diff --git a/gapic-libraries-bom/pom.xml b/gapic-libraries-bom/pom.xml index c5abd69cdb38..07167683ab09 100644 --- a/gapic-libraries-bom/pom.xml +++ b/gapic-libraries-bom/pom.xml @@ -747,6 +747,13 @@ pom import + + com.google.cloud + google-cloud-health-bom + 0.0.1-SNAPSHOT + pom + import + com.google.cloud google-cloud-hypercomputecluster-bom diff --git a/generation_config.yaml b/generation_config.yaml index 2b29a83603eb..3ec49937df20 100644 --- a/generation_config.yaml +++ b/generation_config.yaml @@ -1282,6 +1282,22 @@ libraries: - proto_path: google/apps/script/type/gmail - proto_path: google/apps/script/type/sheets - proto_path: google/apps/script/type/slides +- api_shortname: health + name_pretty: Google Health API + product_documentation: https://developers.google.com/health/api + api_description: The Google Health API lets you view and manage health and fitness + metrics and measurement data. + client_documentation: https://cloud.google.com/java/docs/reference/google-cloud-health/latest/overview + release_level: preview + distribution_name: com.google.cloud:google-cloud-health + api_id: health.googleapis.com + library_type: GAPIC_AUTO + group_id: com.google.cloud + cloud_api: true + GAPICs: + - proto_path: google/devicesandservices/health/v4 + requires_billing: true + rpc_documentation: https://developers.google.com/health/api/reference/rpc - api_shortname: hypercomputecluster name_pretty: Cluster Director API product_documentation: @@ -1660,7 +1676,7 @@ libraries: api_description: The Map Management API is a RESTful service that accepts HTTP requests for map styling data through a variety of methods. It returns formatted configuration data about map styling resources so that you can programmatically manage your - Cloud-based map styles. + Cloud-based map styles. client_documentation: https://cloud.google.com/java/docs/reference/google-maps-mapmanagement/latest/overview release_level: preview diff --git a/java-health/.OwlBot-hermetic.yaml b/java-health/.OwlBot-hermetic.yaml new file mode 100644 index 000000000000..154283fb9b98 --- /dev/null +++ b/java-health/.OwlBot-hermetic.yaml @@ -0,0 +1,35 @@ +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +deep-remove-regex: +- "/java-health/grpc-google-.*/src" +- "/java-health/proto-google-.*/src" +- "/java-health/google-.*/src" +- "/java-health/samples/snippets/generated" + +deep-preserve-regex: +- "/java-health/google-.*/src/test/java/com/google/cloud/.*/v.*/it/IT.*Test.java" + +deep-copy-regex: +- source: "/google/devicesandservices/health/(v.*)/.*-java/proto-google-.*/src" + dest: "/owl-bot-staging/java-health/$1/proto-google-cloud-health-$1/src" +- source: "/google/devicesandservices/health/(v.*)/.*-java/grpc-google-.*/src" + dest: "/owl-bot-staging/java-health/$1/grpc-google-cloud-health-$1/src" +- source: "/google/devicesandservices/health/(v.*)/.*-java/gapic-google-.*/src" + dest: "/owl-bot-staging/java-health/$1/google-cloud-health/src" +- source: "/google/devicesandservices/health/(v.*)/.*-java/samples/snippets/generated" + dest: "/owl-bot-staging/java-health/$1/samples/snippets/generated" + +api-name: health \ No newline at end of file diff --git a/java-health/.repo-metadata.json b/java-health/.repo-metadata.json new file mode 100644 index 000000000000..b23ce3f2ef5b --- /dev/null +++ b/java-health/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_shortname": "health", + "name_pretty": "Google Health API", + "product_documentation": "https://developers.google.com/health/api", + "api_description": "The Google Health API lets you view and manage health and fitness metrics and measurement data.", + "client_documentation": "https://cloud.google.com/java/docs/reference/google-cloud-health/latest/overview", + "release_level": "preview", + "transport": "both", + "language": "java", + "repo": "googleapis/google-cloud-java", + "repo_short": "java-health", + "distribution_name": "com.google.cloud:google-cloud-health", + "api_id": "health.googleapis.com", + "library_type": "GAPIC_AUTO", + "requires_billing": true, + "rpc_documentation": "https://developers.google.com/health/api/reference/rpc" +} \ No newline at end of file diff --git a/java-health/README.md b/java-health/README.md new file mode 100644 index 000000000000..f065e8ff2df2 --- /dev/null +++ b/java-health/README.md @@ -0,0 +1,205 @@ +# Google Google Health API Client for Java + +Java idiomatic client for [Google Health API][product-docs]. + +[![Maven][maven-version-image]][maven-version-link] +![Stability][stability-image] + +- [Product Documentation][product-docs] +- [Client Library Documentation][javadocs] + +> Note: This client is a work-in-progress, and may occasionally +> make backwards-incompatible changes. + + +## Quickstart + + +If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: + +```xml + + + + com.google.cloud + libraries-bom + 26.80.0 + pom + import + + + + + + + com.google.cloud + google-cloud-health + + +``` + +If you are using Maven without the BOM, add this to your dependencies: + + +```xml + + com.google.cloud + google-cloud-health + 0.0.0 + +``` + +If you are using Gradle without BOM, add this to your dependencies: + +```Groovy +implementation 'com.google.cloud:google-cloud-health:0.0.0' +``` + +If you are using SBT, add this to your dependencies: + +```Scala +libraryDependencies += "com.google.cloud" % "google-cloud-health" % "0.0.0" +``` + +## Authentication + +See the [Authentication][authentication] section in the base directory's README. + +## Authorization + +The client application making API calls must be granted [authorization scopes][auth-scopes] required for the desired Google Health API APIs, and the authenticated principal must have the [IAM role(s)][predefined-iam-roles] required to access GCP resources using the Google Health API API calls. + +## Getting Started + +### Prerequisites + +You will need a [Google Cloud Platform Console][developer-console] project with the Google Health API [API enabled][enable-api]. +You will need to [enable billing][enable-billing] to use Google Google Health API. +[Follow these instructions][create-project] to get your project set up. You will also need to set up the local development environment by +[installing the Google Cloud Command Line Interface][cloud-cli] and running the following commands in command line: +`gcloud auth login` and `gcloud config set project [YOUR PROJECT ID]`. + +### Installation and setup + +You'll need to obtain the `google-cloud-health` library. See the [Quickstart](#quickstart) section +to add `google-cloud-health` as a dependency in your code. + +## About Google Health API + + +[Google Health API][product-docs] The Google Health API lets you view and manage health and fitness metrics and measurement data. + +See the [Google Health API client library docs][javadocs] to learn how to +use this Google Health API Client Library. + + + + + + +## Troubleshooting + +To get help, follow the instructions in the [shared Troubleshooting document][troubleshooting]. + +## Transport + +Google Health API uses both gRPC and HTTP/JSON for the transport layer. + +## Supported Java Versions + +Java 8 or above is required for using this client. + +Google's Java client libraries, +[Google Cloud Client Libraries][cloudlibs] +and +[Google Cloud API Libraries][apilibs], +follow the +[Oracle Java SE support roadmap][oracle] +(see the Oracle Java SE Product Releases section). + +### For new development + +In general, new feature development occurs with support for the lowest Java +LTS version covered by Oracle's Premier Support (which typically lasts 5 years +from initial General Availability). If the minimum required JVM for a given +library is changed, it is accompanied by a [semver][semver] major release. + +Java 11 and (in September 2021) Java 17 are the best choices for new +development. + +### Keeping production systems current + +Google tests its client libraries with all current LTS versions covered by +Oracle's Extended Support (which typically lasts 8 years from initial +General Availability). + +#### Legacy support + +Google's client libraries support legacy versions of Java runtimes with long +term stable libraries that don't receive feature updates on a best efforts basis +as it may not be possible to backport all patches. + +Google provides updates on a best efforts basis to apps that continue to use +Java 7, though apps might need to upgrade to current versions of the library +that supports their JVM. + +#### Where to find specific information + +The latest versions and the supported Java versions are identified on +the individual GitHub repository `github.com/GoogleAPIs/java-SERVICENAME` +and on [google-cloud-java][g-c-j]. + +## Versioning + + +This library follows [Semantic Versioning](http://semver.org/). + + +It is currently in major version zero (``0.y.z``), which means that anything may change at any time +and the public API should not be considered stable. + + +## Contributing + + +Contributions to this library are always welcome and highly encouraged. + +See [CONTRIBUTING][contributing] for more information how to get started. + +Please note that this project is released with a Contributor Code of Conduct. By participating in +this project you agree to abide by its terms. See [Code of Conduct][code-of-conduct] for more +information. + + +## License + +Apache 2.0 - See [LICENSE][license] for more information. + +Java is a registered trademark of Oracle and/or its affiliates. + +[product-docs]: https://developers.google.com/health/api +[javadocs]: https://cloud.google.com/java/docs/reference/google-cloud-health/latest/overview +[stability-image]: https://img.shields.io/badge/stability-preview-yellow +[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-health.svg +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-health/0.0.0 +[authentication]: https://github.com/googleapis/google-cloud-java#authentication +[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes +[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles +[iam-policy]: https://cloud.google.com/iam/docs/overview#cloud-iam-policy +[developer-console]: https://console.developers.google.com/ +[create-project]: https://cloud.google.com/resource-manager/docs/creating-managing-projects +[cloud-cli]: https://cloud.google.com/cli +[troubleshooting]: https://github.com/googleapis/google-cloud-java/blob/main/TROUBLESHOOTING.md +[contributing]: https://github.com/googleapis/google-cloud-java/blob/main/CONTRIBUTING.md +[code-of-conduct]: https://github.com/googleapis/google-cloud-java/blob/main/CODE_OF_CONDUCT.md#contributor-code-of-conduct +[license]: https://github.com/googleapis/google-cloud-java/blob/main/LICENSE +[enable-billing]: https://cloud.google.com/apis/docs/getting-started#enabling_billing +[enable-api]: https://console.cloud.google.com/flows/enableapi?apiid=health.googleapis.com +[libraries-bom]: https://github.com/GoogleCloudPlatform/cloud-opensource-java/wiki/The-Google-Cloud-Platform-Libraries-BOM +[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png + +[semver]: https://semver.org/ +[cloudlibs]: https://cloud.google.com/apis/docs/client-libraries-explained +[apilibs]: https://cloud.google.com/apis/docs/client-libraries-explained#google_api_client_libraries +[oracle]: https://www.oracle.com/java/technologies/java-se-support-roadmap.html +[g-c-j]: http://github.com/googleapis/google-cloud-java diff --git a/java-health/google-cloud-health-bom/pom.xml b/java-health/google-cloud-health-bom/pom.xml new file mode 100644 index 000000000000..3f8b44d3f510 --- /dev/null +++ b/java-health/google-cloud-health-bom/pom.xml @@ -0,0 +1,43 @@ + + + 4.0.0 + com.google.cloud + google-cloud-health-bom + 0.0.1-SNAPSHOT + pom + + com.google.cloud + google-cloud-pom-parent + 1.86.0-SNAPSHOT + ../../google-cloud-pom-parent/pom.xml + + + Google Google Health API BOM + + BOM for Google Health API + + + + true + + + + + + com.google.cloud + google-cloud-health + 0.0.1-SNAPSHOT + + + com.google.api.grpc + grpc-google-cloud-health-v4 + 0.0.1-SNAPSHOT + + + com.google.api.grpc + proto-google-cloud-health-v4 + 0.0.1-SNAPSHOT + + + + diff --git a/java-health/google-cloud-health/pom.xml b/java-health/google-cloud-health/pom.xml new file mode 100644 index 000000000000..ba1ddc39a8a2 --- /dev/null +++ b/java-health/google-cloud-health/pom.xml @@ -0,0 +1,115 @@ + + + 4.0.0 + com.google.cloud + google-cloud-health + 0.0.1-SNAPSHOT + jar + Google Google Health API + Google Health API The Google Health API lets you view and manage health and fitness metrics and measurement data. + + com.google.cloud + google-cloud-health-parent + 0.0.1-SNAPSHOT + + + google-cloud-health + + + + io.grpc + grpc-api + + + io.grpc + grpc-stub + + + io.grpc + grpc-protobuf + + + com.google.api + api-common + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + + com.google.api.grpc + proto-google-cloud-health-v4 + + + com.google.guava + guava + + + com.google.api + gax + + + com.google.api + gax-grpc + + + com.google.api + gax-httpjson + + + com.google.api.grpc + proto-google-iam-v1 + + + org.threeten + threetenbp + + + + + com.google.api.grpc + grpc-google-common-protos + test + + + com.google.api.grpc + grpc-google-iam-v1 + test + + + junit + junit + test + + + + com.google.api.grpc + grpc-google-cloud-health-v4 + test + + + + com.google.api + gax + testlib + test + + + com.google.api + gax-grpc + testlib + test + + + com.google.api + gax-httpjson + testlib + test + + + diff --git a/java-health/google-cloud-health/src/main/java/com/google/devicesandservices/health/v4/DataPointsServiceClient.java b/java-health/google-cloud-health/src/main/java/com/google/devicesandservices/health/v4/DataPointsServiceClient.java new file mode 100644 index 000000000000..226b20c471d0 --- /dev/null +++ b/java-health/google-cloud-health/src/main/java/com/google/devicesandservices/health/v4/DataPointsServiceClient.java @@ -0,0 +1,1725 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.httpjson.longrunning.OperationsClient; +import com.google.api.gax.longrunning.OperationFuture; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.devicesandservices.health.v4.stub.DataPointsServiceStub; +import com.google.devicesandservices.health.v4.stub.DataPointsServiceStubSettings; +import com.google.longrunning.Operation; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Data Points Service exposing the user's health and fitness measured and + * derived data. + * + *

This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.create()) {
+ *   DataPointName name = DataPointName.of("[USER]", "[DATA_TYPE]", "[DATA_POINT]");
+ *   DataPoint response = dataPointsServiceClient.getDataPoint(name);
+ * }
+ * }
+ * + *

Note: close() needs to be called on the DataPointsServiceClient object to clean up resources + * such as threads. In the example above, try-with-resources is used, which automatically calls + * close(). + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Methods
MethodDescriptionMethod Variants

GetDataPoint

Get a single identifyable data point.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getDataPoint(GetDataPointRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getDataPoint(DataPointName name) + *

  • getDataPoint(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getDataPointCallable() + *

+ *

ListDataPoints

Query user health and fitness data points.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listDataPoints(ListDataPointsRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listDataPoints(DataTypeName parent) + *

  • listDataPoints(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listDataPointsPagedCallable() + *

  • listDataPointsCallable() + *

+ *

CreateDataPoint

Creates a single identifiable data point.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createDataPointAsync(CreateDataPointRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • createDataPointAsync(DataTypeName parent, DataPoint dataPoint) + *

  • createDataPointAsync(String parent, DataPoint dataPoint) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createDataPointOperationCallable() + *

  • createDataPointCallable() + *

+ *

UpdateDataPoint

Updates a single identifiable data point. If a data point with the specified `name` is not found, the request will fail.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateDataPointAsync(UpdateDataPointRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • updateDataPointAsync(DataPoint dataPoint) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateDataPointOperationCallable() + *

  • updateDataPointCallable() + *

+ *

BatchDeleteDataPoints

Delete a batch of identifyable data points.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • batchDeleteDataPointsAsync(BatchDeleteDataPointsRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • batchDeleteDataPointsOperationCallable() + *

  • batchDeleteDataPointsCallable() + *

+ *

ReconcileDataPoints

Reconcile data points from multiple data sources into a single data stream.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • reconcileDataPoints(ReconcileDataPointsRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • reconcileDataPointsPagedCallable() + *

  • reconcileDataPointsCallable() + *

+ *

RollUpDataPoints

Roll up data points over physical time intervals for supported data types.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • rollUpDataPoints(RollUpDataPointsRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • rollUpDataPointsPagedCallable() + *

  • rollUpDataPointsCallable() + *

+ *

DailyRollUpDataPoints

Roll up data points over civil time intervals for supported data types.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • dailyRollUpDataPoints(DailyRollUpDataPointsRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • dailyRollUpDataPointsCallable() + *

+ *

ExportExerciseTcx

Exports exercise data in TCX format. + *

Note: While the Authorization section below states that any one of the listed scopes is accepted, this specific method requires the user to provide both one of the `activity_and_fitness` scopes (`normal` or `readonly`) AND one of the `location` scopes (`normal` or `readonly`) in their access token to succeed.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • exportExerciseTcx(ExportExerciseTcxRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • exportExerciseTcx(DataPointName name) + *

  • exportExerciseTcx(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • exportExerciseTcxCallable() + *

+ *
+ * + *

See the individual methods for example code. + * + *

Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

This class can be customized by passing in a custom instance of DataPointsServiceSettings to + * create(). For example: + * + *

To customize credentials: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * DataPointsServiceSettings dataPointsServiceSettings =
+ *     DataPointsServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * DataPointsServiceClient dataPointsServiceClient =
+ *     DataPointsServiceClient.create(dataPointsServiceSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * DataPointsServiceSettings dataPointsServiceSettings =
+ *     DataPointsServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * DataPointsServiceClient dataPointsServiceClient =
+ *     DataPointsServiceClient.create(dataPointsServiceSettings);
+ * }
+ * + *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * DataPointsServiceSettings dataPointsServiceSettings =
+ *     DataPointsServiceSettings.newHttpJsonBuilder().build();
+ * DataPointsServiceClient dataPointsServiceClient =
+ *     DataPointsServiceClient.create(dataPointsServiceSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class DataPointsServiceClient implements BackgroundResource { + private final DataPointsServiceSettings settings; + private final DataPointsServiceStub stub; + private final OperationsClient httpJsonOperationsClient; + private final com.google.longrunning.OperationsClient operationsClient; + + /** Constructs an instance of DataPointsServiceClient with default settings. */ + public static final DataPointsServiceClient create() throws IOException { + return create(DataPointsServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of DataPointsServiceClient, using the given settings. The channels are + * created based on the settings passed in, or defaults for any settings that are not set. + */ + public static final DataPointsServiceClient create(DataPointsServiceSettings settings) + throws IOException { + return new DataPointsServiceClient(settings); + } + + /** + * Constructs an instance of DataPointsServiceClient, using the given stub for making calls. This + * is for advanced usage - prefer using create(DataPointsServiceSettings). + */ + public static final DataPointsServiceClient create(DataPointsServiceStub stub) { + return new DataPointsServiceClient(stub); + } + + /** + * Constructs an instance of DataPointsServiceClient, using the given settings. This is protected + * so that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected DataPointsServiceClient(DataPointsServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((DataPointsServiceStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + protected DataPointsServiceClient(DataPointsServiceStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + public final DataPointsServiceSettings getSettings() { + return settings; + } + + public DataPointsServiceStub getStub() { + return stub; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + public final com.google.longrunning.OperationsClient getOperationsClient() { + return operationsClient; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + @BetaApi + public final OperationsClient getHttpJsonOperationsClient() { + return httpJsonOperationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get a single identifyable data point. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.create()) {
+   *   DataPointName name = DataPointName.of("[USER]", "[DATA_TYPE]", "[DATA_POINT]");
+   *   DataPoint response = dataPointsServiceClient.getDataPoint(name);
+   * }
+   * }
+ * + * @param name Required. The name of the data point to retrieve. + *

Format: `users/{user}/dataTypes/{data_type}/dataPoints/{data_point}` + *

See [DataPoint.name][google.devicesandservices.health.v4.DataPoint.name] for examples + * and possible values. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DataPoint getDataPoint(DataPointName name) { + GetDataPointRequest request = + GetDataPointRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getDataPoint(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get a single identifyable data point. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.create()) {
+   *   String name = DataPointName.of("[USER]", "[DATA_TYPE]", "[DATA_POINT]").toString();
+   *   DataPoint response = dataPointsServiceClient.getDataPoint(name);
+   * }
+   * }
+ * + * @param name Required. The name of the data point to retrieve. + *

Format: `users/{user}/dataTypes/{data_type}/dataPoints/{data_point}` + *

See [DataPoint.name][google.devicesandservices.health.v4.DataPoint.name] for examples + * and possible values. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DataPoint getDataPoint(String name) { + GetDataPointRequest request = GetDataPointRequest.newBuilder().setName(name).build(); + return getDataPoint(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get a single identifyable data point. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.create()) {
+   *   GetDataPointRequest request =
+   *       GetDataPointRequest.newBuilder()
+   *           .setName(DataPointName.of("[USER]", "[DATA_TYPE]", "[DATA_POINT]").toString())
+   *           .build();
+   *   DataPoint response = dataPointsServiceClient.getDataPoint(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DataPoint getDataPoint(GetDataPointRequest request) { + return getDataPointCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get a single identifyable data point. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.create()) {
+   *   GetDataPointRequest request =
+   *       GetDataPointRequest.newBuilder()
+   *           .setName(DataPointName.of("[USER]", "[DATA_TYPE]", "[DATA_POINT]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       dataPointsServiceClient.getDataPointCallable().futureCall(request);
+   *   // Do something.
+   *   DataPoint response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getDataPointCallable() { + return stub.getDataPointCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Query user health and fitness data points. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.create()) {
+   *   DataTypeName parent = DataTypeName.of("[USER]", "[DATA_TYPE]");
+   *   for (DataPoint element : dataPointsServiceClient.listDataPoints(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent data type of the Data Point collection. + *

Format: `users/me/dataTypes/{data_type}`, e.g.: + *

- `users/me/dataTypes/steps` - `users/me/dataTypes/weight` + *

For a list of the supported data types see the [DataPoint + * data][google.devicesandservices.health.v4.DataPoint] union field. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListDataPointsPagedResponse listDataPoints(DataTypeName parent) { + ListDataPointsRequest request = + ListDataPointsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listDataPoints(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Query user health and fitness data points. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.create()) {
+   *   String parent = DataTypeName.of("[USER]", "[DATA_TYPE]").toString();
+   *   for (DataPoint element : dataPointsServiceClient.listDataPoints(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent data type of the Data Point collection. + *

Format: `users/me/dataTypes/{data_type}`, e.g.: + *

- `users/me/dataTypes/steps` - `users/me/dataTypes/weight` + *

For a list of the supported data types see the [DataPoint + * data][google.devicesandservices.health.v4.DataPoint] union field. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListDataPointsPagedResponse listDataPoints(String parent) { + ListDataPointsRequest request = ListDataPointsRequest.newBuilder().setParent(parent).build(); + return listDataPoints(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Query user health and fitness data points. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.create()) {
+   *   ListDataPointsRequest request =
+   *       ListDataPointsRequest.newBuilder()
+   *           .setParent(DataTypeName.of("[USER]", "[DATA_TYPE]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   for (DataPoint element : dataPointsServiceClient.listDataPoints(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListDataPointsPagedResponse listDataPoints(ListDataPointsRequest request) { + return listDataPointsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Query user health and fitness data points. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.create()) {
+   *   ListDataPointsRequest request =
+   *       ListDataPointsRequest.newBuilder()
+   *           .setParent(DataTypeName.of("[USER]", "[DATA_TYPE]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   ApiFuture future =
+   *       dataPointsServiceClient.listDataPointsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (DataPoint element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listDataPointsPagedCallable() { + return stub.listDataPointsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Query user health and fitness data points. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.create()) {
+   *   ListDataPointsRequest request =
+   *       ListDataPointsRequest.newBuilder()
+   *           .setParent(DataTypeName.of("[USER]", "[DATA_TYPE]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   while (true) {
+   *     ListDataPointsResponse response =
+   *         dataPointsServiceClient.listDataPointsCallable().call(request);
+   *     for (DataPoint element : response.getDataPointsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listDataPointsCallable() { + return stub.listDataPointsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a single identifiable data point. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.create()) {
+   *   DataTypeName parent = DataTypeName.of("[USER]", "[DATA_TYPE]");
+   *   DataPoint dataPoint = DataPoint.newBuilder().build();
+   *   DataPoint response = dataPointsServiceClient.createDataPointAsync(parent, dataPoint).get();
+   * }
+   * }
+ * + * @param parent Required. The parent resource name where the data point will be created. Format: + * `users/{user}/dataTypes/{data_type}` + * @param dataPoint Required. The data point to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createDataPointAsync( + DataTypeName parent, DataPoint dataPoint) { + CreateDataPointRequest request = + CreateDataPointRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setDataPoint(dataPoint) + .build(); + return createDataPointAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a single identifiable data point. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.create()) {
+   *   String parent = DataTypeName.of("[USER]", "[DATA_TYPE]").toString();
+   *   DataPoint dataPoint = DataPoint.newBuilder().build();
+   *   DataPoint response = dataPointsServiceClient.createDataPointAsync(parent, dataPoint).get();
+   * }
+   * }
+ * + * @param parent Required. The parent resource name where the data point will be created. Format: + * `users/{user}/dataTypes/{data_type}` + * @param dataPoint Required. The data point to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createDataPointAsync( + String parent, DataPoint dataPoint) { + CreateDataPointRequest request = + CreateDataPointRequest.newBuilder().setParent(parent).setDataPoint(dataPoint).build(); + return createDataPointAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a single identifiable data point. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.create()) {
+   *   CreateDataPointRequest request =
+   *       CreateDataPointRequest.newBuilder()
+   *           .setParent(DataTypeName.of("[USER]", "[DATA_TYPE]").toString())
+   *           .setDataPoint(DataPoint.newBuilder().build())
+   *           .build();
+   *   DataPoint response = dataPointsServiceClient.createDataPointAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createDataPointAsync( + CreateDataPointRequest request) { + return createDataPointOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a single identifiable data point. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.create()) {
+   *   CreateDataPointRequest request =
+   *       CreateDataPointRequest.newBuilder()
+   *           .setParent(DataTypeName.of("[USER]", "[DATA_TYPE]").toString())
+   *           .setDataPoint(DataPoint.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       dataPointsServiceClient.createDataPointOperationCallable().futureCall(request);
+   *   // Do something.
+   *   DataPoint response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + CreateDataPointRequest, DataPoint, CreateDataPointOperationMetadata> + createDataPointOperationCallable() { + return stub.createDataPointOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a single identifiable data point. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.create()) {
+   *   CreateDataPointRequest request =
+   *       CreateDataPointRequest.newBuilder()
+   *           .setParent(DataTypeName.of("[USER]", "[DATA_TYPE]").toString())
+   *           .setDataPoint(DataPoint.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       dataPointsServiceClient.createDataPointCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createDataPointCallable() { + return stub.createDataPointCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a single identifiable data point. If a data point with the specified `name` is not + * found, the request will fail. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.create()) {
+   *   DataPoint dataPoint = DataPoint.newBuilder().build();
+   *   DataPoint response = dataPointsServiceClient.updateDataPointAsync(dataPoint).get();
+   * }
+   * }
+ * + * @param dataPoint Required. The data point to update + *

The data point's `name` field is used to identify the data point to update. + *

Format: `users/{user}/dataTypes/{data_type}/dataPoints/{data_point}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateDataPointAsync( + DataPoint dataPoint) { + UpdateDataPointRequest request = + UpdateDataPointRequest.newBuilder().setDataPoint(dataPoint).build(); + return updateDataPointAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a single identifiable data point. If a data point with the specified `name` is not + * found, the request will fail. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.create()) {
+   *   UpdateDataPointRequest request =
+   *       UpdateDataPointRequest.newBuilder().setDataPoint(DataPoint.newBuilder().build()).build();
+   *   DataPoint response = dataPointsServiceClient.updateDataPointAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateDataPointAsync( + UpdateDataPointRequest request) { + return updateDataPointOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a single identifiable data point. If a data point with the specified `name` is not + * found, the request will fail. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.create()) {
+   *   UpdateDataPointRequest request =
+   *       UpdateDataPointRequest.newBuilder().setDataPoint(DataPoint.newBuilder().build()).build();
+   *   OperationFuture future =
+   *       dataPointsServiceClient.updateDataPointOperationCallable().futureCall(request);
+   *   // Do something.
+   *   DataPoint response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + UpdateDataPointRequest, DataPoint, UpdateDataPointOperationMetadata> + updateDataPointOperationCallable() { + return stub.updateDataPointOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a single identifiable data point. If a data point with the specified `name` is not + * found, the request will fail. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.create()) {
+   *   UpdateDataPointRequest request =
+   *       UpdateDataPointRequest.newBuilder().setDataPoint(DataPoint.newBuilder().build()).build();
+   *   ApiFuture future =
+   *       dataPointsServiceClient.updateDataPointCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateDataPointCallable() { + return stub.updateDataPointCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Delete a batch of identifyable data points. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.create()) {
+   *   BatchDeleteDataPointsRequest request =
+   *       BatchDeleteDataPointsRequest.newBuilder()
+   *           .setParent(DataTypeName.of("[USER]", "[DATA_TYPE]").toString())
+   *           .addAllNames(new ArrayList())
+   *           .build();
+   *   BatchDeleteDataPointsResponse response =
+   *       dataPointsServiceClient.batchDeleteDataPointsAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture< + BatchDeleteDataPointsResponse, BatchDeleteDataPointsOperationMetadata> + batchDeleteDataPointsAsync(BatchDeleteDataPointsRequest request) { + return batchDeleteDataPointsOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Delete a batch of identifyable data points. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.create()) {
+   *   BatchDeleteDataPointsRequest request =
+   *       BatchDeleteDataPointsRequest.newBuilder()
+   *           .setParent(DataTypeName.of("[USER]", "[DATA_TYPE]").toString())
+   *           .addAllNames(new ArrayList())
+   *           .build();
+   *   OperationFuture
+   *       future =
+   *           dataPointsServiceClient.batchDeleteDataPointsOperationCallable().futureCall(request);
+   *   // Do something.
+   *   BatchDeleteDataPointsResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + BatchDeleteDataPointsRequest, + BatchDeleteDataPointsResponse, + BatchDeleteDataPointsOperationMetadata> + batchDeleteDataPointsOperationCallable() { + return stub.batchDeleteDataPointsOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Delete a batch of identifyable data points. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.create()) {
+   *   BatchDeleteDataPointsRequest request =
+   *       BatchDeleteDataPointsRequest.newBuilder()
+   *           .setParent(DataTypeName.of("[USER]", "[DATA_TYPE]").toString())
+   *           .addAllNames(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       dataPointsServiceClient.batchDeleteDataPointsCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + batchDeleteDataPointsCallable() { + return stub.batchDeleteDataPointsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Reconcile data points from multiple data sources into a single data stream. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.create()) {
+   *   ReconcileDataPointsRequest request =
+   *       ReconcileDataPointsRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setDataSourceFamily("dataSourceFamily586548265")
+   *           .build();
+   *   for (ReconciledDataPoint element :
+   *       dataPointsServiceClient.reconcileDataPoints(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ReconcileDataPointsPagedResponse reconcileDataPoints( + ReconcileDataPointsRequest request) { + return reconcileDataPointsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Reconcile data points from multiple data sources into a single data stream. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.create()) {
+   *   ReconcileDataPointsRequest request =
+   *       ReconcileDataPointsRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setDataSourceFamily("dataSourceFamily586548265")
+   *           .build();
+   *   ApiFuture future =
+   *       dataPointsServiceClient.reconcileDataPointsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (ReconciledDataPoint element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + reconcileDataPointsPagedCallable() { + return stub.reconcileDataPointsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Reconcile data points from multiple data sources into a single data stream. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.create()) {
+   *   ReconcileDataPointsRequest request =
+   *       ReconcileDataPointsRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setDataSourceFamily("dataSourceFamily586548265")
+   *           .build();
+   *   while (true) {
+   *     ReconcileDataPointsResponse response =
+   *         dataPointsServiceClient.reconcileDataPointsCallable().call(request);
+   *     for (ReconciledDataPoint element : response.getDataPointsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + reconcileDataPointsCallable() { + return stub.reconcileDataPointsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Roll up data points over physical time intervals for supported data types. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.create()) {
+   *   RollUpDataPointsRequest request =
+   *       RollUpDataPointsRequest.newBuilder()
+   *           .setParent(DataTypeName.of("[USER]", "[DATA_TYPE]").toString())
+   *           .setRange(Interval.newBuilder().build())
+   *           .setWindowSize(Duration.newBuilder().build())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setDataSourceFamily("dataSourceFamily586548265")
+   *           .build();
+   *   for (RollupDataPoint element :
+   *       dataPointsServiceClient.rollUpDataPoints(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final RollUpDataPointsPagedResponse rollUpDataPoints(RollUpDataPointsRequest request) { + return rollUpDataPointsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Roll up data points over physical time intervals for supported data types. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.create()) {
+   *   RollUpDataPointsRequest request =
+   *       RollUpDataPointsRequest.newBuilder()
+   *           .setParent(DataTypeName.of("[USER]", "[DATA_TYPE]").toString())
+   *           .setRange(Interval.newBuilder().build())
+   *           .setWindowSize(Duration.newBuilder().build())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setDataSourceFamily("dataSourceFamily586548265")
+   *           .build();
+   *   ApiFuture future =
+   *       dataPointsServiceClient.rollUpDataPointsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (RollupDataPoint element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + rollUpDataPointsPagedCallable() { + return stub.rollUpDataPointsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Roll up data points over physical time intervals for supported data types. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.create()) {
+   *   RollUpDataPointsRequest request =
+   *       RollUpDataPointsRequest.newBuilder()
+   *           .setParent(DataTypeName.of("[USER]", "[DATA_TYPE]").toString())
+   *           .setRange(Interval.newBuilder().build())
+   *           .setWindowSize(Duration.newBuilder().build())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setDataSourceFamily("dataSourceFamily586548265")
+   *           .build();
+   *   while (true) {
+   *     RollUpDataPointsResponse response =
+   *         dataPointsServiceClient.rollUpDataPointsCallable().call(request);
+   *     for (RollupDataPoint element : response.getRollupDataPointsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + rollUpDataPointsCallable() { + return stub.rollUpDataPointsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Roll up data points over civil time intervals for supported data types. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.create()) {
+   *   DailyRollUpDataPointsRequest request =
+   *       DailyRollUpDataPointsRequest.newBuilder()
+   *           .setParent(DataTypeName.of("[USER]", "[DATA_TYPE]").toString())
+   *           .setRange(CivilTimeInterval.newBuilder().build())
+   *           .setWindowSizeDays(1064520774)
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setDataSourceFamily("dataSourceFamily586548265")
+   *           .build();
+   *   DailyRollUpDataPointsResponse response =
+   *       dataPointsServiceClient.dailyRollUpDataPoints(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DailyRollUpDataPointsResponse dailyRollUpDataPoints( + DailyRollUpDataPointsRequest request) { + return dailyRollUpDataPointsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Roll up data points over civil time intervals for supported data types. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.create()) {
+   *   DailyRollUpDataPointsRequest request =
+   *       DailyRollUpDataPointsRequest.newBuilder()
+   *           .setParent(DataTypeName.of("[USER]", "[DATA_TYPE]").toString())
+   *           .setRange(CivilTimeInterval.newBuilder().build())
+   *           .setWindowSizeDays(1064520774)
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setDataSourceFamily("dataSourceFamily586548265")
+   *           .build();
+   *   ApiFuture future =
+   *       dataPointsServiceClient.dailyRollUpDataPointsCallable().futureCall(request);
+   *   // Do something.
+   *   DailyRollUpDataPointsResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + dailyRollUpDataPointsCallable() { + return stub.dailyRollUpDataPointsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Exports exercise data in TCX format. + * + *

Note: While the Authorization section below states that any one of the listed scopes is + * accepted, this specific method requires the user to provide both one of the + * `activity_and_fitness` scopes (`normal` or `readonly`) AND one of the `location` scopes + * (`normal` or `readonly`) in their access token to succeed. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.create()) {
+   *   DataPointName name = DataPointName.of("[USER]", "[DATA_TYPE]", "[DATA_POINT]");
+   *   ExportExerciseTcxResponse response = dataPointsServiceClient.exportExerciseTcx(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of the exercise data point to export. + *

Format: `users/{user}/dataTypes/exercise/dataPoints/{data_point}` Example: + * `users/me/dataTypes/exercise/dataPoints/2026443605080188808` + *

The `{user}` is the alias `"me"` currently. Future versions may support user IDs. The + * `{data_point}` ID maps to the exercise ID, which is a long integer. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ExportExerciseTcxResponse exportExerciseTcx(DataPointName name) { + ExportExerciseTcxRequest request = + ExportExerciseTcxRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return exportExerciseTcx(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Exports exercise data in TCX format. + * + *

Note: While the Authorization section below states that any one of the listed scopes is + * accepted, this specific method requires the user to provide both one of the + * `activity_and_fitness` scopes (`normal` or `readonly`) AND one of the `location` scopes + * (`normal` or `readonly`) in their access token to succeed. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.create()) {
+   *   String name = DataPointName.of("[USER]", "[DATA_TYPE]", "[DATA_POINT]").toString();
+   *   ExportExerciseTcxResponse response = dataPointsServiceClient.exportExerciseTcx(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of the exercise data point to export. + *

Format: `users/{user}/dataTypes/exercise/dataPoints/{data_point}` Example: + * `users/me/dataTypes/exercise/dataPoints/2026443605080188808` + *

The `{user}` is the alias `"me"` currently. Future versions may support user IDs. The + * `{data_point}` ID maps to the exercise ID, which is a long integer. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ExportExerciseTcxResponse exportExerciseTcx(String name) { + ExportExerciseTcxRequest request = ExportExerciseTcxRequest.newBuilder().setName(name).build(); + return exportExerciseTcx(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Exports exercise data in TCX format. + * + *

Note: While the Authorization section below states that any one of the listed scopes is + * accepted, this specific method requires the user to provide both one of the + * `activity_and_fitness` scopes (`normal` or `readonly`) AND one of the `location` scopes + * (`normal` or `readonly`) in their access token to succeed. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.create()) {
+   *   ExportExerciseTcxRequest request =
+   *       ExportExerciseTcxRequest.newBuilder()
+   *           .setName(DataPointName.of("[USER]", "[DATA_TYPE]", "[DATA_POINT]").toString())
+   *           .setPartialData(true)
+   *           .build();
+   *   ExportExerciseTcxResponse response = dataPointsServiceClient.exportExerciseTcx(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ExportExerciseTcxResponse exportExerciseTcx(ExportExerciseTcxRequest request) { + return exportExerciseTcxCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Exports exercise data in TCX format. + * + *

Note: While the Authorization section below states that any one of the listed scopes is + * accepted, this specific method requires the user to provide both one of the + * `activity_and_fitness` scopes (`normal` or `readonly`) AND one of the `location` scopes + * (`normal` or `readonly`) in their access token to succeed. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.create()) {
+   *   ExportExerciseTcxRequest request =
+   *       ExportExerciseTcxRequest.newBuilder()
+   *           .setName(DataPointName.of("[USER]", "[DATA_TYPE]", "[DATA_POINT]").toString())
+   *           .setPartialData(true)
+   *           .build();
+   *   ApiFuture future =
+   *       dataPointsServiceClient.exportExerciseTcxCallable().futureCall(request);
+   *   // Do something.
+   *   ExportExerciseTcxResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + exportExerciseTcxCallable() { + return stub.exportExerciseTcxCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListDataPointsPagedResponse + extends AbstractPagedListResponse< + ListDataPointsRequest, + ListDataPointsResponse, + DataPoint, + ListDataPointsPage, + ListDataPointsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListDataPointsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListDataPointsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListDataPointsPagedResponse(ListDataPointsPage page) { + super(page, ListDataPointsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListDataPointsPage + extends AbstractPage< + ListDataPointsRequest, ListDataPointsResponse, DataPoint, ListDataPointsPage> { + + private ListDataPointsPage( + PageContext context, + ListDataPointsResponse response) { + super(context, response); + } + + private static ListDataPointsPage createEmptyPage() { + return new ListDataPointsPage(null, null); + } + + @Override + protected ListDataPointsPage createPage( + PageContext context, + ListDataPointsResponse response) { + return new ListDataPointsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListDataPointsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListDataPointsRequest, + ListDataPointsResponse, + DataPoint, + ListDataPointsPage, + ListDataPointsFixedSizeCollection> { + + private ListDataPointsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListDataPointsFixedSizeCollection createEmptyCollection() { + return new ListDataPointsFixedSizeCollection(null, 0); + } + + @Override + protected ListDataPointsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListDataPointsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ReconcileDataPointsPagedResponse + extends AbstractPagedListResponse< + ReconcileDataPointsRequest, + ReconcileDataPointsResponse, + ReconciledDataPoint, + ReconcileDataPointsPage, + ReconcileDataPointsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ReconcileDataPointsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ReconcileDataPointsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ReconcileDataPointsPagedResponse(ReconcileDataPointsPage page) { + super(page, ReconcileDataPointsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ReconcileDataPointsPage + extends AbstractPage< + ReconcileDataPointsRequest, + ReconcileDataPointsResponse, + ReconciledDataPoint, + ReconcileDataPointsPage> { + + private ReconcileDataPointsPage( + PageContext + context, + ReconcileDataPointsResponse response) { + super(context, response); + } + + private static ReconcileDataPointsPage createEmptyPage() { + return new ReconcileDataPointsPage(null, null); + } + + @Override + protected ReconcileDataPointsPage createPage( + PageContext + context, + ReconcileDataPointsResponse response) { + return new ReconcileDataPointsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ReconcileDataPointsFixedSizeCollection + extends AbstractFixedSizeCollection< + ReconcileDataPointsRequest, + ReconcileDataPointsResponse, + ReconciledDataPoint, + ReconcileDataPointsPage, + ReconcileDataPointsFixedSizeCollection> { + + private ReconcileDataPointsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ReconcileDataPointsFixedSizeCollection createEmptyCollection() { + return new ReconcileDataPointsFixedSizeCollection(null, 0); + } + + @Override + protected ReconcileDataPointsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ReconcileDataPointsFixedSizeCollection(pages, collectionSize); + } + } + + public static class RollUpDataPointsPagedResponse + extends AbstractPagedListResponse< + RollUpDataPointsRequest, + RollUpDataPointsResponse, + RollupDataPoint, + RollUpDataPointsPage, + RollUpDataPointsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + RollUpDataPointsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new RollUpDataPointsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private RollUpDataPointsPagedResponse(RollUpDataPointsPage page) { + super(page, RollUpDataPointsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class RollUpDataPointsPage + extends AbstractPage< + RollUpDataPointsRequest, + RollUpDataPointsResponse, + RollupDataPoint, + RollUpDataPointsPage> { + + private RollUpDataPointsPage( + PageContext context, + RollUpDataPointsResponse response) { + super(context, response); + } + + private static RollUpDataPointsPage createEmptyPage() { + return new RollUpDataPointsPage(null, null); + } + + @Override + protected RollUpDataPointsPage createPage( + PageContext context, + RollUpDataPointsResponse response) { + return new RollUpDataPointsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class RollUpDataPointsFixedSizeCollection + extends AbstractFixedSizeCollection< + RollUpDataPointsRequest, + RollUpDataPointsResponse, + RollupDataPoint, + RollUpDataPointsPage, + RollUpDataPointsFixedSizeCollection> { + + private RollUpDataPointsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static RollUpDataPointsFixedSizeCollection createEmptyCollection() { + return new RollUpDataPointsFixedSizeCollection(null, 0); + } + + @Override + protected RollUpDataPointsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new RollUpDataPointsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/java-health/google-cloud-health/src/main/java/com/google/devicesandservices/health/v4/DataPointsServiceSettings.java b/java-health/google-cloud-health/src/main/java/com/google/devicesandservices/health/v4/DataPointsServiceSettings.java new file mode 100644 index 000000000000..3a64fc7585fe --- /dev/null +++ b/java-health/google-cloud-health/src/main/java/com/google/devicesandservices/health/v4/DataPointsServiceSettings.java @@ -0,0 +1,393 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4; + +import static com.google.devicesandservices.health.v4.DataPointsServiceClient.ListDataPointsPagedResponse; +import static com.google.devicesandservices.health.v4.DataPointsServiceClient.ReconcileDataPointsPagedResponse; +import static com.google.devicesandservices.health.v4.DataPointsServiceClient.RollUpDataPointsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.devicesandservices.health.v4.stub.DataPointsServiceStubSettings; +import com.google.longrunning.Operation; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link DataPointsServiceClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (health.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the + * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) + * of getDataPoint: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * DataPointsServiceSettings.Builder dataPointsServiceSettingsBuilder =
+ *     DataPointsServiceSettings.newBuilder();
+ * dataPointsServiceSettingsBuilder
+ *     .getDataPointSettings()
+ *     .setRetrySettings(
+ *         dataPointsServiceSettingsBuilder
+ *             .getDataPointSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ *             .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ *             .setMaxAttempts(5)
+ *             .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ *             .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ *             .setRetryDelayMultiplier(1.3)
+ *             .setRpcTimeoutMultiplier(1.5)
+ *             .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ *             .build());
+ * DataPointsServiceSettings dataPointsServiceSettings = dataPointsServiceSettingsBuilder.build();
+ * }
+ * + * Please refer to the [Client Side Retry + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. + * + *

To configure the RetrySettings of a Long Running Operation method, create an + * OperationTimedPollAlgorithm object and update the RPC's polling algorithm. For example, to + * configure the RetrySettings for createDataPoint: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * DataPointsServiceSettings.Builder dataPointsServiceSettingsBuilder =
+ *     DataPointsServiceSettings.newBuilder();
+ * TimedRetryAlgorithm timedRetryAlgorithm =
+ *     OperationalTimedPollAlgorithm.create(
+ *         RetrySettings.newBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofMillis(500))
+ *             .setRetryDelayMultiplier(1.5)
+ *             .setMaxRetryDelayDuration(Duration.ofMillis(5000))
+ *             .setTotalTimeoutDuration(Duration.ofHours(24))
+ *             .build());
+ * dataPointsServiceSettingsBuilder
+ *     .createClusterOperationSettings()
+ *     .setPollingAlgorithm(timedRetryAlgorithm)
+ *     .build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class DataPointsServiceSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to getDataPoint. */ + public UnaryCallSettings getDataPointSettings() { + return ((DataPointsServiceStubSettings) getStubSettings()).getDataPointSettings(); + } + + /** Returns the object with the settings used for calls to listDataPoints. */ + public PagedCallSettings< + ListDataPointsRequest, ListDataPointsResponse, ListDataPointsPagedResponse> + listDataPointsSettings() { + return ((DataPointsServiceStubSettings) getStubSettings()).listDataPointsSettings(); + } + + /** Returns the object with the settings used for calls to createDataPoint. */ + public UnaryCallSettings createDataPointSettings() { + return ((DataPointsServiceStubSettings) getStubSettings()).createDataPointSettings(); + } + + /** Returns the object with the settings used for calls to createDataPoint. */ + public OperationCallSettings + createDataPointOperationSettings() { + return ((DataPointsServiceStubSettings) getStubSettings()).createDataPointOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateDataPoint. */ + public UnaryCallSettings updateDataPointSettings() { + return ((DataPointsServiceStubSettings) getStubSettings()).updateDataPointSettings(); + } + + /** Returns the object with the settings used for calls to updateDataPoint. */ + public OperationCallSettings + updateDataPointOperationSettings() { + return ((DataPointsServiceStubSettings) getStubSettings()).updateDataPointOperationSettings(); + } + + /** Returns the object with the settings used for calls to batchDeleteDataPoints. */ + public UnaryCallSettings + batchDeleteDataPointsSettings() { + return ((DataPointsServiceStubSettings) getStubSettings()).batchDeleteDataPointsSettings(); + } + + /** Returns the object with the settings used for calls to batchDeleteDataPoints. */ + public OperationCallSettings< + BatchDeleteDataPointsRequest, + BatchDeleteDataPointsResponse, + BatchDeleteDataPointsOperationMetadata> + batchDeleteDataPointsOperationSettings() { + return ((DataPointsServiceStubSettings) getStubSettings()) + .batchDeleteDataPointsOperationSettings(); + } + + /** Returns the object with the settings used for calls to reconcileDataPoints. */ + public PagedCallSettings< + ReconcileDataPointsRequest, ReconcileDataPointsResponse, ReconcileDataPointsPagedResponse> + reconcileDataPointsSettings() { + return ((DataPointsServiceStubSettings) getStubSettings()).reconcileDataPointsSettings(); + } + + /** Returns the object with the settings used for calls to rollUpDataPoints. */ + public PagedCallSettings< + RollUpDataPointsRequest, RollUpDataPointsResponse, RollUpDataPointsPagedResponse> + rollUpDataPointsSettings() { + return ((DataPointsServiceStubSettings) getStubSettings()).rollUpDataPointsSettings(); + } + + /** Returns the object with the settings used for calls to dailyRollUpDataPoints. */ + public UnaryCallSettings + dailyRollUpDataPointsSettings() { + return ((DataPointsServiceStubSettings) getStubSettings()).dailyRollUpDataPointsSettings(); + } + + /** Returns the object with the settings used for calls to exportExerciseTcx. */ + public UnaryCallSettings + exportExerciseTcxSettings() { + return ((DataPointsServiceStubSettings) getStubSettings()).exportExerciseTcxSettings(); + } + + public static final DataPointsServiceSettings create(DataPointsServiceStubSettings stub) + throws IOException { + return new DataPointsServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return DataPointsServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return DataPointsServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DataPointsServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return DataPointsServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return DataPointsServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return DataPointsServiceStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return DataPointsServiceStubSettings.defaultTransportChannelProvider(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return DataPointsServiceStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected DataPointsServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for DataPointsServiceSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(DataPointsServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(DataPointsServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(DataPointsServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(DataPointsServiceStubSettings.newBuilder()); + } + + private static Builder createHttpJsonDefault() { + return new Builder(DataPointsServiceStubSettings.newHttpJsonBuilder()); + } + + public DataPointsServiceStubSettings.Builder getStubSettingsBuilder() { + return ((DataPointsServiceStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to getDataPoint. */ + public UnaryCallSettings.Builder getDataPointSettings() { + return getStubSettingsBuilder().getDataPointSettings(); + } + + /** Returns the builder for the settings used for calls to listDataPoints. */ + public PagedCallSettings.Builder< + ListDataPointsRequest, ListDataPointsResponse, ListDataPointsPagedResponse> + listDataPointsSettings() { + return getStubSettingsBuilder().listDataPointsSettings(); + } + + /** Returns the builder for the settings used for calls to createDataPoint. */ + public UnaryCallSettings.Builder createDataPointSettings() { + return getStubSettingsBuilder().createDataPointSettings(); + } + + /** Returns the builder for the settings used for calls to createDataPoint. */ + public OperationCallSettings.Builder< + CreateDataPointRequest, DataPoint, CreateDataPointOperationMetadata> + createDataPointOperationSettings() { + return getStubSettingsBuilder().createDataPointOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateDataPoint. */ + public UnaryCallSettings.Builder updateDataPointSettings() { + return getStubSettingsBuilder().updateDataPointSettings(); + } + + /** Returns the builder for the settings used for calls to updateDataPoint. */ + public OperationCallSettings.Builder< + UpdateDataPointRequest, DataPoint, UpdateDataPointOperationMetadata> + updateDataPointOperationSettings() { + return getStubSettingsBuilder().updateDataPointOperationSettings(); + } + + /** Returns the builder for the settings used for calls to batchDeleteDataPoints. */ + public UnaryCallSettings.Builder + batchDeleteDataPointsSettings() { + return getStubSettingsBuilder().batchDeleteDataPointsSettings(); + } + + /** Returns the builder for the settings used for calls to batchDeleteDataPoints. */ + public OperationCallSettings.Builder< + BatchDeleteDataPointsRequest, + BatchDeleteDataPointsResponse, + BatchDeleteDataPointsOperationMetadata> + batchDeleteDataPointsOperationSettings() { + return getStubSettingsBuilder().batchDeleteDataPointsOperationSettings(); + } + + /** Returns the builder for the settings used for calls to reconcileDataPoints. */ + public PagedCallSettings.Builder< + ReconcileDataPointsRequest, + ReconcileDataPointsResponse, + ReconcileDataPointsPagedResponse> + reconcileDataPointsSettings() { + return getStubSettingsBuilder().reconcileDataPointsSettings(); + } + + /** Returns the builder for the settings used for calls to rollUpDataPoints. */ + public PagedCallSettings.Builder< + RollUpDataPointsRequest, RollUpDataPointsResponse, RollUpDataPointsPagedResponse> + rollUpDataPointsSettings() { + return getStubSettingsBuilder().rollUpDataPointsSettings(); + } + + /** Returns the builder for the settings used for calls to dailyRollUpDataPoints. */ + public UnaryCallSettings.Builder + dailyRollUpDataPointsSettings() { + return getStubSettingsBuilder().dailyRollUpDataPointsSettings(); + } + + /** Returns the builder for the settings used for calls to exportExerciseTcx. */ + public UnaryCallSettings.Builder + exportExerciseTcxSettings() { + return getStubSettingsBuilder().exportExerciseTcxSettings(); + } + + @Override + public DataPointsServiceSettings build() throws IOException { + return new DataPointsServiceSettings(this); + } + } +} diff --git a/java-health/google-cloud-health/src/main/java/com/google/devicesandservices/health/v4/HealthProfileServiceClient.java b/java-health/google-cloud-health/src/main/java/com/google/devicesandservices/health/v4/HealthProfileServiceClient.java new file mode 100644 index 000000000000..fff56a08490e --- /dev/null +++ b/java-health/google-cloud-health/src/main/java/com/google/devicesandservices/health/v4/HealthProfileServiceClient.java @@ -0,0 +1,809 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.devicesandservices.health.v4.stub.HealthProfileServiceStub; +import com.google.devicesandservices.health.v4.stub.HealthProfileServiceStubSettings; +import com.google.protobuf.FieldMask; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Health Profile Service + * + *

This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (HealthProfileServiceClient healthProfileServiceClient =
+ *     HealthProfileServiceClient.create()) {
+ *   ProfileName name = ProfileName.of("[USER]");
+ *   Profile response = healthProfileServiceClient.getProfile(name);
+ * }
+ * }
+ * + *

Note: close() needs to be called on the HealthProfileServiceClient object to clean up + * resources such as threads. In the example above, try-with-resources is used, which automatically + * calls close(). + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Methods
MethodDescriptionMethod Variants

GetProfile

Returns user Profile details.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getProfile(GetProfileRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getProfile(ProfileName name) + *

  • getProfile(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getProfileCallable() + *

+ *

UpdateProfile

Updates the user's profile details.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateProfile(UpdateProfileRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • updateProfile(Profile profile, FieldMask updateMask) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateProfileCallable() + *

+ *

GetSettings

Returns user settings details.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getSettings(GetSettingsRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getSettings(SettingsName name) + *

  • getSettings(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getSettingsCallable() + *

+ *

UpdateSettings

Updates the user's settings details.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateSettings(UpdateSettingsRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • updateSettings(Settings settings, FieldMask updateMask) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateSettingsCallable() + *

+ *

GetIdentity

Gets the user's identity. + *

It includes the legacy Fitbit user ID and the Google user ID and it can be used by migrating clients to map identifiers between the two systems.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getIdentity(GetIdentityRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getIdentity(IdentityName name) + *

  • getIdentity(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getIdentityCallable() + *

+ *
+ * + *

See the individual methods for example code. + * + *

Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

This class can be customized by passing in a custom instance of HealthProfileServiceSettings + * to create(). For example: + * + *

To customize credentials: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * HealthProfileServiceSettings healthProfileServiceSettings =
+ *     HealthProfileServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * HealthProfileServiceClient healthProfileServiceClient =
+ *     HealthProfileServiceClient.create(healthProfileServiceSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * HealthProfileServiceSettings healthProfileServiceSettings =
+ *     HealthProfileServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * HealthProfileServiceClient healthProfileServiceClient =
+ *     HealthProfileServiceClient.create(healthProfileServiceSettings);
+ * }
+ * + *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * HealthProfileServiceSettings healthProfileServiceSettings =
+ *     HealthProfileServiceSettings.newHttpJsonBuilder().build();
+ * HealthProfileServiceClient healthProfileServiceClient =
+ *     HealthProfileServiceClient.create(healthProfileServiceSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class HealthProfileServiceClient implements BackgroundResource { + private final HealthProfileServiceSettings settings; + private final HealthProfileServiceStub stub; + + /** Constructs an instance of HealthProfileServiceClient with default settings. */ + public static final HealthProfileServiceClient create() throws IOException { + return create(HealthProfileServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of HealthProfileServiceClient, using the given settings. The channels + * are created based on the settings passed in, or defaults for any settings that are not set. + */ + public static final HealthProfileServiceClient create(HealthProfileServiceSettings settings) + throws IOException { + return new HealthProfileServiceClient(settings); + } + + /** + * Constructs an instance of HealthProfileServiceClient, using the given stub for making calls. + * This is for advanced usage - prefer using create(HealthProfileServiceSettings). + */ + public static final HealthProfileServiceClient create(HealthProfileServiceStub stub) { + return new HealthProfileServiceClient(stub); + } + + /** + * Constructs an instance of HealthProfileServiceClient, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected HealthProfileServiceClient(HealthProfileServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((HealthProfileServiceStubSettings) settings.getStubSettings()).createStub(); + } + + protected HealthProfileServiceClient(HealthProfileServiceStub stub) { + this.settings = null; + this.stub = stub; + } + + public final HealthProfileServiceSettings getSettings() { + return settings; + } + + public HealthProfileServiceStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns user Profile details. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HealthProfileServiceClient healthProfileServiceClient =
+   *     HealthProfileServiceClient.create()) {
+   *   ProfileName name = ProfileName.of("[USER]");
+   *   Profile response = healthProfileServiceClient.getProfile(name);
+   * }
+   * }
+ * + * @param name Required. The name of the Profile. Format: `users/me/profile`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Profile getProfile(ProfileName name) { + GetProfileRequest request = + GetProfileRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getProfile(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns user Profile details. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HealthProfileServiceClient healthProfileServiceClient =
+   *     HealthProfileServiceClient.create()) {
+   *   String name = ProfileName.of("[USER]").toString();
+   *   Profile response = healthProfileServiceClient.getProfile(name);
+   * }
+   * }
+ * + * @param name Required. The name of the Profile. Format: `users/me/profile`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Profile getProfile(String name) { + GetProfileRequest request = GetProfileRequest.newBuilder().setName(name).build(); + return getProfile(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns user Profile details. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HealthProfileServiceClient healthProfileServiceClient =
+   *     HealthProfileServiceClient.create()) {
+   *   GetProfileRequest request =
+   *       GetProfileRequest.newBuilder().setName(ProfileName.of("[USER]").toString()).build();
+   *   Profile response = healthProfileServiceClient.getProfile(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Profile getProfile(GetProfileRequest request) { + return getProfileCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns user Profile details. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HealthProfileServiceClient healthProfileServiceClient =
+   *     HealthProfileServiceClient.create()) {
+   *   GetProfileRequest request =
+   *       GetProfileRequest.newBuilder().setName(ProfileName.of("[USER]").toString()).build();
+   *   ApiFuture future =
+   *       healthProfileServiceClient.getProfileCallable().futureCall(request);
+   *   // Do something.
+   *   Profile response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getProfileCallable() { + return stub.getProfileCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the user's profile details. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HealthProfileServiceClient healthProfileServiceClient =
+   *     HealthProfileServiceClient.create()) {
+   *   Profile profile = Profile.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Profile response = healthProfileServiceClient.updateProfile(profile, updateMask);
+   * }
+   * }
+ * + * @param profile Required. Profile details. + * @param updateMask Optional. The list of fields to be updated. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Profile updateProfile(Profile profile, FieldMask updateMask) { + UpdateProfileRequest request = + UpdateProfileRequest.newBuilder().setProfile(profile).setUpdateMask(updateMask).build(); + return updateProfile(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the user's profile details. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HealthProfileServiceClient healthProfileServiceClient =
+   *     HealthProfileServiceClient.create()) {
+   *   UpdateProfileRequest request =
+   *       UpdateProfileRequest.newBuilder()
+   *           .setProfile(Profile.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Profile response = healthProfileServiceClient.updateProfile(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Profile updateProfile(UpdateProfileRequest request) { + return updateProfileCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the user's profile details. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HealthProfileServiceClient healthProfileServiceClient =
+   *     HealthProfileServiceClient.create()) {
+   *   UpdateProfileRequest request =
+   *       UpdateProfileRequest.newBuilder()
+   *           .setProfile(Profile.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       healthProfileServiceClient.updateProfileCallable().futureCall(request);
+   *   // Do something.
+   *   Profile response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateProfileCallable() { + return stub.updateProfileCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns user settings details. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HealthProfileServiceClient healthProfileServiceClient =
+   *     HealthProfileServiceClient.create()) {
+   *   SettingsName name = SettingsName.of("[USER]");
+   *   Settings response = healthProfileServiceClient.getSettings(name);
+   * }
+   * }
+ * + * @param name Required. The name of the Settings. Format: `users/me/settings`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Settings getSettings(SettingsName name) { + GetSettingsRequest request = + GetSettingsRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getSettings(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns user settings details. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HealthProfileServiceClient healthProfileServiceClient =
+   *     HealthProfileServiceClient.create()) {
+   *   String name = SettingsName.of("[USER]").toString();
+   *   Settings response = healthProfileServiceClient.getSettings(name);
+   * }
+   * }
+ * + * @param name Required. The name of the Settings. Format: `users/me/settings`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Settings getSettings(String name) { + GetSettingsRequest request = GetSettingsRequest.newBuilder().setName(name).build(); + return getSettings(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns user settings details. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HealthProfileServiceClient healthProfileServiceClient =
+   *     HealthProfileServiceClient.create()) {
+   *   GetSettingsRequest request =
+   *       GetSettingsRequest.newBuilder().setName(SettingsName.of("[USER]").toString()).build();
+   *   Settings response = healthProfileServiceClient.getSettings(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Settings getSettings(GetSettingsRequest request) { + return getSettingsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns user settings details. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HealthProfileServiceClient healthProfileServiceClient =
+   *     HealthProfileServiceClient.create()) {
+   *   GetSettingsRequest request =
+   *       GetSettingsRequest.newBuilder().setName(SettingsName.of("[USER]").toString()).build();
+   *   ApiFuture future =
+   *       healthProfileServiceClient.getSettingsCallable().futureCall(request);
+   *   // Do something.
+   *   Settings response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getSettingsCallable() { + return stub.getSettingsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the user's settings details. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HealthProfileServiceClient healthProfileServiceClient =
+   *     HealthProfileServiceClient.create()) {
+   *   Settings settings = Settings.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Settings response = healthProfileServiceClient.updateSettings(settings, updateMask);
+   * }
+   * }
+ * + * @param settings Required. Settings details + * @param updateMask Optional. The list of fields to be updated. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Settings updateSettings(Settings settings, FieldMask updateMask) { + UpdateSettingsRequest request = + UpdateSettingsRequest.newBuilder().setSettings(settings).setUpdateMask(updateMask).build(); + return updateSettings(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the user's settings details. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HealthProfileServiceClient healthProfileServiceClient =
+   *     HealthProfileServiceClient.create()) {
+   *   UpdateSettingsRequest request =
+   *       UpdateSettingsRequest.newBuilder()
+   *           .setSettings(Settings.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Settings response = healthProfileServiceClient.updateSettings(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Settings updateSettings(UpdateSettingsRequest request) { + return updateSettingsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the user's settings details. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HealthProfileServiceClient healthProfileServiceClient =
+   *     HealthProfileServiceClient.create()) {
+   *   UpdateSettingsRequest request =
+   *       UpdateSettingsRequest.newBuilder()
+   *           .setSettings(Settings.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       healthProfileServiceClient.updateSettingsCallable().futureCall(request);
+   *   // Do something.
+   *   Settings response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateSettingsCallable() { + return stub.updateSettingsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the user's identity. + * + *

It includes the legacy Fitbit user ID and the Google user ID and it can be used by migrating + * clients to map identifiers between the two systems. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HealthProfileServiceClient healthProfileServiceClient =
+   *     HealthProfileServiceClient.create()) {
+   *   IdentityName name = IdentityName.of("[USER]");
+   *   Identity response = healthProfileServiceClient.getIdentity(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of the Identity. Format: `users/me/identity` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Identity getIdentity(IdentityName name) { + GetIdentityRequest request = + GetIdentityRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getIdentity(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the user's identity. + * + *

It includes the legacy Fitbit user ID and the Google user ID and it can be used by migrating + * clients to map identifiers between the two systems. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HealthProfileServiceClient healthProfileServiceClient =
+   *     HealthProfileServiceClient.create()) {
+   *   String name = IdentityName.of("[USER]").toString();
+   *   Identity response = healthProfileServiceClient.getIdentity(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of the Identity. Format: `users/me/identity` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Identity getIdentity(String name) { + GetIdentityRequest request = GetIdentityRequest.newBuilder().setName(name).build(); + return getIdentity(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the user's identity. + * + *

It includes the legacy Fitbit user ID and the Google user ID and it can be used by migrating + * clients to map identifiers between the two systems. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HealthProfileServiceClient healthProfileServiceClient =
+   *     HealthProfileServiceClient.create()) {
+   *   GetIdentityRequest request =
+   *       GetIdentityRequest.newBuilder().setName(IdentityName.of("[USER]").toString()).build();
+   *   Identity response = healthProfileServiceClient.getIdentity(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Identity getIdentity(GetIdentityRequest request) { + return getIdentityCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the user's identity. + * + *

It includes the legacy Fitbit user ID and the Google user ID and it can be used by migrating + * clients to map identifiers between the two systems. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HealthProfileServiceClient healthProfileServiceClient =
+   *     HealthProfileServiceClient.create()) {
+   *   GetIdentityRequest request =
+   *       GetIdentityRequest.newBuilder().setName(IdentityName.of("[USER]").toString()).build();
+   *   ApiFuture future =
+   *       healthProfileServiceClient.getIdentityCallable().futureCall(request);
+   *   // Do something.
+   *   Identity response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getIdentityCallable() { + return stub.getIdentityCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } +} diff --git a/java-health/google-cloud-health/src/main/java/com/google/devicesandservices/health/v4/HealthProfileServiceSettings.java b/java-health/google-cloud-health/src/main/java/com/google/devicesandservices/health/v4/HealthProfileServiceSettings.java new file mode 100644 index 000000000000..6f3dec3c2ac9 --- /dev/null +++ b/java-health/google-cloud-health/src/main/java/com/google/devicesandservices/health/v4/HealthProfileServiceSettings.java @@ -0,0 +1,257 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.devicesandservices.health.v4.stub.HealthProfileServiceStubSettings; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link HealthProfileServiceClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (health.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the + * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) + * of getProfile: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * HealthProfileServiceSettings.Builder healthProfileServiceSettingsBuilder =
+ *     HealthProfileServiceSettings.newBuilder();
+ * healthProfileServiceSettingsBuilder
+ *     .getProfileSettings()
+ *     .setRetrySettings(
+ *         healthProfileServiceSettingsBuilder
+ *             .getProfileSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ *             .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ *             .setMaxAttempts(5)
+ *             .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ *             .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ *             .setRetryDelayMultiplier(1.3)
+ *             .setRpcTimeoutMultiplier(1.5)
+ *             .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ *             .build());
+ * HealthProfileServiceSettings healthProfileServiceSettings =
+ *     healthProfileServiceSettingsBuilder.build();
+ * }
+ * + * Please refer to the [Client Side Retry + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. + */ +@Generated("by gapic-generator-java") +public class HealthProfileServiceSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to getProfile. */ + public UnaryCallSettings getProfileSettings() { + return ((HealthProfileServiceStubSettings) getStubSettings()).getProfileSettings(); + } + + /** Returns the object with the settings used for calls to updateProfile. */ + public UnaryCallSettings updateProfileSettings() { + return ((HealthProfileServiceStubSettings) getStubSettings()).updateProfileSettings(); + } + + /** Returns the object with the settings used for calls to getSettings. */ + public UnaryCallSettings getSettingsSettings() { + return ((HealthProfileServiceStubSettings) getStubSettings()).getSettingsSettings(); + } + + /** Returns the object with the settings used for calls to updateSettings. */ + public UnaryCallSettings updateSettingsSettings() { + return ((HealthProfileServiceStubSettings) getStubSettings()).updateSettingsSettings(); + } + + /** Returns the object with the settings used for calls to getIdentity. */ + public UnaryCallSettings getIdentitySettings() { + return ((HealthProfileServiceStubSettings) getStubSettings()).getIdentitySettings(); + } + + public static final HealthProfileServiceSettings create(HealthProfileServiceStubSettings stub) + throws IOException { + return new HealthProfileServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return HealthProfileServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return HealthProfileServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return HealthProfileServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return HealthProfileServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return HealthProfileServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return HealthProfileServiceStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return HealthProfileServiceStubSettings.defaultTransportChannelProvider(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return HealthProfileServiceStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected HealthProfileServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for HealthProfileServiceSettings. */ + public static class Builder + extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(HealthProfileServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(HealthProfileServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(HealthProfileServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(HealthProfileServiceStubSettings.newBuilder()); + } + + private static Builder createHttpJsonDefault() { + return new Builder(HealthProfileServiceStubSettings.newHttpJsonBuilder()); + } + + public HealthProfileServiceStubSettings.Builder getStubSettingsBuilder() { + return ((HealthProfileServiceStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to getProfile. */ + public UnaryCallSettings.Builder getProfileSettings() { + return getStubSettingsBuilder().getProfileSettings(); + } + + /** Returns the builder for the settings used for calls to updateProfile. */ + public UnaryCallSettings.Builder updateProfileSettings() { + return getStubSettingsBuilder().updateProfileSettings(); + } + + /** Returns the builder for the settings used for calls to getSettings. */ + public UnaryCallSettings.Builder getSettingsSettings() { + return getStubSettingsBuilder().getSettingsSettings(); + } + + /** Returns the builder for the settings used for calls to updateSettings. */ + public UnaryCallSettings.Builder updateSettingsSettings() { + return getStubSettingsBuilder().updateSettingsSettings(); + } + + /** Returns the builder for the settings used for calls to getIdentity. */ + public UnaryCallSettings.Builder getIdentitySettings() { + return getStubSettingsBuilder().getIdentitySettings(); + } + + @Override + public HealthProfileServiceSettings build() throws IOException { + return new HealthProfileServiceSettings(this); + } + } +} diff --git a/java-health/google-cloud-health/src/main/java/com/google/devicesandservices/health/v4/gapic_metadata.json b/java-health/google-cloud-health/src/main/java/com/google/devicesandservices/health/v4/gapic_metadata.json new file mode 100644 index 000000000000..83591d064b45 --- /dev/null +++ b/java-health/google-cloud-health/src/main/java/com/google/devicesandservices/health/v4/gapic_metadata.json @@ -0,0 +1,69 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "java", + "protoPackage": "google.devicesandservices.health.v4", + "libraryPackage": "com.google.devicesandservices.health.v4", + "services": { + "DataPointsService": { + "clients": { + "grpc": { + "libraryClient": "DataPointsServiceClient", + "rpcs": { + "BatchDeleteDataPoints": { + "methods": ["batchDeleteDataPointsAsync", "batchDeleteDataPointsOperationCallable", "batchDeleteDataPointsCallable"] + }, + "CreateDataPoint": { + "methods": ["createDataPointAsync", "createDataPointAsync", "createDataPointAsync", "createDataPointOperationCallable", "createDataPointCallable"] + }, + "DailyRollUpDataPoints": { + "methods": ["dailyRollUpDataPoints", "dailyRollUpDataPointsCallable"] + }, + "ExportExerciseTcx": { + "methods": ["exportExerciseTcx", "exportExerciseTcx", "exportExerciseTcx", "exportExerciseTcxCallable"] + }, + "GetDataPoint": { + "methods": ["getDataPoint", "getDataPoint", "getDataPoint", "getDataPointCallable"] + }, + "ListDataPoints": { + "methods": ["listDataPoints", "listDataPoints", "listDataPoints", "listDataPointsPagedCallable", "listDataPointsCallable"] + }, + "ReconcileDataPoints": { + "methods": ["reconcileDataPoints", "reconcileDataPointsPagedCallable", "reconcileDataPointsCallable"] + }, + "RollUpDataPoints": { + "methods": ["rollUpDataPoints", "rollUpDataPointsPagedCallable", "rollUpDataPointsCallable"] + }, + "UpdateDataPoint": { + "methods": ["updateDataPointAsync", "updateDataPointAsync", "updateDataPointOperationCallable", "updateDataPointCallable"] + } + } + } + } + }, + "HealthProfileService": { + "clients": { + "grpc": { + "libraryClient": "HealthProfileServiceClient", + "rpcs": { + "GetIdentity": { + "methods": ["getIdentity", "getIdentity", "getIdentity", "getIdentityCallable"] + }, + "GetProfile": { + "methods": ["getProfile", "getProfile", "getProfile", "getProfileCallable"] + }, + "GetSettings": { + "methods": ["getSettings", "getSettings", "getSettings", "getSettingsCallable"] + }, + "UpdateProfile": { + "methods": ["updateProfile", "updateProfile", "updateProfileCallable"] + }, + "UpdateSettings": { + "methods": ["updateSettings", "updateSettings", "updateSettingsCallable"] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/java-health/google-cloud-health/src/main/java/com/google/devicesandservices/health/v4/package-info.java b/java-health/google-cloud-health/src/main/java/com/google/devicesandservices/health/v4/package-info.java new file mode 100644 index 000000000000..b038844296f5 --- /dev/null +++ b/java-health/google-cloud-health/src/main/java/com/google/devicesandservices/health/v4/package-info.java @@ -0,0 +1,63 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * A client to Google Health API + * + *

The interfaces provided are listed below, along with usage samples. + * + *

======================= DataPointsServiceClient ======================= + * + *

Service Description: Data Points Service exposing the user's health and fitness measured and + * derived data. + * + *

Sample for DataPointsServiceClient: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.create()) {
+ *   DataPointName name = DataPointName.of("[USER]", "[DATA_TYPE]", "[DATA_POINT]");
+ *   DataPoint response = dataPointsServiceClient.getDataPoint(name);
+ * }
+ * }
+ * + *

======================= HealthProfileServiceClient ======================= + * + *

Service Description: Health Profile Service + * + *

Sample for HealthProfileServiceClient: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (HealthProfileServiceClient healthProfileServiceClient =
+ *     HealthProfileServiceClient.create()) {
+ *   ProfileName name = ProfileName.of("[USER]");
+ *   Profile response = healthProfileServiceClient.getProfile(name);
+ * }
+ * }
+ */ +@Generated("by gapic-generator-java") +package com.google.devicesandservices.health.v4; + +import javax.annotation.Generated; diff --git a/java-health/google-cloud-health/src/main/java/com/google/devicesandservices/health/v4/stub/DataPointsServiceStub.java b/java-health/google-cloud-health/src/main/java/com/google/devicesandservices/health/v4/stub/DataPointsServiceStub.java new file mode 100644 index 000000000000..ef530394eaf0 --- /dev/null +++ b/java-health/google-cloud-health/src/main/java/com/google/devicesandservices/health/v4/stub/DataPointsServiceStub.java @@ -0,0 +1,142 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4.stub; + +import static com.google.devicesandservices.health.v4.DataPointsServiceClient.ListDataPointsPagedResponse; +import static com.google.devicesandservices.health.v4.DataPointsServiceClient.ReconcileDataPointsPagedResponse; +import static com.google.devicesandservices.health.v4.DataPointsServiceClient.RollUpDataPointsPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.devicesandservices.health.v4.BatchDeleteDataPointsOperationMetadata; +import com.google.devicesandservices.health.v4.BatchDeleteDataPointsRequest; +import com.google.devicesandservices.health.v4.BatchDeleteDataPointsResponse; +import com.google.devicesandservices.health.v4.CreateDataPointOperationMetadata; +import com.google.devicesandservices.health.v4.CreateDataPointRequest; +import com.google.devicesandservices.health.v4.DailyRollUpDataPointsRequest; +import com.google.devicesandservices.health.v4.DailyRollUpDataPointsResponse; +import com.google.devicesandservices.health.v4.DataPoint; +import com.google.devicesandservices.health.v4.ExportExerciseTcxRequest; +import com.google.devicesandservices.health.v4.ExportExerciseTcxResponse; +import com.google.devicesandservices.health.v4.GetDataPointRequest; +import com.google.devicesandservices.health.v4.ListDataPointsRequest; +import com.google.devicesandservices.health.v4.ListDataPointsResponse; +import com.google.devicesandservices.health.v4.ReconcileDataPointsRequest; +import com.google.devicesandservices.health.v4.ReconcileDataPointsResponse; +import com.google.devicesandservices.health.v4.RollUpDataPointsRequest; +import com.google.devicesandservices.health.v4.RollUpDataPointsResponse; +import com.google.devicesandservices.health.v4.UpdateDataPointOperationMetadata; +import com.google.devicesandservices.health.v4.UpdateDataPointRequest; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the DataPointsService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class DataPointsServiceStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + return null; + } + + public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() { + return null; + } + + public UnaryCallable getDataPointCallable() { + throw new UnsupportedOperationException("Not implemented: getDataPointCallable()"); + } + + public UnaryCallable + listDataPointsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listDataPointsPagedCallable()"); + } + + public UnaryCallable listDataPointsCallable() { + throw new UnsupportedOperationException("Not implemented: listDataPointsCallable()"); + } + + public OperationCallable + createDataPointOperationCallable() { + throw new UnsupportedOperationException("Not implemented: createDataPointOperationCallable()"); + } + + public UnaryCallable createDataPointCallable() { + throw new UnsupportedOperationException("Not implemented: createDataPointCallable()"); + } + + public OperationCallable + updateDataPointOperationCallable() { + throw new UnsupportedOperationException("Not implemented: updateDataPointOperationCallable()"); + } + + public UnaryCallable updateDataPointCallable() { + throw new UnsupportedOperationException("Not implemented: updateDataPointCallable()"); + } + + public OperationCallable< + BatchDeleteDataPointsRequest, + BatchDeleteDataPointsResponse, + BatchDeleteDataPointsOperationMetadata> + batchDeleteDataPointsOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: batchDeleteDataPointsOperationCallable()"); + } + + public UnaryCallable batchDeleteDataPointsCallable() { + throw new UnsupportedOperationException("Not implemented: batchDeleteDataPointsCallable()"); + } + + public UnaryCallable + reconcileDataPointsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: reconcileDataPointsPagedCallable()"); + } + + public UnaryCallable + reconcileDataPointsCallable() { + throw new UnsupportedOperationException("Not implemented: reconcileDataPointsCallable()"); + } + + public UnaryCallable + rollUpDataPointsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: rollUpDataPointsPagedCallable()"); + } + + public UnaryCallable + rollUpDataPointsCallable() { + throw new UnsupportedOperationException("Not implemented: rollUpDataPointsCallable()"); + } + + public UnaryCallable + dailyRollUpDataPointsCallable() { + throw new UnsupportedOperationException("Not implemented: dailyRollUpDataPointsCallable()"); + } + + public UnaryCallable + exportExerciseTcxCallable() { + throw new UnsupportedOperationException("Not implemented: exportExerciseTcxCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-health/google-cloud-health/src/main/java/com/google/devicesandservices/health/v4/stub/DataPointsServiceStubSettings.java b/java-health/google-cloud-health/src/main/java/com/google/devicesandservices/health/v4/stub/DataPointsServiceStubSettings.java new file mode 100644 index 000000000000..7e9a5cfd57ac --- /dev/null +++ b/java-health/google-cloud-health/src/main/java/com/google/devicesandservices/health/v4/stub/DataPointsServiceStubSettings.java @@ -0,0 +1,979 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4.stub; + +import static com.google.devicesandservices.health.v4.DataPointsServiceClient.ListDataPointsPagedResponse; +import static com.google.devicesandservices.health.v4.DataPointsServiceClient.ReconcileDataPointsPagedResponse; +import static com.google.devicesandservices.health.v4.DataPointsServiceClient.RollUpDataPointsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.core.ObsoleteApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.ProtoOperationTransformers; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.LibraryMetadata; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.devicesandservices.health.v4.BatchDeleteDataPointsOperationMetadata; +import com.google.devicesandservices.health.v4.BatchDeleteDataPointsRequest; +import com.google.devicesandservices.health.v4.BatchDeleteDataPointsResponse; +import com.google.devicesandservices.health.v4.CreateDataPointOperationMetadata; +import com.google.devicesandservices.health.v4.CreateDataPointRequest; +import com.google.devicesandservices.health.v4.DailyRollUpDataPointsRequest; +import com.google.devicesandservices.health.v4.DailyRollUpDataPointsResponse; +import com.google.devicesandservices.health.v4.DataPoint; +import com.google.devicesandservices.health.v4.ExportExerciseTcxRequest; +import com.google.devicesandservices.health.v4.ExportExerciseTcxResponse; +import com.google.devicesandservices.health.v4.GetDataPointRequest; +import com.google.devicesandservices.health.v4.ListDataPointsRequest; +import com.google.devicesandservices.health.v4.ListDataPointsResponse; +import com.google.devicesandservices.health.v4.ReconcileDataPointsRequest; +import com.google.devicesandservices.health.v4.ReconcileDataPointsResponse; +import com.google.devicesandservices.health.v4.ReconciledDataPoint; +import com.google.devicesandservices.health.v4.RollUpDataPointsRequest; +import com.google.devicesandservices.health.v4.RollUpDataPointsResponse; +import com.google.devicesandservices.health.v4.RollupDataPoint; +import com.google.devicesandservices.health.v4.UpdateDataPointOperationMetadata; +import com.google.devicesandservices.health.v4.UpdateDataPointRequest; +import com.google.longrunning.Operation; +import java.io.IOException; +import java.time.Duration; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link DataPointsServiceStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (health.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the + * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) + * of getDataPoint: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * DataPointsServiceStubSettings.Builder dataPointsServiceSettingsBuilder =
+ *     DataPointsServiceStubSettings.newBuilder();
+ * dataPointsServiceSettingsBuilder
+ *     .getDataPointSettings()
+ *     .setRetrySettings(
+ *         dataPointsServiceSettingsBuilder
+ *             .getDataPointSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ *             .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ *             .setMaxAttempts(5)
+ *             .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ *             .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ *             .setRetryDelayMultiplier(1.3)
+ *             .setRpcTimeoutMultiplier(1.5)
+ *             .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ *             .build());
+ * DataPointsServiceStubSettings dataPointsServiceSettings =
+ *     dataPointsServiceSettingsBuilder.build();
+ * }
+ * + * Please refer to the [Client Side Retry + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. + * + *

To configure the RetrySettings of a Long Running Operation method, create an + * OperationTimedPollAlgorithm object and update the RPC's polling algorithm. For example, to + * configure the RetrySettings for createDataPoint: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * DataPointsServiceStubSettings.Builder dataPointsServiceSettingsBuilder =
+ *     DataPointsServiceStubSettings.newBuilder();
+ * TimedRetryAlgorithm timedRetryAlgorithm =
+ *     OperationalTimedPollAlgorithm.create(
+ *         RetrySettings.newBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofMillis(500))
+ *             .setRetryDelayMultiplier(1.5)
+ *             .setMaxRetryDelayDuration(Duration.ofMillis(5000))
+ *             .setTotalTimeoutDuration(Duration.ofHours(24))
+ *             .build());
+ * dataPointsServiceSettingsBuilder
+ *     .createClusterOperationSettings()
+ *     .setPollingAlgorithm(timedRetryAlgorithm)
+ *     .build();
+ * }
+ */ +@Generated("by gapic-generator-java") +@SuppressWarnings("CanonicalDuration") +public class DataPointsServiceStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder() + .add("https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly") + .add( + "https://www.googleapis.com/auth/googlehealth.health_metrics_and_measurements.readonly") + .add("https://www.googleapis.com/auth/googlehealth.location.readonly") + .add("https://www.googleapis.com/auth/googlehealth.sleep.readonly") + .build(); + + private final UnaryCallSettings getDataPointSettings; + private final PagedCallSettings< + ListDataPointsRequest, ListDataPointsResponse, ListDataPointsPagedResponse> + listDataPointsSettings; + private final UnaryCallSettings createDataPointSettings; + private final OperationCallSettings< + CreateDataPointRequest, DataPoint, CreateDataPointOperationMetadata> + createDataPointOperationSettings; + private final UnaryCallSettings updateDataPointSettings; + private final OperationCallSettings< + UpdateDataPointRequest, DataPoint, UpdateDataPointOperationMetadata> + updateDataPointOperationSettings; + private final UnaryCallSettings + batchDeleteDataPointsSettings; + private final OperationCallSettings< + BatchDeleteDataPointsRequest, + BatchDeleteDataPointsResponse, + BatchDeleteDataPointsOperationMetadata> + batchDeleteDataPointsOperationSettings; + private final PagedCallSettings< + ReconcileDataPointsRequest, ReconcileDataPointsResponse, ReconcileDataPointsPagedResponse> + reconcileDataPointsSettings; + private final PagedCallSettings< + RollUpDataPointsRequest, RollUpDataPointsResponse, RollUpDataPointsPagedResponse> + rollUpDataPointsSettings; + private final UnaryCallSettings + dailyRollUpDataPointsSettings; + private final UnaryCallSettings + exportExerciseTcxSettings; + + private static final PagedListDescriptor + LIST_DATA_POINTS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListDataPointsRequest injectToken(ListDataPointsRequest payload, String token) { + return ListDataPointsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListDataPointsRequest injectPageSize( + ListDataPointsRequest payload, int pageSize) { + return ListDataPointsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListDataPointsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListDataPointsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListDataPointsResponse payload) { + return payload.getDataPointsList(); + } + }; + + private static final PagedListDescriptor< + ReconcileDataPointsRequest, ReconcileDataPointsResponse, ReconciledDataPoint> + RECONCILE_DATA_POINTS_PAGE_STR_DESC = + new PagedListDescriptor< + ReconcileDataPointsRequest, ReconcileDataPointsResponse, ReconciledDataPoint>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ReconcileDataPointsRequest injectToken( + ReconcileDataPointsRequest payload, String token) { + return ReconcileDataPointsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ReconcileDataPointsRequest injectPageSize( + ReconcileDataPointsRequest payload, int pageSize) { + return ReconcileDataPointsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ReconcileDataPointsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ReconcileDataPointsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ReconcileDataPointsResponse payload) { + return payload.getDataPointsList(); + } + }; + + private static final PagedListDescriptor< + RollUpDataPointsRequest, RollUpDataPointsResponse, RollupDataPoint> + ROLL_UP_DATA_POINTS_PAGE_STR_DESC = + new PagedListDescriptor< + RollUpDataPointsRequest, RollUpDataPointsResponse, RollupDataPoint>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public RollUpDataPointsRequest injectToken( + RollUpDataPointsRequest payload, String token) { + return RollUpDataPointsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public RollUpDataPointsRequest injectPageSize( + RollUpDataPointsRequest payload, int pageSize) { + return RollUpDataPointsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(RollUpDataPointsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(RollUpDataPointsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(RollUpDataPointsResponse payload) { + return payload.getRollupDataPointsList(); + } + }; + + private static final PagedListResponseFactory< + ListDataPointsRequest, ListDataPointsResponse, ListDataPointsPagedResponse> + LIST_DATA_POINTS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListDataPointsRequest, ListDataPointsResponse, ListDataPointsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListDataPointsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_DATA_POINTS_PAGE_STR_DESC, request, context); + return ListDataPointsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ReconcileDataPointsRequest, ReconcileDataPointsResponse, ReconcileDataPointsPagedResponse> + RECONCILE_DATA_POINTS_PAGE_STR_FACT = + new PagedListResponseFactory< + ReconcileDataPointsRequest, + ReconcileDataPointsResponse, + ReconcileDataPointsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ReconcileDataPointsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ReconcileDataPointsRequest, ReconcileDataPointsResponse, ReconciledDataPoint> + pageContext = + PageContext.create( + callable, RECONCILE_DATA_POINTS_PAGE_STR_DESC, request, context); + return ReconcileDataPointsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + RollUpDataPointsRequest, RollUpDataPointsResponse, RollUpDataPointsPagedResponse> + ROLL_UP_DATA_POINTS_PAGE_STR_FACT = + new PagedListResponseFactory< + RollUpDataPointsRequest, RollUpDataPointsResponse, RollUpDataPointsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + RollUpDataPointsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, ROLL_UP_DATA_POINTS_PAGE_STR_DESC, request, context); + return RollUpDataPointsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to getDataPoint. */ + public UnaryCallSettings getDataPointSettings() { + return getDataPointSettings; + } + + /** Returns the object with the settings used for calls to listDataPoints. */ + public PagedCallSettings< + ListDataPointsRequest, ListDataPointsResponse, ListDataPointsPagedResponse> + listDataPointsSettings() { + return listDataPointsSettings; + } + + /** Returns the object with the settings used for calls to createDataPoint. */ + public UnaryCallSettings createDataPointSettings() { + return createDataPointSettings; + } + + /** Returns the object with the settings used for calls to createDataPoint. */ + public OperationCallSettings + createDataPointOperationSettings() { + return createDataPointOperationSettings; + } + + /** Returns the object with the settings used for calls to updateDataPoint. */ + public UnaryCallSettings updateDataPointSettings() { + return updateDataPointSettings; + } + + /** Returns the object with the settings used for calls to updateDataPoint. */ + public OperationCallSettings + updateDataPointOperationSettings() { + return updateDataPointOperationSettings; + } + + /** Returns the object with the settings used for calls to batchDeleteDataPoints. */ + public UnaryCallSettings + batchDeleteDataPointsSettings() { + return batchDeleteDataPointsSettings; + } + + /** Returns the object with the settings used for calls to batchDeleteDataPoints. */ + public OperationCallSettings< + BatchDeleteDataPointsRequest, + BatchDeleteDataPointsResponse, + BatchDeleteDataPointsOperationMetadata> + batchDeleteDataPointsOperationSettings() { + return batchDeleteDataPointsOperationSettings; + } + + /** Returns the object with the settings used for calls to reconcileDataPoints. */ + public PagedCallSettings< + ReconcileDataPointsRequest, ReconcileDataPointsResponse, ReconcileDataPointsPagedResponse> + reconcileDataPointsSettings() { + return reconcileDataPointsSettings; + } + + /** Returns the object with the settings used for calls to rollUpDataPoints. */ + public PagedCallSettings< + RollUpDataPointsRequest, RollUpDataPointsResponse, RollUpDataPointsPagedResponse> + rollUpDataPointsSettings() { + return rollUpDataPointsSettings; + } + + /** Returns the object with the settings used for calls to dailyRollUpDataPoints. */ + public UnaryCallSettings + dailyRollUpDataPointsSettings() { + return dailyRollUpDataPointsSettings; + } + + /** Returns the object with the settings used for calls to exportExerciseTcx. */ + public UnaryCallSettings + exportExerciseTcxSettings() { + return exportExerciseTcxSettings; + } + + public DataPointsServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcDataPointsServiceStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonDataPointsServiceStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "health"; + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + @ObsoleteApi("Use getEndpoint() instead") + public static String getDefaultEndpoint() { + return "health.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "health.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(DataPointsServiceStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(DataPointsServiceStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return DataPointsServiceStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected DataPointsServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + getDataPointSettings = settingsBuilder.getDataPointSettings().build(); + listDataPointsSettings = settingsBuilder.listDataPointsSettings().build(); + createDataPointSettings = settingsBuilder.createDataPointSettings().build(); + createDataPointOperationSettings = settingsBuilder.createDataPointOperationSettings().build(); + updateDataPointSettings = settingsBuilder.updateDataPointSettings().build(); + updateDataPointOperationSettings = settingsBuilder.updateDataPointOperationSettings().build(); + batchDeleteDataPointsSettings = settingsBuilder.batchDeleteDataPointsSettings().build(); + batchDeleteDataPointsOperationSettings = + settingsBuilder.batchDeleteDataPointsOperationSettings().build(); + reconcileDataPointsSettings = settingsBuilder.reconcileDataPointsSettings().build(); + rollUpDataPointsSettings = settingsBuilder.rollUpDataPointsSettings().build(); + dailyRollUpDataPointsSettings = settingsBuilder.dailyRollUpDataPointsSettings().build(); + exportExerciseTcxSettings = settingsBuilder.exportExerciseTcxSettings().build(); + } + + @Override + protected LibraryMetadata getLibraryMetadata() { + return LibraryMetadata.newBuilder() + .setArtifactName("com.google.cloud:google-cloud-health") + .setRepository("googleapis/google-cloud-java") + .setVersion(Version.VERSION) + .build(); + } + + /** Builder for DataPointsServiceStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder getDataPointSettings; + private final PagedCallSettings.Builder< + ListDataPointsRequest, ListDataPointsResponse, ListDataPointsPagedResponse> + listDataPointsSettings; + private final UnaryCallSettings.Builder + createDataPointSettings; + private final OperationCallSettings.Builder< + CreateDataPointRequest, DataPoint, CreateDataPointOperationMetadata> + createDataPointOperationSettings; + private final UnaryCallSettings.Builder + updateDataPointSettings; + private final OperationCallSettings.Builder< + UpdateDataPointRequest, DataPoint, UpdateDataPointOperationMetadata> + updateDataPointOperationSettings; + private final UnaryCallSettings.Builder + batchDeleteDataPointsSettings; + private final OperationCallSettings.Builder< + BatchDeleteDataPointsRequest, + BatchDeleteDataPointsResponse, + BatchDeleteDataPointsOperationMetadata> + batchDeleteDataPointsOperationSettings; + private final PagedCallSettings.Builder< + ReconcileDataPointsRequest, + ReconcileDataPointsResponse, + ReconcileDataPointsPagedResponse> + reconcileDataPointsSettings; + private final PagedCallSettings.Builder< + RollUpDataPointsRequest, RollUpDataPointsResponse, RollUpDataPointsPagedResponse> + rollUpDataPointsSettings; + private final UnaryCallSettings.Builder< + DailyRollUpDataPointsRequest, DailyRollUpDataPointsResponse> + dailyRollUpDataPointsSettings; + private final UnaryCallSettings.Builder + exportExerciseTcxSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); + definitions.put( + "retry_policy_0_codes", + ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); + definitions.put( + "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); + definitions.put("no_retry_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(1000L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelayDuration(Duration.ofMillis(10000L)) + .setInitialRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setTotalTimeoutDuration(Duration.ofMillis(60000L)) + .build(); + definitions.put("retry_policy_0_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setTotalTimeoutDuration(Duration.ofMillis(60000L)) + .build(); + definitions.put("no_retry_1_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + getDataPointSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listDataPointsSettings = PagedCallSettings.newBuilder(LIST_DATA_POINTS_PAGE_STR_FACT); + createDataPointSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createDataPointOperationSettings = OperationCallSettings.newBuilder(); + updateDataPointSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateDataPointOperationSettings = OperationCallSettings.newBuilder(); + batchDeleteDataPointsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + batchDeleteDataPointsOperationSettings = OperationCallSettings.newBuilder(); + reconcileDataPointsSettings = + PagedCallSettings.newBuilder(RECONCILE_DATA_POINTS_PAGE_STR_FACT); + rollUpDataPointsSettings = PagedCallSettings.newBuilder(ROLL_UP_DATA_POINTS_PAGE_STR_FACT); + dailyRollUpDataPointsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + exportExerciseTcxSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + getDataPointSettings, + listDataPointsSettings, + createDataPointSettings, + updateDataPointSettings, + batchDeleteDataPointsSettings, + reconcileDataPointsSettings, + rollUpDataPointsSettings, + dailyRollUpDataPointsSettings, + exportExerciseTcxSettings); + initDefaults(this); + } + + protected Builder(DataPointsServiceStubSettings settings) { + super(settings); + + getDataPointSettings = settings.getDataPointSettings.toBuilder(); + listDataPointsSettings = settings.listDataPointsSettings.toBuilder(); + createDataPointSettings = settings.createDataPointSettings.toBuilder(); + createDataPointOperationSettings = settings.createDataPointOperationSettings.toBuilder(); + updateDataPointSettings = settings.updateDataPointSettings.toBuilder(); + updateDataPointOperationSettings = settings.updateDataPointOperationSettings.toBuilder(); + batchDeleteDataPointsSettings = settings.batchDeleteDataPointsSettings.toBuilder(); + batchDeleteDataPointsOperationSettings = + settings.batchDeleteDataPointsOperationSettings.toBuilder(); + reconcileDataPointsSettings = settings.reconcileDataPointsSettings.toBuilder(); + rollUpDataPointsSettings = settings.rollUpDataPointsSettings.toBuilder(); + dailyRollUpDataPointsSettings = settings.dailyRollUpDataPointsSettings.toBuilder(); + exportExerciseTcxSettings = settings.exportExerciseTcxSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + getDataPointSettings, + listDataPointsSettings, + createDataPointSettings, + updateDataPointSettings, + batchDeleteDataPointsSettings, + reconcileDataPointsSettings, + rollUpDataPointsSettings, + dailyRollUpDataPointsSettings, + exportExerciseTcxSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .getDataPointSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listDataPointsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createDataPointSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .updateDataPointSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .batchDeleteDataPointsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .reconcileDataPointsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .rollUpDataPointsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .dailyRollUpDataPointsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .exportExerciseTcxSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createDataPointOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(DataPoint.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + CreateDataPointOperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .updateDataPointOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(DataPoint.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + UpdateDataPointOperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .batchDeleteDataPointsOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create( + BatchDeleteDataPointsResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + BatchDeleteDataPointsOperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to getDataPoint. */ + public UnaryCallSettings.Builder getDataPointSettings() { + return getDataPointSettings; + } + + /** Returns the builder for the settings used for calls to listDataPoints. */ + public PagedCallSettings.Builder< + ListDataPointsRequest, ListDataPointsResponse, ListDataPointsPagedResponse> + listDataPointsSettings() { + return listDataPointsSettings; + } + + /** Returns the builder for the settings used for calls to createDataPoint. */ + public UnaryCallSettings.Builder createDataPointSettings() { + return createDataPointSettings; + } + + /** Returns the builder for the settings used for calls to createDataPoint. */ + public OperationCallSettings.Builder< + CreateDataPointRequest, DataPoint, CreateDataPointOperationMetadata> + createDataPointOperationSettings() { + return createDataPointOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateDataPoint. */ + public UnaryCallSettings.Builder updateDataPointSettings() { + return updateDataPointSettings; + } + + /** Returns the builder for the settings used for calls to updateDataPoint. */ + public OperationCallSettings.Builder< + UpdateDataPointRequest, DataPoint, UpdateDataPointOperationMetadata> + updateDataPointOperationSettings() { + return updateDataPointOperationSettings; + } + + /** Returns the builder for the settings used for calls to batchDeleteDataPoints. */ + public UnaryCallSettings.Builder + batchDeleteDataPointsSettings() { + return batchDeleteDataPointsSettings; + } + + /** Returns the builder for the settings used for calls to batchDeleteDataPoints. */ + public OperationCallSettings.Builder< + BatchDeleteDataPointsRequest, + BatchDeleteDataPointsResponse, + BatchDeleteDataPointsOperationMetadata> + batchDeleteDataPointsOperationSettings() { + return batchDeleteDataPointsOperationSettings; + } + + /** Returns the builder for the settings used for calls to reconcileDataPoints. */ + public PagedCallSettings.Builder< + ReconcileDataPointsRequest, + ReconcileDataPointsResponse, + ReconcileDataPointsPagedResponse> + reconcileDataPointsSettings() { + return reconcileDataPointsSettings; + } + + /** Returns the builder for the settings used for calls to rollUpDataPoints. */ + public PagedCallSettings.Builder< + RollUpDataPointsRequest, RollUpDataPointsResponse, RollUpDataPointsPagedResponse> + rollUpDataPointsSettings() { + return rollUpDataPointsSettings; + } + + /** Returns the builder for the settings used for calls to dailyRollUpDataPoints. */ + public UnaryCallSettings.Builder + dailyRollUpDataPointsSettings() { + return dailyRollUpDataPointsSettings; + } + + /** Returns the builder for the settings used for calls to exportExerciseTcx. */ + public UnaryCallSettings.Builder + exportExerciseTcxSettings() { + return exportExerciseTcxSettings; + } + + @Override + public DataPointsServiceStubSettings build() throws IOException { + return new DataPointsServiceStubSettings(this); + } + } +} diff --git a/java-health/google-cloud-health/src/main/java/com/google/devicesandservices/health/v4/stub/GrpcDataPointsServiceCallableFactory.java b/java-health/google-cloud-health/src/main/java/com/google/devicesandservices/health/v4/stub/GrpcDataPointsServiceCallableFactory.java new file mode 100644 index 000000000000..dcca95231e56 --- /dev/null +++ b/java-health/google-cloud-health/src/main/java/com/google/devicesandservices/health/v4/stub/GrpcDataPointsServiceCallableFactory.java @@ -0,0 +1,113 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4.stub; + +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the DataPointsService service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcDataPointsServiceCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/java-health/google-cloud-health/src/main/java/com/google/devicesandservices/health/v4/stub/GrpcDataPointsServiceStub.java b/java-health/google-cloud-health/src/main/java/com/google/devicesandservices/health/v4/stub/GrpcDataPointsServiceStub.java new file mode 100644 index 000000000000..dd0d63ddab47 --- /dev/null +++ b/java-health/google-cloud-health/src/main/java/com/google/devicesandservices/health/v4/stub/GrpcDataPointsServiceStub.java @@ -0,0 +1,555 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4.stub; + +import static com.google.devicesandservices.health.v4.DataPointsServiceClient.ListDataPointsPagedResponse; +import static com.google.devicesandservices.health.v4.DataPointsServiceClient.ReconcileDataPointsPagedResponse; +import static com.google.devicesandservices.health.v4.DataPointsServiceClient.RollUpDataPointsPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.devicesandservices.health.v4.BatchDeleteDataPointsOperationMetadata; +import com.google.devicesandservices.health.v4.BatchDeleteDataPointsRequest; +import com.google.devicesandservices.health.v4.BatchDeleteDataPointsResponse; +import com.google.devicesandservices.health.v4.CreateDataPointOperationMetadata; +import com.google.devicesandservices.health.v4.CreateDataPointRequest; +import com.google.devicesandservices.health.v4.DailyRollUpDataPointsRequest; +import com.google.devicesandservices.health.v4.DailyRollUpDataPointsResponse; +import com.google.devicesandservices.health.v4.DataPoint; +import com.google.devicesandservices.health.v4.ExportExerciseTcxRequest; +import com.google.devicesandservices.health.v4.ExportExerciseTcxResponse; +import com.google.devicesandservices.health.v4.GetDataPointRequest; +import com.google.devicesandservices.health.v4.ListDataPointsRequest; +import com.google.devicesandservices.health.v4.ListDataPointsResponse; +import com.google.devicesandservices.health.v4.ReconcileDataPointsRequest; +import com.google.devicesandservices.health.v4.ReconcileDataPointsResponse; +import com.google.devicesandservices.health.v4.RollUpDataPointsRequest; +import com.google.devicesandservices.health.v4.RollUpDataPointsResponse; +import com.google.devicesandservices.health.v4.UpdateDataPointOperationMetadata; +import com.google.devicesandservices.health.v4.UpdateDataPointRequest; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the DataPointsService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcDataPointsServiceStub extends DataPointsServiceStub { + private static final MethodDescriptor + getDataPointMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.devicesandservices.health.v4.DataPointsService/GetDataPoint") + .setRequestMarshaller(ProtoUtils.marshaller(GetDataPointRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(DataPoint.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + listDataPointsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.devicesandservices.health.v4.DataPointsService/ListDataPoints") + .setRequestMarshaller( + ProtoUtils.marshaller(ListDataPointsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListDataPointsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + createDataPointMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.devicesandservices.health.v4.DataPointsService/CreateDataPoint") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateDataPointRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + updateDataPointMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.devicesandservices.health.v4.DataPointsService/UpdateDataPoint") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateDataPointRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + batchDeleteDataPointsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.devicesandservices.health.v4.DataPointsService/BatchDeleteDataPoints") + .setRequestMarshaller( + ProtoUtils.marshaller(BatchDeleteDataPointsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + reconcileDataPointsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.devicesandservices.health.v4.DataPointsService/ReconcileDataPoints") + .setRequestMarshaller( + ProtoUtils.marshaller(ReconcileDataPointsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ReconcileDataPointsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + rollUpDataPointsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.devicesandservices.health.v4.DataPointsService/RollUpDataPoints") + .setRequestMarshaller( + ProtoUtils.marshaller(RollUpDataPointsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(RollUpDataPointsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + dailyRollUpDataPointsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.devicesandservices.health.v4.DataPointsService/DailyRollUpDataPoints") + .setRequestMarshaller( + ProtoUtils.marshaller(DailyRollUpDataPointsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(DailyRollUpDataPointsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + exportExerciseTcxMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.devicesandservices.health.v4.DataPointsService/ExportExerciseTcx") + .setRequestMarshaller( + ProtoUtils.marshaller(ExportExerciseTcxRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ExportExerciseTcxResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private final UnaryCallable getDataPointCallable; + private final UnaryCallable listDataPointsCallable; + private final UnaryCallable + listDataPointsPagedCallable; + private final UnaryCallable createDataPointCallable; + private final OperationCallable< + CreateDataPointRequest, DataPoint, CreateDataPointOperationMetadata> + createDataPointOperationCallable; + private final UnaryCallable updateDataPointCallable; + private final OperationCallable< + UpdateDataPointRequest, DataPoint, UpdateDataPointOperationMetadata> + updateDataPointOperationCallable; + private final UnaryCallable + batchDeleteDataPointsCallable; + private final OperationCallable< + BatchDeleteDataPointsRequest, + BatchDeleteDataPointsResponse, + BatchDeleteDataPointsOperationMetadata> + batchDeleteDataPointsOperationCallable; + private final UnaryCallable + reconcileDataPointsCallable; + private final UnaryCallable + reconcileDataPointsPagedCallable; + private final UnaryCallable + rollUpDataPointsCallable; + private final UnaryCallable + rollUpDataPointsPagedCallable; + private final UnaryCallable + dailyRollUpDataPointsCallable; + private final UnaryCallable + exportExerciseTcxCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcDataPointsServiceStub create(DataPointsServiceStubSettings settings) + throws IOException { + return new GrpcDataPointsServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcDataPointsServiceStub create(ClientContext clientContext) + throws IOException { + return new GrpcDataPointsServiceStub( + DataPointsServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcDataPointsServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcDataPointsServiceStub( + DataPointsServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcDataPointsServiceStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected GrpcDataPointsServiceStub( + DataPointsServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new GrpcDataPointsServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcDataPointsServiceStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected GrpcDataPointsServiceStub( + DataPointsServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings getDataPointTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getDataPointMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings + listDataPointsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listDataPointsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings createDataPointTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createDataPointMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings updateDataPointTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateDataPointMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("data_point.name", String.valueOf(request.getDataPoint().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + batchDeleteDataPointsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(batchDeleteDataPointsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings + reconcileDataPointsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(reconcileDataPointsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings + rollUpDataPointsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(rollUpDataPointsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings + dailyRollUpDataPointsTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(dailyRollUpDataPointsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings + exportExerciseTcxTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(exportExerciseTcxMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + + this.getDataPointCallable = + callableFactory.createUnaryCallable( + getDataPointTransportSettings, settings.getDataPointSettings(), clientContext); + this.listDataPointsCallable = + callableFactory.createUnaryCallable( + listDataPointsTransportSettings, settings.listDataPointsSettings(), clientContext); + this.listDataPointsPagedCallable = + callableFactory.createPagedCallable( + listDataPointsTransportSettings, settings.listDataPointsSettings(), clientContext); + this.createDataPointCallable = + callableFactory.createUnaryCallable( + createDataPointTransportSettings, settings.createDataPointSettings(), clientContext); + this.createDataPointOperationCallable = + callableFactory.createOperationCallable( + createDataPointTransportSettings, + settings.createDataPointOperationSettings(), + clientContext, + operationsStub); + this.updateDataPointCallable = + callableFactory.createUnaryCallable( + updateDataPointTransportSettings, settings.updateDataPointSettings(), clientContext); + this.updateDataPointOperationCallable = + callableFactory.createOperationCallable( + updateDataPointTransportSettings, + settings.updateDataPointOperationSettings(), + clientContext, + operationsStub); + this.batchDeleteDataPointsCallable = + callableFactory.createUnaryCallable( + batchDeleteDataPointsTransportSettings, + settings.batchDeleteDataPointsSettings(), + clientContext); + this.batchDeleteDataPointsOperationCallable = + callableFactory.createOperationCallable( + batchDeleteDataPointsTransportSettings, + settings.batchDeleteDataPointsOperationSettings(), + clientContext, + operationsStub); + this.reconcileDataPointsCallable = + callableFactory.createUnaryCallable( + reconcileDataPointsTransportSettings, + settings.reconcileDataPointsSettings(), + clientContext); + this.reconcileDataPointsPagedCallable = + callableFactory.createPagedCallable( + reconcileDataPointsTransportSettings, + settings.reconcileDataPointsSettings(), + clientContext); + this.rollUpDataPointsCallable = + callableFactory.createUnaryCallable( + rollUpDataPointsTransportSettings, settings.rollUpDataPointsSettings(), clientContext); + this.rollUpDataPointsPagedCallable = + callableFactory.createPagedCallable( + rollUpDataPointsTransportSettings, settings.rollUpDataPointsSettings(), clientContext); + this.dailyRollUpDataPointsCallable = + callableFactory.createUnaryCallable( + dailyRollUpDataPointsTransportSettings, + settings.dailyRollUpDataPointsSettings(), + clientContext); + this.exportExerciseTcxCallable = + callableFactory.createUnaryCallable( + exportExerciseTcxTransportSettings, + settings.exportExerciseTcxSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable getDataPointCallable() { + return getDataPointCallable; + } + + @Override + public UnaryCallable listDataPointsCallable() { + return listDataPointsCallable; + } + + @Override + public UnaryCallable + listDataPointsPagedCallable() { + return listDataPointsPagedCallable; + } + + @Override + public UnaryCallable createDataPointCallable() { + return createDataPointCallable; + } + + @Override + public OperationCallable + createDataPointOperationCallable() { + return createDataPointOperationCallable; + } + + @Override + public UnaryCallable updateDataPointCallable() { + return updateDataPointCallable; + } + + @Override + public OperationCallable + updateDataPointOperationCallable() { + return updateDataPointOperationCallable; + } + + @Override + public UnaryCallable batchDeleteDataPointsCallable() { + return batchDeleteDataPointsCallable; + } + + @Override + public OperationCallable< + BatchDeleteDataPointsRequest, + BatchDeleteDataPointsResponse, + BatchDeleteDataPointsOperationMetadata> + batchDeleteDataPointsOperationCallable() { + return batchDeleteDataPointsOperationCallable; + } + + @Override + public UnaryCallable + reconcileDataPointsCallable() { + return reconcileDataPointsCallable; + } + + @Override + public UnaryCallable + reconcileDataPointsPagedCallable() { + return reconcileDataPointsPagedCallable; + } + + @Override + public UnaryCallable + rollUpDataPointsCallable() { + return rollUpDataPointsCallable; + } + + @Override + public UnaryCallable + rollUpDataPointsPagedCallable() { + return rollUpDataPointsPagedCallable; + } + + @Override + public UnaryCallable + dailyRollUpDataPointsCallable() { + return dailyRollUpDataPointsCallable; + } + + @Override + public UnaryCallable + exportExerciseTcxCallable() { + return exportExerciseTcxCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-health/google-cloud-health/src/main/java/com/google/devicesandservices/health/v4/stub/GrpcHealthProfileServiceCallableFactory.java b/java-health/google-cloud-health/src/main/java/com/google/devicesandservices/health/v4/stub/GrpcHealthProfileServiceCallableFactory.java new file mode 100644 index 000000000000..fcadf6540d5a --- /dev/null +++ b/java-health/google-cloud-health/src/main/java/com/google/devicesandservices/health/v4/stub/GrpcHealthProfileServiceCallableFactory.java @@ -0,0 +1,113 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4.stub; + +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the HealthProfileService service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcHealthProfileServiceCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/java-health/google-cloud-health/src/main/java/com/google/devicesandservices/health/v4/stub/GrpcHealthProfileServiceStub.java b/java-health/google-cloud-health/src/main/java/com/google/devicesandservices/health/v4/stub/GrpcHealthProfileServiceStub.java new file mode 100644 index 000000000000..e94fa069fbd9 --- /dev/null +++ b/java-health/google-cloud-health/src/main/java/com/google/devicesandservices/health/v4/stub/GrpcHealthProfileServiceStub.java @@ -0,0 +1,288 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4.stub; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.devicesandservices.health.v4.GetIdentityRequest; +import com.google.devicesandservices.health.v4.GetProfileRequest; +import com.google.devicesandservices.health.v4.GetSettingsRequest; +import com.google.devicesandservices.health.v4.Identity; +import com.google.devicesandservices.health.v4.Profile; +import com.google.devicesandservices.health.v4.Settings; +import com.google.devicesandservices.health.v4.UpdateProfileRequest; +import com.google.devicesandservices.health.v4.UpdateSettingsRequest; +import com.google.longrunning.stub.GrpcOperationsStub; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the HealthProfileService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcHealthProfileServiceStub extends HealthProfileServiceStub { + private static final MethodDescriptor getProfileMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.devicesandservices.health.v4.HealthProfileService/GetProfile") + .setRequestMarshaller(ProtoUtils.marshaller(GetProfileRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Profile.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + updateProfileMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.devicesandservices.health.v4.HealthProfileService/UpdateProfile") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateProfileRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Profile.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor getSettingsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.devicesandservices.health.v4.HealthProfileService/GetSettings") + .setRequestMarshaller(ProtoUtils.marshaller(GetSettingsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Settings.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + updateSettingsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.devicesandservices.health.v4.HealthProfileService/UpdateSettings") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateSettingsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Settings.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor getIdentityMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.devicesandservices.health.v4.HealthProfileService/GetIdentity") + .setRequestMarshaller(ProtoUtils.marshaller(GetIdentityRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Identity.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private final UnaryCallable getProfileCallable; + private final UnaryCallable updateProfileCallable; + private final UnaryCallable getSettingsCallable; + private final UnaryCallable updateSettingsCallable; + private final UnaryCallable getIdentityCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcHealthProfileServiceStub create(HealthProfileServiceStubSettings settings) + throws IOException { + return new GrpcHealthProfileServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcHealthProfileServiceStub create(ClientContext clientContext) + throws IOException { + return new GrpcHealthProfileServiceStub( + HealthProfileServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcHealthProfileServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcHealthProfileServiceStub( + HealthProfileServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcHealthProfileServiceStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected GrpcHealthProfileServiceStub( + HealthProfileServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new GrpcHealthProfileServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcHealthProfileServiceStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected GrpcHealthProfileServiceStub( + HealthProfileServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings getProfileTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getProfileMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings updateProfileTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateProfileMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("profile.name", String.valueOf(request.getProfile().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings getSettingsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getSettingsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings updateSettingsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateSettingsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("settings.name", String.valueOf(request.getSettings().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings getIdentityTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getIdentityMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + + this.getProfileCallable = + callableFactory.createUnaryCallable( + getProfileTransportSettings, settings.getProfileSettings(), clientContext); + this.updateProfileCallable = + callableFactory.createUnaryCallable( + updateProfileTransportSettings, settings.updateProfileSettings(), clientContext); + this.getSettingsCallable = + callableFactory.createUnaryCallable( + getSettingsTransportSettings, settings.getSettingsSettings(), clientContext); + this.updateSettingsCallable = + callableFactory.createUnaryCallable( + updateSettingsTransportSettings, settings.updateSettingsSettings(), clientContext); + this.getIdentityCallable = + callableFactory.createUnaryCallable( + getIdentityTransportSettings, settings.getIdentitySettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable getProfileCallable() { + return getProfileCallable; + } + + @Override + public UnaryCallable updateProfileCallable() { + return updateProfileCallable; + } + + @Override + public UnaryCallable getSettingsCallable() { + return getSettingsCallable; + } + + @Override + public UnaryCallable updateSettingsCallable() { + return updateSettingsCallable; + } + + @Override + public UnaryCallable getIdentityCallable() { + return getIdentityCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-health/google-cloud-health/src/main/java/com/google/devicesandservices/health/v4/stub/HealthProfileServiceStub.java b/java-health/google-cloud-health/src/main/java/com/google/devicesandservices/health/v4/stub/HealthProfileServiceStub.java new file mode 100644 index 000000000000..8ef45a40fb67 --- /dev/null +++ b/java-health/google-cloud-health/src/main/java/com/google/devicesandservices/health/v4/stub/HealthProfileServiceStub.java @@ -0,0 +1,62 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4.stub; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.devicesandservices.health.v4.GetIdentityRequest; +import com.google.devicesandservices.health.v4.GetProfileRequest; +import com.google.devicesandservices.health.v4.GetSettingsRequest; +import com.google.devicesandservices.health.v4.Identity; +import com.google.devicesandservices.health.v4.Profile; +import com.google.devicesandservices.health.v4.Settings; +import com.google.devicesandservices.health.v4.UpdateProfileRequest; +import com.google.devicesandservices.health.v4.UpdateSettingsRequest; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the HealthProfileService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class HealthProfileServiceStub implements BackgroundResource { + + public UnaryCallable getProfileCallable() { + throw new UnsupportedOperationException("Not implemented: getProfileCallable()"); + } + + public UnaryCallable updateProfileCallable() { + throw new UnsupportedOperationException("Not implemented: updateProfileCallable()"); + } + + public UnaryCallable getSettingsCallable() { + throw new UnsupportedOperationException("Not implemented: getSettingsCallable()"); + } + + public UnaryCallable updateSettingsCallable() { + throw new UnsupportedOperationException("Not implemented: updateSettingsCallable()"); + } + + public UnaryCallable getIdentityCallable() { + throw new UnsupportedOperationException("Not implemented: getIdentityCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-health/google-cloud-health/src/main/java/com/google/devicesandservices/health/v4/stub/HealthProfileServiceStubSettings.java b/java-health/google-cloud-health/src/main/java/com/google/devicesandservices/health/v4/stub/HealthProfileServiceStubSettings.java new file mode 100644 index 000000000000..684c2cda077a --- /dev/null +++ b/java-health/google-cloud-health/src/main/java/com/google/devicesandservices/health/v4/stub/HealthProfileServiceStubSettings.java @@ -0,0 +1,472 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4.stub; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.core.ObsoleteApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.LibraryMetadata; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.devicesandservices.health.v4.GetIdentityRequest; +import com.google.devicesandservices.health.v4.GetProfileRequest; +import com.google.devicesandservices.health.v4.GetSettingsRequest; +import com.google.devicesandservices.health.v4.Identity; +import com.google.devicesandservices.health.v4.Profile; +import com.google.devicesandservices.health.v4.Settings; +import com.google.devicesandservices.health.v4.UpdateProfileRequest; +import com.google.devicesandservices.health.v4.UpdateSettingsRequest; +import java.io.IOException; +import java.time.Duration; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link HealthProfileServiceStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (health.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the + * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) + * of getProfile: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * HealthProfileServiceStubSettings.Builder healthProfileServiceSettingsBuilder =
+ *     HealthProfileServiceStubSettings.newBuilder();
+ * healthProfileServiceSettingsBuilder
+ *     .getProfileSettings()
+ *     .setRetrySettings(
+ *         healthProfileServiceSettingsBuilder
+ *             .getProfileSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ *             .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ *             .setMaxAttempts(5)
+ *             .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ *             .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ *             .setRetryDelayMultiplier(1.3)
+ *             .setRpcTimeoutMultiplier(1.5)
+ *             .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ *             .build());
+ * HealthProfileServiceStubSettings healthProfileServiceSettings =
+ *     healthProfileServiceSettingsBuilder.build();
+ * }
+ * + * Please refer to the [Client Side Retry + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. + */ +@Generated("by gapic-generator-java") +@SuppressWarnings("CanonicalDuration") +public class HealthProfileServiceStubSettings + extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder() + .add("https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly") + .add( + "https://www.googleapis.com/auth/googlehealth.health_metrics_and_measurements.readonly") + .add("https://www.googleapis.com/auth/googlehealth.profile.readonly") + .add("https://www.googleapis.com/auth/googlehealth.settings.readonly") + .add("https://www.googleapis.com/auth/googlehealth.sleep.readonly") + .build(); + + private final UnaryCallSettings getProfileSettings; + private final UnaryCallSettings updateProfileSettings; + private final UnaryCallSettings getSettingsSettings; + private final UnaryCallSettings updateSettingsSettings; + private final UnaryCallSettings getIdentitySettings; + + /** Returns the object with the settings used for calls to getProfile. */ + public UnaryCallSettings getProfileSettings() { + return getProfileSettings; + } + + /** Returns the object with the settings used for calls to updateProfile. */ + public UnaryCallSettings updateProfileSettings() { + return updateProfileSettings; + } + + /** Returns the object with the settings used for calls to getSettings. */ + public UnaryCallSettings getSettingsSettings() { + return getSettingsSettings; + } + + /** Returns the object with the settings used for calls to updateSettings. */ + public UnaryCallSettings updateSettingsSettings() { + return updateSettingsSettings; + } + + /** Returns the object with the settings used for calls to getIdentity. */ + public UnaryCallSettings getIdentitySettings() { + return getIdentitySettings; + } + + public HealthProfileServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcHealthProfileServiceStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonHealthProfileServiceStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "health"; + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + @ObsoleteApi("Use getEndpoint() instead") + public static String getDefaultEndpoint() { + return "health.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "health.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(HealthProfileServiceStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(HealthProfileServiceStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return HealthProfileServiceStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected HealthProfileServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + getProfileSettings = settingsBuilder.getProfileSettings().build(); + updateProfileSettings = settingsBuilder.updateProfileSettings().build(); + getSettingsSettings = settingsBuilder.getSettingsSettings().build(); + updateSettingsSettings = settingsBuilder.updateSettingsSettings().build(); + getIdentitySettings = settingsBuilder.getIdentitySettings().build(); + } + + @Override + protected LibraryMetadata getLibraryMetadata() { + return LibraryMetadata.newBuilder() + .setArtifactName("com.google.cloud:google-cloud-health") + .setRepository("googleapis/google-cloud-java") + .setVersion(Version.VERSION) + .build(); + } + + /** Builder for HealthProfileServiceStubSettings. */ + public static class Builder + extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder getProfileSettings; + private final UnaryCallSettings.Builder updateProfileSettings; + private final UnaryCallSettings.Builder getSettingsSettings; + private final UnaryCallSettings.Builder updateSettingsSettings; + private final UnaryCallSettings.Builder getIdentitySettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "retry_policy_0_codes", + ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); + definitions.put( + "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(1000L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelayDuration(Duration.ofMillis(10000L)) + .setInitialRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setTotalTimeoutDuration(Duration.ofMillis(60000L)) + .build(); + definitions.put("retry_policy_0_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setTotalTimeoutDuration(Duration.ofMillis(60000L)) + .build(); + definitions.put("no_retry_1_params", settings); + settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); + definitions.put("no_retry_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + getProfileSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateProfileSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getSettingsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateSettingsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getIdentitySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + getProfileSettings, + updateProfileSettings, + getSettingsSettings, + updateSettingsSettings, + getIdentitySettings); + initDefaults(this); + } + + protected Builder(HealthProfileServiceStubSettings settings) { + super(settings); + + getProfileSettings = settings.getProfileSettings.toBuilder(); + updateProfileSettings = settings.updateProfileSettings.toBuilder(); + getSettingsSettings = settings.getSettingsSettings.toBuilder(); + updateSettingsSettings = settings.updateSettingsSettings.toBuilder(); + getIdentitySettings = settings.getIdentitySettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + getProfileSettings, + updateProfileSettings, + getSettingsSettings, + updateSettingsSettings, + getIdentitySettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .getProfileSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .updateProfileSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .getSettingsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .updateSettingsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .getIdentitySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to getProfile. */ + public UnaryCallSettings.Builder getProfileSettings() { + return getProfileSettings; + } + + /** Returns the builder for the settings used for calls to updateProfile. */ + public UnaryCallSettings.Builder updateProfileSettings() { + return updateProfileSettings; + } + + /** Returns the builder for the settings used for calls to getSettings. */ + public UnaryCallSettings.Builder getSettingsSettings() { + return getSettingsSettings; + } + + /** Returns the builder for the settings used for calls to updateSettings. */ + public UnaryCallSettings.Builder updateSettingsSettings() { + return updateSettingsSettings; + } + + /** Returns the builder for the settings used for calls to getIdentity. */ + public UnaryCallSettings.Builder getIdentitySettings() { + return getIdentitySettings; + } + + @Override + public HealthProfileServiceStubSettings build() throws IOException { + return new HealthProfileServiceStubSettings(this); + } + } +} diff --git a/java-health/google-cloud-health/src/main/java/com/google/devicesandservices/health/v4/stub/HttpJsonDataPointsServiceCallableFactory.java b/java-health/google-cloud-health/src/main/java/com/google/devicesandservices/health/v4/stub/HttpJsonDataPointsServiceCallableFactory.java new file mode 100644 index 000000000000..f1d2a3a57d35 --- /dev/null +++ b/java-health/google-cloud-health/src/main/java/com/google/devicesandservices/health/v4/stub/HttpJsonDataPointsServiceCallableFactory.java @@ -0,0 +1,101 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4.stub; + +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the DataPointsService service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class HttpJsonDataPointsServiceCallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/java-health/google-cloud-health/src/main/java/com/google/devicesandservices/health/v4/stub/HttpJsonDataPointsServiceStub.java b/java-health/google-cloud-health/src/main/java/com/google/devicesandservices/health/v4/stub/HttpJsonDataPointsServiceStub.java new file mode 100644 index 000000000000..ab5a505026e4 --- /dev/null +++ b/java-health/google-cloud-health/src/main/java/com/google/devicesandservices/health/v4/stub/HttpJsonDataPointsServiceStub.java @@ -0,0 +1,839 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4.stub; + +import static com.google.devicesandservices.health.v4.DataPointsServiceClient.ListDataPointsPagedResponse; +import static com.google.devicesandservices.health.v4.DataPointsServiceClient.ReconcileDataPointsPagedResponse; +import static com.google.devicesandservices.health.v4.DataPointsServiceClient.RollUpDataPointsPagedResponse; + +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshot; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.devicesandservices.health.v4.BatchDeleteDataPointsOperationMetadata; +import com.google.devicesandservices.health.v4.BatchDeleteDataPointsRequest; +import com.google.devicesandservices.health.v4.BatchDeleteDataPointsResponse; +import com.google.devicesandservices.health.v4.CreateDataPointOperationMetadata; +import com.google.devicesandservices.health.v4.CreateDataPointRequest; +import com.google.devicesandservices.health.v4.DailyRollUpDataPointsRequest; +import com.google.devicesandservices.health.v4.DailyRollUpDataPointsResponse; +import com.google.devicesandservices.health.v4.DataPoint; +import com.google.devicesandservices.health.v4.ExportExerciseTcxRequest; +import com.google.devicesandservices.health.v4.ExportExerciseTcxResponse; +import com.google.devicesandservices.health.v4.GetDataPointRequest; +import com.google.devicesandservices.health.v4.ListDataPointsRequest; +import com.google.devicesandservices.health.v4.ListDataPointsResponse; +import com.google.devicesandservices.health.v4.ReconcileDataPointsRequest; +import com.google.devicesandservices.health.v4.ReconcileDataPointsResponse; +import com.google.devicesandservices.health.v4.RollUpDataPointsRequest; +import com.google.devicesandservices.health.v4.RollUpDataPointsResponse; +import com.google.devicesandservices.health.v4.UpdateDataPointOperationMetadata; +import com.google.devicesandservices.health.v4.UpdateDataPointRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the DataPointsService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class HttpJsonDataPointsServiceStub extends DataPointsServiceStub { + private static final TypeRegistry typeRegistry = + TypeRegistry.newBuilder() + .add(UpdateDataPointOperationMetadata.getDescriptor()) + .add(BatchDeleteDataPointsOperationMetadata.getDescriptor()) + .add(CreateDataPointOperationMetadata.getDescriptor()) + .add(BatchDeleteDataPointsResponse.getDescriptor()) + .add(DataPoint.getDescriptor()) + .build(); + + private static final ApiMethodDescriptor + getDataPointMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.devicesandservices.health.v4.DataPointsService/GetDataPoint") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v4/{name=users/*/dataTypes/*/dataPoints/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(DataPoint.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listDataPointsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.devicesandservices.health.v4.DataPointsService/ListDataPoints") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v4/{parent=users/*/dataTypes/*}/dataPoints", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListDataPointsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createDataPointMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.devicesandservices.health.v4.DataPointsService/CreateDataPoint") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v4/{parent=users/*/dataTypes/*}/dataPoints", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("dataPoint", request.getDataPoint(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateDataPointRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + updateDataPointMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.devicesandservices.health.v4.DataPointsService/UpdateDataPoint") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v4/{dataPoint.name=users/*/dataTypes/*/dataPoints/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "dataPoint.name", request.getDataPoint().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("dataPoint", request.getDataPoint(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UpdateDataPointRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + batchDeleteDataPointsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.devicesandservices.health.v4.DataPointsService/BatchDeleteDataPoints") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v4/{parent=users/*/dataTypes/*}/dataPoints:batchDelete", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearParent().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (BatchDeleteDataPointsRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + reconcileDataPointsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.devicesandservices.health.v4.DataPointsService/ReconcileDataPoints") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v4/{parent=users/*/dataTypes/*}/dataPoints:reconcile", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, "dataSourceFamily", request.getDataSourceFamily()); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ReconcileDataPointsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + rollUpDataPointsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.devicesandservices.health.v4.DataPointsService/RollUpDataPoints") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v4/{parent=users/*/dataTypes/*}/dataPoints:rollUp", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearParent().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(RollUpDataPointsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor< + DailyRollUpDataPointsRequest, DailyRollUpDataPointsResponse> + dailyRollUpDataPointsMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName( + "google.devicesandservices.health.v4.DataPointsService/DailyRollUpDataPoints") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v4/{parent=users/*/dataTypes/*}/dataPoints:dailyRollUp", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearParent().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(DailyRollUpDataPointsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + exportExerciseTcxMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.devicesandservices.health.v4.DataPointsService/ExportExerciseTcx") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v4/{name=users/*/dataTypes/*/dataPoints/*}:exportExerciseTcx", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, "partialData", request.getPartialData()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ExportExerciseTcxResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable getDataPointCallable; + private final UnaryCallable listDataPointsCallable; + private final UnaryCallable + listDataPointsPagedCallable; + private final UnaryCallable createDataPointCallable; + private final OperationCallable< + CreateDataPointRequest, DataPoint, CreateDataPointOperationMetadata> + createDataPointOperationCallable; + private final UnaryCallable updateDataPointCallable; + private final OperationCallable< + UpdateDataPointRequest, DataPoint, UpdateDataPointOperationMetadata> + updateDataPointOperationCallable; + private final UnaryCallable + batchDeleteDataPointsCallable; + private final OperationCallable< + BatchDeleteDataPointsRequest, + BatchDeleteDataPointsResponse, + BatchDeleteDataPointsOperationMetadata> + batchDeleteDataPointsOperationCallable; + private final UnaryCallable + reconcileDataPointsCallable; + private final UnaryCallable + reconcileDataPointsPagedCallable; + private final UnaryCallable + rollUpDataPointsCallable; + private final UnaryCallable + rollUpDataPointsPagedCallable; + private final UnaryCallable + dailyRollUpDataPointsCallable; + private final UnaryCallable + exportExerciseTcxCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonOperationsStub httpJsonOperationsStub; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonDataPointsServiceStub create(DataPointsServiceStubSettings settings) + throws IOException { + return new HttpJsonDataPointsServiceStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonDataPointsServiceStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonDataPointsServiceStub( + DataPointsServiceStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonDataPointsServiceStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonDataPointsServiceStub( + DataPointsServiceStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonDataPointsServiceStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected HttpJsonDataPointsServiceStub( + DataPointsServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new HttpJsonDataPointsServiceCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonDataPointsServiceStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected HttpJsonDataPointsServiceStub( + DataPointsServiceStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.httpJsonOperationsStub = + HttpJsonOperationsStub.create(clientContext, callableFactory, typeRegistry); + + HttpJsonCallSettings getDataPointTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getDataPointMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings + listDataPointsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listDataPointsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings createDataPointTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createDataPointMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings updateDataPointTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateDataPointMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("data_point.name", String.valueOf(request.getDataPoint().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + batchDeleteDataPointsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(batchDeleteDataPointsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings + reconcileDataPointsTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(reconcileDataPointsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + rollUpDataPointsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(rollUpDataPointsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings + dailyRollUpDataPointsTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(dailyRollUpDataPointsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings + exportExerciseTcxTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(exportExerciseTcxMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + + this.getDataPointCallable = + callableFactory.createUnaryCallable( + getDataPointTransportSettings, settings.getDataPointSettings(), clientContext); + this.listDataPointsCallable = + callableFactory.createUnaryCallable( + listDataPointsTransportSettings, settings.listDataPointsSettings(), clientContext); + this.listDataPointsPagedCallable = + callableFactory.createPagedCallable( + listDataPointsTransportSettings, settings.listDataPointsSettings(), clientContext); + this.createDataPointCallable = + callableFactory.createUnaryCallable( + createDataPointTransportSettings, settings.createDataPointSettings(), clientContext); + this.createDataPointOperationCallable = + callableFactory.createOperationCallable( + createDataPointTransportSettings, + settings.createDataPointOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.updateDataPointCallable = + callableFactory.createUnaryCallable( + updateDataPointTransportSettings, settings.updateDataPointSettings(), clientContext); + this.updateDataPointOperationCallable = + callableFactory.createOperationCallable( + updateDataPointTransportSettings, + settings.updateDataPointOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.batchDeleteDataPointsCallable = + callableFactory.createUnaryCallable( + batchDeleteDataPointsTransportSettings, + settings.batchDeleteDataPointsSettings(), + clientContext); + this.batchDeleteDataPointsOperationCallable = + callableFactory.createOperationCallable( + batchDeleteDataPointsTransportSettings, + settings.batchDeleteDataPointsOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.reconcileDataPointsCallable = + callableFactory.createUnaryCallable( + reconcileDataPointsTransportSettings, + settings.reconcileDataPointsSettings(), + clientContext); + this.reconcileDataPointsPagedCallable = + callableFactory.createPagedCallable( + reconcileDataPointsTransportSettings, + settings.reconcileDataPointsSettings(), + clientContext); + this.rollUpDataPointsCallable = + callableFactory.createUnaryCallable( + rollUpDataPointsTransportSettings, settings.rollUpDataPointsSettings(), clientContext); + this.rollUpDataPointsPagedCallable = + callableFactory.createPagedCallable( + rollUpDataPointsTransportSettings, settings.rollUpDataPointsSettings(), clientContext); + this.dailyRollUpDataPointsCallable = + callableFactory.createUnaryCallable( + dailyRollUpDataPointsTransportSettings, + settings.dailyRollUpDataPointsSettings(), + clientContext); + this.exportExerciseTcxCallable = + callableFactory.createUnaryCallable( + exportExerciseTcxTransportSettings, + settings.exportExerciseTcxSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(getDataPointMethodDescriptor); + methodDescriptors.add(listDataPointsMethodDescriptor); + methodDescriptors.add(createDataPointMethodDescriptor); + methodDescriptors.add(updateDataPointMethodDescriptor); + methodDescriptors.add(batchDeleteDataPointsMethodDescriptor); + methodDescriptors.add(reconcileDataPointsMethodDescriptor); + methodDescriptors.add(rollUpDataPointsMethodDescriptor); + methodDescriptors.add(dailyRollUpDataPointsMethodDescriptor); + methodDescriptors.add(exportExerciseTcxMethodDescriptor); + return methodDescriptors; + } + + public HttpJsonOperationsStub getHttpJsonOperationsStub() { + return httpJsonOperationsStub; + } + + @Override + public UnaryCallable getDataPointCallable() { + return getDataPointCallable; + } + + @Override + public UnaryCallable listDataPointsCallable() { + return listDataPointsCallable; + } + + @Override + public UnaryCallable + listDataPointsPagedCallable() { + return listDataPointsPagedCallable; + } + + @Override + public UnaryCallable createDataPointCallable() { + return createDataPointCallable; + } + + @Override + public OperationCallable + createDataPointOperationCallable() { + return createDataPointOperationCallable; + } + + @Override + public UnaryCallable updateDataPointCallable() { + return updateDataPointCallable; + } + + @Override + public OperationCallable + updateDataPointOperationCallable() { + return updateDataPointOperationCallable; + } + + @Override + public UnaryCallable batchDeleteDataPointsCallable() { + return batchDeleteDataPointsCallable; + } + + @Override + public OperationCallable< + BatchDeleteDataPointsRequest, + BatchDeleteDataPointsResponse, + BatchDeleteDataPointsOperationMetadata> + batchDeleteDataPointsOperationCallable() { + return batchDeleteDataPointsOperationCallable; + } + + @Override + public UnaryCallable + reconcileDataPointsCallable() { + return reconcileDataPointsCallable; + } + + @Override + public UnaryCallable + reconcileDataPointsPagedCallable() { + return reconcileDataPointsPagedCallable; + } + + @Override + public UnaryCallable + rollUpDataPointsCallable() { + return rollUpDataPointsCallable; + } + + @Override + public UnaryCallable + rollUpDataPointsPagedCallable() { + return rollUpDataPointsPagedCallable; + } + + @Override + public UnaryCallable + dailyRollUpDataPointsCallable() { + return dailyRollUpDataPointsCallable; + } + + @Override + public UnaryCallable + exportExerciseTcxCallable() { + return exportExerciseTcxCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-health/google-cloud-health/src/main/java/com/google/devicesandservices/health/v4/stub/HttpJsonHealthProfileServiceCallableFactory.java b/java-health/google-cloud-health/src/main/java/com/google/devicesandservices/health/v4/stub/HttpJsonHealthProfileServiceCallableFactory.java new file mode 100644 index 000000000000..969dda7c9ee8 --- /dev/null +++ b/java-health/google-cloud-health/src/main/java/com/google/devicesandservices/health/v4/stub/HttpJsonHealthProfileServiceCallableFactory.java @@ -0,0 +1,101 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4.stub; + +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the HealthProfileService service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class HttpJsonHealthProfileServiceCallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/java-health/google-cloud-health/src/main/java/com/google/devicesandservices/health/v4/stub/HttpJsonHealthProfileServiceStub.java b/java-health/google-cloud-health/src/main/java/com/google/devicesandservices/health/v4/stub/HttpJsonHealthProfileServiceStub.java new file mode 100644 index 000000000000..c8028f3a1e2b --- /dev/null +++ b/java-health/google-cloud-health/src/main/java/com/google/devicesandservices/health/v4/stub/HttpJsonHealthProfileServiceStub.java @@ -0,0 +1,441 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4.stub; + +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.devicesandservices.health.v4.GetIdentityRequest; +import com.google.devicesandservices.health.v4.GetProfileRequest; +import com.google.devicesandservices.health.v4.GetSettingsRequest; +import com.google.devicesandservices.health.v4.Identity; +import com.google.devicesandservices.health.v4.Profile; +import com.google.devicesandservices.health.v4.Settings; +import com.google.devicesandservices.health.v4.UpdateProfileRequest; +import com.google.devicesandservices.health.v4.UpdateSettingsRequest; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the HealthProfileService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class HttpJsonHealthProfileServiceStub extends HealthProfileServiceStub { + private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build(); + + private static final ApiMethodDescriptor getProfileMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.devicesandservices.health.v4.HealthProfileService/GetProfile") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v4/{name=users/*/profile}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Profile.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updateProfileMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.devicesandservices.health.v4.HealthProfileService/UpdateProfile") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v4/{profile.name=users/*/profile}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "profile.name", request.getProfile().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("profile", request.getProfile(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Profile.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getSettingsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.devicesandservices.health.v4.HealthProfileService/GetSettings") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v4/{name=users/*/settings}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Settings.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updateSettingsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.devicesandservices.health.v4.HealthProfileService/UpdateSettings") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v4/{settings.name=users/*/settings}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "settings.name", request.getSettings().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("settings", request.getSettings(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Settings.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getIdentityMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.devicesandservices.health.v4.HealthProfileService/GetIdentity") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v4/{name=users/*/identity}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Identity.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable getProfileCallable; + private final UnaryCallable updateProfileCallable; + private final UnaryCallable getSettingsCallable; + private final UnaryCallable updateSettingsCallable; + private final UnaryCallable getIdentityCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonHealthProfileServiceStub create( + HealthProfileServiceStubSettings settings) throws IOException { + return new HttpJsonHealthProfileServiceStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonHealthProfileServiceStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonHealthProfileServiceStub( + HealthProfileServiceStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonHealthProfileServiceStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonHealthProfileServiceStub( + HealthProfileServiceStubSettings.newHttpJsonBuilder().build(), + clientContext, + callableFactory); + } + + /** + * Constructs an instance of HttpJsonHealthProfileServiceStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected HttpJsonHealthProfileServiceStub( + HealthProfileServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new HttpJsonHealthProfileServiceCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonHealthProfileServiceStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected HttpJsonHealthProfileServiceStub( + HealthProfileServiceStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + + HttpJsonCallSettings getProfileTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getProfileMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings updateProfileTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateProfileMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("profile.name", String.valueOf(request.getProfile().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getSettingsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getSettingsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings updateSettingsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateSettingsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("settings.name", String.valueOf(request.getSettings().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getIdentityTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getIdentityMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + + this.getProfileCallable = + callableFactory.createUnaryCallable( + getProfileTransportSettings, settings.getProfileSettings(), clientContext); + this.updateProfileCallable = + callableFactory.createUnaryCallable( + updateProfileTransportSettings, settings.updateProfileSettings(), clientContext); + this.getSettingsCallable = + callableFactory.createUnaryCallable( + getSettingsTransportSettings, settings.getSettingsSettings(), clientContext); + this.updateSettingsCallable = + callableFactory.createUnaryCallable( + updateSettingsTransportSettings, settings.updateSettingsSettings(), clientContext); + this.getIdentityCallable = + callableFactory.createUnaryCallable( + getIdentityTransportSettings, settings.getIdentitySettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(getProfileMethodDescriptor); + methodDescriptors.add(updateProfileMethodDescriptor); + methodDescriptors.add(getSettingsMethodDescriptor); + methodDescriptors.add(updateSettingsMethodDescriptor); + methodDescriptors.add(getIdentityMethodDescriptor); + return methodDescriptors; + } + + @Override + public UnaryCallable getProfileCallable() { + return getProfileCallable; + } + + @Override + public UnaryCallable updateProfileCallable() { + return updateProfileCallable; + } + + @Override + public UnaryCallable getSettingsCallable() { + return getSettingsCallable; + } + + @Override + public UnaryCallable updateSettingsCallable() { + return updateSettingsCallable; + } + + @Override + public UnaryCallable getIdentityCallable() { + return getIdentityCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-health/google-cloud-health/src/main/java/com/google/devicesandservices/health/v4/stub/Version.java b/java-health/google-cloud-health/src/main/java/com/google/devicesandservices/health/v4/stub/Version.java new file mode 100644 index 000000000000..f28ec6889f34 --- /dev/null +++ b/java-health/google-cloud-health/src/main/java/com/google/devicesandservices/health/v4/stub/Version.java @@ -0,0 +1,27 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4.stub; + +import com.google.api.core.InternalApi; + +@InternalApi("For internal use only") +final class Version { + // {x-version-update-start:google-cloud-health:current} + static final String VERSION = "0.0.0-SNAPSHOT"; + // {x-version-update-end} + +} diff --git a/java-health/google-cloud-health/src/main/resources/META-INF/native-image/com.google.devicesandservices.health.v4/reflect-config.json b/java-health/google-cloud-health/src/main/resources/META-INF/native-image/com.google.devicesandservices.health.v4/reflect-config.json new file mode 100644 index 000000000000..00236a08ced0 --- /dev/null +++ b/java-health/google-cloud-health/src/main/resources/META-INF/native-image/com.google.devicesandservices.health.v4/reflect-config.json @@ -0,0 +1,3881 @@ +[ + { + "name": "com.google.api.BatchingConfigProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingConfigProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingSettingsProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingSettingsProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ClientLibraryDestination", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ClientLibraryOrganization", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ClientLibrarySettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ClientLibrarySettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CommonLanguageSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CommonLanguageSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CppSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CppSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CustomHttpPattern", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CustomHttpPattern$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.DotnetSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.DotnetSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.FieldBehavior", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.FlowControlLimitExceededBehaviorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.GoSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.GoSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Http", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Http$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.HttpRule", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.HttpRule$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.JavaSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.JavaSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.LaunchStage", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings$LongRunning", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings$LongRunning$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.NodeSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.NodeSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PhpSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PhpSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Publishing", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Publishing$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PythonSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PythonSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PythonSettings$ExperimentalFeatures", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PythonSettings$ExperimentalFeatures$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor$History", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor$Style", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceReference", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceReference$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.RubySettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.RubySettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.SelectiveGapicGeneration", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.SelectiveGapicGeneration$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.ActiveMinutes", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.ActiveMinutes$ActiveMinutesByActivityLevel", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.ActiveMinutes$ActiveMinutesByActivityLevel$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.ActiveMinutes$ActivityLevel", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.ActiveMinutes$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.ActiveMinutesRollupValue", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.ActiveMinutesRollupValue$ActiveMinutesRollupByActivityLevel", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.ActiveMinutesRollupValue$ActiveMinutesRollupByActivityLevel$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.ActiveMinutesRollupValue$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.ActiveZoneMinutes", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.ActiveZoneMinutes$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.ActiveZoneMinutes$HeartRateZone", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.ActivityLevel", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.ActivityLevel$ActivityLevelType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.ActivityLevel$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.ActivityLevelRollupValue", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.ActivityLevelRollupValue$ActivityLevelRollupByActivityLevelType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.ActivityLevelRollupValue$ActivityLevelRollupByActivityLevelType$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.ActivityLevelRollupValue$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.Altitude", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.Altitude$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.AltitudeRollupValue", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.AltitudeRollupValue$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.BasalEnergyBurned", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.BasalEnergyBurned$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.BatchDeleteDataPointsOperationMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.BatchDeleteDataPointsOperationMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.BatchDeleteDataPointsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.BatchDeleteDataPointsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.BatchDeleteDataPointsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.BatchDeleteDataPointsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.BodyFat", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.BodyFat$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.BodyFatRollupValue", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.BodyFatRollupValue$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue$CaloriesInHeartRateZoneValue", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue$CaloriesInHeartRateZoneValue$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.CivilDateTime", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.CivilDateTime$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.CivilTimeInterval", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.CivilTimeInterval$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.CreateDataPointOperationMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.CreateDataPointOperationMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.CreateDataPointRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.CreateDataPointRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.DailyHeartRateVariability", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.DailyHeartRateVariability$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.DailyHeartRateZones", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.DailyHeartRateZones$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.DailyHeartRateZones$HeartRateZone", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.DailyHeartRateZones$HeartRateZone$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.DailyOxygenSaturation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.DailyOxygenSaturation$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.DailyRespiratoryRate", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.DailyRespiratoryRate$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.DailyRestingHeartRate", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.DailyRestingHeartRate$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.DailyRestingHeartRate$DailyRestingHeartRateMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.DailyRestingHeartRate$DailyRestingHeartRateMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.DailyRestingHeartRate$DailyRestingHeartRateMetadata$CalculationMethod", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.DailyRollUpDataPointsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.DailyRollUpDataPointsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.DailyRollUpDataPointsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.DailyRollUpDataPointsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.DailyRollupDataPoint", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.DailyRollupDataPoint$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.DailyVO2Max", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.DailyVO2Max$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.DailyVO2Max$CardioFitnessLevel", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.DataPoint", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.DataPoint$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.DataSource", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.DataSource$Application", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.DataSource$Application$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.DataSource$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.DataSource$Device", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.DataSource$Device$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.DataSource$Device$FormFactor", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.DataSource$Platform", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.DataSource$RecordingMethod", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.DataType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.DataType$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.Distance", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.Distance$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.DistanceRollupValue", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.DistanceRollupValue$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.Exercise", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.Exercise$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.Exercise$ExerciseEvent", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.Exercise$ExerciseEvent$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.Exercise$ExerciseEvent$ExerciseEventType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.Exercise$ExerciseMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.Exercise$ExerciseMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.Exercise$ExerciseType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.Exercise$SplitSummary", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.Exercise$SplitSummary$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.Exercise$SplitSummary$SplitType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.ExportExerciseTcxRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.ExportExerciseTcxRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.ExportExerciseTcxResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.ExportExerciseTcxResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.Floors", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.Floors$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.FloorsRollupValue", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.FloorsRollupValue$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.GetDataPointRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.GetDataPointRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.GetIdentityRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.GetIdentityRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.GetProfileRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.GetProfileRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.GetSettingsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.GetSettingsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.HeartRate", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.HeartRate$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.HeartRate$HeartRateMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.HeartRate$HeartRateMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.HeartRate$HeartRateMetadata$MotionContext", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.HeartRate$HeartRateMetadata$SensorLocation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.HeartRateRollupValue", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.HeartRateRollupValue$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.HeartRateVariability", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.HeartRateVariability$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.HeartRateZoneType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.Height", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.Height$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.HydrationLog", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.HydrationLog$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.HydrationLogRollupValue", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.HydrationLogRollupValue$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.HydrationLogRollupValue$VolumeQuantityRollup", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.HydrationLogRollupValue$VolumeQuantityRollup$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.Identity", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.Identity$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.ListDataPointsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.ListDataPointsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.ListDataPointsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.ListDataPointsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.MetricsSummary", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.MetricsSummary$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.MetricsSummary$MobilityMetrics", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.MetricsSummary$MobilityMetrics$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.MetricsSummary$TimeInHeartRateZones", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.MetricsSummary$TimeInHeartRateZones$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.ObservationSampleTime", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.ObservationSampleTime$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.ObservationTimeInterval", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.ObservationTimeInterval$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.OxygenSaturation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.OxygenSaturation$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.Profile", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.Profile$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.ReconcileDataPointsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.ReconcileDataPointsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.ReconcileDataPointsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.ReconcileDataPointsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.ReconciledDataPoint", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.ReconciledDataPoint$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary$RespiratoryRateSleepSummaryStatistics", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary$RespiratoryRateSleepSummaryStatistics$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.RollUpDataPointsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.RollUpDataPointsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.RollUpDataPointsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.RollUpDataPointsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.RollupDataPoint", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.RollupDataPoint$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.RunVO2Max", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.RunVO2Max$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.RunVO2MaxRollupValue", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.RunVO2MaxRollupValue$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.SedentaryPeriod", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.SedentaryPeriod$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.SessionTimeInterval", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.SessionTimeInterval$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.Settings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.Settings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.Settings$DistanceUnit", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.Settings$GlucoseUnit", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.Settings$HeightUnit", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.Settings$StrideLengthType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.Settings$SwimUnit", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.Settings$TemperatureUnit", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.Settings$WaterUnit", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.Settings$WeightUnit", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.Sleep", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.Sleep$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.Sleep$OutOfBedSegment", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.Sleep$OutOfBedSegment$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.Sleep$SleepMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.Sleep$SleepMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.Sleep$SleepMetadata$StagesState", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.Sleep$SleepStage", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.Sleep$SleepStage$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.Sleep$SleepStageType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.Sleep$SleepSummary", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.Sleep$SleepSummary$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.Sleep$SleepSummary$StageSummary", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.Sleep$SleepSummary$StageSummary$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.Sleep$SleepType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.Steps", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.Steps$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.StepsRollupValue", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.StepsRollupValue$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.SwimLengthsData", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.SwimLengthsData$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.SwimLengthsData$SwimStrokeType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.TimeInHeartRateZone", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.TimeInHeartRateZone$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue$TimeInHeartRateZoneValue", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue$TimeInHeartRateZoneValue$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.TotalCaloriesRollupValue", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.TotalCaloriesRollupValue$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.UpdateDataPointOperationMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.UpdateDataPointOperationMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.UpdateDataPointRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.UpdateDataPointRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.UpdateProfileRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.UpdateProfileRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.UpdateSettingsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.UpdateSettingsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.VO2Max", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.VO2Max$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.VO2Max$MeasurementMethod", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.VolumeQuantity", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.VolumeQuantity$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.VolumeUnit", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.WebhookNotificationCloudLog", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.WebhookNotificationCloudLog$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.Weight", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.Weight$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.WeightRollupValue", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.devicesandservices.health.v4.WeightRollupValue$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.CancelOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.CancelOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.DeleteOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.DeleteOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.GetOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.GetOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.ListOperationsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.ListOperationsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.ListOperationsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.ListOperationsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.Operation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.Operation$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.OperationInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.OperationInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.WaitOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.WaitOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Any", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Any$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ExtensionRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ExtensionRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ReservedRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ReservedRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$Edition", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto$EnumReservedRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto$EnumReservedRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$Declaration", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$Declaration$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$VerificationState", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$EnforceNamingStyle", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$EnumType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$FieldPresence", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$JsonFormat", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$MessageEncoding", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$RepeatedFieldEncoding", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$Utf8Validation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$VisibilityFeature", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$VisibilityFeature$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$VisibilityFeature$DefaultSymbolVisibility", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults$FeatureSetEditionDefault", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults$FeatureSetEditionDefault$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto$Label", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto$Type", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$CType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$EditionDefault", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$EditionDefault$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$FeatureSupport", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$FeatureSupport$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$JSType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$OptionRetention", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$OptionTargetType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorSet", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorSet$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileOptions$OptimizeMode", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Annotation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Annotation$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Annotation$Semantic", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MessageOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MessageOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodOptions$IdempotencyLevel", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo$Location", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo$Location$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SymbolVisibility", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption$NamePart", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption$NamePart$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Duration", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Duration$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Empty", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Empty$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.FieldMask", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.FieldMask$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Timestamp", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Timestamp$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.rpc.HttpHeader", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.rpc.HttpHeader$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.rpc.HttpRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.rpc.HttpRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.rpc.HttpResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.rpc.HttpResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.rpc.Status", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.rpc.Status$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.type.Date", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.type.Date$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.type.Interval", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.type.Interval$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.type.TimeOfDay", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.type.TimeOfDay$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + } +] \ No newline at end of file diff --git a/java-health/google-cloud-health/src/test/java/com/google/devicesandservices/health/v4/DataPointsServiceClientHttpJsonTest.java b/java-health/google-cloud-health/src/test/java/com/google/devicesandservices/health/v4/DataPointsServiceClientHttpJsonTest.java new file mode 100644 index 000000000000..ec88eae5a849 --- /dev/null +++ b/java-health/google-cloud-health/src/test/java/com/google/devicesandservices/health/v4/DataPointsServiceClientHttpJsonTest.java @@ -0,0 +1,768 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4; + +import static com.google.devicesandservices.health.v4.DataPointsServiceClient.ListDataPointsPagedResponse; +import static com.google.devicesandservices.health.v4.DataPointsServiceClient.ReconcileDataPointsPagedResponse; +import static com.google.devicesandservices.health.v4.DataPointsServiceClient.RollUpDataPointsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.common.collect.Lists; +import com.google.devicesandservices.health.v4.stub.HttpJsonDataPointsServiceStub; +import com.google.longrunning.Operation; +import com.google.protobuf.Any; +import com.google.protobuf.Duration; +import com.google.type.Interval; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class DataPointsServiceClientHttpJsonTest { + private static MockHttpService mockService; + private static DataPointsServiceClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonDataPointsServiceStub.getMethodDescriptors(), + DataPointsServiceSettings.getDefaultEndpoint()); + DataPointsServiceSettings settings = + DataPointsServiceSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + DataPointsServiceSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = DataPointsServiceClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void getDataPointTest() throws Exception { + DataPoint expectedResponse = + DataPoint.newBuilder() + .setName(DataPointName.of("[USER]", "[DATA_TYPE]", "[DATA_POINT]").toString()) + .setDataSource(DataSource.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + DataPointName name = DataPointName.of("[USER]", "[DATA_TYPE]", "[DATA_POINT]"); + + DataPoint actualResponse = client.getDataPoint(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getDataPointExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DataPointName name = DataPointName.of("[USER]", "[DATA_TYPE]", "[DATA_POINT]"); + client.getDataPoint(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDataPointTest2() throws Exception { + DataPoint expectedResponse = + DataPoint.newBuilder() + .setName(DataPointName.of("[USER]", "[DATA_TYPE]", "[DATA_POINT]").toString()) + .setDataSource(DataSource.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "users/user-9228/dataTypes/dataType-9228/dataPoints/dataPoint-9228"; + + DataPoint actualResponse = client.getDataPoint(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getDataPointExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "users/user-9228/dataTypes/dataType-9228/dataPoints/dataPoint-9228"; + client.getDataPoint(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listDataPointsTest() throws Exception { + DataPoint responsesElement = DataPoint.newBuilder().build(); + ListDataPointsResponse expectedResponse = + ListDataPointsResponse.newBuilder() + .setNextPageToken("") + .addAllDataPoints(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + DataTypeName parent = DataTypeName.of("[USER]", "[DATA_TYPE]"); + + ListDataPointsPagedResponse pagedListResponse = client.listDataPoints(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDataPointsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listDataPointsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DataTypeName parent = DataTypeName.of("[USER]", "[DATA_TYPE]"); + client.listDataPoints(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listDataPointsTest2() throws Exception { + DataPoint responsesElement = DataPoint.newBuilder().build(); + ListDataPointsResponse expectedResponse = + ListDataPointsResponse.newBuilder() + .setNextPageToken("") + .addAllDataPoints(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "users/user-180/dataTypes/dataType-180"; + + ListDataPointsPagedResponse pagedListResponse = client.listDataPoints(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDataPointsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listDataPointsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "users/user-180/dataTypes/dataType-180"; + client.listDataPoints(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createDataPointTest() throws Exception { + DataPoint expectedResponse = + DataPoint.newBuilder() + .setName(DataPointName.of("[USER]", "[DATA_TYPE]", "[DATA_POINT]").toString()) + .setDataSource(DataSource.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createDataPointTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + DataTypeName parent = DataTypeName.of("[USER]", "[DATA_TYPE]"); + DataPoint dataPoint = DataPoint.newBuilder().build(); + + DataPoint actualResponse = client.createDataPointAsync(parent, dataPoint).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createDataPointExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DataTypeName parent = DataTypeName.of("[USER]", "[DATA_TYPE]"); + DataPoint dataPoint = DataPoint.newBuilder().build(); + client.createDataPointAsync(parent, dataPoint).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createDataPointTest2() throws Exception { + DataPoint expectedResponse = + DataPoint.newBuilder() + .setName(DataPointName.of("[USER]", "[DATA_TYPE]", "[DATA_POINT]").toString()) + .setDataSource(DataSource.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createDataPointTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "users/user-180/dataTypes/dataType-180"; + DataPoint dataPoint = DataPoint.newBuilder().build(); + + DataPoint actualResponse = client.createDataPointAsync(parent, dataPoint).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createDataPointExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "users/user-180/dataTypes/dataType-180"; + DataPoint dataPoint = DataPoint.newBuilder().build(); + client.createDataPointAsync(parent, dataPoint).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void updateDataPointTest() throws Exception { + DataPoint expectedResponse = + DataPoint.newBuilder() + .setName(DataPointName.of("[USER]", "[DATA_TYPE]", "[DATA_POINT]").toString()) + .setDataSource(DataSource.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateDataPointTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + DataPoint dataPoint = + DataPoint.newBuilder() + .setName(DataPointName.of("[USER]", "[DATA_TYPE]", "[DATA_POINT]").toString()) + .setDataSource(DataSource.newBuilder().build()) + .build(); + + DataPoint actualResponse = client.updateDataPointAsync(dataPoint).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateDataPointExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DataPoint dataPoint = + DataPoint.newBuilder() + .setName(DataPointName.of("[USER]", "[DATA_TYPE]", "[DATA_POINT]").toString()) + .setDataSource(DataSource.newBuilder().build()) + .build(); + client.updateDataPointAsync(dataPoint).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void batchDeleteDataPointsTest() throws Exception { + BatchDeleteDataPointsResponse expectedResponse = + BatchDeleteDataPointsResponse.newBuilder() + .addAllDataPoints(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("batchDeleteDataPointsTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + BatchDeleteDataPointsRequest request = + BatchDeleteDataPointsRequest.newBuilder() + .setParent(DataTypeName.of("[USER]", "[DATA_TYPE]").toString()) + .addAllNames(new ArrayList()) + .build(); + + BatchDeleteDataPointsResponse actualResponse = client.batchDeleteDataPointsAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void batchDeleteDataPointsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + BatchDeleteDataPointsRequest request = + BatchDeleteDataPointsRequest.newBuilder() + .setParent(DataTypeName.of("[USER]", "[DATA_TYPE]").toString()) + .addAllNames(new ArrayList()) + .build(); + client.batchDeleteDataPointsAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void reconcileDataPointsTest() throws Exception { + ReconciledDataPoint responsesElement = ReconciledDataPoint.newBuilder().build(); + ReconcileDataPointsResponse expectedResponse = + ReconcileDataPointsResponse.newBuilder() + .setNextPageToken("") + .addAllDataPoints(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ReconcileDataPointsRequest request = + ReconcileDataPointsRequest.newBuilder() + .setParent("users/user-180/dataTypes/dataType-180") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setDataSourceFamily("dataSourceFamily586548265") + .build(); + + ReconcileDataPointsPagedResponse pagedListResponse = client.reconcileDataPoints(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDataPointsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void reconcileDataPointsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ReconcileDataPointsRequest request = + ReconcileDataPointsRequest.newBuilder() + .setParent("users/user-180/dataTypes/dataType-180") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setDataSourceFamily("dataSourceFamily586548265") + .build(); + client.reconcileDataPoints(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void rollUpDataPointsTest() throws Exception { + RollupDataPoint responsesElement = RollupDataPoint.newBuilder().build(); + RollUpDataPointsResponse expectedResponse = + RollUpDataPointsResponse.newBuilder() + .setNextPageToken("") + .addAllRollupDataPoints(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + RollUpDataPointsRequest request = + RollUpDataPointsRequest.newBuilder() + .setParent(DataTypeName.of("[USER]", "[DATA_TYPE]").toString()) + .setRange(Interval.newBuilder().build()) + .setWindowSize(Duration.newBuilder().build()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setDataSourceFamily("dataSourceFamily586548265") + .build(); + + RollUpDataPointsPagedResponse pagedListResponse = client.rollUpDataPoints(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getRollupDataPointsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void rollUpDataPointsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + RollUpDataPointsRequest request = + RollUpDataPointsRequest.newBuilder() + .setParent(DataTypeName.of("[USER]", "[DATA_TYPE]").toString()) + .setRange(Interval.newBuilder().build()) + .setWindowSize(Duration.newBuilder().build()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setDataSourceFamily("dataSourceFamily586548265") + .build(); + client.rollUpDataPoints(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void dailyRollUpDataPointsTest() throws Exception { + DailyRollUpDataPointsResponse expectedResponse = + DailyRollUpDataPointsResponse.newBuilder() + .addAllRollupDataPoints(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + DailyRollUpDataPointsRequest request = + DailyRollUpDataPointsRequest.newBuilder() + .setParent(DataTypeName.of("[USER]", "[DATA_TYPE]").toString()) + .setRange(CivilTimeInterval.newBuilder().build()) + .setWindowSizeDays(1064520774) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setDataSourceFamily("dataSourceFamily586548265") + .build(); + + DailyRollUpDataPointsResponse actualResponse = client.dailyRollUpDataPoints(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void dailyRollUpDataPointsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DailyRollUpDataPointsRequest request = + DailyRollUpDataPointsRequest.newBuilder() + .setParent(DataTypeName.of("[USER]", "[DATA_TYPE]").toString()) + .setRange(CivilTimeInterval.newBuilder().build()) + .setWindowSizeDays(1064520774) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setDataSourceFamily("dataSourceFamily586548265") + .build(); + client.dailyRollUpDataPoints(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void exportExerciseTcxTest() throws Exception { + ExportExerciseTcxResponse expectedResponse = + ExportExerciseTcxResponse.newBuilder().setTcxData("tcxData-1476524237").build(); + mockService.addResponse(expectedResponse); + + DataPointName name = DataPointName.of("[USER]", "[DATA_TYPE]", "[DATA_POINT]"); + + ExportExerciseTcxResponse actualResponse = client.exportExerciseTcx(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void exportExerciseTcxExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DataPointName name = DataPointName.of("[USER]", "[DATA_TYPE]", "[DATA_POINT]"); + client.exportExerciseTcx(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void exportExerciseTcxTest2() throws Exception { + ExportExerciseTcxResponse expectedResponse = + ExportExerciseTcxResponse.newBuilder().setTcxData("tcxData-1476524237").build(); + mockService.addResponse(expectedResponse); + + String name = "users/user-9228/dataTypes/dataType-9228/dataPoints/dataPoint-9228"; + + ExportExerciseTcxResponse actualResponse = client.exportExerciseTcx(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void exportExerciseTcxExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "users/user-9228/dataTypes/dataType-9228/dataPoints/dataPoint-9228"; + client.exportExerciseTcx(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-health/google-cloud-health/src/test/java/com/google/devicesandservices/health/v4/DataPointsServiceClientTest.java b/java-health/google-cloud-health/src/test/java/com/google/devicesandservices/health/v4/DataPointsServiceClientTest.java new file mode 100644 index 000000000000..27752ec040c3 --- /dev/null +++ b/java-health/google-cloud-health/src/test/java/com/google/devicesandservices/health/v4/DataPointsServiceClientTest.java @@ -0,0 +1,717 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4; + +import static com.google.devicesandservices.health.v4.DataPointsServiceClient.ListDataPointsPagedResponse; +import static com.google.devicesandservices.health.v4.DataPointsServiceClient.ReconcileDataPointsPagedResponse; +import static com.google.devicesandservices.health.v4.DataPointsServiceClient.RollUpDataPointsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.Duration; +import com.google.type.Interval; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class DataPointsServiceClientTest { + private static MockDataPointsService mockDataPointsService; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private DataPointsServiceClient client; + + @BeforeClass + public static void startStaticServer() { + mockDataPointsService = new MockDataPointsService(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockDataPointsService)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + DataPointsServiceSettings settings = + DataPointsServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = DataPointsServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void getDataPointTest() throws Exception { + DataPoint expectedResponse = + DataPoint.newBuilder() + .setName(DataPointName.of("[USER]", "[DATA_TYPE]", "[DATA_POINT]").toString()) + .setDataSource(DataSource.newBuilder().build()) + .build(); + mockDataPointsService.addResponse(expectedResponse); + + DataPointName name = DataPointName.of("[USER]", "[DATA_TYPE]", "[DATA_POINT]"); + + DataPoint actualResponse = client.getDataPoint(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataPointsService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetDataPointRequest actualRequest = ((GetDataPointRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getDataPointExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataPointsService.addException(exception); + + try { + DataPointName name = DataPointName.of("[USER]", "[DATA_TYPE]", "[DATA_POINT]"); + client.getDataPoint(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDataPointTest2() throws Exception { + DataPoint expectedResponse = + DataPoint.newBuilder() + .setName(DataPointName.of("[USER]", "[DATA_TYPE]", "[DATA_POINT]").toString()) + .setDataSource(DataSource.newBuilder().build()) + .build(); + mockDataPointsService.addResponse(expectedResponse); + + String name = "name3373707"; + + DataPoint actualResponse = client.getDataPoint(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataPointsService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetDataPointRequest actualRequest = ((GetDataPointRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getDataPointExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataPointsService.addException(exception); + + try { + String name = "name3373707"; + client.getDataPoint(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listDataPointsTest() throws Exception { + DataPoint responsesElement = DataPoint.newBuilder().build(); + ListDataPointsResponse expectedResponse = + ListDataPointsResponse.newBuilder() + .setNextPageToken("") + .addAllDataPoints(Arrays.asList(responsesElement)) + .build(); + mockDataPointsService.addResponse(expectedResponse); + + DataTypeName parent = DataTypeName.of("[USER]", "[DATA_TYPE]"); + + ListDataPointsPagedResponse pagedListResponse = client.listDataPoints(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDataPointsList().get(0), resources.get(0)); + + List actualRequests = mockDataPointsService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListDataPointsRequest actualRequest = ((ListDataPointsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listDataPointsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataPointsService.addException(exception); + + try { + DataTypeName parent = DataTypeName.of("[USER]", "[DATA_TYPE]"); + client.listDataPoints(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listDataPointsTest2() throws Exception { + DataPoint responsesElement = DataPoint.newBuilder().build(); + ListDataPointsResponse expectedResponse = + ListDataPointsResponse.newBuilder() + .setNextPageToken("") + .addAllDataPoints(Arrays.asList(responsesElement)) + .build(); + mockDataPointsService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListDataPointsPagedResponse pagedListResponse = client.listDataPoints(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDataPointsList().get(0), resources.get(0)); + + List actualRequests = mockDataPointsService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListDataPointsRequest actualRequest = ((ListDataPointsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listDataPointsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataPointsService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listDataPoints(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createDataPointTest() throws Exception { + DataPoint expectedResponse = + DataPoint.newBuilder() + .setName(DataPointName.of("[USER]", "[DATA_TYPE]", "[DATA_POINT]").toString()) + .setDataSource(DataSource.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createDataPointTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataPointsService.addResponse(resultOperation); + + DataTypeName parent = DataTypeName.of("[USER]", "[DATA_TYPE]"); + DataPoint dataPoint = DataPoint.newBuilder().build(); + + DataPoint actualResponse = client.createDataPointAsync(parent, dataPoint).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataPointsService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateDataPointRequest actualRequest = ((CreateDataPointRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(dataPoint, actualRequest.getDataPoint()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createDataPointExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataPointsService.addException(exception); + + try { + DataTypeName parent = DataTypeName.of("[USER]", "[DATA_TYPE]"); + DataPoint dataPoint = DataPoint.newBuilder().build(); + client.createDataPointAsync(parent, dataPoint).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void createDataPointTest2() throws Exception { + DataPoint expectedResponse = + DataPoint.newBuilder() + .setName(DataPointName.of("[USER]", "[DATA_TYPE]", "[DATA_POINT]").toString()) + .setDataSource(DataSource.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createDataPointTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataPointsService.addResponse(resultOperation); + + String parent = "parent-995424086"; + DataPoint dataPoint = DataPoint.newBuilder().build(); + + DataPoint actualResponse = client.createDataPointAsync(parent, dataPoint).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataPointsService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateDataPointRequest actualRequest = ((CreateDataPointRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(dataPoint, actualRequest.getDataPoint()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createDataPointExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataPointsService.addException(exception); + + try { + String parent = "parent-995424086"; + DataPoint dataPoint = DataPoint.newBuilder().build(); + client.createDataPointAsync(parent, dataPoint).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void updateDataPointTest() throws Exception { + DataPoint expectedResponse = + DataPoint.newBuilder() + .setName(DataPointName.of("[USER]", "[DATA_TYPE]", "[DATA_POINT]").toString()) + .setDataSource(DataSource.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateDataPointTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataPointsService.addResponse(resultOperation); + + DataPoint dataPoint = DataPoint.newBuilder().build(); + + DataPoint actualResponse = client.updateDataPointAsync(dataPoint).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataPointsService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateDataPointRequest actualRequest = ((UpdateDataPointRequest) actualRequests.get(0)); + + Assert.assertEquals(dataPoint, actualRequest.getDataPoint()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateDataPointExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataPointsService.addException(exception); + + try { + DataPoint dataPoint = DataPoint.newBuilder().build(); + client.updateDataPointAsync(dataPoint).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void batchDeleteDataPointsTest() throws Exception { + BatchDeleteDataPointsResponse expectedResponse = + BatchDeleteDataPointsResponse.newBuilder() + .addAllDataPoints(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("batchDeleteDataPointsTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataPointsService.addResponse(resultOperation); + + BatchDeleteDataPointsRequest request = + BatchDeleteDataPointsRequest.newBuilder() + .setParent(DataTypeName.of("[USER]", "[DATA_TYPE]").toString()) + .addAllNames(new ArrayList()) + .build(); + + BatchDeleteDataPointsResponse actualResponse = client.batchDeleteDataPointsAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataPointsService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + BatchDeleteDataPointsRequest actualRequest = + ((BatchDeleteDataPointsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getNamesList(), actualRequest.getNamesList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void batchDeleteDataPointsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataPointsService.addException(exception); + + try { + BatchDeleteDataPointsRequest request = + BatchDeleteDataPointsRequest.newBuilder() + .setParent(DataTypeName.of("[USER]", "[DATA_TYPE]").toString()) + .addAllNames(new ArrayList()) + .build(); + client.batchDeleteDataPointsAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void reconcileDataPointsTest() throws Exception { + ReconciledDataPoint responsesElement = ReconciledDataPoint.newBuilder().build(); + ReconcileDataPointsResponse expectedResponse = + ReconcileDataPointsResponse.newBuilder() + .setNextPageToken("") + .addAllDataPoints(Arrays.asList(responsesElement)) + .build(); + mockDataPointsService.addResponse(expectedResponse); + + ReconcileDataPointsRequest request = + ReconcileDataPointsRequest.newBuilder() + .setParent("parent-995424086") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setDataSourceFamily("dataSourceFamily586548265") + .build(); + + ReconcileDataPointsPagedResponse pagedListResponse = client.reconcileDataPoints(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDataPointsList().get(0), resources.get(0)); + + List actualRequests = mockDataPointsService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ReconcileDataPointsRequest actualRequest = ((ReconcileDataPointsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertEquals(request.getFilter(), actualRequest.getFilter()); + Assert.assertEquals(request.getDataSourceFamily(), actualRequest.getDataSourceFamily()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void reconcileDataPointsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataPointsService.addException(exception); + + try { + ReconcileDataPointsRequest request = + ReconcileDataPointsRequest.newBuilder() + .setParent("parent-995424086") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setDataSourceFamily("dataSourceFamily586548265") + .build(); + client.reconcileDataPoints(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void rollUpDataPointsTest() throws Exception { + RollupDataPoint responsesElement = RollupDataPoint.newBuilder().build(); + RollUpDataPointsResponse expectedResponse = + RollUpDataPointsResponse.newBuilder() + .setNextPageToken("") + .addAllRollupDataPoints(Arrays.asList(responsesElement)) + .build(); + mockDataPointsService.addResponse(expectedResponse); + + RollUpDataPointsRequest request = + RollUpDataPointsRequest.newBuilder() + .setParent(DataTypeName.of("[USER]", "[DATA_TYPE]").toString()) + .setRange(Interval.newBuilder().build()) + .setWindowSize(Duration.newBuilder().build()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setDataSourceFamily("dataSourceFamily586548265") + .build(); + + RollUpDataPointsPagedResponse pagedListResponse = client.rollUpDataPoints(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getRollupDataPointsList().get(0), resources.get(0)); + + List actualRequests = mockDataPointsService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RollUpDataPointsRequest actualRequest = ((RollUpDataPointsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getRange(), actualRequest.getRange()); + Assert.assertEquals(request.getWindowSize(), actualRequest.getWindowSize()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertEquals(request.getDataSourceFamily(), actualRequest.getDataSourceFamily()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void rollUpDataPointsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataPointsService.addException(exception); + + try { + RollUpDataPointsRequest request = + RollUpDataPointsRequest.newBuilder() + .setParent(DataTypeName.of("[USER]", "[DATA_TYPE]").toString()) + .setRange(Interval.newBuilder().build()) + .setWindowSize(Duration.newBuilder().build()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setDataSourceFamily("dataSourceFamily586548265") + .build(); + client.rollUpDataPoints(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void dailyRollUpDataPointsTest() throws Exception { + DailyRollUpDataPointsResponse expectedResponse = + DailyRollUpDataPointsResponse.newBuilder() + .addAllRollupDataPoints(new ArrayList()) + .build(); + mockDataPointsService.addResponse(expectedResponse); + + DailyRollUpDataPointsRequest request = + DailyRollUpDataPointsRequest.newBuilder() + .setParent(DataTypeName.of("[USER]", "[DATA_TYPE]").toString()) + .setRange(CivilTimeInterval.newBuilder().build()) + .setWindowSizeDays(1064520774) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setDataSourceFamily("dataSourceFamily586548265") + .build(); + + DailyRollUpDataPointsResponse actualResponse = client.dailyRollUpDataPoints(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataPointsService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DailyRollUpDataPointsRequest actualRequest = + ((DailyRollUpDataPointsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getRange(), actualRequest.getRange()); + Assert.assertEquals(request.getWindowSizeDays(), actualRequest.getWindowSizeDays()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertEquals(request.getDataSourceFamily(), actualRequest.getDataSourceFamily()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void dailyRollUpDataPointsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataPointsService.addException(exception); + + try { + DailyRollUpDataPointsRequest request = + DailyRollUpDataPointsRequest.newBuilder() + .setParent(DataTypeName.of("[USER]", "[DATA_TYPE]").toString()) + .setRange(CivilTimeInterval.newBuilder().build()) + .setWindowSizeDays(1064520774) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setDataSourceFamily("dataSourceFamily586548265") + .build(); + client.dailyRollUpDataPoints(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void exportExerciseTcxTest() throws Exception { + ExportExerciseTcxResponse expectedResponse = + ExportExerciseTcxResponse.newBuilder().setTcxData("tcxData-1476524237").build(); + mockDataPointsService.addResponse(expectedResponse); + + DataPointName name = DataPointName.of("[USER]", "[DATA_TYPE]", "[DATA_POINT]"); + + ExportExerciseTcxResponse actualResponse = client.exportExerciseTcx(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataPointsService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ExportExerciseTcxRequest actualRequest = ((ExportExerciseTcxRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void exportExerciseTcxExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataPointsService.addException(exception); + + try { + DataPointName name = DataPointName.of("[USER]", "[DATA_TYPE]", "[DATA_POINT]"); + client.exportExerciseTcx(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void exportExerciseTcxTest2() throws Exception { + ExportExerciseTcxResponse expectedResponse = + ExportExerciseTcxResponse.newBuilder().setTcxData("tcxData-1476524237").build(); + mockDataPointsService.addResponse(expectedResponse); + + String name = "name3373707"; + + ExportExerciseTcxResponse actualResponse = client.exportExerciseTcx(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataPointsService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ExportExerciseTcxRequest actualRequest = ((ExportExerciseTcxRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void exportExerciseTcxExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataPointsService.addException(exception); + + try { + String name = "name3373707"; + client.exportExerciseTcx(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-health/google-cloud-health/src/test/java/com/google/devicesandservices/health/v4/HealthProfileServiceClientHttpJsonTest.java b/java-health/google-cloud-health/src/test/java/com/google/devicesandservices/health/v4/HealthProfileServiceClientHttpJsonTest.java new file mode 100644 index 000000000000..532ef2d11226 --- /dev/null +++ b/java-health/google-cloud-health/src/test/java/com/google/devicesandservices/health/v4/HealthProfileServiceClientHttpJsonTest.java @@ -0,0 +1,498 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.devicesandservices.health.v4.stub.HttpJsonHealthProfileServiceStub; +import com.google.protobuf.Duration; +import com.google.protobuf.FieldMask; +import com.google.type.Date; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class HealthProfileServiceClientHttpJsonTest { + private static MockHttpService mockService; + private static HealthProfileServiceClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonHealthProfileServiceStub.getMethodDescriptors(), + HealthProfileServiceSettings.getDefaultEndpoint()); + HealthProfileServiceSettings settings = + HealthProfileServiceSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + HealthProfileServiceSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = HealthProfileServiceClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void getProfileTest() throws Exception { + Profile expectedResponse = + Profile.newBuilder() + .setName(ProfileName.of("[USER]").toString()) + .setAge(96511) + .setMembershipStartDate(Date.newBuilder().build()) + .setUserConfiguredWalkingStrideLengthMm(-549254618) + .setUserConfiguredRunningStrideLengthMm(-235827552) + .setAutoWalkingStrideLengthMm(204417609) + .setAutoRunningStrideLengthMm(517844675) + .build(); + mockService.addResponse(expectedResponse); + + ProfileName name = ProfileName.of("[USER]"); + + Profile actualResponse = client.getProfile(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getProfileExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProfileName name = ProfileName.of("[USER]"); + client.getProfile(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getProfileTest2() throws Exception { + Profile expectedResponse = + Profile.newBuilder() + .setName(ProfileName.of("[USER]").toString()) + .setAge(96511) + .setMembershipStartDate(Date.newBuilder().build()) + .setUserConfiguredWalkingStrideLengthMm(-549254618) + .setUserConfiguredRunningStrideLengthMm(-235827552) + .setAutoWalkingStrideLengthMm(204417609) + .setAutoRunningStrideLengthMm(517844675) + .build(); + mockService.addResponse(expectedResponse); + + String name = "users/user-1522/profile"; + + Profile actualResponse = client.getProfile(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getProfileExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "users/user-1522/profile"; + client.getProfile(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateProfileTest() throws Exception { + Profile expectedResponse = + Profile.newBuilder() + .setName(ProfileName.of("[USER]").toString()) + .setAge(96511) + .setMembershipStartDate(Date.newBuilder().build()) + .setUserConfiguredWalkingStrideLengthMm(-549254618) + .setUserConfiguredRunningStrideLengthMm(-235827552) + .setAutoWalkingStrideLengthMm(204417609) + .setAutoRunningStrideLengthMm(517844675) + .build(); + mockService.addResponse(expectedResponse); + + Profile profile = + Profile.newBuilder() + .setName(ProfileName.of("[USER]").toString()) + .setAge(96511) + .setMembershipStartDate(Date.newBuilder().build()) + .setUserConfiguredWalkingStrideLengthMm(-549254618) + .setUserConfiguredRunningStrideLengthMm(-235827552) + .setAutoWalkingStrideLengthMm(204417609) + .setAutoRunningStrideLengthMm(517844675) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Profile actualResponse = client.updateProfile(profile, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateProfileExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + Profile profile = + Profile.newBuilder() + .setName(ProfileName.of("[USER]").toString()) + .setAge(96511) + .setMembershipStartDate(Date.newBuilder().build()) + .setUserConfiguredWalkingStrideLengthMm(-549254618) + .setUserConfiguredRunningStrideLengthMm(-235827552) + .setAutoWalkingStrideLengthMm(204417609) + .setAutoRunningStrideLengthMm(517844675) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateProfile(profile, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getSettingsTest() throws Exception { + Settings expectedResponse = + Settings.newBuilder() + .setName(SettingsName.of("[USER]").toString()) + .setAutoStrideEnabled(true) + .setLanguageLocale("languageLocale-445142062") + .setUtcOffset(Duration.newBuilder().build()) + .setTimeZone("timeZone-2077180903") + .build(); + mockService.addResponse(expectedResponse); + + SettingsName name = SettingsName.of("[USER]"); + + Settings actualResponse = client.getSettings(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getSettingsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + SettingsName name = SettingsName.of("[USER]"); + client.getSettings(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getSettingsTest2() throws Exception { + Settings expectedResponse = + Settings.newBuilder() + .setName(SettingsName.of("[USER]").toString()) + .setAutoStrideEnabled(true) + .setLanguageLocale("languageLocale-445142062") + .setUtcOffset(Duration.newBuilder().build()) + .setTimeZone("timeZone-2077180903") + .build(); + mockService.addResponse(expectedResponse); + + String name = "users/user-9114/settings"; + + Settings actualResponse = client.getSettings(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getSettingsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "users/user-9114/settings"; + client.getSettings(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateSettingsTest() throws Exception { + Settings expectedResponse = + Settings.newBuilder() + .setName(SettingsName.of("[USER]").toString()) + .setAutoStrideEnabled(true) + .setLanguageLocale("languageLocale-445142062") + .setUtcOffset(Duration.newBuilder().build()) + .setTimeZone("timeZone-2077180903") + .build(); + mockService.addResponse(expectedResponse); + + Settings settings = + Settings.newBuilder() + .setName(SettingsName.of("[USER]").toString()) + .setAutoStrideEnabled(true) + .setLanguageLocale("languageLocale-445142062") + .setUtcOffset(Duration.newBuilder().build()) + .setTimeZone("timeZone-2077180903") + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Settings actualResponse = client.updateSettings(settings, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateSettingsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + Settings settings = + Settings.newBuilder() + .setName(SettingsName.of("[USER]").toString()) + .setAutoStrideEnabled(true) + .setLanguageLocale("languageLocale-445142062") + .setUtcOffset(Duration.newBuilder().build()) + .setTimeZone("timeZone-2077180903") + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateSettings(settings, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getIdentityTest() throws Exception { + Identity expectedResponse = + Identity.newBuilder() + .setName(IdentityName.of("[USER]").toString()) + .setLegacyUserId("legacyUserId958223215") + .setHealthUserId("healthUserId574154690") + .build(); + mockService.addResponse(expectedResponse); + + IdentityName name = IdentityName.of("[USER]"); + + Identity actualResponse = client.getIdentity(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getIdentityExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + IdentityName name = IdentityName.of("[USER]"); + client.getIdentity(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getIdentityTest2() throws Exception { + Identity expectedResponse = + Identity.newBuilder() + .setName(IdentityName.of("[USER]").toString()) + .setLegacyUserId("legacyUserId958223215") + .setHealthUserId("healthUserId574154690") + .build(); + mockService.addResponse(expectedResponse); + + String name = "users/user-3819/identity"; + + Identity actualResponse = client.getIdentity(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getIdentityExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "users/user-3819/identity"; + client.getIdentity(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-health/google-cloud-health/src/test/java/com/google/devicesandservices/health/v4/HealthProfileServiceClientTest.java b/java-health/google-cloud-health/src/test/java/com/google/devicesandservices/health/v4/HealthProfileServiceClientTest.java new file mode 100644 index 000000000000..ae6f01ee47df --- /dev/null +++ b/java-health/google-cloud-health/src/test/java/com/google/devicesandservices/health/v4/HealthProfileServiceClientTest.java @@ -0,0 +1,424 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Duration; +import com.google.protobuf.FieldMask; +import com.google.type.Date; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class HealthProfileServiceClientTest { + private static MockHealthProfileService mockHealthProfileService; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private HealthProfileServiceClient client; + + @BeforeClass + public static void startStaticServer() { + mockHealthProfileService = new MockHealthProfileService(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockHealthProfileService)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + HealthProfileServiceSettings settings = + HealthProfileServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = HealthProfileServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void getProfileTest() throws Exception { + Profile expectedResponse = + Profile.newBuilder() + .setName(ProfileName.of("[USER]").toString()) + .setAge(96511) + .setMembershipStartDate(Date.newBuilder().build()) + .setUserConfiguredWalkingStrideLengthMm(-549254618) + .setUserConfiguredRunningStrideLengthMm(-235827552) + .setAutoWalkingStrideLengthMm(204417609) + .setAutoRunningStrideLengthMm(517844675) + .build(); + mockHealthProfileService.addResponse(expectedResponse); + + ProfileName name = ProfileName.of("[USER]"); + + Profile actualResponse = client.getProfile(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockHealthProfileService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetProfileRequest actualRequest = ((GetProfileRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getProfileExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHealthProfileService.addException(exception); + + try { + ProfileName name = ProfileName.of("[USER]"); + client.getProfile(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getProfileTest2() throws Exception { + Profile expectedResponse = + Profile.newBuilder() + .setName(ProfileName.of("[USER]").toString()) + .setAge(96511) + .setMembershipStartDate(Date.newBuilder().build()) + .setUserConfiguredWalkingStrideLengthMm(-549254618) + .setUserConfiguredRunningStrideLengthMm(-235827552) + .setAutoWalkingStrideLengthMm(204417609) + .setAutoRunningStrideLengthMm(517844675) + .build(); + mockHealthProfileService.addResponse(expectedResponse); + + String name = "name3373707"; + + Profile actualResponse = client.getProfile(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockHealthProfileService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetProfileRequest actualRequest = ((GetProfileRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getProfileExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHealthProfileService.addException(exception); + + try { + String name = "name3373707"; + client.getProfile(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateProfileTest() throws Exception { + Profile expectedResponse = + Profile.newBuilder() + .setName(ProfileName.of("[USER]").toString()) + .setAge(96511) + .setMembershipStartDate(Date.newBuilder().build()) + .setUserConfiguredWalkingStrideLengthMm(-549254618) + .setUserConfiguredRunningStrideLengthMm(-235827552) + .setAutoWalkingStrideLengthMm(204417609) + .setAutoRunningStrideLengthMm(517844675) + .build(); + mockHealthProfileService.addResponse(expectedResponse); + + Profile profile = Profile.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Profile actualResponse = client.updateProfile(profile, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockHealthProfileService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateProfileRequest actualRequest = ((UpdateProfileRequest) actualRequests.get(0)); + + Assert.assertEquals(profile, actualRequest.getProfile()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateProfileExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHealthProfileService.addException(exception); + + try { + Profile profile = Profile.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateProfile(profile, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getSettingsTest() throws Exception { + Settings expectedResponse = + Settings.newBuilder() + .setName(SettingsName.of("[USER]").toString()) + .setAutoStrideEnabled(true) + .setLanguageLocale("languageLocale-445142062") + .setUtcOffset(Duration.newBuilder().build()) + .setTimeZone("timeZone-2077180903") + .build(); + mockHealthProfileService.addResponse(expectedResponse); + + SettingsName name = SettingsName.of("[USER]"); + + Settings actualResponse = client.getSettings(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockHealthProfileService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetSettingsRequest actualRequest = ((GetSettingsRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getSettingsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHealthProfileService.addException(exception); + + try { + SettingsName name = SettingsName.of("[USER]"); + client.getSettings(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getSettingsTest2() throws Exception { + Settings expectedResponse = + Settings.newBuilder() + .setName(SettingsName.of("[USER]").toString()) + .setAutoStrideEnabled(true) + .setLanguageLocale("languageLocale-445142062") + .setUtcOffset(Duration.newBuilder().build()) + .setTimeZone("timeZone-2077180903") + .build(); + mockHealthProfileService.addResponse(expectedResponse); + + String name = "name3373707"; + + Settings actualResponse = client.getSettings(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockHealthProfileService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetSettingsRequest actualRequest = ((GetSettingsRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getSettingsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHealthProfileService.addException(exception); + + try { + String name = "name3373707"; + client.getSettings(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateSettingsTest() throws Exception { + Settings expectedResponse = + Settings.newBuilder() + .setName(SettingsName.of("[USER]").toString()) + .setAutoStrideEnabled(true) + .setLanguageLocale("languageLocale-445142062") + .setUtcOffset(Duration.newBuilder().build()) + .setTimeZone("timeZone-2077180903") + .build(); + mockHealthProfileService.addResponse(expectedResponse); + + Settings settings = Settings.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Settings actualResponse = client.updateSettings(settings, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockHealthProfileService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateSettingsRequest actualRequest = ((UpdateSettingsRequest) actualRequests.get(0)); + + Assert.assertEquals(settings, actualRequest.getSettings()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateSettingsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHealthProfileService.addException(exception); + + try { + Settings settings = Settings.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateSettings(settings, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getIdentityTest() throws Exception { + Identity expectedResponse = + Identity.newBuilder() + .setName(IdentityName.of("[USER]").toString()) + .setLegacyUserId("legacyUserId958223215") + .setHealthUserId("healthUserId574154690") + .build(); + mockHealthProfileService.addResponse(expectedResponse); + + IdentityName name = IdentityName.of("[USER]"); + + Identity actualResponse = client.getIdentity(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockHealthProfileService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetIdentityRequest actualRequest = ((GetIdentityRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getIdentityExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHealthProfileService.addException(exception); + + try { + IdentityName name = IdentityName.of("[USER]"); + client.getIdentity(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getIdentityTest2() throws Exception { + Identity expectedResponse = + Identity.newBuilder() + .setName(IdentityName.of("[USER]").toString()) + .setLegacyUserId("legacyUserId958223215") + .setHealthUserId("healthUserId574154690") + .build(); + mockHealthProfileService.addResponse(expectedResponse); + + String name = "name3373707"; + + Identity actualResponse = client.getIdentity(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockHealthProfileService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetIdentityRequest actualRequest = ((GetIdentityRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getIdentityExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHealthProfileService.addException(exception); + + try { + String name = "name3373707"; + client.getIdentity(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-health/google-cloud-health/src/test/java/com/google/devicesandservices/health/v4/MockDataPointsService.java b/java-health/google-cloud-health/src/test/java/com/google/devicesandservices/health/v4/MockDataPointsService.java new file mode 100644 index 000000000000..90f646b458f9 --- /dev/null +++ b/java-health/google-cloud-health/src/test/java/com/google/devicesandservices/health/v4/MockDataPointsService.java @@ -0,0 +1,59 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockDataPointsService implements MockGrpcService { + private final MockDataPointsServiceImpl serviceImpl; + + public MockDataPointsService() { + serviceImpl = new MockDataPointsServiceImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/java-health/google-cloud-health/src/test/java/com/google/devicesandservices/health/v4/MockDataPointsServiceImpl.java b/java-health/google-cloud-health/src/test/java/com/google/devicesandservices/health/v4/MockDataPointsServiceImpl.java new file mode 100644 index 000000000000..f8a6cc3acee7 --- /dev/null +++ b/java-health/google-cloud-health/src/test/java/com/google/devicesandservices/health/v4/MockDataPointsServiceImpl.java @@ -0,0 +1,255 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4; + +import com.google.api.core.BetaApi; +import com.google.devicesandservices.health.v4.DataPointsServiceGrpc.DataPointsServiceImplBase; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockDataPointsServiceImpl extends DataPointsServiceImplBase { + private List requests; + private Queue responses; + + public MockDataPointsServiceImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void getDataPoint( + GetDataPointRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof DataPoint) { + requests.add(request); + responseObserver.onNext(((DataPoint) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetDataPoint, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + DataPoint.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listDataPoints( + ListDataPointsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListDataPointsResponse) { + requests.add(request); + responseObserver.onNext(((ListDataPointsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListDataPoints, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListDataPointsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createDataPoint( + CreateDataPointRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateDataPoint, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateDataPoint( + UpdateDataPointRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateDataPoint, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void batchDeleteDataPoints( + BatchDeleteDataPointsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method BatchDeleteDataPoints, expected %s or" + + " %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void reconcileDataPoints( + ReconcileDataPointsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ReconcileDataPointsResponse) { + requests.add(request); + responseObserver.onNext(((ReconcileDataPointsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ReconcileDataPoints, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ReconcileDataPointsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void rollUpDataPoints( + RollUpDataPointsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof RollUpDataPointsResponse) { + requests.add(request); + responseObserver.onNext(((RollUpDataPointsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method RollUpDataPoints, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + RollUpDataPointsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void dailyRollUpDataPoints( + DailyRollUpDataPointsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof DailyRollUpDataPointsResponse) { + requests.add(request); + responseObserver.onNext(((DailyRollUpDataPointsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DailyRollUpDataPoints, expected %s or" + + " %s", + response == null ? "null" : response.getClass().getName(), + DailyRollUpDataPointsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void exportExerciseTcx( + ExportExerciseTcxRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ExportExerciseTcxResponse) { + requests.add(request); + responseObserver.onNext(((ExportExerciseTcxResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ExportExerciseTcx, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ExportExerciseTcxResponse.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-health/google-cloud-health/src/test/java/com/google/devicesandservices/health/v4/MockHealthProfileService.java b/java-health/google-cloud-health/src/test/java/com/google/devicesandservices/health/v4/MockHealthProfileService.java new file mode 100644 index 000000000000..0d969825c455 --- /dev/null +++ b/java-health/google-cloud-health/src/test/java/com/google/devicesandservices/health/v4/MockHealthProfileService.java @@ -0,0 +1,59 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockHealthProfileService implements MockGrpcService { + private final MockHealthProfileServiceImpl serviceImpl; + + public MockHealthProfileService() { + serviceImpl = new MockHealthProfileServiceImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/java-health/google-cloud-health/src/test/java/com/google/devicesandservices/health/v4/MockHealthProfileServiceImpl.java b/java-health/google-cloud-health/src/test/java/com/google/devicesandservices/health/v4/MockHealthProfileServiceImpl.java new file mode 100644 index 000000000000..3b27ac66fe69 --- /dev/null +++ b/java-health/google-cloud-health/src/test/java/com/google/devicesandservices/health/v4/MockHealthProfileServiceImpl.java @@ -0,0 +1,162 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4; + +import com.google.api.core.BetaApi; +import com.google.devicesandservices.health.v4.HealthProfileServiceGrpc.HealthProfileServiceImplBase; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockHealthProfileServiceImpl extends HealthProfileServiceImplBase { + private List requests; + private Queue responses; + + public MockHealthProfileServiceImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void getProfile(GetProfileRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Profile) { + requests.add(request); + responseObserver.onNext(((Profile) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetProfile, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Profile.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateProfile( + UpdateProfileRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Profile) { + requests.add(request); + responseObserver.onNext(((Profile) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateProfile, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Profile.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getSettings(GetSettingsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Settings) { + requests.add(request); + responseObserver.onNext(((Settings) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetSettings, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Settings.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateSettings( + UpdateSettingsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Settings) { + requests.add(request); + responseObserver.onNext(((Settings) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateSettings, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Settings.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getIdentity(GetIdentityRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Identity) { + requests.add(request); + responseObserver.onNext(((Identity) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetIdentity, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Identity.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-health/grpc-google-cloud-health-v4/pom.xml b/java-health/grpc-google-cloud-health-v4/pom.xml new file mode 100644 index 000000000000..7185ccd19a40 --- /dev/null +++ b/java-health/grpc-google-cloud-health-v4/pom.xml @@ -0,0 +1,45 @@ + + 4.0.0 + com.google.api.grpc + grpc-google-cloud-health-v4 + 0.0.1-SNAPSHOT + grpc-google-cloud-health-v4 + GRPC library for google-cloud-health + + com.google.cloud + google-cloud-health-parent + 0.0.1-SNAPSHOT + + + + io.grpc + grpc-api + + + io.grpc + grpc-stub + + + io.grpc + grpc-protobuf + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + com.google.api.grpc + proto-google-cloud-health-v4 + + + com.google.guava + guava + + + diff --git a/java-health/grpc-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DataPointsServiceGrpc.java b/java-health/grpc-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DataPointsServiceGrpc.java new file mode 100644 index 000000000000..0284eae77c87 --- /dev/null +++ b/java-health/grpc-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DataPointsServiceGrpc.java @@ -0,0 +1,1554 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.devicesandservices.health.v4; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * Data Points Service exposing the user's health and fitness measured and
+ * derived data.
+ * 
+ */ +@io.grpc.stub.annotations.GrpcGenerated +public final class DataPointsServiceGrpc { + + private DataPointsServiceGrpc() {} + + public static final java.lang.String SERVICE_NAME = + "google.devicesandservices.health.v4.DataPointsService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.devicesandservices.health.v4.GetDataPointRequest, + com.google.devicesandservices.health.v4.DataPoint> + getGetDataPointMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetDataPoint", + requestType = com.google.devicesandservices.health.v4.GetDataPointRequest.class, + responseType = com.google.devicesandservices.health.v4.DataPoint.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.devicesandservices.health.v4.GetDataPointRequest, + com.google.devicesandservices.health.v4.DataPoint> + getGetDataPointMethod() { + io.grpc.MethodDescriptor< + com.google.devicesandservices.health.v4.GetDataPointRequest, + com.google.devicesandservices.health.v4.DataPoint> + getGetDataPointMethod; + if ((getGetDataPointMethod = DataPointsServiceGrpc.getGetDataPointMethod) == null) { + synchronized (DataPointsServiceGrpc.class) { + if ((getGetDataPointMethod = DataPointsServiceGrpc.getGetDataPointMethod) == null) { + DataPointsServiceGrpc.getGetDataPointMethod = + getGetDataPointMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetDataPoint")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.devicesandservices.health.v4.GetDataPointRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.devicesandservices.health.v4.DataPoint + .getDefaultInstance())) + .setSchemaDescriptor( + new DataPointsServiceMethodDescriptorSupplier("GetDataPoint")) + .build(); + } + } + } + return getGetDataPointMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.devicesandservices.health.v4.ListDataPointsRequest, + com.google.devicesandservices.health.v4.ListDataPointsResponse> + getListDataPointsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListDataPoints", + requestType = com.google.devicesandservices.health.v4.ListDataPointsRequest.class, + responseType = com.google.devicesandservices.health.v4.ListDataPointsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.devicesandservices.health.v4.ListDataPointsRequest, + com.google.devicesandservices.health.v4.ListDataPointsResponse> + getListDataPointsMethod() { + io.grpc.MethodDescriptor< + com.google.devicesandservices.health.v4.ListDataPointsRequest, + com.google.devicesandservices.health.v4.ListDataPointsResponse> + getListDataPointsMethod; + if ((getListDataPointsMethod = DataPointsServiceGrpc.getListDataPointsMethod) == null) { + synchronized (DataPointsServiceGrpc.class) { + if ((getListDataPointsMethod = DataPointsServiceGrpc.getListDataPointsMethod) == null) { + DataPointsServiceGrpc.getListDataPointsMethod = + getListDataPointsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListDataPoints")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.devicesandservices.health.v4.ListDataPointsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.devicesandservices.health.v4.ListDataPointsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new DataPointsServiceMethodDescriptorSupplier("ListDataPoints")) + .build(); + } + } + } + return getListDataPointsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.devicesandservices.health.v4.CreateDataPointRequest, + com.google.longrunning.Operation> + getCreateDataPointMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateDataPoint", + requestType = com.google.devicesandservices.health.v4.CreateDataPointRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.devicesandservices.health.v4.CreateDataPointRequest, + com.google.longrunning.Operation> + getCreateDataPointMethod() { + io.grpc.MethodDescriptor< + com.google.devicesandservices.health.v4.CreateDataPointRequest, + com.google.longrunning.Operation> + getCreateDataPointMethod; + if ((getCreateDataPointMethod = DataPointsServiceGrpc.getCreateDataPointMethod) == null) { + synchronized (DataPointsServiceGrpc.class) { + if ((getCreateDataPointMethod = DataPointsServiceGrpc.getCreateDataPointMethod) == null) { + DataPointsServiceGrpc.getCreateDataPointMethod = + getCreateDataPointMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateDataPoint")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.devicesandservices.health.v4.CreateDataPointRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new DataPointsServiceMethodDescriptorSupplier("CreateDataPoint")) + .build(); + } + } + } + return getCreateDataPointMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.devicesandservices.health.v4.UpdateDataPointRequest, + com.google.longrunning.Operation> + getUpdateDataPointMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateDataPoint", + requestType = com.google.devicesandservices.health.v4.UpdateDataPointRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.devicesandservices.health.v4.UpdateDataPointRequest, + com.google.longrunning.Operation> + getUpdateDataPointMethod() { + io.grpc.MethodDescriptor< + com.google.devicesandservices.health.v4.UpdateDataPointRequest, + com.google.longrunning.Operation> + getUpdateDataPointMethod; + if ((getUpdateDataPointMethod = DataPointsServiceGrpc.getUpdateDataPointMethod) == null) { + synchronized (DataPointsServiceGrpc.class) { + if ((getUpdateDataPointMethod = DataPointsServiceGrpc.getUpdateDataPointMethod) == null) { + DataPointsServiceGrpc.getUpdateDataPointMethod = + getUpdateDataPointMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateDataPoint")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.devicesandservices.health.v4.UpdateDataPointRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new DataPointsServiceMethodDescriptorSupplier("UpdateDataPoint")) + .build(); + } + } + } + return getUpdateDataPointMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.devicesandservices.health.v4.BatchDeleteDataPointsRequest, + com.google.longrunning.Operation> + getBatchDeleteDataPointsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "BatchDeleteDataPoints", + requestType = com.google.devicesandservices.health.v4.BatchDeleteDataPointsRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.devicesandservices.health.v4.BatchDeleteDataPointsRequest, + com.google.longrunning.Operation> + getBatchDeleteDataPointsMethod() { + io.grpc.MethodDescriptor< + com.google.devicesandservices.health.v4.BatchDeleteDataPointsRequest, + com.google.longrunning.Operation> + getBatchDeleteDataPointsMethod; + if ((getBatchDeleteDataPointsMethod = DataPointsServiceGrpc.getBatchDeleteDataPointsMethod) + == null) { + synchronized (DataPointsServiceGrpc.class) { + if ((getBatchDeleteDataPointsMethod = DataPointsServiceGrpc.getBatchDeleteDataPointsMethod) + == null) { + DataPointsServiceGrpc.getBatchDeleteDataPointsMethod = + getBatchDeleteDataPointsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "BatchDeleteDataPoints")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.devicesandservices.health.v4.BatchDeleteDataPointsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new DataPointsServiceMethodDescriptorSupplier("BatchDeleteDataPoints")) + .build(); + } + } + } + return getBatchDeleteDataPointsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.devicesandservices.health.v4.ReconcileDataPointsRequest, + com.google.devicesandservices.health.v4.ReconcileDataPointsResponse> + getReconcileDataPointsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ReconcileDataPoints", + requestType = com.google.devicesandservices.health.v4.ReconcileDataPointsRequest.class, + responseType = com.google.devicesandservices.health.v4.ReconcileDataPointsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.devicesandservices.health.v4.ReconcileDataPointsRequest, + com.google.devicesandservices.health.v4.ReconcileDataPointsResponse> + getReconcileDataPointsMethod() { + io.grpc.MethodDescriptor< + com.google.devicesandservices.health.v4.ReconcileDataPointsRequest, + com.google.devicesandservices.health.v4.ReconcileDataPointsResponse> + getReconcileDataPointsMethod; + if ((getReconcileDataPointsMethod = DataPointsServiceGrpc.getReconcileDataPointsMethod) + == null) { + synchronized (DataPointsServiceGrpc.class) { + if ((getReconcileDataPointsMethod = DataPointsServiceGrpc.getReconcileDataPointsMethod) + == null) { + DataPointsServiceGrpc.getReconcileDataPointsMethod = + getReconcileDataPointsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ReconcileDataPoints")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.devicesandservices.health.v4.ReconcileDataPointsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.devicesandservices.health.v4.ReconcileDataPointsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new DataPointsServiceMethodDescriptorSupplier("ReconcileDataPoints")) + .build(); + } + } + } + return getReconcileDataPointsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.devicesandservices.health.v4.RollUpDataPointsRequest, + com.google.devicesandservices.health.v4.RollUpDataPointsResponse> + getRollUpDataPointsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "RollUpDataPoints", + requestType = com.google.devicesandservices.health.v4.RollUpDataPointsRequest.class, + responseType = com.google.devicesandservices.health.v4.RollUpDataPointsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.devicesandservices.health.v4.RollUpDataPointsRequest, + com.google.devicesandservices.health.v4.RollUpDataPointsResponse> + getRollUpDataPointsMethod() { + io.grpc.MethodDescriptor< + com.google.devicesandservices.health.v4.RollUpDataPointsRequest, + com.google.devicesandservices.health.v4.RollUpDataPointsResponse> + getRollUpDataPointsMethod; + if ((getRollUpDataPointsMethod = DataPointsServiceGrpc.getRollUpDataPointsMethod) == null) { + synchronized (DataPointsServiceGrpc.class) { + if ((getRollUpDataPointsMethod = DataPointsServiceGrpc.getRollUpDataPointsMethod) == null) { + DataPointsServiceGrpc.getRollUpDataPointsMethod = + getRollUpDataPointsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RollUpDataPoints")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.devicesandservices.health.v4.RollUpDataPointsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.devicesandservices.health.v4.RollUpDataPointsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new DataPointsServiceMethodDescriptorSupplier("RollUpDataPoints")) + .build(); + } + } + } + return getRollUpDataPointsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.devicesandservices.health.v4.DailyRollUpDataPointsRequest, + com.google.devicesandservices.health.v4.DailyRollUpDataPointsResponse> + getDailyRollUpDataPointsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DailyRollUpDataPoints", + requestType = com.google.devicesandservices.health.v4.DailyRollUpDataPointsRequest.class, + responseType = com.google.devicesandservices.health.v4.DailyRollUpDataPointsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.devicesandservices.health.v4.DailyRollUpDataPointsRequest, + com.google.devicesandservices.health.v4.DailyRollUpDataPointsResponse> + getDailyRollUpDataPointsMethod() { + io.grpc.MethodDescriptor< + com.google.devicesandservices.health.v4.DailyRollUpDataPointsRequest, + com.google.devicesandservices.health.v4.DailyRollUpDataPointsResponse> + getDailyRollUpDataPointsMethod; + if ((getDailyRollUpDataPointsMethod = DataPointsServiceGrpc.getDailyRollUpDataPointsMethod) + == null) { + synchronized (DataPointsServiceGrpc.class) { + if ((getDailyRollUpDataPointsMethod = DataPointsServiceGrpc.getDailyRollUpDataPointsMethod) + == null) { + DataPointsServiceGrpc.getDailyRollUpDataPointsMethod = + getDailyRollUpDataPointsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "DailyRollUpDataPoints")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.devicesandservices.health.v4.DailyRollUpDataPointsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.devicesandservices.health.v4.DailyRollUpDataPointsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new DataPointsServiceMethodDescriptorSupplier("DailyRollUpDataPoints")) + .build(); + } + } + } + return getDailyRollUpDataPointsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.devicesandservices.health.v4.ExportExerciseTcxRequest, + com.google.devicesandservices.health.v4.ExportExerciseTcxResponse> + getExportExerciseTcxMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ExportExerciseTcx", + requestType = com.google.devicesandservices.health.v4.ExportExerciseTcxRequest.class, + responseType = com.google.devicesandservices.health.v4.ExportExerciseTcxResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.devicesandservices.health.v4.ExportExerciseTcxRequest, + com.google.devicesandservices.health.v4.ExportExerciseTcxResponse> + getExportExerciseTcxMethod() { + io.grpc.MethodDescriptor< + com.google.devicesandservices.health.v4.ExportExerciseTcxRequest, + com.google.devicesandservices.health.v4.ExportExerciseTcxResponse> + getExportExerciseTcxMethod; + if ((getExportExerciseTcxMethod = DataPointsServiceGrpc.getExportExerciseTcxMethod) == null) { + synchronized (DataPointsServiceGrpc.class) { + if ((getExportExerciseTcxMethod = DataPointsServiceGrpc.getExportExerciseTcxMethod) + == null) { + DataPointsServiceGrpc.getExportExerciseTcxMethod = + getExportExerciseTcxMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ExportExerciseTcx")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.devicesandservices.health.v4.ExportExerciseTcxRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.devicesandservices.health.v4.ExportExerciseTcxResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new DataPointsServiceMethodDescriptorSupplier("ExportExerciseTcx")) + .build(); + } + } + } + return getExportExerciseTcxMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static DataPointsServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public DataPointsServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataPointsServiceStub(channel, callOptions); + } + }; + return DataPointsServiceStub.newStub(factory, channel); + } + + /** Creates a new blocking-style stub that supports all types of calls on the service */ + public static DataPointsServiceBlockingV2Stub newBlockingV2Stub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public DataPointsServiceBlockingV2Stub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataPointsServiceBlockingV2Stub(channel, callOptions); + } + }; + return DataPointsServiceBlockingV2Stub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static DataPointsServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public DataPointsServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataPointsServiceBlockingStub(channel, callOptions); + } + }; + return DataPointsServiceBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static DataPointsServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public DataPointsServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataPointsServiceFutureStub(channel, callOptions); + } + }; + return DataPointsServiceFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * Data Points Service exposing the user's health and fitness measured and
+   * derived data.
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * Get a single identifyable data point.
+     * 
+ */ + default void getDataPoint( + com.google.devicesandservices.health.v4.GetDataPointRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetDataPointMethod(), responseObserver); + } + + /** + * + * + *
+     * Query user health and fitness data points.
+     * 
+ */ + default void listDataPoints( + com.google.devicesandservices.health.v4.ListDataPointsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListDataPointsMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a single identifiable data point.
+     * 
+ */ + default void createDataPoint( + com.google.devicesandservices.health.v4.CreateDataPointRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateDataPointMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates a single identifiable data point. If a data point with the
+     * specified `name` is not found, the request will fail.
+     * 
+ */ + default void updateDataPoint( + com.google.devicesandservices.health.v4.UpdateDataPointRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateDataPointMethod(), responseObserver); + } + + /** + * + * + *
+     * Delete a batch of identifyable data points.
+     * 
+ */ + default void batchDeleteDataPoints( + com.google.devicesandservices.health.v4.BatchDeleteDataPointsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getBatchDeleteDataPointsMethod(), responseObserver); + } + + /** + * + * + *
+     * Reconcile data points from multiple data sources into a single data stream.
+     * 
+ */ + default void reconcileDataPoints( + com.google.devicesandservices.health.v4.ReconcileDataPointsRequest request, + io.grpc.stub.StreamObserver< + com.google.devicesandservices.health.v4.ReconcileDataPointsResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getReconcileDataPointsMethod(), responseObserver); + } + + /** + * + * + *
+     * Roll up data points over physical time intervals for supported data types.
+     * 
+ */ + default void rollUpDataPoints( + com.google.devicesandservices.health.v4.RollUpDataPointsRequest request, + io.grpc.stub.StreamObserver< + com.google.devicesandservices.health.v4.RollUpDataPointsResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getRollUpDataPointsMethod(), responseObserver); + } + + /** + * + * + *
+     * Roll up data points over civil time intervals for supported data types.
+     * 
+ */ + default void dailyRollUpDataPoints( + com.google.devicesandservices.health.v4.DailyRollUpDataPointsRequest request, + io.grpc.stub.StreamObserver< + com.google.devicesandservices.health.v4.DailyRollUpDataPointsResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDailyRollUpDataPointsMethod(), responseObserver); + } + + /** + * + * + *
+     * Exports exercise data in TCX format.
+     * Note: While the Authorization section below states that any one of the
+     * listed scopes is accepted, this specific method requires the user to
+     * provide both one of the `activity_and_fitness` scopes (`normal` or
+     * `readonly`) AND one of the `location` scopes (`normal` or `readonly`) in
+     * their access token to succeed.
+     * 
+ */ + default void exportExerciseTcx( + com.google.devicesandservices.health.v4.ExportExerciseTcxRequest request, + io.grpc.stub.StreamObserver< + com.google.devicesandservices.health.v4.ExportExerciseTcxResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getExportExerciseTcxMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service DataPointsService. + * + *
+   * Data Points Service exposing the user's health and fitness measured and
+   * derived data.
+   * 
+ */ + public abstract static class DataPointsServiceImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return DataPointsServiceGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service DataPointsService. + * + *
+   * Data Points Service exposing the user's health and fitness measured and
+   * derived data.
+   * 
+ */ + public static final class DataPointsServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private DataPointsServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DataPointsServiceStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataPointsServiceStub(channel, callOptions); + } + + /** + * + * + *
+     * Get a single identifyable data point.
+     * 
+ */ + public void getDataPoint( + com.google.devicesandservices.health.v4.GetDataPointRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetDataPointMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Query user health and fitness data points.
+     * 
+ */ + public void listDataPoints( + com.google.devicesandservices.health.v4.ListDataPointsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListDataPointsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a single identifiable data point.
+     * 
+ */ + public void createDataPoint( + com.google.devicesandservices.health.v4.CreateDataPointRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateDataPointMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates a single identifiable data point. If a data point with the
+     * specified `name` is not found, the request will fail.
+     * 
+ */ + public void updateDataPoint( + com.google.devicesandservices.health.v4.UpdateDataPointRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateDataPointMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Delete a batch of identifyable data points.
+     * 
+ */ + public void batchDeleteDataPoints( + com.google.devicesandservices.health.v4.BatchDeleteDataPointsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getBatchDeleteDataPointsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Reconcile data points from multiple data sources into a single data stream.
+     * 
+ */ + public void reconcileDataPoints( + com.google.devicesandservices.health.v4.ReconcileDataPointsRequest request, + io.grpc.stub.StreamObserver< + com.google.devicesandservices.health.v4.ReconcileDataPointsResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getReconcileDataPointsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Roll up data points over physical time intervals for supported data types.
+     * 
+ */ + public void rollUpDataPoints( + com.google.devicesandservices.health.v4.RollUpDataPointsRequest request, + io.grpc.stub.StreamObserver< + com.google.devicesandservices.health.v4.RollUpDataPointsResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getRollUpDataPointsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Roll up data points over civil time intervals for supported data types.
+     * 
+ */ + public void dailyRollUpDataPoints( + com.google.devicesandservices.health.v4.DailyRollUpDataPointsRequest request, + io.grpc.stub.StreamObserver< + com.google.devicesandservices.health.v4.DailyRollUpDataPointsResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDailyRollUpDataPointsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Exports exercise data in TCX format.
+     * Note: While the Authorization section below states that any one of the
+     * listed scopes is accepted, this specific method requires the user to
+     * provide both one of the `activity_and_fitness` scopes (`normal` or
+     * `readonly`) AND one of the `location` scopes (`normal` or `readonly`) in
+     * their access token to succeed.
+     * 
+ */ + public void exportExerciseTcx( + com.google.devicesandservices.health.v4.ExportExerciseTcxRequest request, + io.grpc.stub.StreamObserver< + com.google.devicesandservices.health.v4.ExportExerciseTcxResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getExportExerciseTcxMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service DataPointsService. + * + *
+   * Data Points Service exposing the user's health and fitness measured and
+   * derived data.
+   * 
+ */ + public static final class DataPointsServiceBlockingV2Stub + extends io.grpc.stub.AbstractBlockingStub { + private DataPointsServiceBlockingV2Stub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DataPointsServiceBlockingV2Stub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataPointsServiceBlockingV2Stub(channel, callOptions); + } + + /** + * + * + *
+     * Get a single identifyable data point.
+     * 
+ */ + public com.google.devicesandservices.health.v4.DataPoint getDataPoint( + com.google.devicesandservices.health.v4.GetDataPointRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetDataPointMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Query user health and fitness data points.
+     * 
+ */ + public com.google.devicesandservices.health.v4.ListDataPointsResponse listDataPoints( + com.google.devicesandservices.health.v4.ListDataPointsRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListDataPointsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a single identifiable data point.
+     * 
+ */ + public com.google.longrunning.Operation createDataPoint( + com.google.devicesandservices.health.v4.CreateDataPointRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getCreateDataPointMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates a single identifiable data point. If a data point with the
+     * specified `name` is not found, the request will fail.
+     * 
+ */ + public com.google.longrunning.Operation updateDataPoint( + com.google.devicesandservices.health.v4.UpdateDataPointRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getUpdateDataPointMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Delete a batch of identifyable data points.
+     * 
+ */ + public com.google.longrunning.Operation batchDeleteDataPoints( + com.google.devicesandservices.health.v4.BatchDeleteDataPointsRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getBatchDeleteDataPointsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Reconcile data points from multiple data sources into a single data stream.
+     * 
+ */ + public com.google.devicesandservices.health.v4.ReconcileDataPointsResponse reconcileDataPoints( + com.google.devicesandservices.health.v4.ReconcileDataPointsRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getReconcileDataPointsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Roll up data points over physical time intervals for supported data types.
+     * 
+ */ + public com.google.devicesandservices.health.v4.RollUpDataPointsResponse rollUpDataPoints( + com.google.devicesandservices.health.v4.RollUpDataPointsRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getRollUpDataPointsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Roll up data points over civil time intervals for supported data types.
+     * 
+ */ + public com.google.devicesandservices.health.v4.DailyRollUpDataPointsResponse + dailyRollUpDataPoints( + com.google.devicesandservices.health.v4.DailyRollUpDataPointsRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getDailyRollUpDataPointsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Exports exercise data in TCX format.
+     * Note: While the Authorization section below states that any one of the
+     * listed scopes is accepted, this specific method requires the user to
+     * provide both one of the `activity_and_fitness` scopes (`normal` or
+     * `readonly`) AND one of the `location` scopes (`normal` or `readonly`) in
+     * their access token to succeed.
+     * 
+ */ + public com.google.devicesandservices.health.v4.ExportExerciseTcxResponse exportExerciseTcx( + com.google.devicesandservices.health.v4.ExportExerciseTcxRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getExportExerciseTcxMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do limited synchronous rpc calls to service DataPointsService. + * + *
+   * Data Points Service exposing the user's health and fitness measured and
+   * derived data.
+   * 
+ */ + public static final class DataPointsServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private DataPointsServiceBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DataPointsServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataPointsServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Get a single identifyable data point.
+     * 
+ */ + public com.google.devicesandservices.health.v4.DataPoint getDataPoint( + com.google.devicesandservices.health.v4.GetDataPointRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetDataPointMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Query user health and fitness data points.
+     * 
+ */ + public com.google.devicesandservices.health.v4.ListDataPointsResponse listDataPoints( + com.google.devicesandservices.health.v4.ListDataPointsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListDataPointsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a single identifiable data point.
+     * 
+ */ + public com.google.longrunning.Operation createDataPoint( + com.google.devicesandservices.health.v4.CreateDataPointRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateDataPointMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates a single identifiable data point. If a data point with the
+     * specified `name` is not found, the request will fail.
+     * 
+ */ + public com.google.longrunning.Operation updateDataPoint( + com.google.devicesandservices.health.v4.UpdateDataPointRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateDataPointMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Delete a batch of identifyable data points.
+     * 
+ */ + public com.google.longrunning.Operation batchDeleteDataPoints( + com.google.devicesandservices.health.v4.BatchDeleteDataPointsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getBatchDeleteDataPointsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Reconcile data points from multiple data sources into a single data stream.
+     * 
+ */ + public com.google.devicesandservices.health.v4.ReconcileDataPointsResponse reconcileDataPoints( + com.google.devicesandservices.health.v4.ReconcileDataPointsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getReconcileDataPointsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Roll up data points over physical time intervals for supported data types.
+     * 
+ */ + public com.google.devicesandservices.health.v4.RollUpDataPointsResponse rollUpDataPoints( + com.google.devicesandservices.health.v4.RollUpDataPointsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getRollUpDataPointsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Roll up data points over civil time intervals for supported data types.
+     * 
+ */ + public com.google.devicesandservices.health.v4.DailyRollUpDataPointsResponse + dailyRollUpDataPoints( + com.google.devicesandservices.health.v4.DailyRollUpDataPointsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDailyRollUpDataPointsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Exports exercise data in TCX format.
+     * Note: While the Authorization section below states that any one of the
+     * listed scopes is accepted, this specific method requires the user to
+     * provide both one of the `activity_and_fitness` scopes (`normal` or
+     * `readonly`) AND one of the `location` scopes (`normal` or `readonly`) in
+     * their access token to succeed.
+     * 
+ */ + public com.google.devicesandservices.health.v4.ExportExerciseTcxResponse exportExerciseTcx( + com.google.devicesandservices.health.v4.ExportExerciseTcxRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getExportExerciseTcxMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service DataPointsService. + * + *
+   * Data Points Service exposing the user's health and fitness measured and
+   * derived data.
+   * 
+ */ + public static final class DataPointsServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private DataPointsServiceFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DataPointsServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataPointsServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Get a single identifyable data point.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.devicesandservices.health.v4.DataPoint> + getDataPoint(com.google.devicesandservices.health.v4.GetDataPointRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetDataPointMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Query user health and fitness data points.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.devicesandservices.health.v4.ListDataPointsResponse> + listDataPoints(com.google.devicesandservices.health.v4.ListDataPointsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListDataPointsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a single identifiable data point.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createDataPoint(com.google.devicesandservices.health.v4.CreateDataPointRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateDataPointMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates a single identifiable data point. If a data point with the
+     * specified `name` is not found, the request will fail.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateDataPoint(com.google.devicesandservices.health.v4.UpdateDataPointRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateDataPointMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Delete a batch of identifyable data points.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + batchDeleteDataPoints( + com.google.devicesandservices.health.v4.BatchDeleteDataPointsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getBatchDeleteDataPointsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Reconcile data points from multiple data sources into a single data stream.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.devicesandservices.health.v4.ReconcileDataPointsResponse> + reconcileDataPoints( + com.google.devicesandservices.health.v4.ReconcileDataPointsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getReconcileDataPointsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Roll up data points over physical time intervals for supported data types.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.devicesandservices.health.v4.RollUpDataPointsResponse> + rollUpDataPoints(com.google.devicesandservices.health.v4.RollUpDataPointsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getRollUpDataPointsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Roll up data points over civil time intervals for supported data types.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.devicesandservices.health.v4.DailyRollUpDataPointsResponse> + dailyRollUpDataPoints( + com.google.devicesandservices.health.v4.DailyRollUpDataPointsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDailyRollUpDataPointsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Exports exercise data in TCX format.
+     * Note: While the Authorization section below states that any one of the
+     * listed scopes is accepted, this specific method requires the user to
+     * provide both one of the `activity_and_fitness` scopes (`normal` or
+     * `readonly`) AND one of the `location` scopes (`normal` or `readonly`) in
+     * their access token to succeed.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.devicesandservices.health.v4.ExportExerciseTcxResponse> + exportExerciseTcx( + com.google.devicesandservices.health.v4.ExportExerciseTcxRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getExportExerciseTcxMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_GET_DATA_POINT = 0; + private static final int METHODID_LIST_DATA_POINTS = 1; + private static final int METHODID_CREATE_DATA_POINT = 2; + private static final int METHODID_UPDATE_DATA_POINT = 3; + private static final int METHODID_BATCH_DELETE_DATA_POINTS = 4; + private static final int METHODID_RECONCILE_DATA_POINTS = 5; + private static final int METHODID_ROLL_UP_DATA_POINTS = 6; + private static final int METHODID_DAILY_ROLL_UP_DATA_POINTS = 7; + private static final int METHODID_EXPORT_EXERCISE_TCX = 8; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_GET_DATA_POINT: + serviceImpl.getDataPoint( + (com.google.devicesandservices.health.v4.GetDataPointRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_DATA_POINTS: + serviceImpl.listDataPoints( + (com.google.devicesandservices.health.v4.ListDataPointsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.devicesandservices.health.v4.ListDataPointsResponse>) + responseObserver); + break; + case METHODID_CREATE_DATA_POINT: + serviceImpl.createDataPoint( + (com.google.devicesandservices.health.v4.CreateDataPointRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_DATA_POINT: + serviceImpl.updateDataPoint( + (com.google.devicesandservices.health.v4.UpdateDataPointRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_BATCH_DELETE_DATA_POINTS: + serviceImpl.batchDeleteDataPoints( + (com.google.devicesandservices.health.v4.BatchDeleteDataPointsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_RECONCILE_DATA_POINTS: + serviceImpl.reconcileDataPoints( + (com.google.devicesandservices.health.v4.ReconcileDataPointsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.devicesandservices.health.v4.ReconcileDataPointsResponse>) + responseObserver); + break; + case METHODID_ROLL_UP_DATA_POINTS: + serviceImpl.rollUpDataPoints( + (com.google.devicesandservices.health.v4.RollUpDataPointsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.devicesandservices.health.v4.RollUpDataPointsResponse>) + responseObserver); + break; + case METHODID_DAILY_ROLL_UP_DATA_POINTS: + serviceImpl.dailyRollUpDataPoints( + (com.google.devicesandservices.health.v4.DailyRollUpDataPointsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.devicesandservices.health.v4.DailyRollUpDataPointsResponse>) + responseObserver); + break; + case METHODID_EXPORT_EXERCISE_TCX: + serviceImpl.exportExerciseTcx( + (com.google.devicesandservices.health.v4.ExportExerciseTcxRequest) request, + (io.grpc.stub.StreamObserver< + com.google.devicesandservices.health.v4.ExportExerciseTcxResponse>) + responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getGetDataPointMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.devicesandservices.health.v4.GetDataPointRequest, + com.google.devicesandservices.health.v4.DataPoint>( + service, METHODID_GET_DATA_POINT))) + .addMethod( + getListDataPointsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.devicesandservices.health.v4.ListDataPointsRequest, + com.google.devicesandservices.health.v4.ListDataPointsResponse>( + service, METHODID_LIST_DATA_POINTS))) + .addMethod( + getCreateDataPointMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.devicesandservices.health.v4.CreateDataPointRequest, + com.google.longrunning.Operation>(service, METHODID_CREATE_DATA_POINT))) + .addMethod( + getUpdateDataPointMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.devicesandservices.health.v4.UpdateDataPointRequest, + com.google.longrunning.Operation>(service, METHODID_UPDATE_DATA_POINT))) + .addMethod( + getBatchDeleteDataPointsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.devicesandservices.health.v4.BatchDeleteDataPointsRequest, + com.google.longrunning.Operation>(service, METHODID_BATCH_DELETE_DATA_POINTS))) + .addMethod( + getReconcileDataPointsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.devicesandservices.health.v4.ReconcileDataPointsRequest, + com.google.devicesandservices.health.v4.ReconcileDataPointsResponse>( + service, METHODID_RECONCILE_DATA_POINTS))) + .addMethod( + getRollUpDataPointsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.devicesandservices.health.v4.RollUpDataPointsRequest, + com.google.devicesandservices.health.v4.RollUpDataPointsResponse>( + service, METHODID_ROLL_UP_DATA_POINTS))) + .addMethod( + getDailyRollUpDataPointsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.devicesandservices.health.v4.DailyRollUpDataPointsRequest, + com.google.devicesandservices.health.v4.DailyRollUpDataPointsResponse>( + service, METHODID_DAILY_ROLL_UP_DATA_POINTS))) + .addMethod( + getExportExerciseTcxMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.devicesandservices.health.v4.ExportExerciseTcxRequest, + com.google.devicesandservices.health.v4.ExportExerciseTcxResponse>( + service, METHODID_EXPORT_EXERCISE_TCX))) + .build(); + } + + private abstract static class DataPointsServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + DataPointsServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.devicesandservices.health.v4.DataPointsProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("DataPointsService"); + } + } + + private static final class DataPointsServiceFileDescriptorSupplier + extends DataPointsServiceBaseDescriptorSupplier { + DataPointsServiceFileDescriptorSupplier() {} + } + + private static final class DataPointsServiceMethodDescriptorSupplier + extends DataPointsServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + DataPointsServiceMethodDescriptorSupplier(java.lang.String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (DataPointsServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new DataPointsServiceFileDescriptorSupplier()) + .addMethod(getGetDataPointMethod()) + .addMethod(getListDataPointsMethod()) + .addMethod(getCreateDataPointMethod()) + .addMethod(getUpdateDataPointMethod()) + .addMethod(getBatchDeleteDataPointsMethod()) + .addMethod(getReconcileDataPointsMethod()) + .addMethod(getRollUpDataPointsMethod()) + .addMethod(getDailyRollUpDataPointsMethod()) + .addMethod(getExportExerciseTcxMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-health/grpc-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/HealthProfileServiceGrpc.java b/java-health/grpc-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/HealthProfileServiceGrpc.java new file mode 100644 index 000000000000..4097eaf99804 --- /dev/null +++ b/java-health/grpc-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/HealthProfileServiceGrpc.java @@ -0,0 +1,972 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.devicesandservices.health.v4; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * Health Profile Service
+ * 
+ */ +@io.grpc.stub.annotations.GrpcGenerated +public final class HealthProfileServiceGrpc { + + private HealthProfileServiceGrpc() {} + + public static final java.lang.String SERVICE_NAME = + "google.devicesandservices.health.v4.HealthProfileService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.devicesandservices.health.v4.GetProfileRequest, + com.google.devicesandservices.health.v4.Profile> + getGetProfileMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetProfile", + requestType = com.google.devicesandservices.health.v4.GetProfileRequest.class, + responseType = com.google.devicesandservices.health.v4.Profile.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.devicesandservices.health.v4.GetProfileRequest, + com.google.devicesandservices.health.v4.Profile> + getGetProfileMethod() { + io.grpc.MethodDescriptor< + com.google.devicesandservices.health.v4.GetProfileRequest, + com.google.devicesandservices.health.v4.Profile> + getGetProfileMethod; + if ((getGetProfileMethod = HealthProfileServiceGrpc.getGetProfileMethod) == null) { + synchronized (HealthProfileServiceGrpc.class) { + if ((getGetProfileMethod = HealthProfileServiceGrpc.getGetProfileMethod) == null) { + HealthProfileServiceGrpc.getGetProfileMethod = + getGetProfileMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetProfile")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.devicesandservices.health.v4.GetProfileRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.devicesandservices.health.v4.Profile.getDefaultInstance())) + .setSchemaDescriptor( + new HealthProfileServiceMethodDescriptorSupplier("GetProfile")) + .build(); + } + } + } + return getGetProfileMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.devicesandservices.health.v4.UpdateProfileRequest, + com.google.devicesandservices.health.v4.Profile> + getUpdateProfileMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateProfile", + requestType = com.google.devicesandservices.health.v4.UpdateProfileRequest.class, + responseType = com.google.devicesandservices.health.v4.Profile.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.devicesandservices.health.v4.UpdateProfileRequest, + com.google.devicesandservices.health.v4.Profile> + getUpdateProfileMethod() { + io.grpc.MethodDescriptor< + com.google.devicesandservices.health.v4.UpdateProfileRequest, + com.google.devicesandservices.health.v4.Profile> + getUpdateProfileMethod; + if ((getUpdateProfileMethod = HealthProfileServiceGrpc.getUpdateProfileMethod) == null) { + synchronized (HealthProfileServiceGrpc.class) { + if ((getUpdateProfileMethod = HealthProfileServiceGrpc.getUpdateProfileMethod) == null) { + HealthProfileServiceGrpc.getUpdateProfileMethod = + getUpdateProfileMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateProfile")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.devicesandservices.health.v4.UpdateProfileRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.devicesandservices.health.v4.Profile.getDefaultInstance())) + .setSchemaDescriptor( + new HealthProfileServiceMethodDescriptorSupplier("UpdateProfile")) + .build(); + } + } + } + return getUpdateProfileMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.devicesandservices.health.v4.GetSettingsRequest, + com.google.devicesandservices.health.v4.Settings> + getGetSettingsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetSettings", + requestType = com.google.devicesandservices.health.v4.GetSettingsRequest.class, + responseType = com.google.devicesandservices.health.v4.Settings.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.devicesandservices.health.v4.GetSettingsRequest, + com.google.devicesandservices.health.v4.Settings> + getGetSettingsMethod() { + io.grpc.MethodDescriptor< + com.google.devicesandservices.health.v4.GetSettingsRequest, + com.google.devicesandservices.health.v4.Settings> + getGetSettingsMethod; + if ((getGetSettingsMethod = HealthProfileServiceGrpc.getGetSettingsMethod) == null) { + synchronized (HealthProfileServiceGrpc.class) { + if ((getGetSettingsMethod = HealthProfileServiceGrpc.getGetSettingsMethod) == null) { + HealthProfileServiceGrpc.getGetSettingsMethod = + getGetSettingsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetSettings")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.devicesandservices.health.v4.GetSettingsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.devicesandservices.health.v4.Settings + .getDefaultInstance())) + .setSchemaDescriptor( + new HealthProfileServiceMethodDescriptorSupplier("GetSettings")) + .build(); + } + } + } + return getGetSettingsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.devicesandservices.health.v4.UpdateSettingsRequest, + com.google.devicesandservices.health.v4.Settings> + getUpdateSettingsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateSettings", + requestType = com.google.devicesandservices.health.v4.UpdateSettingsRequest.class, + responseType = com.google.devicesandservices.health.v4.Settings.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.devicesandservices.health.v4.UpdateSettingsRequest, + com.google.devicesandservices.health.v4.Settings> + getUpdateSettingsMethod() { + io.grpc.MethodDescriptor< + com.google.devicesandservices.health.v4.UpdateSettingsRequest, + com.google.devicesandservices.health.v4.Settings> + getUpdateSettingsMethod; + if ((getUpdateSettingsMethod = HealthProfileServiceGrpc.getUpdateSettingsMethod) == null) { + synchronized (HealthProfileServiceGrpc.class) { + if ((getUpdateSettingsMethod = HealthProfileServiceGrpc.getUpdateSettingsMethod) == null) { + HealthProfileServiceGrpc.getUpdateSettingsMethod = + getUpdateSettingsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateSettings")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.devicesandservices.health.v4.UpdateSettingsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.devicesandservices.health.v4.Settings + .getDefaultInstance())) + .setSchemaDescriptor( + new HealthProfileServiceMethodDescriptorSupplier("UpdateSettings")) + .build(); + } + } + } + return getUpdateSettingsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.devicesandservices.health.v4.GetIdentityRequest, + com.google.devicesandservices.health.v4.Identity> + getGetIdentityMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetIdentity", + requestType = com.google.devicesandservices.health.v4.GetIdentityRequest.class, + responseType = com.google.devicesandservices.health.v4.Identity.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.devicesandservices.health.v4.GetIdentityRequest, + com.google.devicesandservices.health.v4.Identity> + getGetIdentityMethod() { + io.grpc.MethodDescriptor< + com.google.devicesandservices.health.v4.GetIdentityRequest, + com.google.devicesandservices.health.v4.Identity> + getGetIdentityMethod; + if ((getGetIdentityMethod = HealthProfileServiceGrpc.getGetIdentityMethod) == null) { + synchronized (HealthProfileServiceGrpc.class) { + if ((getGetIdentityMethod = HealthProfileServiceGrpc.getGetIdentityMethod) == null) { + HealthProfileServiceGrpc.getGetIdentityMethod = + getGetIdentityMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetIdentity")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.devicesandservices.health.v4.GetIdentityRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.devicesandservices.health.v4.Identity + .getDefaultInstance())) + .setSchemaDescriptor( + new HealthProfileServiceMethodDescriptorSupplier("GetIdentity")) + .build(); + } + } + } + return getGetIdentityMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static HealthProfileServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public HealthProfileServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new HealthProfileServiceStub(channel, callOptions); + } + }; + return HealthProfileServiceStub.newStub(factory, channel); + } + + /** Creates a new blocking-style stub that supports all types of calls on the service */ + public static HealthProfileServiceBlockingV2Stub newBlockingV2Stub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public HealthProfileServiceBlockingV2Stub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new HealthProfileServiceBlockingV2Stub(channel, callOptions); + } + }; + return HealthProfileServiceBlockingV2Stub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static HealthProfileServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public HealthProfileServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new HealthProfileServiceBlockingStub(channel, callOptions); + } + }; + return HealthProfileServiceBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static HealthProfileServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public HealthProfileServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new HealthProfileServiceFutureStub(channel, callOptions); + } + }; + return HealthProfileServiceFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * Health Profile Service
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * Returns user Profile details.
+     * 
+ */ + default void getProfile( + com.google.devicesandservices.health.v4.GetProfileRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetProfileMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the user's profile details.
+     * 
+ */ + default void updateProfile( + com.google.devicesandservices.health.v4.UpdateProfileRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateProfileMethod(), responseObserver); + } + + /** + * + * + *
+     * Returns user settings details.
+     * 
+ */ + default void getSettings( + com.google.devicesandservices.health.v4.GetSettingsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetSettingsMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the user's settings details.
+     * 
+ */ + default void updateSettings( + com.google.devicesandservices.health.v4.UpdateSettingsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateSettingsMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets the user's identity.
+     * It includes the legacy Fitbit user ID and the Google user ID and it can be
+     * used by migrating clients to map identifiers between the two systems.
+     * 
+ */ + default void getIdentity( + com.google.devicesandservices.health.v4.GetIdentityRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetIdentityMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service HealthProfileService. + * + *
+   * Health Profile Service
+   * 
+ */ + public abstract static class HealthProfileServiceImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return HealthProfileServiceGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service HealthProfileService. + * + *
+   * Health Profile Service
+   * 
+ */ + public static final class HealthProfileServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private HealthProfileServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected HealthProfileServiceStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new HealthProfileServiceStub(channel, callOptions); + } + + /** + * + * + *
+     * Returns user Profile details.
+     * 
+ */ + public void getProfile( + com.google.devicesandservices.health.v4.GetProfileRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetProfileMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Updates the user's profile details.
+     * 
+ */ + public void updateProfile( + com.google.devicesandservices.health.v4.UpdateProfileRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateProfileMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Returns user settings details.
+     * 
+ */ + public void getSettings( + com.google.devicesandservices.health.v4.GetSettingsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetSettingsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates the user's settings details.
+     * 
+ */ + public void updateSettings( + com.google.devicesandservices.health.v4.UpdateSettingsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateSettingsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets the user's identity.
+     * It includes the legacy Fitbit user ID and the Google user ID and it can be
+     * used by migrating clients to map identifiers between the two systems.
+     * 
+ */ + public void getIdentity( + com.google.devicesandservices.health.v4.GetIdentityRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetIdentityMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service HealthProfileService. + * + *
+   * Health Profile Service
+   * 
+ */ + public static final class HealthProfileServiceBlockingV2Stub + extends io.grpc.stub.AbstractBlockingStub { + private HealthProfileServiceBlockingV2Stub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected HealthProfileServiceBlockingV2Stub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new HealthProfileServiceBlockingV2Stub(channel, callOptions); + } + + /** + * + * + *
+     * Returns user Profile details.
+     * 
+ */ + public com.google.devicesandservices.health.v4.Profile getProfile( + com.google.devicesandservices.health.v4.GetProfileRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetProfileMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the user's profile details.
+     * 
+ */ + public com.google.devicesandservices.health.v4.Profile updateProfile( + com.google.devicesandservices.health.v4.UpdateProfileRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getUpdateProfileMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Returns user settings details.
+     * 
+ */ + public com.google.devicesandservices.health.v4.Settings getSettings( + com.google.devicesandservices.health.v4.GetSettingsRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetSettingsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the user's settings details.
+     * 
+ */ + public com.google.devicesandservices.health.v4.Settings updateSettings( + com.google.devicesandservices.health.v4.UpdateSettingsRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getUpdateSettingsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets the user's identity.
+     * It includes the legacy Fitbit user ID and the Google user ID and it can be
+     * used by migrating clients to map identifiers between the two systems.
+     * 
+ */ + public com.google.devicesandservices.health.v4.Identity getIdentity( + com.google.devicesandservices.health.v4.GetIdentityRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetIdentityMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do limited synchronous rpc calls to service HealthProfileService. + * + *
+   * Health Profile Service
+   * 
+ */ + public static final class HealthProfileServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private HealthProfileServiceBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected HealthProfileServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new HealthProfileServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Returns user Profile details.
+     * 
+ */ + public com.google.devicesandservices.health.v4.Profile getProfile( + com.google.devicesandservices.health.v4.GetProfileRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetProfileMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the user's profile details.
+     * 
+ */ + public com.google.devicesandservices.health.v4.Profile updateProfile( + com.google.devicesandservices.health.v4.UpdateProfileRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateProfileMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Returns user settings details.
+     * 
+ */ + public com.google.devicesandservices.health.v4.Settings getSettings( + com.google.devicesandservices.health.v4.GetSettingsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetSettingsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the user's settings details.
+     * 
+ */ + public com.google.devicesandservices.health.v4.Settings updateSettings( + com.google.devicesandservices.health.v4.UpdateSettingsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateSettingsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets the user's identity.
+     * It includes the legacy Fitbit user ID and the Google user ID and it can be
+     * used by migrating clients to map identifiers between the two systems.
+     * 
+ */ + public com.google.devicesandservices.health.v4.Identity getIdentity( + com.google.devicesandservices.health.v4.GetIdentityRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetIdentityMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service HealthProfileService. + * + *
+   * Health Profile Service
+   * 
+ */ + public static final class HealthProfileServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private HealthProfileServiceFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected HealthProfileServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new HealthProfileServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Returns user Profile details.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.devicesandservices.health.v4.Profile> + getProfile(com.google.devicesandservices.health.v4.GetProfileRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetProfileMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the user's profile details.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.devicesandservices.health.v4.Profile> + updateProfile(com.google.devicesandservices.health.v4.UpdateProfileRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateProfileMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Returns user settings details.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.devicesandservices.health.v4.Settings> + getSettings(com.google.devicesandservices.health.v4.GetSettingsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetSettingsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the user's settings details.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.devicesandservices.health.v4.Settings> + updateSettings(com.google.devicesandservices.health.v4.UpdateSettingsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateSettingsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets the user's identity.
+     * It includes the legacy Fitbit user ID and the Google user ID and it can be
+     * used by migrating clients to map identifiers between the two systems.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.devicesandservices.health.v4.Identity> + getIdentity(com.google.devicesandservices.health.v4.GetIdentityRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetIdentityMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_GET_PROFILE = 0; + private static final int METHODID_UPDATE_PROFILE = 1; + private static final int METHODID_GET_SETTINGS = 2; + private static final int METHODID_UPDATE_SETTINGS = 3; + private static final int METHODID_GET_IDENTITY = 4; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_GET_PROFILE: + serviceImpl.getProfile( + (com.google.devicesandservices.health.v4.GetProfileRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_PROFILE: + serviceImpl.updateProfile( + (com.google.devicesandservices.health.v4.UpdateProfileRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_SETTINGS: + serviceImpl.getSettings( + (com.google.devicesandservices.health.v4.GetSettingsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_SETTINGS: + serviceImpl.updateSettings( + (com.google.devicesandservices.health.v4.UpdateSettingsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_IDENTITY: + serviceImpl.getIdentity( + (com.google.devicesandservices.health.v4.GetIdentityRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getGetProfileMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.devicesandservices.health.v4.GetProfileRequest, + com.google.devicesandservices.health.v4.Profile>( + service, METHODID_GET_PROFILE))) + .addMethod( + getUpdateProfileMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.devicesandservices.health.v4.UpdateProfileRequest, + com.google.devicesandservices.health.v4.Profile>( + service, METHODID_UPDATE_PROFILE))) + .addMethod( + getGetSettingsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.devicesandservices.health.v4.GetSettingsRequest, + com.google.devicesandservices.health.v4.Settings>( + service, METHODID_GET_SETTINGS))) + .addMethod( + getUpdateSettingsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.devicesandservices.health.v4.UpdateSettingsRequest, + com.google.devicesandservices.health.v4.Settings>( + service, METHODID_UPDATE_SETTINGS))) + .addMethod( + getGetIdentityMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.devicesandservices.health.v4.GetIdentityRequest, + com.google.devicesandservices.health.v4.Identity>( + service, METHODID_GET_IDENTITY))) + .build(); + } + + private abstract static class HealthProfileServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + HealthProfileServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.devicesandservices.health.v4.HealthProfileProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("HealthProfileService"); + } + } + + private static final class HealthProfileServiceFileDescriptorSupplier + extends HealthProfileServiceBaseDescriptorSupplier { + HealthProfileServiceFileDescriptorSupplier() {} + } + + private static final class HealthProfileServiceMethodDescriptorSupplier + extends HealthProfileServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + HealthProfileServiceMethodDescriptorSupplier(java.lang.String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (HealthProfileServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new HealthProfileServiceFileDescriptorSupplier()) + .addMethod(getGetProfileMethod()) + .addMethod(getUpdateProfileMethod()) + .addMethod(getGetSettingsMethod()) + .addMethod(getUpdateSettingsMethod()) + .addMethod(getGetIdentityMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-health/owlbot.py b/java-health/owlbot.py new file mode 100644 index 000000000000..6da47954339a --- /dev/null +++ b/java-health/owlbot.py @@ -0,0 +1,38 @@ +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import synthtool as s +from synthtool.languages import java + +for library in s.get_staging_dirs(): + # put any special-case replacements here + s.move(library) + +s.remove_staging_dirs() +java.common_templates( + monorepo=True, + excludes=[ + ".github/*", + ".kokoro/*", + "samples/*", + "CODE_OF_CONDUCT.md", + "CONTRIBUTING.md", + "LICENSE", + "SECURITY.md", + "java.header", + "license-checks.xml", + "renovate.json", + ".gitignore", + ], +) \ No newline at end of file diff --git a/java-health/pom.xml b/java-health/pom.xml new file mode 100644 index 000000000000..c03ca0e39d66 --- /dev/null +++ b/java-health/pom.xml @@ -0,0 +1,55 @@ + + + 4.0.0 + com.google.cloud + google-cloud-health-parent + pom + 0.0.1-SNAPSHOT + Google Google Health API Parent + + Java idiomatic client for Google Cloud Platform services. + + + + com.google.cloud + google-cloud-jar-parent + 1.86.0-SNAPSHOT + ../google-cloud-jar-parent/pom.xml + + + + UTF-8 + UTF-8 + github + google-cloud-health-parent + + + + + + com.google.cloud + google-cloud-health + 0.0.1-SNAPSHOT + + + com.google.api.grpc + grpc-google-cloud-health-v4 + 0.0.1-SNAPSHOT + + + com.google.api.grpc + proto-google-cloud-health-v4 + 0.0.1-SNAPSHOT + + + + + + + google-cloud-health + grpc-google-cloud-health-v4 + proto-google-cloud-health-v4 + google-cloud-health-bom + + + diff --git a/java-health/proto-google-cloud-health-v4/clirr-ignored-differences.xml b/java-health/proto-google-cloud-health-v4/clirr-ignored-differences.xml new file mode 100644 index 000000000000..57486867eae4 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/clirr-ignored-differences.xml @@ -0,0 +1,80 @@ + + + + + 7012 + com/google/devicesandservices/health/v4/*OrBuilder + * get*(*) + + + 7012 + com/google/devicesandservices/health/v4/*OrBuilder + boolean contains*(*) + + + 7012 + com/google/devicesandservices/health/v4/*OrBuilder + boolean has*(*) + + + + 7006 + com/google/devicesandservices/health/v4/** + * getDefaultInstanceForType() + ** + + + 7006 + com/google/devicesandservices/health/v4/** + * addRepeatedField(*) + ** + + + 7006 + com/google/devicesandservices/health/v4/** + * clear() + ** + + + 7006 + com/google/devicesandservices/health/v4/** + * clearField(*) + ** + + + 7006 + com/google/devicesandservices/health/v4/** + * clearOneof(*) + ** + + + 7006 + com/google/devicesandservices/health/v4/** + * clone() + ** + + + 7006 + com/google/devicesandservices/health/v4/** + * mergeUnknownFields(*) + ** + + + 7006 + com/google/devicesandservices/health/v4/** + * setField(*) + ** + + + 7006 + com/google/devicesandservices/health/v4/** + * setRepeatedField(*) + ** + + + 7006 + com/google/devicesandservices/health/v4/** + * setUnknownFields(*) + ** + + diff --git a/java-health/proto-google-cloud-health-v4/pom.xml b/java-health/proto-google-cloud-health-v4/pom.xml new file mode 100644 index 000000000000..b601a16c2600 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/pom.xml @@ -0,0 +1,37 @@ + + 4.0.0 + com.google.api.grpc + proto-google-cloud-health-v4 + 0.0.1-SNAPSHOT + proto-google-cloud-health-v4 + Proto library for google-cloud-health + + com.google.cloud + google-cloud-health-parent + 0.0.1-SNAPSHOT + + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + com.google.api.grpc + proto-google-iam-v1 + + + com.google.api + api-common + + + com.google.guava + guava + + + diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ActiveMinutes.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ActiveMinutes.java new file mode 100644 index 000000000000..6491ca644cdb --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ActiveMinutes.java @@ -0,0 +1,2332 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * Record of active minutes in a given time interval.
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.ActiveMinutes} + */ +@com.google.protobuf.Generated +public final class ActiveMinutes extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.ActiveMinutes) + ActiveMinutesOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ActiveMinutes"); + } + + // Use ActiveMinutes.newBuilder() to construct. + private ActiveMinutes(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ActiveMinutes() { + activeMinutesByActivityLevel_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_ActiveMinutes_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_ActiveMinutes_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.ActiveMinutes.class, + com.google.devicesandservices.health.v4.ActiveMinutes.Builder.class); + } + + /** + * + * + *
+   * Activity level.
+   * 
+ * + * Protobuf enum {@code google.devicesandservices.health.v4.ActiveMinutes.ActivityLevel} + */ + public enum ActivityLevel implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Activity level is unspecified.
+     * 
+ * + * ACTIVITY_LEVEL_UNSPECIFIED = 0; + */ + ACTIVITY_LEVEL_UNSPECIFIED(0), + /** + * + * + *
+     * Light activity level.
+     * 
+ * + * LIGHT = 1; + */ + LIGHT(1), + /** + * + * + *
+     * Moderate activity level.
+     * 
+ * + * MODERATE = 2; + */ + MODERATE(2), + /** + * + * + *
+     * Vigorous activity level.
+     * 
+ * + * VIGOROUS = 3; + */ + VIGOROUS(3), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ActivityLevel"); + } + + /** + * + * + *
+     * Activity level is unspecified.
+     * 
+ * + * ACTIVITY_LEVEL_UNSPECIFIED = 0; + */ + public static final int ACTIVITY_LEVEL_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Light activity level.
+     * 
+ * + * LIGHT = 1; + */ + public static final int LIGHT_VALUE = 1; + + /** + * + * + *
+     * Moderate activity level.
+     * 
+ * + * MODERATE = 2; + */ + public static final int MODERATE_VALUE = 2; + + /** + * + * + *
+     * Vigorous activity level.
+     * 
+ * + * VIGOROUS = 3; + */ + public static final int VIGOROUS_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ActivityLevel valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ActivityLevel forNumber(int value) { + switch (value) { + case 0: + return ACTIVITY_LEVEL_UNSPECIFIED; + case 1: + return LIGHT; + case 2: + return MODERATE; + case 3: + return VIGOROUS; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ActivityLevel findValueByNumber(int number) { + return ActivityLevel.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.devicesandservices.health.v4.ActiveMinutes.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final ActivityLevel[] VALUES = values(); + + public static ActivityLevel valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private ActivityLevel(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.devicesandservices.health.v4.ActiveMinutes.ActivityLevel) + } + + public interface ActiveMinutesByActivityLevelOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. The level of activity.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ActiveMinutes.ActivityLevel activity_level = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for activityLevel. + */ + int getActivityLevelValue(); + + /** + * + * + *
+     * Required. The level of activity.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ActiveMinutes.ActivityLevel activity_level = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The activityLevel. + */ + com.google.devicesandservices.health.v4.ActiveMinutes.ActivityLevel getActivityLevel(); + + /** + * + * + *
+     * Required. Number of whole minutes spent in activity.
+     * 
+ * + * int64 active_minutes = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The activeMinutes. + */ + long getActiveMinutes(); + } + + /** + * + * + *
+   * Active minutes at a given activity level.
+   * 
+ * + * Protobuf type {@code + * google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel} + */ + public static final class ActiveMinutesByActivityLevel + extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel) + ActiveMinutesByActivityLevelOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ActiveMinutesByActivityLevel"); + } + + // Use ActiveMinutesByActivityLevel.newBuilder() to construct. + private ActiveMinutesByActivityLevel(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ActiveMinutesByActivityLevel() { + activityLevel_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_ActiveMinutes_ActiveMinutesByActivityLevel_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_ActiveMinutes_ActiveMinutesByActivityLevel_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel + .class, + com.google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel + .Builder.class); + } + + public static final int ACTIVITY_LEVEL_FIELD_NUMBER = 1; + private int activityLevel_ = 0; + + /** + * + * + *
+     * Required. The level of activity.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ActiveMinutes.ActivityLevel activity_level = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for activityLevel. + */ + @java.lang.Override + public int getActivityLevelValue() { + return activityLevel_; + } + + /** + * + * + *
+     * Required. The level of activity.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ActiveMinutes.ActivityLevel activity_level = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The activityLevel. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ActiveMinutes.ActivityLevel getActivityLevel() { + com.google.devicesandservices.health.v4.ActiveMinutes.ActivityLevel result = + com.google.devicesandservices.health.v4.ActiveMinutes.ActivityLevel.forNumber( + activityLevel_); + return result == null + ? com.google.devicesandservices.health.v4.ActiveMinutes.ActivityLevel.UNRECOGNIZED + : result; + } + + public static final int ACTIVE_MINUTES_FIELD_NUMBER = 2; + private long activeMinutes_ = 0L; + + /** + * + * + *
+     * Required. Number of whole minutes spent in activity.
+     * 
+ * + * int64 active_minutes = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The activeMinutes. + */ + @java.lang.Override + public long getActiveMinutes() { + return activeMinutes_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (activityLevel_ + != com.google.devicesandservices.health.v4.ActiveMinutes.ActivityLevel + .ACTIVITY_LEVEL_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, activityLevel_); + } + if (activeMinutes_ != 0L) { + output.writeInt64(2, activeMinutes_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (activityLevel_ + != com.google.devicesandservices.health.v4.ActiveMinutes.ActivityLevel + .ACTIVITY_LEVEL_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, activityLevel_); + } + if (activeMinutes_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, activeMinutes_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel other = + (com.google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel) obj; + + if (activityLevel_ != other.activityLevel_) return false; + if (getActiveMinutes() != other.getActiveMinutes()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ACTIVITY_LEVEL_FIELD_NUMBER; + hash = (53 * hash) + activityLevel_; + hash = (37 * hash) + ACTIVE_MINUTES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getActiveMinutes()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+     * Active minutes at a given activity level.
+     * 
+ * + * Protobuf type {@code + * google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel) + com.google.devicesandservices.health.v4.ActiveMinutes + .ActiveMinutesByActivityLevelOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_ActiveMinutes_ActiveMinutesByActivityLevel_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_ActiveMinutes_ActiveMinutesByActivityLevel_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel + .class, + com.google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel + .Builder.class); + } + + // Construct using + // com.google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + activityLevel_ = 0; + activeMinutes_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_ActiveMinutes_ActiveMinutesByActivityLevel_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel + getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel + build() { + com.google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel + buildPartial() { + com.google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel result = + new com.google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.activityLevel_ = activityLevel_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.activeMinutes_ = activeMinutes_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel) { + return mergeFrom( + (com.google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel + other) { + if (other + == com.google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel + .getDefaultInstance()) return this; + if (other.activityLevel_ != 0) { + setActivityLevelValue(other.getActivityLevelValue()); + } + if (other.getActiveMinutes() != 0L) { + setActiveMinutes(other.getActiveMinutes()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + activityLevel_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + activeMinutes_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int activityLevel_ = 0; + + /** + * + * + *
+       * Required. The level of activity.
+       * 
+ * + * + * .google.devicesandservices.health.v4.ActiveMinutes.ActivityLevel activity_level = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for activityLevel. + */ + @java.lang.Override + public int getActivityLevelValue() { + return activityLevel_; + } + + /** + * + * + *
+       * Required. The level of activity.
+       * 
+ * + * + * .google.devicesandservices.health.v4.ActiveMinutes.ActivityLevel activity_level = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for activityLevel to set. + * @return This builder for chaining. + */ + public Builder setActivityLevelValue(int value) { + activityLevel_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The level of activity.
+       * 
+ * + * + * .google.devicesandservices.health.v4.ActiveMinutes.ActivityLevel activity_level = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The activityLevel. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ActiveMinutes.ActivityLevel + getActivityLevel() { + com.google.devicesandservices.health.v4.ActiveMinutes.ActivityLevel result = + com.google.devicesandservices.health.v4.ActiveMinutes.ActivityLevel.forNumber( + activityLevel_); + return result == null + ? com.google.devicesandservices.health.v4.ActiveMinutes.ActivityLevel.UNRECOGNIZED + : result; + } + + /** + * + * + *
+       * Required. The level of activity.
+       * 
+ * + * + * .google.devicesandservices.health.v4.ActiveMinutes.ActivityLevel activity_level = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The activityLevel to set. + * @return This builder for chaining. + */ + public Builder setActivityLevel( + com.google.devicesandservices.health.v4.ActiveMinutes.ActivityLevel value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + activityLevel_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The level of activity.
+       * 
+ * + * + * .google.devicesandservices.health.v4.ActiveMinutes.ActivityLevel activity_level = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearActivityLevel() { + bitField0_ = (bitField0_ & ~0x00000001); + activityLevel_ = 0; + onChanged(); + return this; + } + + private long activeMinutes_; + + /** + * + * + *
+       * Required. Number of whole minutes spent in activity.
+       * 
+ * + * int64 active_minutes = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The activeMinutes. + */ + @java.lang.Override + public long getActiveMinutes() { + return activeMinutes_; + } + + /** + * + * + *
+       * Required. Number of whole minutes spent in activity.
+       * 
+ * + * int64 active_minutes = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The activeMinutes to set. + * @return This builder for chaining. + */ + public Builder setActiveMinutes(long value) { + + activeMinutes_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. Number of whole minutes spent in activity.
+       * 
+ * + * int64 active_minutes = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearActiveMinutes() { + bitField0_ = (bitField0_ & ~0x00000002); + activeMinutes_ = 0L; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel) + private static final com.google.devicesandservices.health.v4.ActiveMinutes + .ActiveMinutesByActivityLevel + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel(); + } + + public static com.google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ActiveMinutesByActivityLevel parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int INTERVAL_FIELD_NUMBER = 1; + private com.google.devicesandservices.health.v4.ObservationTimeInterval interval_; + + /** + * + * + *
+   * Required. Observed interval.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the interval field is set. + */ + @java.lang.Override + public boolean hasInterval() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. Observed interval.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The interval. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ObservationTimeInterval getInterval() { + return interval_ == null + ? com.google.devicesandservices.health.v4.ObservationTimeInterval.getDefaultInstance() + : interval_; + } + + /** + * + * + *
+   * Required. Observed interval.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ObservationTimeIntervalOrBuilder + getIntervalOrBuilder() { + return interval_ == null + ? com.google.devicesandservices.health.v4.ObservationTimeInterval.getDefaultInstance() + : interval_; + } + + public static final int ACTIVE_MINUTES_BY_ACTIVITY_LEVEL_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List< + com.google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel> + activeMinutesByActivityLevel_; + + /** + * + * + *
+   * Required. Active minutes by activity level. At most one record per activity
+   * level is allowed.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel active_minutes_by_activity_level = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List< + com.google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel> + getActiveMinutesByActivityLevelList() { + return activeMinutesByActivityLevel_; + } + + /** + * + * + *
+   * Required. Active minutes by activity level. At most one record per activity
+   * level is allowed.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel active_minutes_by_activity_level = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.devicesandservices.health.v4.ActiveMinutes + .ActiveMinutesByActivityLevelOrBuilder> + getActiveMinutesByActivityLevelOrBuilderList() { + return activeMinutesByActivityLevel_; + } + + /** + * + * + *
+   * Required. Active minutes by activity level. At most one record per activity
+   * level is allowed.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel active_minutes_by_activity_level = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getActiveMinutesByActivityLevelCount() { + return activeMinutesByActivityLevel_.size(); + } + + /** + * + * + *
+   * Required. Active minutes by activity level. At most one record per activity
+   * level is allowed.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel active_minutes_by_activity_level = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel + getActiveMinutesByActivityLevel(int index) { + return activeMinutesByActivityLevel_.get(index); + } + + /** + * + * + *
+   * Required. Active minutes by activity level. At most one record per activity
+   * level is allowed.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel active_minutes_by_activity_level = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevelOrBuilder + getActiveMinutesByActivityLevelOrBuilder(int index) { + return activeMinutesByActivityLevel_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getInterval()); + } + for (int i = 0; i < activeMinutesByActivityLevel_.size(); i++) { + output.writeMessage(2, activeMinutesByActivityLevel_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getInterval()); + } + for (int i = 0; i < activeMinutesByActivityLevel_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, activeMinutesByActivityLevel_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.ActiveMinutes)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.ActiveMinutes other = + (com.google.devicesandservices.health.v4.ActiveMinutes) obj; + + if (hasInterval() != other.hasInterval()) return false; + if (hasInterval()) { + if (!getInterval().equals(other.getInterval())) return false; + } + if (!getActiveMinutesByActivityLevelList().equals(other.getActiveMinutesByActivityLevelList())) + return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasInterval()) { + hash = (37 * hash) + INTERVAL_FIELD_NUMBER; + hash = (53 * hash) + getInterval().hashCode(); + } + if (getActiveMinutesByActivityLevelCount() > 0) { + hash = (37 * hash) + ACTIVE_MINUTES_BY_ACTIVITY_LEVEL_FIELD_NUMBER; + hash = (53 * hash) + getActiveMinutesByActivityLevelList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.ActiveMinutes parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.ActiveMinutes parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ActiveMinutes parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.ActiveMinutes parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ActiveMinutes parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.ActiveMinutes parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ActiveMinutes parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.ActiveMinutes parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ActiveMinutes parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.ActiveMinutes parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ActiveMinutes parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.ActiveMinutes parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.ActiveMinutes prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Record of active minutes in a given time interval.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.ActiveMinutes} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.ActiveMinutes) + com.google.devicesandservices.health.v4.ActiveMinutesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_ActiveMinutes_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_ActiveMinutes_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.ActiveMinutes.class, + com.google.devicesandservices.health.v4.ActiveMinutes.Builder.class); + } + + // Construct using com.google.devicesandservices.health.v4.ActiveMinutes.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetIntervalFieldBuilder(); + internalGetActiveMinutesByActivityLevelFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + interval_ = null; + if (intervalBuilder_ != null) { + intervalBuilder_.dispose(); + intervalBuilder_ = null; + } + if (activeMinutesByActivityLevelBuilder_ == null) { + activeMinutesByActivityLevel_ = java.util.Collections.emptyList(); + } else { + activeMinutesByActivityLevel_ = null; + activeMinutesByActivityLevelBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_ActiveMinutes_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.ActiveMinutes getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.ActiveMinutes.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.ActiveMinutes build() { + com.google.devicesandservices.health.v4.ActiveMinutes result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.ActiveMinutes buildPartial() { + com.google.devicesandservices.health.v4.ActiveMinutes result = + new com.google.devicesandservices.health.v4.ActiveMinutes(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.devicesandservices.health.v4.ActiveMinutes result) { + if (activeMinutesByActivityLevelBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + activeMinutesByActivityLevel_ = + java.util.Collections.unmodifiableList(activeMinutesByActivityLevel_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.activeMinutesByActivityLevel_ = activeMinutesByActivityLevel_; + } else { + result.activeMinutesByActivityLevel_ = activeMinutesByActivityLevelBuilder_.build(); + } + } + + private void buildPartial0(com.google.devicesandservices.health.v4.ActiveMinutes result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.interval_ = intervalBuilder_ == null ? interval_ : intervalBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.ActiveMinutes) { + return mergeFrom((com.google.devicesandservices.health.v4.ActiveMinutes) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.devicesandservices.health.v4.ActiveMinutes other) { + if (other == com.google.devicesandservices.health.v4.ActiveMinutes.getDefaultInstance()) + return this; + if (other.hasInterval()) { + mergeInterval(other.getInterval()); + } + if (activeMinutesByActivityLevelBuilder_ == null) { + if (!other.activeMinutesByActivityLevel_.isEmpty()) { + if (activeMinutesByActivityLevel_.isEmpty()) { + activeMinutesByActivityLevel_ = other.activeMinutesByActivityLevel_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureActiveMinutesByActivityLevelIsMutable(); + activeMinutesByActivityLevel_.addAll(other.activeMinutesByActivityLevel_); + } + onChanged(); + } + } else { + if (!other.activeMinutesByActivityLevel_.isEmpty()) { + if (activeMinutesByActivityLevelBuilder_.isEmpty()) { + activeMinutesByActivityLevelBuilder_.dispose(); + activeMinutesByActivityLevelBuilder_ = null; + activeMinutesByActivityLevel_ = other.activeMinutesByActivityLevel_; + bitField0_ = (bitField0_ & ~0x00000002); + activeMinutesByActivityLevelBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetActiveMinutesByActivityLevelFieldBuilder() + : null; + } else { + activeMinutesByActivityLevelBuilder_.addAllMessages( + other.activeMinutesByActivityLevel_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetIntervalFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + com.google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel + m = + input.readMessage( + com.google.devicesandservices.health.v4.ActiveMinutes + .ActiveMinutesByActivityLevel.parser(), + extensionRegistry); + if (activeMinutesByActivityLevelBuilder_ == null) { + ensureActiveMinutesByActivityLevelIsMutable(); + activeMinutesByActivityLevel_.add(m); + } else { + activeMinutesByActivityLevelBuilder_.addMessage(m); + } + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.devicesandservices.health.v4.ObservationTimeInterval interval_; + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ObservationTimeInterval, + com.google.devicesandservices.health.v4.ObservationTimeInterval.Builder, + com.google.devicesandservices.health.v4.ObservationTimeIntervalOrBuilder> + intervalBuilder_; + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the interval field is set. + */ + public boolean hasInterval() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The interval. + */ + public com.google.devicesandservices.health.v4.ObservationTimeInterval getInterval() { + if (intervalBuilder_ == null) { + return interval_ == null + ? com.google.devicesandservices.health.v4.ObservationTimeInterval.getDefaultInstance() + : interval_; + } else { + return intervalBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setInterval( + com.google.devicesandservices.health.v4.ObservationTimeInterval value) { + if (intervalBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + interval_ = value; + } else { + intervalBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setInterval( + com.google.devicesandservices.health.v4.ObservationTimeInterval.Builder builderForValue) { + if (intervalBuilder_ == null) { + interval_ = builderForValue.build(); + } else { + intervalBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeInterval( + com.google.devicesandservices.health.v4.ObservationTimeInterval value) { + if (intervalBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && interval_ != null + && interval_ + != com.google.devicesandservices.health.v4.ObservationTimeInterval + .getDefaultInstance()) { + getIntervalBuilder().mergeFrom(value); + } else { + interval_ = value; + } + } else { + intervalBuilder_.mergeFrom(value); + } + if (interval_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearInterval() { + bitField0_ = (bitField0_ & ~0x00000001); + interval_ = null; + if (intervalBuilder_ != null) { + intervalBuilder_.dispose(); + intervalBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.devicesandservices.health.v4.ObservationTimeInterval.Builder + getIntervalBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetIntervalFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.devicesandservices.health.v4.ObservationTimeIntervalOrBuilder + getIntervalOrBuilder() { + if (intervalBuilder_ != null) { + return intervalBuilder_.getMessageOrBuilder(); + } else { + return interval_ == null + ? com.google.devicesandservices.health.v4.ObservationTimeInterval.getDefaultInstance() + : interval_; + } + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ObservationTimeInterval, + com.google.devicesandservices.health.v4.ObservationTimeInterval.Builder, + com.google.devicesandservices.health.v4.ObservationTimeIntervalOrBuilder> + internalGetIntervalFieldBuilder() { + if (intervalBuilder_ == null) { + intervalBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ObservationTimeInterval, + com.google.devicesandservices.health.v4.ObservationTimeInterval.Builder, + com.google.devicesandservices.health.v4.ObservationTimeIntervalOrBuilder>( + getInterval(), getParentForChildren(), isClean()); + interval_ = null; + } + return intervalBuilder_; + } + + private java.util.List< + com.google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel> + activeMinutesByActivityLevel_ = java.util.Collections.emptyList(); + + private void ensureActiveMinutesByActivityLevelIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + activeMinutesByActivityLevel_ = + new java.util.ArrayList< + com.google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel>( + activeMinutesByActivityLevel_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel, + com.google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel + .Builder, + com.google.devicesandservices.health.v4.ActiveMinutes + .ActiveMinutesByActivityLevelOrBuilder> + activeMinutesByActivityLevelBuilder_; + + /** + * + * + *
+     * Required. Active minutes by activity level. At most one record per activity
+     * level is allowed.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel active_minutes_by_activity_level = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List< + com.google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel> + getActiveMinutesByActivityLevelList() { + if (activeMinutesByActivityLevelBuilder_ == null) { + return java.util.Collections.unmodifiableList(activeMinutesByActivityLevel_); + } else { + return activeMinutesByActivityLevelBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Required. Active minutes by activity level. At most one record per activity
+     * level is allowed.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel active_minutes_by_activity_level = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getActiveMinutesByActivityLevelCount() { + if (activeMinutesByActivityLevelBuilder_ == null) { + return activeMinutesByActivityLevel_.size(); + } else { + return activeMinutesByActivityLevelBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Required. Active minutes by activity level. At most one record per activity
+     * level is allowed.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel active_minutes_by_activity_level = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel + getActiveMinutesByActivityLevel(int index) { + if (activeMinutesByActivityLevelBuilder_ == null) { + return activeMinutesByActivityLevel_.get(index); + } else { + return activeMinutesByActivityLevelBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Required. Active minutes by activity level. At most one record per activity
+     * level is allowed.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel active_minutes_by_activity_level = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setActiveMinutesByActivityLevel( + int index, + com.google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel value) { + if (activeMinutesByActivityLevelBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureActiveMinutesByActivityLevelIsMutable(); + activeMinutesByActivityLevel_.set(index, value); + onChanged(); + } else { + activeMinutesByActivityLevelBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Required. Active minutes by activity level. At most one record per activity
+     * level is allowed.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel active_minutes_by_activity_level = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setActiveMinutesByActivityLevel( + int index, + com.google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel.Builder + builderForValue) { + if (activeMinutesByActivityLevelBuilder_ == null) { + ensureActiveMinutesByActivityLevelIsMutable(); + activeMinutesByActivityLevel_.set(index, builderForValue.build()); + onChanged(); + } else { + activeMinutesByActivityLevelBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Required. Active minutes by activity level. At most one record per activity
+     * level is allowed.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel active_minutes_by_activity_level = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addActiveMinutesByActivityLevel( + com.google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel value) { + if (activeMinutesByActivityLevelBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureActiveMinutesByActivityLevelIsMutable(); + activeMinutesByActivityLevel_.add(value); + onChanged(); + } else { + activeMinutesByActivityLevelBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Required. Active minutes by activity level. At most one record per activity
+     * level is allowed.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel active_minutes_by_activity_level = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addActiveMinutesByActivityLevel( + int index, + com.google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel value) { + if (activeMinutesByActivityLevelBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureActiveMinutesByActivityLevelIsMutable(); + activeMinutesByActivityLevel_.add(index, value); + onChanged(); + } else { + activeMinutesByActivityLevelBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Required. Active minutes by activity level. At most one record per activity
+     * level is allowed.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel active_minutes_by_activity_level = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addActiveMinutesByActivityLevel( + com.google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel.Builder + builderForValue) { + if (activeMinutesByActivityLevelBuilder_ == null) { + ensureActiveMinutesByActivityLevelIsMutable(); + activeMinutesByActivityLevel_.add(builderForValue.build()); + onChanged(); + } else { + activeMinutesByActivityLevelBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Required. Active minutes by activity level. At most one record per activity
+     * level is allowed.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel active_minutes_by_activity_level = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addActiveMinutesByActivityLevel( + int index, + com.google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel.Builder + builderForValue) { + if (activeMinutesByActivityLevelBuilder_ == null) { + ensureActiveMinutesByActivityLevelIsMutable(); + activeMinutesByActivityLevel_.add(index, builderForValue.build()); + onChanged(); + } else { + activeMinutesByActivityLevelBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Required. Active minutes by activity level. At most one record per activity
+     * level is allowed.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel active_minutes_by_activity_level = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllActiveMinutesByActivityLevel( + java.lang.Iterable< + ? extends + com.google.devicesandservices.health.v4.ActiveMinutes + .ActiveMinutesByActivityLevel> + values) { + if (activeMinutesByActivityLevelBuilder_ == null) { + ensureActiveMinutesByActivityLevelIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, activeMinutesByActivityLevel_); + onChanged(); + } else { + activeMinutesByActivityLevelBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Required. Active minutes by activity level. At most one record per activity
+     * level is allowed.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel active_minutes_by_activity_level = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearActiveMinutesByActivityLevel() { + if (activeMinutesByActivityLevelBuilder_ == null) { + activeMinutesByActivityLevel_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + activeMinutesByActivityLevelBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Required. Active minutes by activity level. At most one record per activity
+     * level is allowed.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel active_minutes_by_activity_level = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeActiveMinutesByActivityLevel(int index) { + if (activeMinutesByActivityLevelBuilder_ == null) { + ensureActiveMinutesByActivityLevelIsMutable(); + activeMinutesByActivityLevel_.remove(index); + onChanged(); + } else { + activeMinutesByActivityLevelBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Required. Active minutes by activity level. At most one record per activity
+     * level is allowed.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel active_minutes_by_activity_level = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel + .Builder + getActiveMinutesByActivityLevelBuilder(int index) { + return internalGetActiveMinutesByActivityLevelFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Required. Active minutes by activity level. At most one record per activity
+     * level is allowed.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel active_minutes_by_activity_level = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.devicesandservices.health.v4.ActiveMinutes + .ActiveMinutesByActivityLevelOrBuilder + getActiveMinutesByActivityLevelOrBuilder(int index) { + if (activeMinutesByActivityLevelBuilder_ == null) { + return activeMinutesByActivityLevel_.get(index); + } else { + return activeMinutesByActivityLevelBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Required. Active minutes by activity level. At most one record per activity
+     * level is allowed.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel active_minutes_by_activity_level = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List< + ? extends + com.google.devicesandservices.health.v4.ActiveMinutes + .ActiveMinutesByActivityLevelOrBuilder> + getActiveMinutesByActivityLevelOrBuilderList() { + if (activeMinutesByActivityLevelBuilder_ != null) { + return activeMinutesByActivityLevelBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(activeMinutesByActivityLevel_); + } + } + + /** + * + * + *
+     * Required. Active minutes by activity level. At most one record per activity
+     * level is allowed.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel active_minutes_by_activity_level = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel + .Builder + addActiveMinutesByActivityLevelBuilder() { + return internalGetActiveMinutesByActivityLevelFieldBuilder() + .addBuilder( + com.google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel + .getDefaultInstance()); + } + + /** + * + * + *
+     * Required. Active minutes by activity level. At most one record per activity
+     * level is allowed.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel active_minutes_by_activity_level = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel + .Builder + addActiveMinutesByActivityLevelBuilder(int index) { + return internalGetActiveMinutesByActivityLevelFieldBuilder() + .addBuilder( + index, + com.google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel + .getDefaultInstance()); + } + + /** + * + * + *
+     * Required. Active minutes by activity level. At most one record per activity
+     * level is allowed.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel active_minutes_by_activity_level = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List< + com.google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel + .Builder> + getActiveMinutesByActivityLevelBuilderList() { + return internalGetActiveMinutesByActivityLevelFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel, + com.google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel + .Builder, + com.google.devicesandservices.health.v4.ActiveMinutes + .ActiveMinutesByActivityLevelOrBuilder> + internalGetActiveMinutesByActivityLevelFieldBuilder() { + if (activeMinutesByActivityLevelBuilder_ == null) { + activeMinutesByActivityLevelBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel, + com.google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel + .Builder, + com.google.devicesandservices.health.v4.ActiveMinutes + .ActiveMinutesByActivityLevelOrBuilder>( + activeMinutesByActivityLevel_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + activeMinutesByActivityLevel_ = null; + } + return activeMinutesByActivityLevelBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.ActiveMinutes) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.ActiveMinutes) + private static final com.google.devicesandservices.health.v4.ActiveMinutes DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.ActiveMinutes(); + } + + public static com.google.devicesandservices.health.v4.ActiveMinutes getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ActiveMinutes parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.ActiveMinutes getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ActiveMinutesOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ActiveMinutesOrBuilder.java new file mode 100644 index 000000000000..48bd71919f91 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ActiveMinutesOrBuilder.java @@ -0,0 +1,148 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface ActiveMinutesOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.ActiveMinutes) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Observed interval.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the interval field is set. + */ + boolean hasInterval(); + + /** + * + * + *
+   * Required. Observed interval.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The interval. + */ + com.google.devicesandservices.health.v4.ObservationTimeInterval getInterval(); + + /** + * + * + *
+   * Required. Observed interval.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.devicesandservices.health.v4.ObservationTimeIntervalOrBuilder getIntervalOrBuilder(); + + /** + * + * + *
+   * Required. Active minutes by activity level. At most one record per activity
+   * level is allowed.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel active_minutes_by_activity_level = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List + getActiveMinutesByActivityLevelList(); + + /** + * + * + *
+   * Required. Active minutes by activity level. At most one record per activity
+   * level is allowed.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel active_minutes_by_activity_level = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel + getActiveMinutesByActivityLevel(int index); + + /** + * + * + *
+   * Required. Active minutes by activity level. At most one record per activity
+   * level is allowed.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel active_minutes_by_activity_level = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getActiveMinutesByActivityLevelCount(); + + /** + * + * + *
+   * Required. Active minutes by activity level. At most one record per activity
+   * level is allowed.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel active_minutes_by_activity_level = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List< + ? extends + com.google.devicesandservices.health.v4.ActiveMinutes + .ActiveMinutesByActivityLevelOrBuilder> + getActiveMinutesByActivityLevelOrBuilderList(); + + /** + * + * + *
+   * Required. Active minutes by activity level. At most one record per activity
+   * level is allowed.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevel active_minutes_by_activity_level = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.devicesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevelOrBuilder + getActiveMinutesByActivityLevelOrBuilder(int index); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ActiveMinutesRollupValue.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ActiveMinutesRollupValue.java new file mode 100644 index 000000000000..e62630617e9a --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ActiveMinutesRollupValue.java @@ -0,0 +1,1864 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * Represents the result of the rollup of the active minutes data type.
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.ActiveMinutesRollupValue} + */ +@com.google.protobuf.Generated +public final class ActiveMinutesRollupValue extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.ActiveMinutesRollupValue) + ActiveMinutesRollupValueOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ActiveMinutesRollupValue"); + } + + // Use ActiveMinutesRollupValue.newBuilder() to construct. + private ActiveMinutesRollupValue(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ActiveMinutesRollupValue() { + activeMinutesRollupByActivityLevel_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_ActiveMinutesRollupValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_ActiveMinutesRollupValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.ActiveMinutesRollupValue.class, + com.google.devicesandservices.health.v4.ActiveMinutesRollupValue.Builder.class); + } + + public interface ActiveMinutesRollupByActivityLevelOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.ActiveMinutesRollupValue.ActiveMinutesRollupByActivityLevel) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The level of activity.
+     * 
+ * + * .google.devicesandservices.health.v4.ActiveMinutes.ActivityLevel activity_level = 1; + * + * + * @return The enum numeric value on the wire for activityLevel. + */ + int getActivityLevelValue(); + + /** + * + * + *
+     * The level of activity.
+     * 
+ * + * .google.devicesandservices.health.v4.ActiveMinutes.ActivityLevel activity_level = 1; + * + * + * @return The activityLevel. + */ + com.google.devicesandservices.health.v4.ActiveMinutes.ActivityLevel getActivityLevel(); + + /** + * + * + *
+     * Number of whole minutes spent in activity.
+     * 
+ * + * int64 active_minutes_sum = 2; + * + * @return The activeMinutesSum. + */ + long getActiveMinutesSum(); + } + + /** + * + * + *
+   * Active minutes by activity level.
+   * 
+ * + * Protobuf type {@code + * google.devicesandservices.health.v4.ActiveMinutesRollupValue.ActiveMinutesRollupByActivityLevel} + */ + public static final class ActiveMinutesRollupByActivityLevel + extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.ActiveMinutesRollupValue.ActiveMinutesRollupByActivityLevel) + ActiveMinutesRollupByActivityLevelOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ActiveMinutesRollupByActivityLevel"); + } + + // Use ActiveMinutesRollupByActivityLevel.newBuilder() to construct. + private ActiveMinutesRollupByActivityLevel( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ActiveMinutesRollupByActivityLevel() { + activityLevel_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_ActiveMinutesRollupValue_ActiveMinutesRollupByActivityLevel_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_ActiveMinutesRollupValue_ActiveMinutesRollupByActivityLevel_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .ActiveMinutesRollupByActivityLevel.class, + com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .ActiveMinutesRollupByActivityLevel.Builder.class); + } + + public static final int ACTIVITY_LEVEL_FIELD_NUMBER = 1; + private int activityLevel_ = 0; + + /** + * + * + *
+     * The level of activity.
+     * 
+ * + * .google.devicesandservices.health.v4.ActiveMinutes.ActivityLevel activity_level = 1; + * + * + * @return The enum numeric value on the wire for activityLevel. + */ + @java.lang.Override + public int getActivityLevelValue() { + return activityLevel_; + } + + /** + * + * + *
+     * The level of activity.
+     * 
+ * + * .google.devicesandservices.health.v4.ActiveMinutes.ActivityLevel activity_level = 1; + * + * + * @return The activityLevel. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ActiveMinutes.ActivityLevel getActivityLevel() { + com.google.devicesandservices.health.v4.ActiveMinutes.ActivityLevel result = + com.google.devicesandservices.health.v4.ActiveMinutes.ActivityLevel.forNumber( + activityLevel_); + return result == null + ? com.google.devicesandservices.health.v4.ActiveMinutes.ActivityLevel.UNRECOGNIZED + : result; + } + + public static final int ACTIVE_MINUTES_SUM_FIELD_NUMBER = 2; + private long activeMinutesSum_ = 0L; + + /** + * + * + *
+     * Number of whole minutes spent in activity.
+     * 
+ * + * int64 active_minutes_sum = 2; + * + * @return The activeMinutesSum. + */ + @java.lang.Override + public long getActiveMinutesSum() { + return activeMinutesSum_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (activityLevel_ + != com.google.devicesandservices.health.v4.ActiveMinutes.ActivityLevel + .ACTIVITY_LEVEL_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, activityLevel_); + } + if (activeMinutesSum_ != 0L) { + output.writeInt64(2, activeMinutesSum_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (activityLevel_ + != com.google.devicesandservices.health.v4.ActiveMinutes.ActivityLevel + .ACTIVITY_LEVEL_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, activityLevel_); + } + if (activeMinutesSum_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, activeMinutesSum_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .ActiveMinutesRollupByActivityLevel)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .ActiveMinutesRollupByActivityLevel + other = + (com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .ActiveMinutesRollupByActivityLevel) + obj; + + if (activityLevel_ != other.activityLevel_) return false; + if (getActiveMinutesSum() != other.getActiveMinutesSum()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ACTIVITY_LEVEL_FIELD_NUMBER; + hash = (53 * hash) + activityLevel_; + hash = (37 * hash) + ACTIVE_MINUTES_SUM_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getActiveMinutesSum()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .ActiveMinutesRollupByActivityLevel + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .ActiveMinutesRollupByActivityLevel + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .ActiveMinutesRollupByActivityLevel + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .ActiveMinutesRollupByActivityLevel + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .ActiveMinutesRollupByActivityLevel + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .ActiveMinutesRollupByActivityLevel + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .ActiveMinutesRollupByActivityLevel + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .ActiveMinutesRollupByActivityLevel + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .ActiveMinutesRollupByActivityLevel + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .ActiveMinutesRollupByActivityLevel + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .ActiveMinutesRollupByActivityLevel + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .ActiveMinutesRollupByActivityLevel + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .ActiveMinutesRollupByActivityLevel + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+     * Active minutes by activity level.
+     * 
+ * + * Protobuf type {@code + * google.devicesandservices.health.v4.ActiveMinutesRollupValue.ActiveMinutesRollupByActivityLevel} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.ActiveMinutesRollupValue.ActiveMinutesRollupByActivityLevel) + com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .ActiveMinutesRollupByActivityLevelOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_ActiveMinutesRollupValue_ActiveMinutesRollupByActivityLevel_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_ActiveMinutesRollupValue_ActiveMinutesRollupByActivityLevel_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .ActiveMinutesRollupByActivityLevel.class, + com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .ActiveMinutesRollupByActivityLevel.Builder.class); + } + + // Construct using + // com.google.devicesandservices.health.v4.ActiveMinutesRollupValue.ActiveMinutesRollupByActivityLevel.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + activityLevel_ = 0; + activeMinutesSum_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_ActiveMinutesRollupValue_ActiveMinutesRollupByActivityLevel_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .ActiveMinutesRollupByActivityLevel + getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .ActiveMinutesRollupByActivityLevel.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .ActiveMinutesRollupByActivityLevel + build() { + com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .ActiveMinutesRollupByActivityLevel + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .ActiveMinutesRollupByActivityLevel + buildPartial() { + com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .ActiveMinutesRollupByActivityLevel + result = + new com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .ActiveMinutesRollupByActivityLevel(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .ActiveMinutesRollupByActivityLevel + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.activityLevel_ = activityLevel_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.activeMinutesSum_ = activeMinutesSum_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .ActiveMinutesRollupByActivityLevel) { + return mergeFrom( + (com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .ActiveMinutesRollupByActivityLevel) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .ActiveMinutesRollupByActivityLevel + other) { + if (other + == com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .ActiveMinutesRollupByActivityLevel.getDefaultInstance()) return this; + if (other.activityLevel_ != 0) { + setActivityLevelValue(other.getActivityLevelValue()); + } + if (other.getActiveMinutesSum() != 0L) { + setActiveMinutesSum(other.getActiveMinutesSum()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + activityLevel_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + activeMinutesSum_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int activityLevel_ = 0; + + /** + * + * + *
+       * The level of activity.
+       * 
+ * + * .google.devicesandservices.health.v4.ActiveMinutes.ActivityLevel activity_level = 1; + * + * + * @return The enum numeric value on the wire for activityLevel. + */ + @java.lang.Override + public int getActivityLevelValue() { + return activityLevel_; + } + + /** + * + * + *
+       * The level of activity.
+       * 
+ * + * .google.devicesandservices.health.v4.ActiveMinutes.ActivityLevel activity_level = 1; + * + * + * @param value The enum numeric value on the wire for activityLevel to set. + * @return This builder for chaining. + */ + public Builder setActivityLevelValue(int value) { + activityLevel_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * The level of activity.
+       * 
+ * + * .google.devicesandservices.health.v4.ActiveMinutes.ActivityLevel activity_level = 1; + * + * + * @return The activityLevel. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ActiveMinutes.ActivityLevel + getActivityLevel() { + com.google.devicesandservices.health.v4.ActiveMinutes.ActivityLevel result = + com.google.devicesandservices.health.v4.ActiveMinutes.ActivityLevel.forNumber( + activityLevel_); + return result == null + ? com.google.devicesandservices.health.v4.ActiveMinutes.ActivityLevel.UNRECOGNIZED + : result; + } + + /** + * + * + *
+       * The level of activity.
+       * 
+ * + * .google.devicesandservices.health.v4.ActiveMinutes.ActivityLevel activity_level = 1; + * + * + * @param value The activityLevel to set. + * @return This builder for chaining. + */ + public Builder setActivityLevel( + com.google.devicesandservices.health.v4.ActiveMinutes.ActivityLevel value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + activityLevel_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+       * The level of activity.
+       * 
+ * + * .google.devicesandservices.health.v4.ActiveMinutes.ActivityLevel activity_level = 1; + * + * + * @return This builder for chaining. + */ + public Builder clearActivityLevel() { + bitField0_ = (bitField0_ & ~0x00000001); + activityLevel_ = 0; + onChanged(); + return this; + } + + private long activeMinutesSum_; + + /** + * + * + *
+       * Number of whole minutes spent in activity.
+       * 
+ * + * int64 active_minutes_sum = 2; + * + * @return The activeMinutesSum. + */ + @java.lang.Override + public long getActiveMinutesSum() { + return activeMinutesSum_; + } + + /** + * + * + *
+       * Number of whole minutes spent in activity.
+       * 
+ * + * int64 active_minutes_sum = 2; + * + * @param value The activeMinutesSum to set. + * @return This builder for chaining. + */ + public Builder setActiveMinutesSum(long value) { + + activeMinutesSum_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Number of whole minutes spent in activity.
+       * 
+ * + * int64 active_minutes_sum = 2; + * + * @return This builder for chaining. + */ + public Builder clearActiveMinutesSum() { + bitField0_ = (bitField0_ & ~0x00000002); + activeMinutesSum_ = 0L; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.ActiveMinutesRollupValue.ActiveMinutesRollupByActivityLevel) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.ActiveMinutesRollupValue.ActiveMinutesRollupByActivityLevel) + private static final com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .ActiveMinutesRollupByActivityLevel + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .ActiveMinutesRollupByActivityLevel(); + } + + public static com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .ActiveMinutesRollupByActivityLevel + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ActiveMinutesRollupByActivityLevel parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .ActiveMinutesRollupByActivityLevel + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int ACTIVE_MINUTES_ROLLUP_BY_ACTIVITY_LEVEL_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List< + com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .ActiveMinutesRollupByActivityLevel> + activeMinutesRollupByActivityLevel_; + + /** + * + * + *
+   * Active minutes by activity level. At most one record per activity level
+   * is allowed.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActiveMinutesRollupValue.ActiveMinutesRollupByActivityLevel active_minutes_rollup_by_activity_level = 1; + * + */ + @java.lang.Override + public java.util.List< + com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .ActiveMinutesRollupByActivityLevel> + getActiveMinutesRollupByActivityLevelList() { + return activeMinutesRollupByActivityLevel_; + } + + /** + * + * + *
+   * Active minutes by activity level. At most one record per activity level
+   * is allowed.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActiveMinutesRollupValue.ActiveMinutesRollupByActivityLevel active_minutes_rollup_by_activity_level = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .ActiveMinutesRollupByActivityLevelOrBuilder> + getActiveMinutesRollupByActivityLevelOrBuilderList() { + return activeMinutesRollupByActivityLevel_; + } + + /** + * + * + *
+   * Active minutes by activity level. At most one record per activity level
+   * is allowed.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActiveMinutesRollupValue.ActiveMinutesRollupByActivityLevel active_minutes_rollup_by_activity_level = 1; + * + */ + @java.lang.Override + public int getActiveMinutesRollupByActivityLevelCount() { + return activeMinutesRollupByActivityLevel_.size(); + } + + /** + * + * + *
+   * Active minutes by activity level. At most one record per activity level
+   * is allowed.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActiveMinutesRollupValue.ActiveMinutesRollupByActivityLevel active_minutes_rollup_by_activity_level = 1; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .ActiveMinutesRollupByActivityLevel + getActiveMinutesRollupByActivityLevel(int index) { + return activeMinutesRollupByActivityLevel_.get(index); + } + + /** + * + * + *
+   * Active minutes by activity level. At most one record per activity level
+   * is allowed.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActiveMinutesRollupValue.ActiveMinutesRollupByActivityLevel active_minutes_rollup_by_activity_level = 1; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .ActiveMinutesRollupByActivityLevelOrBuilder + getActiveMinutesRollupByActivityLevelOrBuilder(int index) { + return activeMinutesRollupByActivityLevel_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < activeMinutesRollupByActivityLevel_.size(); i++) { + output.writeMessage(1, activeMinutesRollupByActivityLevel_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < activeMinutesRollupByActivityLevel_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, activeMinutesRollupByActivityLevel_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.ActiveMinutesRollupValue)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.ActiveMinutesRollupValue other = + (com.google.devicesandservices.health.v4.ActiveMinutesRollupValue) obj; + + if (!getActiveMinutesRollupByActivityLevelList() + .equals(other.getActiveMinutesRollupByActivityLevelList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getActiveMinutesRollupByActivityLevelCount() > 0) { + hash = (37 * hash) + ACTIVE_MINUTES_ROLLUP_BY_ACTIVITY_LEVEL_FIELD_NUMBER; + hash = (53 * hash) + getActiveMinutesRollupByActivityLevelList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.ActiveMinutesRollupValue parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.ActiveMinutesRollupValue parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ActiveMinutesRollupValue parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.ActiveMinutesRollupValue parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ActiveMinutesRollupValue parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.ActiveMinutesRollupValue parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ActiveMinutesRollupValue parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.ActiveMinutesRollupValue parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ActiveMinutesRollupValue parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.ActiveMinutesRollupValue parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ActiveMinutesRollupValue parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.ActiveMinutesRollupValue parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.ActiveMinutesRollupValue prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Represents the result of the rollup of the active minutes data type.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.ActiveMinutesRollupValue} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.ActiveMinutesRollupValue) + com.google.devicesandservices.health.v4.ActiveMinutesRollupValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_ActiveMinutesRollupValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_ActiveMinutesRollupValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.ActiveMinutesRollupValue.class, + com.google.devicesandservices.health.v4.ActiveMinutesRollupValue.Builder.class); + } + + // Construct using com.google.devicesandservices.health.v4.ActiveMinutesRollupValue.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (activeMinutesRollupByActivityLevelBuilder_ == null) { + activeMinutesRollupByActivityLevel_ = java.util.Collections.emptyList(); + } else { + activeMinutesRollupByActivityLevel_ = null; + activeMinutesRollupByActivityLevelBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_ActiveMinutesRollupValue_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.ActiveMinutesRollupValue.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.ActiveMinutesRollupValue build() { + com.google.devicesandservices.health.v4.ActiveMinutesRollupValue result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.ActiveMinutesRollupValue buildPartial() { + com.google.devicesandservices.health.v4.ActiveMinutesRollupValue result = + new com.google.devicesandservices.health.v4.ActiveMinutesRollupValue(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.devicesandservices.health.v4.ActiveMinutesRollupValue result) { + if (activeMinutesRollupByActivityLevelBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + activeMinutesRollupByActivityLevel_ = + java.util.Collections.unmodifiableList(activeMinutesRollupByActivityLevel_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.activeMinutesRollupByActivityLevel_ = activeMinutesRollupByActivityLevel_; + } else { + result.activeMinutesRollupByActivityLevel_ = + activeMinutesRollupByActivityLevelBuilder_.build(); + } + } + + private void buildPartial0( + com.google.devicesandservices.health.v4.ActiveMinutesRollupValue result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.ActiveMinutesRollupValue) { + return mergeFrom((com.google.devicesandservices.health.v4.ActiveMinutesRollupValue) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.devicesandservices.health.v4.ActiveMinutesRollupValue other) { + if (other + == com.google.devicesandservices.health.v4.ActiveMinutesRollupValue.getDefaultInstance()) + return this; + if (activeMinutesRollupByActivityLevelBuilder_ == null) { + if (!other.activeMinutesRollupByActivityLevel_.isEmpty()) { + if (activeMinutesRollupByActivityLevel_.isEmpty()) { + activeMinutesRollupByActivityLevel_ = other.activeMinutesRollupByActivityLevel_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureActiveMinutesRollupByActivityLevelIsMutable(); + activeMinutesRollupByActivityLevel_.addAll(other.activeMinutesRollupByActivityLevel_); + } + onChanged(); + } + } else { + if (!other.activeMinutesRollupByActivityLevel_.isEmpty()) { + if (activeMinutesRollupByActivityLevelBuilder_.isEmpty()) { + activeMinutesRollupByActivityLevelBuilder_.dispose(); + activeMinutesRollupByActivityLevelBuilder_ = null; + activeMinutesRollupByActivityLevel_ = other.activeMinutesRollupByActivityLevel_; + bitField0_ = (bitField0_ & ~0x00000001); + activeMinutesRollupByActivityLevelBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetActiveMinutesRollupByActivityLevelFieldBuilder() + : null; + } else { + activeMinutesRollupByActivityLevelBuilder_.addAllMessages( + other.activeMinutesRollupByActivityLevel_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .ActiveMinutesRollupByActivityLevel + m = + input.readMessage( + com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .ActiveMinutesRollupByActivityLevel.parser(), + extensionRegistry); + if (activeMinutesRollupByActivityLevelBuilder_ == null) { + ensureActiveMinutesRollupByActivityLevelIsMutable(); + activeMinutesRollupByActivityLevel_.add(m); + } else { + activeMinutesRollupByActivityLevelBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List< + com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .ActiveMinutesRollupByActivityLevel> + activeMinutesRollupByActivityLevel_ = java.util.Collections.emptyList(); + + private void ensureActiveMinutesRollupByActivityLevelIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + activeMinutesRollupByActivityLevel_ = + new java.util.ArrayList< + com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .ActiveMinutesRollupByActivityLevel>(activeMinutesRollupByActivityLevel_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .ActiveMinutesRollupByActivityLevel, + com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .ActiveMinutesRollupByActivityLevel.Builder, + com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .ActiveMinutesRollupByActivityLevelOrBuilder> + activeMinutesRollupByActivityLevelBuilder_; + + /** + * + * + *
+     * Active minutes by activity level. At most one record per activity level
+     * is allowed.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActiveMinutesRollupValue.ActiveMinutesRollupByActivityLevel active_minutes_rollup_by_activity_level = 1; + * + */ + public java.util.List< + com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .ActiveMinutesRollupByActivityLevel> + getActiveMinutesRollupByActivityLevelList() { + if (activeMinutesRollupByActivityLevelBuilder_ == null) { + return java.util.Collections.unmodifiableList(activeMinutesRollupByActivityLevel_); + } else { + return activeMinutesRollupByActivityLevelBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Active minutes by activity level. At most one record per activity level
+     * is allowed.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActiveMinutesRollupValue.ActiveMinutesRollupByActivityLevel active_minutes_rollup_by_activity_level = 1; + * + */ + public int getActiveMinutesRollupByActivityLevelCount() { + if (activeMinutesRollupByActivityLevelBuilder_ == null) { + return activeMinutesRollupByActivityLevel_.size(); + } else { + return activeMinutesRollupByActivityLevelBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Active minutes by activity level. At most one record per activity level
+     * is allowed.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActiveMinutesRollupValue.ActiveMinutesRollupByActivityLevel active_minutes_rollup_by_activity_level = 1; + * + */ + public com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .ActiveMinutesRollupByActivityLevel + getActiveMinutesRollupByActivityLevel(int index) { + if (activeMinutesRollupByActivityLevelBuilder_ == null) { + return activeMinutesRollupByActivityLevel_.get(index); + } else { + return activeMinutesRollupByActivityLevelBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Active minutes by activity level. At most one record per activity level
+     * is allowed.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActiveMinutesRollupValue.ActiveMinutesRollupByActivityLevel active_minutes_rollup_by_activity_level = 1; + * + */ + public Builder setActiveMinutesRollupByActivityLevel( + int index, + com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .ActiveMinutesRollupByActivityLevel + value) { + if (activeMinutesRollupByActivityLevelBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureActiveMinutesRollupByActivityLevelIsMutable(); + activeMinutesRollupByActivityLevel_.set(index, value); + onChanged(); + } else { + activeMinutesRollupByActivityLevelBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Active minutes by activity level. At most one record per activity level
+     * is allowed.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActiveMinutesRollupValue.ActiveMinutesRollupByActivityLevel active_minutes_rollup_by_activity_level = 1; + * + */ + public Builder setActiveMinutesRollupByActivityLevel( + int index, + com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .ActiveMinutesRollupByActivityLevel.Builder + builderForValue) { + if (activeMinutesRollupByActivityLevelBuilder_ == null) { + ensureActiveMinutesRollupByActivityLevelIsMutable(); + activeMinutesRollupByActivityLevel_.set(index, builderForValue.build()); + onChanged(); + } else { + activeMinutesRollupByActivityLevelBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Active minutes by activity level. At most one record per activity level
+     * is allowed.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActiveMinutesRollupValue.ActiveMinutesRollupByActivityLevel active_minutes_rollup_by_activity_level = 1; + * + */ + public Builder addActiveMinutesRollupByActivityLevel( + com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .ActiveMinutesRollupByActivityLevel + value) { + if (activeMinutesRollupByActivityLevelBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureActiveMinutesRollupByActivityLevelIsMutable(); + activeMinutesRollupByActivityLevel_.add(value); + onChanged(); + } else { + activeMinutesRollupByActivityLevelBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Active minutes by activity level. At most one record per activity level
+     * is allowed.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActiveMinutesRollupValue.ActiveMinutesRollupByActivityLevel active_minutes_rollup_by_activity_level = 1; + * + */ + public Builder addActiveMinutesRollupByActivityLevel( + int index, + com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .ActiveMinutesRollupByActivityLevel + value) { + if (activeMinutesRollupByActivityLevelBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureActiveMinutesRollupByActivityLevelIsMutable(); + activeMinutesRollupByActivityLevel_.add(index, value); + onChanged(); + } else { + activeMinutesRollupByActivityLevelBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Active minutes by activity level. At most one record per activity level
+     * is allowed.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActiveMinutesRollupValue.ActiveMinutesRollupByActivityLevel active_minutes_rollup_by_activity_level = 1; + * + */ + public Builder addActiveMinutesRollupByActivityLevel( + com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .ActiveMinutesRollupByActivityLevel.Builder + builderForValue) { + if (activeMinutesRollupByActivityLevelBuilder_ == null) { + ensureActiveMinutesRollupByActivityLevelIsMutable(); + activeMinutesRollupByActivityLevel_.add(builderForValue.build()); + onChanged(); + } else { + activeMinutesRollupByActivityLevelBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Active minutes by activity level. At most one record per activity level
+     * is allowed.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActiveMinutesRollupValue.ActiveMinutesRollupByActivityLevel active_minutes_rollup_by_activity_level = 1; + * + */ + public Builder addActiveMinutesRollupByActivityLevel( + int index, + com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .ActiveMinutesRollupByActivityLevel.Builder + builderForValue) { + if (activeMinutesRollupByActivityLevelBuilder_ == null) { + ensureActiveMinutesRollupByActivityLevelIsMutable(); + activeMinutesRollupByActivityLevel_.add(index, builderForValue.build()); + onChanged(); + } else { + activeMinutesRollupByActivityLevelBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Active minutes by activity level. At most one record per activity level
+     * is allowed.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActiveMinutesRollupValue.ActiveMinutesRollupByActivityLevel active_minutes_rollup_by_activity_level = 1; + * + */ + public Builder addAllActiveMinutesRollupByActivityLevel( + java.lang.Iterable< + ? extends + com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .ActiveMinutesRollupByActivityLevel> + values) { + if (activeMinutesRollupByActivityLevelBuilder_ == null) { + ensureActiveMinutesRollupByActivityLevelIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, activeMinutesRollupByActivityLevel_); + onChanged(); + } else { + activeMinutesRollupByActivityLevelBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Active minutes by activity level. At most one record per activity level
+     * is allowed.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActiveMinutesRollupValue.ActiveMinutesRollupByActivityLevel active_minutes_rollup_by_activity_level = 1; + * + */ + public Builder clearActiveMinutesRollupByActivityLevel() { + if (activeMinutesRollupByActivityLevelBuilder_ == null) { + activeMinutesRollupByActivityLevel_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + activeMinutesRollupByActivityLevelBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Active minutes by activity level. At most one record per activity level
+     * is allowed.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActiveMinutesRollupValue.ActiveMinutesRollupByActivityLevel active_minutes_rollup_by_activity_level = 1; + * + */ + public Builder removeActiveMinutesRollupByActivityLevel(int index) { + if (activeMinutesRollupByActivityLevelBuilder_ == null) { + ensureActiveMinutesRollupByActivityLevelIsMutable(); + activeMinutesRollupByActivityLevel_.remove(index); + onChanged(); + } else { + activeMinutesRollupByActivityLevelBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Active minutes by activity level. At most one record per activity level
+     * is allowed.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActiveMinutesRollupValue.ActiveMinutesRollupByActivityLevel active_minutes_rollup_by_activity_level = 1; + * + */ + public com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .ActiveMinutesRollupByActivityLevel.Builder + getActiveMinutesRollupByActivityLevelBuilder(int index) { + return internalGetActiveMinutesRollupByActivityLevelFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Active minutes by activity level. At most one record per activity level
+     * is allowed.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActiveMinutesRollupValue.ActiveMinutesRollupByActivityLevel active_minutes_rollup_by_activity_level = 1; + * + */ + public com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .ActiveMinutesRollupByActivityLevelOrBuilder + getActiveMinutesRollupByActivityLevelOrBuilder(int index) { + if (activeMinutesRollupByActivityLevelBuilder_ == null) { + return activeMinutesRollupByActivityLevel_.get(index); + } else { + return activeMinutesRollupByActivityLevelBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Active minutes by activity level. At most one record per activity level
+     * is allowed.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActiveMinutesRollupValue.ActiveMinutesRollupByActivityLevel active_minutes_rollup_by_activity_level = 1; + * + */ + public java.util.List< + ? extends + com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .ActiveMinutesRollupByActivityLevelOrBuilder> + getActiveMinutesRollupByActivityLevelOrBuilderList() { + if (activeMinutesRollupByActivityLevelBuilder_ != null) { + return activeMinutesRollupByActivityLevelBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(activeMinutesRollupByActivityLevel_); + } + } + + /** + * + * + *
+     * Active minutes by activity level. At most one record per activity level
+     * is allowed.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActiveMinutesRollupValue.ActiveMinutesRollupByActivityLevel active_minutes_rollup_by_activity_level = 1; + * + */ + public com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .ActiveMinutesRollupByActivityLevel.Builder + addActiveMinutesRollupByActivityLevelBuilder() { + return internalGetActiveMinutesRollupByActivityLevelFieldBuilder() + .addBuilder( + com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .ActiveMinutesRollupByActivityLevel.getDefaultInstance()); + } + + /** + * + * + *
+     * Active minutes by activity level. At most one record per activity level
+     * is allowed.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActiveMinutesRollupValue.ActiveMinutesRollupByActivityLevel active_minutes_rollup_by_activity_level = 1; + * + */ + public com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .ActiveMinutesRollupByActivityLevel.Builder + addActiveMinutesRollupByActivityLevelBuilder(int index) { + return internalGetActiveMinutesRollupByActivityLevelFieldBuilder() + .addBuilder( + index, + com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .ActiveMinutesRollupByActivityLevel.getDefaultInstance()); + } + + /** + * + * + *
+     * Active minutes by activity level. At most one record per activity level
+     * is allowed.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActiveMinutesRollupValue.ActiveMinutesRollupByActivityLevel active_minutes_rollup_by_activity_level = 1; + * + */ + public java.util.List< + com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .ActiveMinutesRollupByActivityLevel.Builder> + getActiveMinutesRollupByActivityLevelBuilderList() { + return internalGetActiveMinutesRollupByActivityLevelFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .ActiveMinutesRollupByActivityLevel, + com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .ActiveMinutesRollupByActivityLevel.Builder, + com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .ActiveMinutesRollupByActivityLevelOrBuilder> + internalGetActiveMinutesRollupByActivityLevelFieldBuilder() { + if (activeMinutesRollupByActivityLevelBuilder_ == null) { + activeMinutesRollupByActivityLevelBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .ActiveMinutesRollupByActivityLevel, + com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .ActiveMinutesRollupByActivityLevel.Builder, + com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .ActiveMinutesRollupByActivityLevelOrBuilder>( + activeMinutesRollupByActivityLevel_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + activeMinutesRollupByActivityLevel_ = null; + } + return activeMinutesRollupByActivityLevelBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.ActiveMinutesRollupValue) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.ActiveMinutesRollupValue) + private static final com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.ActiveMinutesRollupValue(); + } + + public static com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ActiveMinutesRollupValue parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ActiveMinutesRollupValueOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ActiveMinutesRollupValueOrBuilder.java new file mode 100644 index 000000000000..7b01f02ced4c --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ActiveMinutesRollupValueOrBuilder.java @@ -0,0 +1,109 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface ActiveMinutesRollupValueOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.ActiveMinutesRollupValue) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Active minutes by activity level. At most one record per activity level
+   * is allowed.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActiveMinutesRollupValue.ActiveMinutesRollupByActivityLevel active_minutes_rollup_by_activity_level = 1; + * + */ + java.util.List< + com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .ActiveMinutesRollupByActivityLevel> + getActiveMinutesRollupByActivityLevelList(); + + /** + * + * + *
+   * Active minutes by activity level. At most one record per activity level
+   * is allowed.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActiveMinutesRollupValue.ActiveMinutesRollupByActivityLevel active_minutes_rollup_by_activity_level = 1; + * + */ + com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .ActiveMinutesRollupByActivityLevel + getActiveMinutesRollupByActivityLevel(int index); + + /** + * + * + *
+   * Active minutes by activity level. At most one record per activity level
+   * is allowed.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActiveMinutesRollupValue.ActiveMinutesRollupByActivityLevel active_minutes_rollup_by_activity_level = 1; + * + */ + int getActiveMinutesRollupByActivityLevelCount(); + + /** + * + * + *
+   * Active minutes by activity level. At most one record per activity level
+   * is allowed.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActiveMinutesRollupValue.ActiveMinutesRollupByActivityLevel active_minutes_rollup_by_activity_level = 1; + * + */ + java.util.List< + ? extends + com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .ActiveMinutesRollupByActivityLevelOrBuilder> + getActiveMinutesRollupByActivityLevelOrBuilderList(); + + /** + * + * + *
+   * Active minutes by activity level. At most one record per activity level
+   * is allowed.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActiveMinutesRollupValue.ActiveMinutesRollupByActivityLevel active_minutes_rollup_by_activity_level = 1; + * + */ + com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .ActiveMinutesRollupByActivityLevelOrBuilder + getActiveMinutesRollupByActivityLevelOrBuilder(int index); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ActiveZoneMinutes.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ActiveZoneMinutes.java new file mode 100644 index 000000000000..3ca693af356f --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ActiveZoneMinutes.java @@ -0,0 +1,1222 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * Record of active zone minutes in a given time interval.
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.ActiveZoneMinutes} + */ +@com.google.protobuf.Generated +public final class ActiveZoneMinutes extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.ActiveZoneMinutes) + ActiveZoneMinutesOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ActiveZoneMinutes"); + } + + // Use ActiveZoneMinutes.newBuilder() to construct. + private ActiveZoneMinutes(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ActiveZoneMinutes() { + heartRateZone_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_ActiveZoneMinutes_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_ActiveZoneMinutes_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.ActiveZoneMinutes.class, + com.google.devicesandservices.health.v4.ActiveZoneMinutes.Builder.class); + } + + /** + * + * + *
+   * Represents different heart rate zones.
+   * 
+ * + * Protobuf enum {@code google.devicesandservices.health.v4.ActiveZoneMinutes.HeartRateZone} + */ + public enum HeartRateZone implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified heart rate zone.
+     * 
+ * + * HEART_RATE_ZONE_UNSPECIFIED = 0; + */ + HEART_RATE_ZONE_UNSPECIFIED(0), + /** + * + * + *
+     * The fat burn heart rate zone.
+     * 
+ * + * FAT_BURN = 1; + */ + FAT_BURN(1), + /** + * + * + *
+     * The cardio heart rate zone.
+     * 
+ * + * CARDIO = 2; + */ + CARDIO(2), + /** + * + * + *
+     * The peak heart rate zone.
+     * 
+ * + * PEAK = 3; + */ + PEAK(3), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "HeartRateZone"); + } + + /** + * + * + *
+     * Unspecified heart rate zone.
+     * 
+ * + * HEART_RATE_ZONE_UNSPECIFIED = 0; + */ + public static final int HEART_RATE_ZONE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * The fat burn heart rate zone.
+     * 
+ * + * FAT_BURN = 1; + */ + public static final int FAT_BURN_VALUE = 1; + + /** + * + * + *
+     * The cardio heart rate zone.
+     * 
+ * + * CARDIO = 2; + */ + public static final int CARDIO_VALUE = 2; + + /** + * + * + *
+     * The peak heart rate zone.
+     * 
+ * + * PEAK = 3; + */ + public static final int PEAK_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static HeartRateZone valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static HeartRateZone forNumber(int value) { + switch (value) { + case 0: + return HEART_RATE_ZONE_UNSPECIFIED; + case 1: + return FAT_BURN; + case 2: + return CARDIO; + case 3: + return PEAK; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public HeartRateZone findValueByNumber(int number) { + return HeartRateZone.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.devicesandservices.health.v4.ActiveZoneMinutes.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final HeartRateZone[] VALUES = values(); + + public static HeartRateZone valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private HeartRateZone(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.devicesandservices.health.v4.ActiveZoneMinutes.HeartRateZone) + } + + private int bitField0_; + public static final int INTERVAL_FIELD_NUMBER = 1; + private com.google.devicesandservices.health.v4.ObservationTimeInterval interval_; + + /** + * + * + *
+   * Required. Observed interval.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the interval field is set. + */ + @java.lang.Override + public boolean hasInterval() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. Observed interval.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The interval. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ObservationTimeInterval getInterval() { + return interval_ == null + ? com.google.devicesandservices.health.v4.ObservationTimeInterval.getDefaultInstance() + : interval_; + } + + /** + * + * + *
+   * Required. Observed interval.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ObservationTimeIntervalOrBuilder + getIntervalOrBuilder() { + return interval_ == null + ? com.google.devicesandservices.health.v4.ObservationTimeInterval.getDefaultInstance() + : interval_; + } + + public static final int HEART_RATE_ZONE_FIELD_NUMBER = 2; + private int heartRateZone_ = 0; + + /** + * + * + *
+   * Required. Heart rate zone in which the active zone minutes have been
+   * earned, in the given time interval.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ActiveZoneMinutes.HeartRateZone heart_rate_zone = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for heartRateZone. + */ + @java.lang.Override + public int getHeartRateZoneValue() { + return heartRateZone_; + } + + /** + * + * + *
+   * Required. Heart rate zone in which the active zone minutes have been
+   * earned, in the given time interval.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ActiveZoneMinutes.HeartRateZone heart_rate_zone = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The heartRateZone. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ActiveZoneMinutes.HeartRateZone + getHeartRateZone() { + com.google.devicesandservices.health.v4.ActiveZoneMinutes.HeartRateZone result = + com.google.devicesandservices.health.v4.ActiveZoneMinutes.HeartRateZone.forNumber( + heartRateZone_); + return result == null + ? com.google.devicesandservices.health.v4.ActiveZoneMinutes.HeartRateZone.UNRECOGNIZED + : result; + } + + public static final int ACTIVE_ZONE_MINUTES_FIELD_NUMBER = 3; + private long activeZoneMinutes_ = 0L; + + /** + * + * + *
+   * Required. Number of Active Zone Minutes earned in the given time interval.
+   * Note: active_zone_minutes equals to 1 for low intensity (fat burn) zones or
+   * 2 for high intensity zones (cardio, peak).
+   * 
+ * + * int64 active_zone_minutes = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The activeZoneMinutes. + */ + @java.lang.Override + public long getActiveZoneMinutes() { + return activeZoneMinutes_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getInterval()); + } + if (heartRateZone_ + != com.google.devicesandservices.health.v4.ActiveZoneMinutes.HeartRateZone + .HEART_RATE_ZONE_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, heartRateZone_); + } + if (activeZoneMinutes_ != 0L) { + output.writeInt64(3, activeZoneMinutes_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getInterval()); + } + if (heartRateZone_ + != com.google.devicesandservices.health.v4.ActiveZoneMinutes.HeartRateZone + .HEART_RATE_ZONE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, heartRateZone_); + } + if (activeZoneMinutes_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, activeZoneMinutes_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.ActiveZoneMinutes)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.ActiveZoneMinutes other = + (com.google.devicesandservices.health.v4.ActiveZoneMinutes) obj; + + if (hasInterval() != other.hasInterval()) return false; + if (hasInterval()) { + if (!getInterval().equals(other.getInterval())) return false; + } + if (heartRateZone_ != other.heartRateZone_) return false; + if (getActiveZoneMinutes() != other.getActiveZoneMinutes()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasInterval()) { + hash = (37 * hash) + INTERVAL_FIELD_NUMBER; + hash = (53 * hash) + getInterval().hashCode(); + } + hash = (37 * hash) + HEART_RATE_ZONE_FIELD_NUMBER; + hash = (53 * hash) + heartRateZone_; + hash = (37 * hash) + ACTIVE_ZONE_MINUTES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getActiveZoneMinutes()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.ActiveZoneMinutes parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.ActiveZoneMinutes parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ActiveZoneMinutes parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.ActiveZoneMinutes parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ActiveZoneMinutes parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.ActiveZoneMinutes parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ActiveZoneMinutes parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.ActiveZoneMinutes parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ActiveZoneMinutes parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.ActiveZoneMinutes parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ActiveZoneMinutes parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.ActiveZoneMinutes parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.ActiveZoneMinutes prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Record of active zone minutes in a given time interval.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.ActiveZoneMinutes} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.ActiveZoneMinutes) + com.google.devicesandservices.health.v4.ActiveZoneMinutesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_ActiveZoneMinutes_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_ActiveZoneMinutes_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.ActiveZoneMinutes.class, + com.google.devicesandservices.health.v4.ActiveZoneMinutes.Builder.class); + } + + // Construct using com.google.devicesandservices.health.v4.ActiveZoneMinutes.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetIntervalFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + interval_ = null; + if (intervalBuilder_ != null) { + intervalBuilder_.dispose(); + intervalBuilder_ = null; + } + heartRateZone_ = 0; + activeZoneMinutes_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_ActiveZoneMinutes_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.ActiveZoneMinutes getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.ActiveZoneMinutes.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.ActiveZoneMinutes build() { + com.google.devicesandservices.health.v4.ActiveZoneMinutes result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.ActiveZoneMinutes buildPartial() { + com.google.devicesandservices.health.v4.ActiveZoneMinutes result = + new com.google.devicesandservices.health.v4.ActiveZoneMinutes(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.devicesandservices.health.v4.ActiveZoneMinutes result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.interval_ = intervalBuilder_ == null ? interval_ : intervalBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.heartRateZone_ = heartRateZone_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.activeZoneMinutes_ = activeZoneMinutes_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.ActiveZoneMinutes) { + return mergeFrom((com.google.devicesandservices.health.v4.ActiveZoneMinutes) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.devicesandservices.health.v4.ActiveZoneMinutes other) { + if (other == com.google.devicesandservices.health.v4.ActiveZoneMinutes.getDefaultInstance()) + return this; + if (other.hasInterval()) { + mergeInterval(other.getInterval()); + } + if (other.heartRateZone_ != 0) { + setHeartRateZoneValue(other.getHeartRateZoneValue()); + } + if (other.getActiveZoneMinutes() != 0L) { + setActiveZoneMinutes(other.getActiveZoneMinutes()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetIntervalFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + heartRateZone_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + activeZoneMinutes_ = input.readInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.devicesandservices.health.v4.ObservationTimeInterval interval_; + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ObservationTimeInterval, + com.google.devicesandservices.health.v4.ObservationTimeInterval.Builder, + com.google.devicesandservices.health.v4.ObservationTimeIntervalOrBuilder> + intervalBuilder_; + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the interval field is set. + */ + public boolean hasInterval() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The interval. + */ + public com.google.devicesandservices.health.v4.ObservationTimeInterval getInterval() { + if (intervalBuilder_ == null) { + return interval_ == null + ? com.google.devicesandservices.health.v4.ObservationTimeInterval.getDefaultInstance() + : interval_; + } else { + return intervalBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setInterval( + com.google.devicesandservices.health.v4.ObservationTimeInterval value) { + if (intervalBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + interval_ = value; + } else { + intervalBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setInterval( + com.google.devicesandservices.health.v4.ObservationTimeInterval.Builder builderForValue) { + if (intervalBuilder_ == null) { + interval_ = builderForValue.build(); + } else { + intervalBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeInterval( + com.google.devicesandservices.health.v4.ObservationTimeInterval value) { + if (intervalBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && interval_ != null + && interval_ + != com.google.devicesandservices.health.v4.ObservationTimeInterval + .getDefaultInstance()) { + getIntervalBuilder().mergeFrom(value); + } else { + interval_ = value; + } + } else { + intervalBuilder_.mergeFrom(value); + } + if (interval_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearInterval() { + bitField0_ = (bitField0_ & ~0x00000001); + interval_ = null; + if (intervalBuilder_ != null) { + intervalBuilder_.dispose(); + intervalBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.devicesandservices.health.v4.ObservationTimeInterval.Builder + getIntervalBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetIntervalFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.devicesandservices.health.v4.ObservationTimeIntervalOrBuilder + getIntervalOrBuilder() { + if (intervalBuilder_ != null) { + return intervalBuilder_.getMessageOrBuilder(); + } else { + return interval_ == null + ? com.google.devicesandservices.health.v4.ObservationTimeInterval.getDefaultInstance() + : interval_; + } + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ObservationTimeInterval, + com.google.devicesandservices.health.v4.ObservationTimeInterval.Builder, + com.google.devicesandservices.health.v4.ObservationTimeIntervalOrBuilder> + internalGetIntervalFieldBuilder() { + if (intervalBuilder_ == null) { + intervalBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ObservationTimeInterval, + com.google.devicesandservices.health.v4.ObservationTimeInterval.Builder, + com.google.devicesandservices.health.v4.ObservationTimeIntervalOrBuilder>( + getInterval(), getParentForChildren(), isClean()); + interval_ = null; + } + return intervalBuilder_; + } + + private int heartRateZone_ = 0; + + /** + * + * + *
+     * Required. Heart rate zone in which the active zone minutes have been
+     * earned, in the given time interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ActiveZoneMinutes.HeartRateZone heart_rate_zone = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for heartRateZone. + */ + @java.lang.Override + public int getHeartRateZoneValue() { + return heartRateZone_; + } + + /** + * + * + *
+     * Required. Heart rate zone in which the active zone minutes have been
+     * earned, in the given time interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ActiveZoneMinutes.HeartRateZone heart_rate_zone = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for heartRateZone to set. + * @return This builder for chaining. + */ + public Builder setHeartRateZoneValue(int value) { + heartRateZone_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Heart rate zone in which the active zone minutes have been
+     * earned, in the given time interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ActiveZoneMinutes.HeartRateZone heart_rate_zone = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The heartRateZone. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ActiveZoneMinutes.HeartRateZone + getHeartRateZone() { + com.google.devicesandservices.health.v4.ActiveZoneMinutes.HeartRateZone result = + com.google.devicesandservices.health.v4.ActiveZoneMinutes.HeartRateZone.forNumber( + heartRateZone_); + return result == null + ? com.google.devicesandservices.health.v4.ActiveZoneMinutes.HeartRateZone.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Required. Heart rate zone in which the active zone minutes have been
+     * earned, in the given time interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ActiveZoneMinutes.HeartRateZone heart_rate_zone = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The heartRateZone to set. + * @return This builder for chaining. + */ + public Builder setHeartRateZone( + com.google.devicesandservices.health.v4.ActiveZoneMinutes.HeartRateZone value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + heartRateZone_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Heart rate zone in which the active zone minutes have been
+     * earned, in the given time interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ActiveZoneMinutes.HeartRateZone heart_rate_zone = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearHeartRateZone() { + bitField0_ = (bitField0_ & ~0x00000002); + heartRateZone_ = 0; + onChanged(); + return this; + } + + private long activeZoneMinutes_; + + /** + * + * + *
+     * Required. Number of Active Zone Minutes earned in the given time interval.
+     * Note: active_zone_minutes equals to 1 for low intensity (fat burn) zones or
+     * 2 for high intensity zones (cardio, peak).
+     * 
+ * + * int64 active_zone_minutes = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The activeZoneMinutes. + */ + @java.lang.Override + public long getActiveZoneMinutes() { + return activeZoneMinutes_; + } + + /** + * + * + *
+     * Required. Number of Active Zone Minutes earned in the given time interval.
+     * Note: active_zone_minutes equals to 1 for low intensity (fat burn) zones or
+     * 2 for high intensity zones (cardio, peak).
+     * 
+ * + * int64 active_zone_minutes = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The activeZoneMinutes to set. + * @return This builder for chaining. + */ + public Builder setActiveZoneMinutes(long value) { + + activeZoneMinutes_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Number of Active Zone Minutes earned in the given time interval.
+     * Note: active_zone_minutes equals to 1 for low intensity (fat burn) zones or
+     * 2 for high intensity zones (cardio, peak).
+     * 
+ * + * int64 active_zone_minutes = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearActiveZoneMinutes() { + bitField0_ = (bitField0_ & ~0x00000004); + activeZoneMinutes_ = 0L; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.ActiveZoneMinutes) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.ActiveZoneMinutes) + private static final com.google.devicesandservices.health.v4.ActiveZoneMinutes DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.ActiveZoneMinutes(); + } + + public static com.google.devicesandservices.health.v4.ActiveZoneMinutes getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ActiveZoneMinutes parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.ActiveZoneMinutes getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ActiveZoneMinutesOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ActiveZoneMinutesOrBuilder.java new file mode 100644 index 000000000000..93a0733520e3 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ActiveZoneMinutesOrBuilder.java @@ -0,0 +1,118 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface ActiveZoneMinutesOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.ActiveZoneMinutes) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Observed interval.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the interval field is set. + */ + boolean hasInterval(); + + /** + * + * + *
+   * Required. Observed interval.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The interval. + */ + com.google.devicesandservices.health.v4.ObservationTimeInterval getInterval(); + + /** + * + * + *
+   * Required. Observed interval.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.devicesandservices.health.v4.ObservationTimeIntervalOrBuilder getIntervalOrBuilder(); + + /** + * + * + *
+   * Required. Heart rate zone in which the active zone minutes have been
+   * earned, in the given time interval.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ActiveZoneMinutes.HeartRateZone heart_rate_zone = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for heartRateZone. + */ + int getHeartRateZoneValue(); + + /** + * + * + *
+   * Required. Heart rate zone in which the active zone minutes have been
+   * earned, in the given time interval.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ActiveZoneMinutes.HeartRateZone heart_rate_zone = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The heartRateZone. + */ + com.google.devicesandservices.health.v4.ActiveZoneMinutes.HeartRateZone getHeartRateZone(); + + /** + * + * + *
+   * Required. Number of Active Zone Minutes earned in the given time interval.
+   * Note: active_zone_minutes equals to 1 for low intensity (fat burn) zones or
+   * 2 for high intensity zones (cardio, peak).
+   * 
+ * + * int64 active_zone_minutes = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The activeZoneMinutes. + */ + long getActiveZoneMinutes(); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ActiveZoneMinutesRollupValue.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ActiveZoneMinutesRollupValue.java new file mode 100644 index 000000000000..bc2f3ba5e82a --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ActiveZoneMinutesRollupValue.java @@ -0,0 +1,709 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * Represents the result of the rollup of the active zone minutes data type.
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue} + */ +@com.google.protobuf.Generated +public final class ActiveZoneMinutesRollupValue extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue) + ActiveZoneMinutesRollupValueOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ActiveZoneMinutesRollupValue"); + } + + // Use ActiveZoneMinutesRollupValue.newBuilder() to construct. + private ActiveZoneMinutesRollupValue(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ActiveZoneMinutesRollupValue() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_ActiveZoneMinutesRollupValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_ActiveZoneMinutesRollupValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue.class, + com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue.Builder.class); + } + + public static final int SUM_IN_CARDIO_HEART_ZONE_FIELD_NUMBER = 1; + private long sumInCardioHeartZone_ = 0L; + + /** + * + * + *
+   * Active zone minutes in `HeartRateZone.CARDIO`.
+   * 
+ * + * int64 sum_in_cardio_heart_zone = 1; + * + * @return The sumInCardioHeartZone. + */ + @java.lang.Override + public long getSumInCardioHeartZone() { + return sumInCardioHeartZone_; + } + + public static final int SUM_IN_PEAK_HEART_ZONE_FIELD_NUMBER = 2; + private long sumInPeakHeartZone_ = 0L; + + /** + * + * + *
+   * Active zone minutes in `HeartRateZone.PEAK`.
+   * 
+ * + * int64 sum_in_peak_heart_zone = 2; + * + * @return The sumInPeakHeartZone. + */ + @java.lang.Override + public long getSumInPeakHeartZone() { + return sumInPeakHeartZone_; + } + + public static final int SUM_IN_FAT_BURN_HEART_ZONE_FIELD_NUMBER = 3; + private long sumInFatBurnHeartZone_ = 0L; + + /** + * + * + *
+   * Active zone minutes in `HeartRateZone.FAT_BURN`.
+   * 
+ * + * int64 sum_in_fat_burn_heart_zone = 3; + * + * @return The sumInFatBurnHeartZone. + */ + @java.lang.Override + public long getSumInFatBurnHeartZone() { + return sumInFatBurnHeartZone_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (sumInCardioHeartZone_ != 0L) { + output.writeInt64(1, sumInCardioHeartZone_); + } + if (sumInPeakHeartZone_ != 0L) { + output.writeInt64(2, sumInPeakHeartZone_); + } + if (sumInFatBurnHeartZone_ != 0L) { + output.writeInt64(3, sumInFatBurnHeartZone_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (sumInCardioHeartZone_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, sumInCardioHeartZone_); + } + if (sumInPeakHeartZone_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, sumInPeakHeartZone_); + } + if (sumInFatBurnHeartZone_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, sumInFatBurnHeartZone_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue other = + (com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue) obj; + + if (getSumInCardioHeartZone() != other.getSumInCardioHeartZone()) return false; + if (getSumInPeakHeartZone() != other.getSumInPeakHeartZone()) return false; + if (getSumInFatBurnHeartZone() != other.getSumInFatBurnHeartZone()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SUM_IN_CARDIO_HEART_ZONE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getSumInCardioHeartZone()); + hash = (37 * hash) + SUM_IN_PEAK_HEART_ZONE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getSumInPeakHeartZone()); + hash = (37 * hash) + SUM_IN_FAT_BURN_HEART_ZONE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getSumInFatBurnHeartZone()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Represents the result of the rollup of the active zone minutes data type.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue) + com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_ActiveZoneMinutesRollupValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_ActiveZoneMinutesRollupValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue.class, + com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue.Builder.class); + } + + // Construct using + // com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + sumInCardioHeartZone_ = 0L; + sumInPeakHeartZone_ = 0L; + sumInFatBurnHeartZone_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_ActiveZoneMinutesRollupValue_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue + getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue build() { + com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue buildPartial() { + com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue result = + new com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.sumInCardioHeartZone_ = sumInCardioHeartZone_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.sumInPeakHeartZone_ = sumInPeakHeartZone_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.sumInFatBurnHeartZone_ = sumInFatBurnHeartZone_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue) { + return mergeFrom( + (com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue other) { + if (other + == com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue + .getDefaultInstance()) return this; + if (other.getSumInCardioHeartZone() != 0L) { + setSumInCardioHeartZone(other.getSumInCardioHeartZone()); + } + if (other.getSumInPeakHeartZone() != 0L) { + setSumInPeakHeartZone(other.getSumInPeakHeartZone()); + } + if (other.getSumInFatBurnHeartZone() != 0L) { + setSumInFatBurnHeartZone(other.getSumInFatBurnHeartZone()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + sumInCardioHeartZone_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + sumInPeakHeartZone_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + sumInFatBurnHeartZone_ = input.readInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private long sumInCardioHeartZone_; + + /** + * + * + *
+     * Active zone minutes in `HeartRateZone.CARDIO`.
+     * 
+ * + * int64 sum_in_cardio_heart_zone = 1; + * + * @return The sumInCardioHeartZone. + */ + @java.lang.Override + public long getSumInCardioHeartZone() { + return sumInCardioHeartZone_; + } + + /** + * + * + *
+     * Active zone minutes in `HeartRateZone.CARDIO`.
+     * 
+ * + * int64 sum_in_cardio_heart_zone = 1; + * + * @param value The sumInCardioHeartZone to set. + * @return This builder for chaining. + */ + public Builder setSumInCardioHeartZone(long value) { + + sumInCardioHeartZone_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Active zone minutes in `HeartRateZone.CARDIO`.
+     * 
+ * + * int64 sum_in_cardio_heart_zone = 1; + * + * @return This builder for chaining. + */ + public Builder clearSumInCardioHeartZone() { + bitField0_ = (bitField0_ & ~0x00000001); + sumInCardioHeartZone_ = 0L; + onChanged(); + return this; + } + + private long sumInPeakHeartZone_; + + /** + * + * + *
+     * Active zone minutes in `HeartRateZone.PEAK`.
+     * 
+ * + * int64 sum_in_peak_heart_zone = 2; + * + * @return The sumInPeakHeartZone. + */ + @java.lang.Override + public long getSumInPeakHeartZone() { + return sumInPeakHeartZone_; + } + + /** + * + * + *
+     * Active zone minutes in `HeartRateZone.PEAK`.
+     * 
+ * + * int64 sum_in_peak_heart_zone = 2; + * + * @param value The sumInPeakHeartZone to set. + * @return This builder for chaining. + */ + public Builder setSumInPeakHeartZone(long value) { + + sumInPeakHeartZone_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Active zone minutes in `HeartRateZone.PEAK`.
+     * 
+ * + * int64 sum_in_peak_heart_zone = 2; + * + * @return This builder for chaining. + */ + public Builder clearSumInPeakHeartZone() { + bitField0_ = (bitField0_ & ~0x00000002); + sumInPeakHeartZone_ = 0L; + onChanged(); + return this; + } + + private long sumInFatBurnHeartZone_; + + /** + * + * + *
+     * Active zone minutes in `HeartRateZone.FAT_BURN`.
+     * 
+ * + * int64 sum_in_fat_burn_heart_zone = 3; + * + * @return The sumInFatBurnHeartZone. + */ + @java.lang.Override + public long getSumInFatBurnHeartZone() { + return sumInFatBurnHeartZone_; + } + + /** + * + * + *
+     * Active zone minutes in `HeartRateZone.FAT_BURN`.
+     * 
+ * + * int64 sum_in_fat_burn_heart_zone = 3; + * + * @param value The sumInFatBurnHeartZone to set. + * @return This builder for chaining. + */ + public Builder setSumInFatBurnHeartZone(long value) { + + sumInFatBurnHeartZone_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Active zone minutes in `HeartRateZone.FAT_BURN`.
+     * 
+ * + * int64 sum_in_fat_burn_heart_zone = 3; + * + * @return This builder for chaining. + */ + public Builder clearSumInFatBurnHeartZone() { + bitField0_ = (bitField0_ & ~0x00000004); + sumInFatBurnHeartZone_ = 0L; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue) + private static final com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue(); + } + + public static com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ActiveZoneMinutesRollupValue parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ActiveZoneMinutesRollupValueOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ActiveZoneMinutesRollupValueOrBuilder.java new file mode 100644 index 000000000000..755b5c0a4101 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ActiveZoneMinutesRollupValueOrBuilder.java @@ -0,0 +1,67 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface ActiveZoneMinutesRollupValueOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Active zone minutes in `HeartRateZone.CARDIO`.
+   * 
+ * + * int64 sum_in_cardio_heart_zone = 1; + * + * @return The sumInCardioHeartZone. + */ + long getSumInCardioHeartZone(); + + /** + * + * + *
+   * Active zone minutes in `HeartRateZone.PEAK`.
+   * 
+ * + * int64 sum_in_peak_heart_zone = 2; + * + * @return The sumInPeakHeartZone. + */ + long getSumInPeakHeartZone(); + + /** + * + * + *
+   * Active zone minutes in `HeartRateZone.FAT_BURN`.
+   * 
+ * + * int64 sum_in_fat_burn_heart_zone = 3; + * + * @return The sumInFatBurnHeartZone. + */ + long getSumInFatBurnHeartZone(); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ActivityLevel.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ActivityLevel.java new file mode 100644 index 000000000000..6a715b5d371c --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ActivityLevel.java @@ -0,0 +1,1136 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * Internal type to capture activity level during a certain time interval.
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.ActivityLevel} + */ +@com.google.protobuf.Generated +public final class ActivityLevel extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.ActivityLevel) + ActivityLevelOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ActivityLevel"); + } + + // Use ActivityLevel.newBuilder() to construct. + private ActivityLevel(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ActivityLevel() { + activityLevelType_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_ActivityLevel_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_ActivityLevel_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.ActivityLevel.class, + com.google.devicesandservices.health.v4.ActivityLevel.Builder.class); + } + + /** + * + * + *
+   * Represents different activity level types.
+   * 
+ * + * Protobuf enum {@code google.devicesandservices.health.v4.ActivityLevel.ActivityLevelType} + */ + public enum ActivityLevelType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified activity level type.
+     * 
+ * + * ACTIVITY_LEVEL_TYPE_UNSPECIFIED = 0; + */ + ACTIVITY_LEVEL_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Sedentary activity level.
+     * 
+ * + * SEDENTARY = 1; + */ + SEDENTARY(1), + /** + * + * + *
+     * Lightly active activity level.
+     * 
+ * + * LIGHTLY_ACTIVE = 2; + */ + LIGHTLY_ACTIVE(2), + /** + * + * + *
+     * Moderately active activity level.
+     * 
+ * + * MODERATELY_ACTIVE = 3; + */ + MODERATELY_ACTIVE(3), + /** + * + * + *
+     * Very active activity level.
+     * 
+ * + * VERY_ACTIVE = 4; + */ + VERY_ACTIVE(4), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ActivityLevelType"); + } + + /** + * + * + *
+     * Unspecified activity level type.
+     * 
+ * + * ACTIVITY_LEVEL_TYPE_UNSPECIFIED = 0; + */ + public static final int ACTIVITY_LEVEL_TYPE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Sedentary activity level.
+     * 
+ * + * SEDENTARY = 1; + */ + public static final int SEDENTARY_VALUE = 1; + + /** + * + * + *
+     * Lightly active activity level.
+     * 
+ * + * LIGHTLY_ACTIVE = 2; + */ + public static final int LIGHTLY_ACTIVE_VALUE = 2; + + /** + * + * + *
+     * Moderately active activity level.
+     * 
+ * + * MODERATELY_ACTIVE = 3; + */ + public static final int MODERATELY_ACTIVE_VALUE = 3; + + /** + * + * + *
+     * Very active activity level.
+     * 
+ * + * VERY_ACTIVE = 4; + */ + public static final int VERY_ACTIVE_VALUE = 4; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ActivityLevelType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ActivityLevelType forNumber(int value) { + switch (value) { + case 0: + return ACTIVITY_LEVEL_TYPE_UNSPECIFIED; + case 1: + return SEDENTARY; + case 2: + return LIGHTLY_ACTIVE; + case 3: + return MODERATELY_ACTIVE; + case 4: + return VERY_ACTIVE; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ActivityLevelType findValueByNumber(int number) { + return ActivityLevelType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.devicesandservices.health.v4.ActivityLevel.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final ActivityLevelType[] VALUES = values(); + + public static ActivityLevelType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private ActivityLevelType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.devicesandservices.health.v4.ActivityLevel.ActivityLevelType) + } + + private int bitField0_; + public static final int INTERVAL_FIELD_NUMBER = 1; + private com.google.devicesandservices.health.v4.ObservationTimeInterval interval_; + + /** + * + * + *
+   * Required. Observed interval.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the interval field is set. + */ + @java.lang.Override + public boolean hasInterval() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. Observed interval.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The interval. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ObservationTimeInterval getInterval() { + return interval_ == null + ? com.google.devicesandservices.health.v4.ObservationTimeInterval.getDefaultInstance() + : interval_; + } + + /** + * + * + *
+   * Required. Observed interval.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ObservationTimeIntervalOrBuilder + getIntervalOrBuilder() { + return interval_ == null + ? com.google.devicesandservices.health.v4.ObservationTimeInterval.getDefaultInstance() + : interval_; + } + + public static final int ACTIVITY_LEVEL_TYPE_FIELD_NUMBER = 2; + private int activityLevelType_ = 0; + + /** + * + * + *
+   * Required. Activity level type in the given time interval.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ActivityLevel.ActivityLevelType activity_level_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for activityLevelType. + */ + @java.lang.Override + public int getActivityLevelTypeValue() { + return activityLevelType_; + } + + /** + * + * + *
+   * Required. Activity level type in the given time interval.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ActivityLevel.ActivityLevelType activity_level_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The activityLevelType. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ActivityLevel.ActivityLevelType + getActivityLevelType() { + com.google.devicesandservices.health.v4.ActivityLevel.ActivityLevelType result = + com.google.devicesandservices.health.v4.ActivityLevel.ActivityLevelType.forNumber( + activityLevelType_); + return result == null + ? com.google.devicesandservices.health.v4.ActivityLevel.ActivityLevelType.UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getInterval()); + } + if (activityLevelType_ + != com.google.devicesandservices.health.v4.ActivityLevel.ActivityLevelType + .ACTIVITY_LEVEL_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, activityLevelType_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getInterval()); + } + if (activityLevelType_ + != com.google.devicesandservices.health.v4.ActivityLevel.ActivityLevelType + .ACTIVITY_LEVEL_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, activityLevelType_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.ActivityLevel)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.ActivityLevel other = + (com.google.devicesandservices.health.v4.ActivityLevel) obj; + + if (hasInterval() != other.hasInterval()) return false; + if (hasInterval()) { + if (!getInterval().equals(other.getInterval())) return false; + } + if (activityLevelType_ != other.activityLevelType_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasInterval()) { + hash = (37 * hash) + INTERVAL_FIELD_NUMBER; + hash = (53 * hash) + getInterval().hashCode(); + } + hash = (37 * hash) + ACTIVITY_LEVEL_TYPE_FIELD_NUMBER; + hash = (53 * hash) + activityLevelType_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.ActivityLevel parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.ActivityLevel parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ActivityLevel parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.ActivityLevel parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ActivityLevel parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.ActivityLevel parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ActivityLevel parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.ActivityLevel parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ActivityLevel parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.ActivityLevel parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ActivityLevel parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.ActivityLevel parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.ActivityLevel prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Internal type to capture activity level during a certain time interval.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.ActivityLevel} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.ActivityLevel) + com.google.devicesandservices.health.v4.ActivityLevelOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_ActivityLevel_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_ActivityLevel_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.ActivityLevel.class, + com.google.devicesandservices.health.v4.ActivityLevel.Builder.class); + } + + // Construct using com.google.devicesandservices.health.v4.ActivityLevel.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetIntervalFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + interval_ = null; + if (intervalBuilder_ != null) { + intervalBuilder_.dispose(); + intervalBuilder_ = null; + } + activityLevelType_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_ActivityLevel_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.ActivityLevel getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.ActivityLevel.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.ActivityLevel build() { + com.google.devicesandservices.health.v4.ActivityLevel result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.ActivityLevel buildPartial() { + com.google.devicesandservices.health.v4.ActivityLevel result = + new com.google.devicesandservices.health.v4.ActivityLevel(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.devicesandservices.health.v4.ActivityLevel result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.interval_ = intervalBuilder_ == null ? interval_ : intervalBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.activityLevelType_ = activityLevelType_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.ActivityLevel) { + return mergeFrom((com.google.devicesandservices.health.v4.ActivityLevel) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.devicesandservices.health.v4.ActivityLevel other) { + if (other == com.google.devicesandservices.health.v4.ActivityLevel.getDefaultInstance()) + return this; + if (other.hasInterval()) { + mergeInterval(other.getInterval()); + } + if (other.activityLevelType_ != 0) { + setActivityLevelTypeValue(other.getActivityLevelTypeValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetIntervalFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + activityLevelType_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.devicesandservices.health.v4.ObservationTimeInterval interval_; + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ObservationTimeInterval, + com.google.devicesandservices.health.v4.ObservationTimeInterval.Builder, + com.google.devicesandservices.health.v4.ObservationTimeIntervalOrBuilder> + intervalBuilder_; + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the interval field is set. + */ + public boolean hasInterval() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The interval. + */ + public com.google.devicesandservices.health.v4.ObservationTimeInterval getInterval() { + if (intervalBuilder_ == null) { + return interval_ == null + ? com.google.devicesandservices.health.v4.ObservationTimeInterval.getDefaultInstance() + : interval_; + } else { + return intervalBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setInterval( + com.google.devicesandservices.health.v4.ObservationTimeInterval value) { + if (intervalBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + interval_ = value; + } else { + intervalBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setInterval( + com.google.devicesandservices.health.v4.ObservationTimeInterval.Builder builderForValue) { + if (intervalBuilder_ == null) { + interval_ = builderForValue.build(); + } else { + intervalBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeInterval( + com.google.devicesandservices.health.v4.ObservationTimeInterval value) { + if (intervalBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && interval_ != null + && interval_ + != com.google.devicesandservices.health.v4.ObservationTimeInterval + .getDefaultInstance()) { + getIntervalBuilder().mergeFrom(value); + } else { + interval_ = value; + } + } else { + intervalBuilder_.mergeFrom(value); + } + if (interval_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearInterval() { + bitField0_ = (bitField0_ & ~0x00000001); + interval_ = null; + if (intervalBuilder_ != null) { + intervalBuilder_.dispose(); + intervalBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.devicesandservices.health.v4.ObservationTimeInterval.Builder + getIntervalBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetIntervalFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.devicesandservices.health.v4.ObservationTimeIntervalOrBuilder + getIntervalOrBuilder() { + if (intervalBuilder_ != null) { + return intervalBuilder_.getMessageOrBuilder(); + } else { + return interval_ == null + ? com.google.devicesandservices.health.v4.ObservationTimeInterval.getDefaultInstance() + : interval_; + } + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ObservationTimeInterval, + com.google.devicesandservices.health.v4.ObservationTimeInterval.Builder, + com.google.devicesandservices.health.v4.ObservationTimeIntervalOrBuilder> + internalGetIntervalFieldBuilder() { + if (intervalBuilder_ == null) { + intervalBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ObservationTimeInterval, + com.google.devicesandservices.health.v4.ObservationTimeInterval.Builder, + com.google.devicesandservices.health.v4.ObservationTimeIntervalOrBuilder>( + getInterval(), getParentForChildren(), isClean()); + interval_ = null; + } + return intervalBuilder_; + } + + private int activityLevelType_ = 0; + + /** + * + * + *
+     * Required. Activity level type in the given time interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ActivityLevel.ActivityLevelType activity_level_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for activityLevelType. + */ + @java.lang.Override + public int getActivityLevelTypeValue() { + return activityLevelType_; + } + + /** + * + * + *
+     * Required. Activity level type in the given time interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ActivityLevel.ActivityLevelType activity_level_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for activityLevelType to set. + * @return This builder for chaining. + */ + public Builder setActivityLevelTypeValue(int value) { + activityLevelType_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Activity level type in the given time interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ActivityLevel.ActivityLevelType activity_level_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The activityLevelType. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ActivityLevel.ActivityLevelType + getActivityLevelType() { + com.google.devicesandservices.health.v4.ActivityLevel.ActivityLevelType result = + com.google.devicesandservices.health.v4.ActivityLevel.ActivityLevelType.forNumber( + activityLevelType_); + return result == null + ? com.google.devicesandservices.health.v4.ActivityLevel.ActivityLevelType.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Required. Activity level type in the given time interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ActivityLevel.ActivityLevelType activity_level_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The activityLevelType to set. + * @return This builder for chaining. + */ + public Builder setActivityLevelType( + com.google.devicesandservices.health.v4.ActivityLevel.ActivityLevelType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + activityLevelType_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Activity level type in the given time interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ActivityLevel.ActivityLevelType activity_level_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearActivityLevelType() { + bitField0_ = (bitField0_ & ~0x00000002); + activityLevelType_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.ActivityLevel) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.ActivityLevel) + private static final com.google.devicesandservices.health.v4.ActivityLevel DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.ActivityLevel(); + } + + public static com.google.devicesandservices.health.v4.ActivityLevel getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ActivityLevel parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.ActivityLevel getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ActivityLevelOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ActivityLevelOrBuilder.java new file mode 100644 index 000000000000..907e403d3a1f --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ActivityLevelOrBuilder.java @@ -0,0 +1,101 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface ActivityLevelOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.ActivityLevel) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Observed interval.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the interval field is set. + */ + boolean hasInterval(); + + /** + * + * + *
+   * Required. Observed interval.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The interval. + */ + com.google.devicesandservices.health.v4.ObservationTimeInterval getInterval(); + + /** + * + * + *
+   * Required. Observed interval.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.devicesandservices.health.v4.ObservationTimeIntervalOrBuilder getIntervalOrBuilder(); + + /** + * + * + *
+   * Required. Activity level type in the given time interval.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ActivityLevel.ActivityLevelType activity_level_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for activityLevelType. + */ + int getActivityLevelTypeValue(); + + /** + * + * + *
+   * Required. Activity level type in the given time interval.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ActivityLevel.ActivityLevelType activity_level_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The activityLevelType. + */ + com.google.devicesandservices.health.v4.ActivityLevel.ActivityLevelType getActivityLevelType(); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ActivityLevelRollupValue.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ActivityLevelRollupValue.java new file mode 100644 index 000000000000..743daec948ec --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ActivityLevelRollupValue.java @@ -0,0 +1,2075 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * Represents the result of the rollup of the activity level data type.
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.ActivityLevelRollupValue} + */ +@com.google.protobuf.Generated +public final class ActivityLevelRollupValue extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.ActivityLevelRollupValue) + ActivityLevelRollupValueOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ActivityLevelRollupValue"); + } + + // Use ActivityLevelRollupValue.newBuilder() to construct. + private ActivityLevelRollupValue(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ActivityLevelRollupValue() { + activityLevelRollupsByActivityLevelType_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_ActivityLevelRollupValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_ActivityLevelRollupValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.ActivityLevelRollupValue.class, + com.google.devicesandservices.health.v4.ActivityLevelRollupValue.Builder.class); + } + + public interface ActivityLevelRollupByActivityLevelTypeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.ActivityLevelRollupValue.ActivityLevelRollupByActivityLevelType) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Activity level type.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ActivityLevel.ActivityLevelType activity_level_type = 1; + * + * + * @return The enum numeric value on the wire for activityLevelType. + */ + int getActivityLevelTypeValue(); + + /** + * + * + *
+     * Activity level type.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ActivityLevel.ActivityLevelType activity_level_type = 1; + * + * + * @return The activityLevelType. + */ + com.google.devicesandservices.health.v4.ActivityLevel.ActivityLevelType getActivityLevelType(); + + /** + * + * + *
+     * Total duration in the activity level type.
+     * 
+ * + * .google.protobuf.Duration total_duration = 2; + * + * @return Whether the totalDuration field is set. + */ + boolean hasTotalDuration(); + + /** + * + * + *
+     * Total duration in the activity level type.
+     * 
+ * + * .google.protobuf.Duration total_duration = 2; + * + * @return The totalDuration. + */ + com.google.protobuf.Duration getTotalDuration(); + + /** + * + * + *
+     * Total duration in the activity level type.
+     * 
+ * + * .google.protobuf.Duration total_duration = 2; + */ + com.google.protobuf.DurationOrBuilder getTotalDurationOrBuilder(); + } + + /** + * + * + *
+   * Represents the total duration in a specific activity level type.
+   * 
+ * + * Protobuf type {@code + * google.devicesandservices.health.v4.ActivityLevelRollupValue.ActivityLevelRollupByActivityLevelType} + */ + public static final class ActivityLevelRollupByActivityLevelType + extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.ActivityLevelRollupValue.ActivityLevelRollupByActivityLevelType) + ActivityLevelRollupByActivityLevelTypeOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ActivityLevelRollupByActivityLevelType"); + } + + // Use ActivityLevelRollupByActivityLevelType.newBuilder() to construct. + private ActivityLevelRollupByActivityLevelType( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ActivityLevelRollupByActivityLevelType() { + activityLevelType_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_ActivityLevelRollupValue_ActivityLevelRollupByActivityLevelType_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_ActivityLevelRollupValue_ActivityLevelRollupByActivityLevelType_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .ActivityLevelRollupByActivityLevelType.class, + com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .ActivityLevelRollupByActivityLevelType.Builder.class); + } + + private int bitField0_; + public static final int ACTIVITY_LEVEL_TYPE_FIELD_NUMBER = 1; + private int activityLevelType_ = 0; + + /** + * + * + *
+     * Activity level type.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ActivityLevel.ActivityLevelType activity_level_type = 1; + * + * + * @return The enum numeric value on the wire for activityLevelType. + */ + @java.lang.Override + public int getActivityLevelTypeValue() { + return activityLevelType_; + } + + /** + * + * + *
+     * Activity level type.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ActivityLevel.ActivityLevelType activity_level_type = 1; + * + * + * @return The activityLevelType. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ActivityLevel.ActivityLevelType + getActivityLevelType() { + com.google.devicesandservices.health.v4.ActivityLevel.ActivityLevelType result = + com.google.devicesandservices.health.v4.ActivityLevel.ActivityLevelType.forNumber( + activityLevelType_); + return result == null + ? com.google.devicesandservices.health.v4.ActivityLevel.ActivityLevelType.UNRECOGNIZED + : result; + } + + public static final int TOTAL_DURATION_FIELD_NUMBER = 2; + private com.google.protobuf.Duration totalDuration_; + + /** + * + * + *
+     * Total duration in the activity level type.
+     * 
+ * + * .google.protobuf.Duration total_duration = 2; + * + * @return Whether the totalDuration field is set. + */ + @java.lang.Override + public boolean hasTotalDuration() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Total duration in the activity level type.
+     * 
+ * + * .google.protobuf.Duration total_duration = 2; + * + * @return The totalDuration. + */ + @java.lang.Override + public com.google.protobuf.Duration getTotalDuration() { + return totalDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : totalDuration_; + } + + /** + * + * + *
+     * Total duration in the activity level type.
+     * 
+ * + * .google.protobuf.Duration total_duration = 2; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getTotalDurationOrBuilder() { + return totalDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : totalDuration_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (activityLevelType_ + != com.google.devicesandservices.health.v4.ActivityLevel.ActivityLevelType + .ACTIVITY_LEVEL_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, activityLevelType_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getTotalDuration()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (activityLevelType_ + != com.google.devicesandservices.health.v4.ActivityLevel.ActivityLevelType + .ACTIVITY_LEVEL_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, activityLevelType_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getTotalDuration()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .ActivityLevelRollupByActivityLevelType)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .ActivityLevelRollupByActivityLevelType + other = + (com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .ActivityLevelRollupByActivityLevelType) + obj; + + if (activityLevelType_ != other.activityLevelType_) return false; + if (hasTotalDuration() != other.hasTotalDuration()) return false; + if (hasTotalDuration()) { + if (!getTotalDuration().equals(other.getTotalDuration())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ACTIVITY_LEVEL_TYPE_FIELD_NUMBER; + hash = (53 * hash) + activityLevelType_; + if (hasTotalDuration()) { + hash = (37 * hash) + TOTAL_DURATION_FIELD_NUMBER; + hash = (53 * hash) + getTotalDuration().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .ActivityLevelRollupByActivityLevelType + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .ActivityLevelRollupByActivityLevelType + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .ActivityLevelRollupByActivityLevelType + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .ActivityLevelRollupByActivityLevelType + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .ActivityLevelRollupByActivityLevelType + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .ActivityLevelRollupByActivityLevelType + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .ActivityLevelRollupByActivityLevelType + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .ActivityLevelRollupByActivityLevelType + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .ActivityLevelRollupByActivityLevelType + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .ActivityLevelRollupByActivityLevelType + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .ActivityLevelRollupByActivityLevelType + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .ActivityLevelRollupByActivityLevelType + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .ActivityLevelRollupByActivityLevelType + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+     * Represents the total duration in a specific activity level type.
+     * 
+ * + * Protobuf type {@code + * google.devicesandservices.health.v4.ActivityLevelRollupValue.ActivityLevelRollupByActivityLevelType} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.ActivityLevelRollupValue.ActivityLevelRollupByActivityLevelType) + com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .ActivityLevelRollupByActivityLevelTypeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_ActivityLevelRollupValue_ActivityLevelRollupByActivityLevelType_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_ActivityLevelRollupValue_ActivityLevelRollupByActivityLevelType_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .ActivityLevelRollupByActivityLevelType.class, + com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .ActivityLevelRollupByActivityLevelType.Builder.class); + } + + // Construct using + // com.google.devicesandservices.health.v4.ActivityLevelRollupValue.ActivityLevelRollupByActivityLevelType.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetTotalDurationFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + activityLevelType_ = 0; + totalDuration_ = null; + if (totalDurationBuilder_ != null) { + totalDurationBuilder_.dispose(); + totalDurationBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_ActivityLevelRollupValue_ActivityLevelRollupByActivityLevelType_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .ActivityLevelRollupByActivityLevelType + getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .ActivityLevelRollupByActivityLevelType.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .ActivityLevelRollupByActivityLevelType + build() { + com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .ActivityLevelRollupByActivityLevelType + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .ActivityLevelRollupByActivityLevelType + buildPartial() { + com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .ActivityLevelRollupByActivityLevelType + result = + new com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .ActivityLevelRollupByActivityLevelType(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .ActivityLevelRollupByActivityLevelType + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.activityLevelType_ = activityLevelType_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.totalDuration_ = + totalDurationBuilder_ == null ? totalDuration_ : totalDurationBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .ActivityLevelRollupByActivityLevelType) { + return mergeFrom( + (com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .ActivityLevelRollupByActivityLevelType) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .ActivityLevelRollupByActivityLevelType + other) { + if (other + == com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .ActivityLevelRollupByActivityLevelType.getDefaultInstance()) return this; + if (other.activityLevelType_ != 0) { + setActivityLevelTypeValue(other.getActivityLevelTypeValue()); + } + if (other.hasTotalDuration()) { + mergeTotalDuration(other.getTotalDuration()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + activityLevelType_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + input.readMessage( + internalGetTotalDurationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int activityLevelType_ = 0; + + /** + * + * + *
+       * Activity level type.
+       * 
+ * + * + * .google.devicesandservices.health.v4.ActivityLevel.ActivityLevelType activity_level_type = 1; + * + * + * @return The enum numeric value on the wire for activityLevelType. + */ + @java.lang.Override + public int getActivityLevelTypeValue() { + return activityLevelType_; + } + + /** + * + * + *
+       * Activity level type.
+       * 
+ * + * + * .google.devicesandservices.health.v4.ActivityLevel.ActivityLevelType activity_level_type = 1; + * + * + * @param value The enum numeric value on the wire for activityLevelType to set. + * @return This builder for chaining. + */ + public Builder setActivityLevelTypeValue(int value) { + activityLevelType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Activity level type.
+       * 
+ * + * + * .google.devicesandservices.health.v4.ActivityLevel.ActivityLevelType activity_level_type = 1; + * + * + * @return The activityLevelType. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ActivityLevel.ActivityLevelType + getActivityLevelType() { + com.google.devicesandservices.health.v4.ActivityLevel.ActivityLevelType result = + com.google.devicesandservices.health.v4.ActivityLevel.ActivityLevelType.forNumber( + activityLevelType_); + return result == null + ? com.google.devicesandservices.health.v4.ActivityLevel.ActivityLevelType.UNRECOGNIZED + : result; + } + + /** + * + * + *
+       * Activity level type.
+       * 
+ * + * + * .google.devicesandservices.health.v4.ActivityLevel.ActivityLevelType activity_level_type = 1; + * + * + * @param value The activityLevelType to set. + * @return This builder for chaining. + */ + public Builder setActivityLevelType( + com.google.devicesandservices.health.v4.ActivityLevel.ActivityLevelType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + activityLevelType_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+       * Activity level type.
+       * 
+ * + * + * .google.devicesandservices.health.v4.ActivityLevel.ActivityLevelType activity_level_type = 1; + * + * + * @return This builder for chaining. + */ + public Builder clearActivityLevelType() { + bitField0_ = (bitField0_ & ~0x00000001); + activityLevelType_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Duration totalDuration_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + totalDurationBuilder_; + + /** + * + * + *
+       * Total duration in the activity level type.
+       * 
+ * + * .google.protobuf.Duration total_duration = 2; + * + * @return Whether the totalDuration field is set. + */ + public boolean hasTotalDuration() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+       * Total duration in the activity level type.
+       * 
+ * + * .google.protobuf.Duration total_duration = 2; + * + * @return The totalDuration. + */ + public com.google.protobuf.Duration getTotalDuration() { + if (totalDurationBuilder_ == null) { + return totalDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : totalDuration_; + } else { + return totalDurationBuilder_.getMessage(); + } + } + + /** + * + * + *
+       * Total duration in the activity level type.
+       * 
+ * + * .google.protobuf.Duration total_duration = 2; + */ + public Builder setTotalDuration(com.google.protobuf.Duration value) { + if (totalDurationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + totalDuration_ = value; + } else { + totalDurationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Total duration in the activity level type.
+       * 
+ * + * .google.protobuf.Duration total_duration = 2; + */ + public Builder setTotalDuration(com.google.protobuf.Duration.Builder builderForValue) { + if (totalDurationBuilder_ == null) { + totalDuration_ = builderForValue.build(); + } else { + totalDurationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Total duration in the activity level type.
+       * 
+ * + * .google.protobuf.Duration total_duration = 2; + */ + public Builder mergeTotalDuration(com.google.protobuf.Duration value) { + if (totalDurationBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && totalDuration_ != null + && totalDuration_ != com.google.protobuf.Duration.getDefaultInstance()) { + getTotalDurationBuilder().mergeFrom(value); + } else { + totalDuration_ = value; + } + } else { + totalDurationBuilder_.mergeFrom(value); + } + if (totalDuration_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * Total duration in the activity level type.
+       * 
+ * + * .google.protobuf.Duration total_duration = 2; + */ + public Builder clearTotalDuration() { + bitField0_ = (bitField0_ & ~0x00000002); + totalDuration_ = null; + if (totalDurationBuilder_ != null) { + totalDurationBuilder_.dispose(); + totalDurationBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+       * Total duration in the activity level type.
+       * 
+ * + * .google.protobuf.Duration total_duration = 2; + */ + public com.google.protobuf.Duration.Builder getTotalDurationBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetTotalDurationFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * Total duration in the activity level type.
+       * 
+ * + * .google.protobuf.Duration total_duration = 2; + */ + public com.google.protobuf.DurationOrBuilder getTotalDurationOrBuilder() { + if (totalDurationBuilder_ != null) { + return totalDurationBuilder_.getMessageOrBuilder(); + } else { + return totalDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : totalDuration_; + } + } + + /** + * + * + *
+       * Total duration in the activity level type.
+       * 
+ * + * .google.protobuf.Duration total_duration = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + internalGetTotalDurationFieldBuilder() { + if (totalDurationBuilder_ == null) { + totalDurationBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getTotalDuration(), getParentForChildren(), isClean()); + totalDuration_ = null; + } + return totalDurationBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.ActivityLevelRollupValue.ActivityLevelRollupByActivityLevelType) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.ActivityLevelRollupValue.ActivityLevelRollupByActivityLevelType) + private static final com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .ActivityLevelRollupByActivityLevelType + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .ActivityLevelRollupByActivityLevelType(); + } + + public static com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .ActivityLevelRollupByActivityLevelType + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ActivityLevelRollupByActivityLevelType parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .ActivityLevelRollupByActivityLevelType + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int ACTIVITY_LEVEL_ROLLUPS_BY_ACTIVITY_LEVEL_TYPE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List< + com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .ActivityLevelRollupByActivityLevelType> + activityLevelRollupsByActivityLevelType_; + + /** + * + * + *
+   * List of total durations in each activity level type.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActivityLevelRollupValue.ActivityLevelRollupByActivityLevelType activity_level_rollups_by_activity_level_type = 1; + * + */ + @java.lang.Override + public java.util.List< + com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .ActivityLevelRollupByActivityLevelType> + getActivityLevelRollupsByActivityLevelTypeList() { + return activityLevelRollupsByActivityLevelType_; + } + + /** + * + * + *
+   * List of total durations in each activity level type.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActivityLevelRollupValue.ActivityLevelRollupByActivityLevelType activity_level_rollups_by_activity_level_type = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .ActivityLevelRollupByActivityLevelTypeOrBuilder> + getActivityLevelRollupsByActivityLevelTypeOrBuilderList() { + return activityLevelRollupsByActivityLevelType_; + } + + /** + * + * + *
+   * List of total durations in each activity level type.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActivityLevelRollupValue.ActivityLevelRollupByActivityLevelType activity_level_rollups_by_activity_level_type = 1; + * + */ + @java.lang.Override + public int getActivityLevelRollupsByActivityLevelTypeCount() { + return activityLevelRollupsByActivityLevelType_.size(); + } + + /** + * + * + *
+   * List of total durations in each activity level type.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActivityLevelRollupValue.ActivityLevelRollupByActivityLevelType activity_level_rollups_by_activity_level_type = 1; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .ActivityLevelRollupByActivityLevelType + getActivityLevelRollupsByActivityLevelType(int index) { + return activityLevelRollupsByActivityLevelType_.get(index); + } + + /** + * + * + *
+   * List of total durations in each activity level type.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActivityLevelRollupValue.ActivityLevelRollupByActivityLevelType activity_level_rollups_by_activity_level_type = 1; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .ActivityLevelRollupByActivityLevelTypeOrBuilder + getActivityLevelRollupsByActivityLevelTypeOrBuilder(int index) { + return activityLevelRollupsByActivityLevelType_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < activityLevelRollupsByActivityLevelType_.size(); i++) { + output.writeMessage(1, activityLevelRollupsByActivityLevelType_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < activityLevelRollupsByActivityLevelType_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, activityLevelRollupsByActivityLevelType_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.ActivityLevelRollupValue)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.ActivityLevelRollupValue other = + (com.google.devicesandservices.health.v4.ActivityLevelRollupValue) obj; + + if (!getActivityLevelRollupsByActivityLevelTypeList() + .equals(other.getActivityLevelRollupsByActivityLevelTypeList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getActivityLevelRollupsByActivityLevelTypeCount() > 0) { + hash = (37 * hash) + ACTIVITY_LEVEL_ROLLUPS_BY_ACTIVITY_LEVEL_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getActivityLevelRollupsByActivityLevelTypeList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.ActivityLevelRollupValue parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.ActivityLevelRollupValue parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ActivityLevelRollupValue parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.ActivityLevelRollupValue parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ActivityLevelRollupValue parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.ActivityLevelRollupValue parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ActivityLevelRollupValue parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.ActivityLevelRollupValue parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ActivityLevelRollupValue parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.ActivityLevelRollupValue parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ActivityLevelRollupValue parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.ActivityLevelRollupValue parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.ActivityLevelRollupValue prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Represents the result of the rollup of the activity level data type.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.ActivityLevelRollupValue} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.ActivityLevelRollupValue) + com.google.devicesandservices.health.v4.ActivityLevelRollupValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_ActivityLevelRollupValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_ActivityLevelRollupValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.ActivityLevelRollupValue.class, + com.google.devicesandservices.health.v4.ActivityLevelRollupValue.Builder.class); + } + + // Construct using com.google.devicesandservices.health.v4.ActivityLevelRollupValue.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (activityLevelRollupsByActivityLevelTypeBuilder_ == null) { + activityLevelRollupsByActivityLevelType_ = java.util.Collections.emptyList(); + } else { + activityLevelRollupsByActivityLevelType_ = null; + activityLevelRollupsByActivityLevelTypeBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_ActivityLevelRollupValue_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.ActivityLevelRollupValue + getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.ActivityLevelRollupValue.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.ActivityLevelRollupValue build() { + com.google.devicesandservices.health.v4.ActivityLevelRollupValue result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.ActivityLevelRollupValue buildPartial() { + com.google.devicesandservices.health.v4.ActivityLevelRollupValue result = + new com.google.devicesandservices.health.v4.ActivityLevelRollupValue(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.devicesandservices.health.v4.ActivityLevelRollupValue result) { + if (activityLevelRollupsByActivityLevelTypeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + activityLevelRollupsByActivityLevelType_ = + java.util.Collections.unmodifiableList(activityLevelRollupsByActivityLevelType_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.activityLevelRollupsByActivityLevelType_ = activityLevelRollupsByActivityLevelType_; + } else { + result.activityLevelRollupsByActivityLevelType_ = + activityLevelRollupsByActivityLevelTypeBuilder_.build(); + } + } + + private void buildPartial0( + com.google.devicesandservices.health.v4.ActivityLevelRollupValue result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.ActivityLevelRollupValue) { + return mergeFrom((com.google.devicesandservices.health.v4.ActivityLevelRollupValue) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.devicesandservices.health.v4.ActivityLevelRollupValue other) { + if (other + == com.google.devicesandservices.health.v4.ActivityLevelRollupValue.getDefaultInstance()) + return this; + if (activityLevelRollupsByActivityLevelTypeBuilder_ == null) { + if (!other.activityLevelRollupsByActivityLevelType_.isEmpty()) { + if (activityLevelRollupsByActivityLevelType_.isEmpty()) { + activityLevelRollupsByActivityLevelType_ = + other.activityLevelRollupsByActivityLevelType_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureActivityLevelRollupsByActivityLevelTypeIsMutable(); + activityLevelRollupsByActivityLevelType_.addAll( + other.activityLevelRollupsByActivityLevelType_); + } + onChanged(); + } + } else { + if (!other.activityLevelRollupsByActivityLevelType_.isEmpty()) { + if (activityLevelRollupsByActivityLevelTypeBuilder_.isEmpty()) { + activityLevelRollupsByActivityLevelTypeBuilder_.dispose(); + activityLevelRollupsByActivityLevelTypeBuilder_ = null; + activityLevelRollupsByActivityLevelType_ = + other.activityLevelRollupsByActivityLevelType_; + bitField0_ = (bitField0_ & ~0x00000001); + activityLevelRollupsByActivityLevelTypeBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetActivityLevelRollupsByActivityLevelTypeFieldBuilder() + : null; + } else { + activityLevelRollupsByActivityLevelTypeBuilder_.addAllMessages( + other.activityLevelRollupsByActivityLevelType_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .ActivityLevelRollupByActivityLevelType + m = + input.readMessage( + com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .ActivityLevelRollupByActivityLevelType.parser(), + extensionRegistry); + if (activityLevelRollupsByActivityLevelTypeBuilder_ == null) { + ensureActivityLevelRollupsByActivityLevelTypeIsMutable(); + activityLevelRollupsByActivityLevelType_.add(m); + } else { + activityLevelRollupsByActivityLevelTypeBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List< + com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .ActivityLevelRollupByActivityLevelType> + activityLevelRollupsByActivityLevelType_ = java.util.Collections.emptyList(); + + private void ensureActivityLevelRollupsByActivityLevelTypeIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + activityLevelRollupsByActivityLevelType_ = + new java.util.ArrayList< + com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .ActivityLevelRollupByActivityLevelType>( + activityLevelRollupsByActivityLevelType_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .ActivityLevelRollupByActivityLevelType, + com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .ActivityLevelRollupByActivityLevelType.Builder, + com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .ActivityLevelRollupByActivityLevelTypeOrBuilder> + activityLevelRollupsByActivityLevelTypeBuilder_; + + /** + * + * + *
+     * List of total durations in each activity level type.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActivityLevelRollupValue.ActivityLevelRollupByActivityLevelType activity_level_rollups_by_activity_level_type = 1; + * + */ + public java.util.List< + com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .ActivityLevelRollupByActivityLevelType> + getActivityLevelRollupsByActivityLevelTypeList() { + if (activityLevelRollupsByActivityLevelTypeBuilder_ == null) { + return java.util.Collections.unmodifiableList(activityLevelRollupsByActivityLevelType_); + } else { + return activityLevelRollupsByActivityLevelTypeBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * List of total durations in each activity level type.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActivityLevelRollupValue.ActivityLevelRollupByActivityLevelType activity_level_rollups_by_activity_level_type = 1; + * + */ + public int getActivityLevelRollupsByActivityLevelTypeCount() { + if (activityLevelRollupsByActivityLevelTypeBuilder_ == null) { + return activityLevelRollupsByActivityLevelType_.size(); + } else { + return activityLevelRollupsByActivityLevelTypeBuilder_.getCount(); + } + } + + /** + * + * + *
+     * List of total durations in each activity level type.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActivityLevelRollupValue.ActivityLevelRollupByActivityLevelType activity_level_rollups_by_activity_level_type = 1; + * + */ + public com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .ActivityLevelRollupByActivityLevelType + getActivityLevelRollupsByActivityLevelType(int index) { + if (activityLevelRollupsByActivityLevelTypeBuilder_ == null) { + return activityLevelRollupsByActivityLevelType_.get(index); + } else { + return activityLevelRollupsByActivityLevelTypeBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * List of total durations in each activity level type.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActivityLevelRollupValue.ActivityLevelRollupByActivityLevelType activity_level_rollups_by_activity_level_type = 1; + * + */ + public Builder setActivityLevelRollupsByActivityLevelType( + int index, + com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .ActivityLevelRollupByActivityLevelType + value) { + if (activityLevelRollupsByActivityLevelTypeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureActivityLevelRollupsByActivityLevelTypeIsMutable(); + activityLevelRollupsByActivityLevelType_.set(index, value); + onChanged(); + } else { + activityLevelRollupsByActivityLevelTypeBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * List of total durations in each activity level type.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActivityLevelRollupValue.ActivityLevelRollupByActivityLevelType activity_level_rollups_by_activity_level_type = 1; + * + */ + public Builder setActivityLevelRollupsByActivityLevelType( + int index, + com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .ActivityLevelRollupByActivityLevelType.Builder + builderForValue) { + if (activityLevelRollupsByActivityLevelTypeBuilder_ == null) { + ensureActivityLevelRollupsByActivityLevelTypeIsMutable(); + activityLevelRollupsByActivityLevelType_.set(index, builderForValue.build()); + onChanged(); + } else { + activityLevelRollupsByActivityLevelTypeBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * List of total durations in each activity level type.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActivityLevelRollupValue.ActivityLevelRollupByActivityLevelType activity_level_rollups_by_activity_level_type = 1; + * + */ + public Builder addActivityLevelRollupsByActivityLevelType( + com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .ActivityLevelRollupByActivityLevelType + value) { + if (activityLevelRollupsByActivityLevelTypeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureActivityLevelRollupsByActivityLevelTypeIsMutable(); + activityLevelRollupsByActivityLevelType_.add(value); + onChanged(); + } else { + activityLevelRollupsByActivityLevelTypeBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * List of total durations in each activity level type.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActivityLevelRollupValue.ActivityLevelRollupByActivityLevelType activity_level_rollups_by_activity_level_type = 1; + * + */ + public Builder addActivityLevelRollupsByActivityLevelType( + int index, + com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .ActivityLevelRollupByActivityLevelType + value) { + if (activityLevelRollupsByActivityLevelTypeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureActivityLevelRollupsByActivityLevelTypeIsMutable(); + activityLevelRollupsByActivityLevelType_.add(index, value); + onChanged(); + } else { + activityLevelRollupsByActivityLevelTypeBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * List of total durations in each activity level type.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActivityLevelRollupValue.ActivityLevelRollupByActivityLevelType activity_level_rollups_by_activity_level_type = 1; + * + */ + public Builder addActivityLevelRollupsByActivityLevelType( + com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .ActivityLevelRollupByActivityLevelType.Builder + builderForValue) { + if (activityLevelRollupsByActivityLevelTypeBuilder_ == null) { + ensureActivityLevelRollupsByActivityLevelTypeIsMutable(); + activityLevelRollupsByActivityLevelType_.add(builderForValue.build()); + onChanged(); + } else { + activityLevelRollupsByActivityLevelTypeBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * List of total durations in each activity level type.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActivityLevelRollupValue.ActivityLevelRollupByActivityLevelType activity_level_rollups_by_activity_level_type = 1; + * + */ + public Builder addActivityLevelRollupsByActivityLevelType( + int index, + com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .ActivityLevelRollupByActivityLevelType.Builder + builderForValue) { + if (activityLevelRollupsByActivityLevelTypeBuilder_ == null) { + ensureActivityLevelRollupsByActivityLevelTypeIsMutable(); + activityLevelRollupsByActivityLevelType_.add(index, builderForValue.build()); + onChanged(); + } else { + activityLevelRollupsByActivityLevelTypeBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * List of total durations in each activity level type.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActivityLevelRollupValue.ActivityLevelRollupByActivityLevelType activity_level_rollups_by_activity_level_type = 1; + * + */ + public Builder addAllActivityLevelRollupsByActivityLevelType( + java.lang.Iterable< + ? extends + com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .ActivityLevelRollupByActivityLevelType> + values) { + if (activityLevelRollupsByActivityLevelTypeBuilder_ == null) { + ensureActivityLevelRollupsByActivityLevelTypeIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, activityLevelRollupsByActivityLevelType_); + onChanged(); + } else { + activityLevelRollupsByActivityLevelTypeBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * List of total durations in each activity level type.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActivityLevelRollupValue.ActivityLevelRollupByActivityLevelType activity_level_rollups_by_activity_level_type = 1; + * + */ + public Builder clearActivityLevelRollupsByActivityLevelType() { + if (activityLevelRollupsByActivityLevelTypeBuilder_ == null) { + activityLevelRollupsByActivityLevelType_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + activityLevelRollupsByActivityLevelTypeBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * List of total durations in each activity level type.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActivityLevelRollupValue.ActivityLevelRollupByActivityLevelType activity_level_rollups_by_activity_level_type = 1; + * + */ + public Builder removeActivityLevelRollupsByActivityLevelType(int index) { + if (activityLevelRollupsByActivityLevelTypeBuilder_ == null) { + ensureActivityLevelRollupsByActivityLevelTypeIsMutable(); + activityLevelRollupsByActivityLevelType_.remove(index); + onChanged(); + } else { + activityLevelRollupsByActivityLevelTypeBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * List of total durations in each activity level type.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActivityLevelRollupValue.ActivityLevelRollupByActivityLevelType activity_level_rollups_by_activity_level_type = 1; + * + */ + public com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .ActivityLevelRollupByActivityLevelType.Builder + getActivityLevelRollupsByActivityLevelTypeBuilder(int index) { + return internalGetActivityLevelRollupsByActivityLevelTypeFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * List of total durations in each activity level type.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActivityLevelRollupValue.ActivityLevelRollupByActivityLevelType activity_level_rollups_by_activity_level_type = 1; + * + */ + public com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .ActivityLevelRollupByActivityLevelTypeOrBuilder + getActivityLevelRollupsByActivityLevelTypeOrBuilder(int index) { + if (activityLevelRollupsByActivityLevelTypeBuilder_ == null) { + return activityLevelRollupsByActivityLevelType_.get(index); + } else { + return activityLevelRollupsByActivityLevelTypeBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * List of total durations in each activity level type.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActivityLevelRollupValue.ActivityLevelRollupByActivityLevelType activity_level_rollups_by_activity_level_type = 1; + * + */ + public java.util.List< + ? extends + com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .ActivityLevelRollupByActivityLevelTypeOrBuilder> + getActivityLevelRollupsByActivityLevelTypeOrBuilderList() { + if (activityLevelRollupsByActivityLevelTypeBuilder_ != null) { + return activityLevelRollupsByActivityLevelTypeBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(activityLevelRollupsByActivityLevelType_); + } + } + + /** + * + * + *
+     * List of total durations in each activity level type.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActivityLevelRollupValue.ActivityLevelRollupByActivityLevelType activity_level_rollups_by_activity_level_type = 1; + * + */ + public com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .ActivityLevelRollupByActivityLevelType.Builder + addActivityLevelRollupsByActivityLevelTypeBuilder() { + return internalGetActivityLevelRollupsByActivityLevelTypeFieldBuilder() + .addBuilder( + com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .ActivityLevelRollupByActivityLevelType.getDefaultInstance()); + } + + /** + * + * + *
+     * List of total durations in each activity level type.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActivityLevelRollupValue.ActivityLevelRollupByActivityLevelType activity_level_rollups_by_activity_level_type = 1; + * + */ + public com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .ActivityLevelRollupByActivityLevelType.Builder + addActivityLevelRollupsByActivityLevelTypeBuilder(int index) { + return internalGetActivityLevelRollupsByActivityLevelTypeFieldBuilder() + .addBuilder( + index, + com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .ActivityLevelRollupByActivityLevelType.getDefaultInstance()); + } + + /** + * + * + *
+     * List of total durations in each activity level type.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActivityLevelRollupValue.ActivityLevelRollupByActivityLevelType activity_level_rollups_by_activity_level_type = 1; + * + */ + public java.util.List< + com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .ActivityLevelRollupByActivityLevelType.Builder> + getActivityLevelRollupsByActivityLevelTypeBuilderList() { + return internalGetActivityLevelRollupsByActivityLevelTypeFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .ActivityLevelRollupByActivityLevelType, + com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .ActivityLevelRollupByActivityLevelType.Builder, + com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .ActivityLevelRollupByActivityLevelTypeOrBuilder> + internalGetActivityLevelRollupsByActivityLevelTypeFieldBuilder() { + if (activityLevelRollupsByActivityLevelTypeBuilder_ == null) { + activityLevelRollupsByActivityLevelTypeBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .ActivityLevelRollupByActivityLevelType, + com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .ActivityLevelRollupByActivityLevelType.Builder, + com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .ActivityLevelRollupByActivityLevelTypeOrBuilder>( + activityLevelRollupsByActivityLevelType_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + activityLevelRollupsByActivityLevelType_ = null; + } + return activityLevelRollupsByActivityLevelTypeBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.ActivityLevelRollupValue) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.ActivityLevelRollupValue) + private static final com.google.devicesandservices.health.v4.ActivityLevelRollupValue + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.ActivityLevelRollupValue(); + } + + public static com.google.devicesandservices.health.v4.ActivityLevelRollupValue + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ActivityLevelRollupValue parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.ActivityLevelRollupValue + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ActivityLevelRollupValueOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ActivityLevelRollupValueOrBuilder.java new file mode 100644 index 000000000000..abc1aafdd3e2 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ActivityLevelRollupValueOrBuilder.java @@ -0,0 +1,104 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface ActivityLevelRollupValueOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.ActivityLevelRollupValue) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * List of total durations in each activity level type.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActivityLevelRollupValue.ActivityLevelRollupByActivityLevelType activity_level_rollups_by_activity_level_type = 1; + * + */ + java.util.List< + com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .ActivityLevelRollupByActivityLevelType> + getActivityLevelRollupsByActivityLevelTypeList(); + + /** + * + * + *
+   * List of total durations in each activity level type.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActivityLevelRollupValue.ActivityLevelRollupByActivityLevelType activity_level_rollups_by_activity_level_type = 1; + * + */ + com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .ActivityLevelRollupByActivityLevelType + getActivityLevelRollupsByActivityLevelType(int index); + + /** + * + * + *
+   * List of total durations in each activity level type.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActivityLevelRollupValue.ActivityLevelRollupByActivityLevelType activity_level_rollups_by_activity_level_type = 1; + * + */ + int getActivityLevelRollupsByActivityLevelTypeCount(); + + /** + * + * + *
+   * List of total durations in each activity level type.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActivityLevelRollupValue.ActivityLevelRollupByActivityLevelType activity_level_rollups_by_activity_level_type = 1; + * + */ + java.util.List< + ? extends + com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .ActivityLevelRollupByActivityLevelTypeOrBuilder> + getActivityLevelRollupsByActivityLevelTypeOrBuilderList(); + + /** + * + * + *
+   * List of total durations in each activity level type.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.ActivityLevelRollupValue.ActivityLevelRollupByActivityLevelType activity_level_rollups_by_activity_level_type = 1; + * + */ + com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .ActivityLevelRollupByActivityLevelTypeOrBuilder + getActivityLevelRollupsByActivityLevelTypeOrBuilder(int index); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/Altitude.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/Altitude.java new file mode 100644 index 000000000000..816df55c166e --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/Altitude.java @@ -0,0 +1,829 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * Captures the altitude gain (i.e. deltas), and not level above sea, for a user
+ * in millimeters.
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.Altitude} + */ +@com.google.protobuf.Generated +public final class Altitude extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.Altitude) + AltitudeOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Altitude"); + } + + // Use Altitude.newBuilder() to construct. + private Altitude(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Altitude() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_Altitude_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_Altitude_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.Altitude.class, + com.google.devicesandservices.health.v4.Altitude.Builder.class); + } + + private int bitField0_; + public static final int INTERVAL_FIELD_NUMBER = 2; + private com.google.devicesandservices.health.v4.ObservationTimeInterval interval_; + + /** + * + * + *
+   * Required. Observed interval.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the interval field is set. + */ + @java.lang.Override + public boolean hasInterval() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. Observed interval.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The interval. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ObservationTimeInterval getInterval() { + return interval_ == null + ? com.google.devicesandservices.health.v4.ObservationTimeInterval.getDefaultInstance() + : interval_; + } + + /** + * + * + *
+   * Required. Observed interval.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ObservationTimeIntervalOrBuilder + getIntervalOrBuilder() { + return interval_ == null + ? com.google.devicesandservices.health.v4.ObservationTimeInterval.getDefaultInstance() + : interval_; + } + + public static final int GAIN_MILLIMETERS_FIELD_NUMBER = 3; + private long gainMillimeters_ = 0L; + + /** + * + * + *
+   * Required. Altitude gain in millimeters over the observed interval.
+   * 
+ * + * int64 gain_millimeters = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The gainMillimeters. + */ + @java.lang.Override + public long getGainMillimeters() { + return gainMillimeters_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getInterval()); + } + if (gainMillimeters_ != 0L) { + output.writeInt64(3, gainMillimeters_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getInterval()); + } + if (gainMillimeters_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, gainMillimeters_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.Altitude)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.Altitude other = + (com.google.devicesandservices.health.v4.Altitude) obj; + + if (hasInterval() != other.hasInterval()) return false; + if (hasInterval()) { + if (!getInterval().equals(other.getInterval())) return false; + } + if (getGainMillimeters() != other.getGainMillimeters()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasInterval()) { + hash = (37 * hash) + INTERVAL_FIELD_NUMBER; + hash = (53 * hash) + getInterval().hashCode(); + } + hash = (37 * hash) + GAIN_MILLIMETERS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getGainMillimeters()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.Altitude parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.Altitude parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Altitude parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.Altitude parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Altitude parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.Altitude parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Altitude parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.Altitude parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Altitude parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.Altitude parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Altitude parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.Altitude parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.devicesandservices.health.v4.Altitude prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Captures the altitude gain (i.e. deltas), and not level above sea, for a user
+   * in millimeters.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.Altitude} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.Altitude) + com.google.devicesandservices.health.v4.AltitudeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_Altitude_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_Altitude_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.Altitude.class, + com.google.devicesandservices.health.v4.Altitude.Builder.class); + } + + // Construct using com.google.devicesandservices.health.v4.Altitude.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetIntervalFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + interval_ = null; + if (intervalBuilder_ != null) { + intervalBuilder_.dispose(); + intervalBuilder_ = null; + } + gainMillimeters_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_Altitude_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.Altitude getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.Altitude.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.Altitude build() { + com.google.devicesandservices.health.v4.Altitude result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.Altitude buildPartial() { + com.google.devicesandservices.health.v4.Altitude result = + new com.google.devicesandservices.health.v4.Altitude(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.devicesandservices.health.v4.Altitude result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.interval_ = intervalBuilder_ == null ? interval_ : intervalBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.gainMillimeters_ = gainMillimeters_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.Altitude) { + return mergeFrom((com.google.devicesandservices.health.v4.Altitude) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.devicesandservices.health.v4.Altitude other) { + if (other == com.google.devicesandservices.health.v4.Altitude.getDefaultInstance()) + return this; + if (other.hasInterval()) { + mergeInterval(other.getInterval()); + } + if (other.getGainMillimeters() != 0L) { + setGainMillimeters(other.getGainMillimeters()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + input.readMessage( + internalGetIntervalFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 18 + case 24: + { + gainMillimeters_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.devicesandservices.health.v4.ObservationTimeInterval interval_; + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ObservationTimeInterval, + com.google.devicesandservices.health.v4.ObservationTimeInterval.Builder, + com.google.devicesandservices.health.v4.ObservationTimeIntervalOrBuilder> + intervalBuilder_; + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the interval field is set. + */ + public boolean hasInterval() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The interval. + */ + public com.google.devicesandservices.health.v4.ObservationTimeInterval getInterval() { + if (intervalBuilder_ == null) { + return interval_ == null + ? com.google.devicesandservices.health.v4.ObservationTimeInterval.getDefaultInstance() + : interval_; + } else { + return intervalBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setInterval( + com.google.devicesandservices.health.v4.ObservationTimeInterval value) { + if (intervalBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + interval_ = value; + } else { + intervalBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setInterval( + com.google.devicesandservices.health.v4.ObservationTimeInterval.Builder builderForValue) { + if (intervalBuilder_ == null) { + interval_ = builderForValue.build(); + } else { + intervalBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeInterval( + com.google.devicesandservices.health.v4.ObservationTimeInterval value) { + if (intervalBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && interval_ != null + && interval_ + != com.google.devicesandservices.health.v4.ObservationTimeInterval + .getDefaultInstance()) { + getIntervalBuilder().mergeFrom(value); + } else { + interval_ = value; + } + } else { + intervalBuilder_.mergeFrom(value); + } + if (interval_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearInterval() { + bitField0_ = (bitField0_ & ~0x00000001); + interval_ = null; + if (intervalBuilder_ != null) { + intervalBuilder_.dispose(); + intervalBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.devicesandservices.health.v4.ObservationTimeInterval.Builder + getIntervalBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetIntervalFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.devicesandservices.health.v4.ObservationTimeIntervalOrBuilder + getIntervalOrBuilder() { + if (intervalBuilder_ != null) { + return intervalBuilder_.getMessageOrBuilder(); + } else { + return interval_ == null + ? com.google.devicesandservices.health.v4.ObservationTimeInterval.getDefaultInstance() + : interval_; + } + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ObservationTimeInterval, + com.google.devicesandservices.health.v4.ObservationTimeInterval.Builder, + com.google.devicesandservices.health.v4.ObservationTimeIntervalOrBuilder> + internalGetIntervalFieldBuilder() { + if (intervalBuilder_ == null) { + intervalBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ObservationTimeInterval, + com.google.devicesandservices.health.v4.ObservationTimeInterval.Builder, + com.google.devicesandservices.health.v4.ObservationTimeIntervalOrBuilder>( + getInterval(), getParentForChildren(), isClean()); + interval_ = null; + } + return intervalBuilder_; + } + + private long gainMillimeters_; + + /** + * + * + *
+     * Required. Altitude gain in millimeters over the observed interval.
+     * 
+ * + * int64 gain_millimeters = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The gainMillimeters. + */ + @java.lang.Override + public long getGainMillimeters() { + return gainMillimeters_; + } + + /** + * + * + *
+     * Required. Altitude gain in millimeters over the observed interval.
+     * 
+ * + * int64 gain_millimeters = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The gainMillimeters to set. + * @return This builder for chaining. + */ + public Builder setGainMillimeters(long value) { + + gainMillimeters_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Altitude gain in millimeters over the observed interval.
+     * 
+ * + * int64 gain_millimeters = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearGainMillimeters() { + bitField0_ = (bitField0_ & ~0x00000002); + gainMillimeters_ = 0L; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.Altitude) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.Altitude) + private static final com.google.devicesandservices.health.v4.Altitude DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.Altitude(); + } + + public static com.google.devicesandservices.health.v4.Altitude getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Altitude parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.Altitude getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/AltitudeOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/AltitudeOrBuilder.java new file mode 100644 index 000000000000..ec5c78e22ced --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/AltitudeOrBuilder.java @@ -0,0 +1,84 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface AltitudeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.Altitude) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Observed interval.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the interval field is set. + */ + boolean hasInterval(); + + /** + * + * + *
+   * Required. Observed interval.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The interval. + */ + com.google.devicesandservices.health.v4.ObservationTimeInterval getInterval(); + + /** + * + * + *
+   * Required. Observed interval.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.devicesandservices.health.v4.ObservationTimeIntervalOrBuilder getIntervalOrBuilder(); + + /** + * + * + *
+   * Required. Altitude gain in millimeters over the observed interval.
+   * 
+ * + * int64 gain_millimeters = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The gainMillimeters. + */ + long getGainMillimeters(); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/AltitudeRollupValue.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/AltitudeRollupValue.java new file mode 100644 index 000000000000..90fe28174a81 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/AltitudeRollupValue.java @@ -0,0 +1,504 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * Represents the result of the rollup of the user's altitude.
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.AltitudeRollupValue} + */ +@com.google.protobuf.Generated +public final class AltitudeRollupValue extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.AltitudeRollupValue) + AltitudeRollupValueOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AltitudeRollupValue"); + } + + // Use AltitudeRollupValue.newBuilder() to construct. + private AltitudeRollupValue(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private AltitudeRollupValue() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_AltitudeRollupValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_AltitudeRollupValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.AltitudeRollupValue.class, + com.google.devicesandservices.health.v4.AltitudeRollupValue.Builder.class); + } + + public static final int GAIN_MILLIMETERS_SUM_FIELD_NUMBER = 1; + private long gainMillimetersSum_ = 0L; + + /** + * + * + *
+   * Sum of the altitude gain in millimeters.
+   * 
+ * + * int64 gain_millimeters_sum = 1; + * + * @return The gainMillimetersSum. + */ + @java.lang.Override + public long getGainMillimetersSum() { + return gainMillimetersSum_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (gainMillimetersSum_ != 0L) { + output.writeInt64(1, gainMillimetersSum_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (gainMillimetersSum_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, gainMillimetersSum_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.AltitudeRollupValue)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.AltitudeRollupValue other = + (com.google.devicesandservices.health.v4.AltitudeRollupValue) obj; + + if (getGainMillimetersSum() != other.getGainMillimetersSum()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + GAIN_MILLIMETERS_SUM_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getGainMillimetersSum()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.AltitudeRollupValue parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.AltitudeRollupValue parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.AltitudeRollupValue parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.AltitudeRollupValue parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.AltitudeRollupValue parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.AltitudeRollupValue parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.AltitudeRollupValue parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.AltitudeRollupValue parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.AltitudeRollupValue parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.AltitudeRollupValue parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.AltitudeRollupValue parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.AltitudeRollupValue parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.AltitudeRollupValue prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Represents the result of the rollup of the user's altitude.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.AltitudeRollupValue} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.AltitudeRollupValue) + com.google.devicesandservices.health.v4.AltitudeRollupValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_AltitudeRollupValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_AltitudeRollupValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.AltitudeRollupValue.class, + com.google.devicesandservices.health.v4.AltitudeRollupValue.Builder.class); + } + + // Construct using com.google.devicesandservices.health.v4.AltitudeRollupValue.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + gainMillimetersSum_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_AltitudeRollupValue_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.AltitudeRollupValue getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.AltitudeRollupValue.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.AltitudeRollupValue build() { + com.google.devicesandservices.health.v4.AltitudeRollupValue result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.AltitudeRollupValue buildPartial() { + com.google.devicesandservices.health.v4.AltitudeRollupValue result = + new com.google.devicesandservices.health.v4.AltitudeRollupValue(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.devicesandservices.health.v4.AltitudeRollupValue result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.gainMillimetersSum_ = gainMillimetersSum_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.AltitudeRollupValue) { + return mergeFrom((com.google.devicesandservices.health.v4.AltitudeRollupValue) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.devicesandservices.health.v4.AltitudeRollupValue other) { + if (other == com.google.devicesandservices.health.v4.AltitudeRollupValue.getDefaultInstance()) + return this; + if (other.getGainMillimetersSum() != 0L) { + setGainMillimetersSum(other.getGainMillimetersSum()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + gainMillimetersSum_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private long gainMillimetersSum_; + + /** + * + * + *
+     * Sum of the altitude gain in millimeters.
+     * 
+ * + * int64 gain_millimeters_sum = 1; + * + * @return The gainMillimetersSum. + */ + @java.lang.Override + public long getGainMillimetersSum() { + return gainMillimetersSum_; + } + + /** + * + * + *
+     * Sum of the altitude gain in millimeters.
+     * 
+ * + * int64 gain_millimeters_sum = 1; + * + * @param value The gainMillimetersSum to set. + * @return This builder for chaining. + */ + public Builder setGainMillimetersSum(long value) { + + gainMillimetersSum_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Sum of the altitude gain in millimeters.
+     * 
+ * + * int64 gain_millimeters_sum = 1; + * + * @return This builder for chaining. + */ + public Builder clearGainMillimetersSum() { + bitField0_ = (bitField0_ & ~0x00000001); + gainMillimetersSum_ = 0L; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.AltitudeRollupValue) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.AltitudeRollupValue) + private static final com.google.devicesandservices.health.v4.AltitudeRollupValue DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.AltitudeRollupValue(); + } + + public static com.google.devicesandservices.health.v4.AltitudeRollupValue getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AltitudeRollupValue parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.AltitudeRollupValue getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/AltitudeRollupValueOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/AltitudeRollupValueOrBuilder.java new file mode 100644 index 000000000000..bee530b95bd8 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/AltitudeRollupValueOrBuilder.java @@ -0,0 +1,41 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface AltitudeRollupValueOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.AltitudeRollupValue) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Sum of the altitude gain in millimeters.
+   * 
+ * + * int64 gain_millimeters_sum = 1; + * + * @return The gainMillimetersSum. + */ + long getGainMillimetersSum(); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/BasalEnergyBurned.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/BasalEnergyBurned.java new file mode 100644 index 000000000000..7e3272192578 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/BasalEnergyBurned.java @@ -0,0 +1,837 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * Number of calories burned due to basal metabolic rate (BMR) over a period of
+ * time.
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.BasalEnergyBurned} + */ +@com.google.protobuf.Generated +public final class BasalEnergyBurned extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.BasalEnergyBurned) + BasalEnergyBurnedOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "BasalEnergyBurned"); + } + + // Use BasalEnergyBurned.newBuilder() to construct. + private BasalEnergyBurned(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private BasalEnergyBurned() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_BasalEnergyBurned_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_BasalEnergyBurned_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.BasalEnergyBurned.class, + com.google.devicesandservices.health.v4.BasalEnergyBurned.Builder.class); + } + + private int bitField0_; + public static final int INTERVAL_FIELD_NUMBER = 1; + private com.google.devicesandservices.health.v4.ObservationTimeInterval interval_; + + /** + * + * + *
+   * Required. Observed interval.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the interval field is set. + */ + @java.lang.Override + public boolean hasInterval() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. Observed interval.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The interval. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ObservationTimeInterval getInterval() { + return interval_ == null + ? com.google.devicesandservices.health.v4.ObservationTimeInterval.getDefaultInstance() + : interval_; + } + + /** + * + * + *
+   * Required. Observed interval.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ObservationTimeIntervalOrBuilder + getIntervalOrBuilder() { + return interval_ == null + ? com.google.devicesandservices.health.v4.ObservationTimeInterval.getDefaultInstance() + : interval_; + } + + public static final int KCAL_FIELD_NUMBER = 2; + private double kcal_ = 0D; + + /** + * + * + *
+   * Required. Number of calories burned due to basal metabolic rate in
+   * kilocalories over the observed interval.
+   * 
+ * + * double kcal = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The kcal. + */ + @java.lang.Override + public double getKcal() { + return kcal_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getInterval()); + } + if (java.lang.Double.doubleToRawLongBits(kcal_) != 0) { + output.writeDouble(2, kcal_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getInterval()); + } + if (java.lang.Double.doubleToRawLongBits(kcal_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(2, kcal_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.BasalEnergyBurned)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.BasalEnergyBurned other = + (com.google.devicesandservices.health.v4.BasalEnergyBurned) obj; + + if (hasInterval() != other.hasInterval()) return false; + if (hasInterval()) { + if (!getInterval().equals(other.getInterval())) return false; + } + if (java.lang.Double.doubleToLongBits(getKcal()) + != java.lang.Double.doubleToLongBits(other.getKcal())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasInterval()) { + hash = (37 * hash) + INTERVAL_FIELD_NUMBER; + hash = (53 * hash) + getInterval().hashCode(); + } + hash = (37 * hash) + KCAL_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong(java.lang.Double.doubleToLongBits(getKcal())); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.BasalEnergyBurned parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.BasalEnergyBurned parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.BasalEnergyBurned parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.BasalEnergyBurned parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.BasalEnergyBurned parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.BasalEnergyBurned parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.BasalEnergyBurned parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.BasalEnergyBurned parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.BasalEnergyBurned parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.BasalEnergyBurned parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.BasalEnergyBurned parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.BasalEnergyBurned parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.BasalEnergyBurned prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Number of calories burned due to basal metabolic rate (BMR) over a period of
+   * time.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.BasalEnergyBurned} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.BasalEnergyBurned) + com.google.devicesandservices.health.v4.BasalEnergyBurnedOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_BasalEnergyBurned_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_BasalEnergyBurned_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.BasalEnergyBurned.class, + com.google.devicesandservices.health.v4.BasalEnergyBurned.Builder.class); + } + + // Construct using com.google.devicesandservices.health.v4.BasalEnergyBurned.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetIntervalFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + interval_ = null; + if (intervalBuilder_ != null) { + intervalBuilder_.dispose(); + intervalBuilder_ = null; + } + kcal_ = 0D; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_BasalEnergyBurned_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.BasalEnergyBurned getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.BasalEnergyBurned.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.BasalEnergyBurned build() { + com.google.devicesandservices.health.v4.BasalEnergyBurned result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.BasalEnergyBurned buildPartial() { + com.google.devicesandservices.health.v4.BasalEnergyBurned result = + new com.google.devicesandservices.health.v4.BasalEnergyBurned(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.devicesandservices.health.v4.BasalEnergyBurned result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.interval_ = intervalBuilder_ == null ? interval_ : intervalBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.kcal_ = kcal_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.BasalEnergyBurned) { + return mergeFrom((com.google.devicesandservices.health.v4.BasalEnergyBurned) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.devicesandservices.health.v4.BasalEnergyBurned other) { + if (other == com.google.devicesandservices.health.v4.BasalEnergyBurned.getDefaultInstance()) + return this; + if (other.hasInterval()) { + mergeInterval(other.getInterval()); + } + if (java.lang.Double.doubleToRawLongBits(other.getKcal()) != 0) { + setKcal(other.getKcal()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetIntervalFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 17: + { + kcal_ = input.readDouble(); + bitField0_ |= 0x00000002; + break; + } // case 17 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.devicesandservices.health.v4.ObservationTimeInterval interval_; + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ObservationTimeInterval, + com.google.devicesandservices.health.v4.ObservationTimeInterval.Builder, + com.google.devicesandservices.health.v4.ObservationTimeIntervalOrBuilder> + intervalBuilder_; + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the interval field is set. + */ + public boolean hasInterval() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The interval. + */ + public com.google.devicesandservices.health.v4.ObservationTimeInterval getInterval() { + if (intervalBuilder_ == null) { + return interval_ == null + ? com.google.devicesandservices.health.v4.ObservationTimeInterval.getDefaultInstance() + : interval_; + } else { + return intervalBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setInterval( + com.google.devicesandservices.health.v4.ObservationTimeInterval value) { + if (intervalBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + interval_ = value; + } else { + intervalBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setInterval( + com.google.devicesandservices.health.v4.ObservationTimeInterval.Builder builderForValue) { + if (intervalBuilder_ == null) { + interval_ = builderForValue.build(); + } else { + intervalBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeInterval( + com.google.devicesandservices.health.v4.ObservationTimeInterval value) { + if (intervalBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && interval_ != null + && interval_ + != com.google.devicesandservices.health.v4.ObservationTimeInterval + .getDefaultInstance()) { + getIntervalBuilder().mergeFrom(value); + } else { + interval_ = value; + } + } else { + intervalBuilder_.mergeFrom(value); + } + if (interval_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearInterval() { + bitField0_ = (bitField0_ & ~0x00000001); + interval_ = null; + if (intervalBuilder_ != null) { + intervalBuilder_.dispose(); + intervalBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.devicesandservices.health.v4.ObservationTimeInterval.Builder + getIntervalBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetIntervalFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.devicesandservices.health.v4.ObservationTimeIntervalOrBuilder + getIntervalOrBuilder() { + if (intervalBuilder_ != null) { + return intervalBuilder_.getMessageOrBuilder(); + } else { + return interval_ == null + ? com.google.devicesandservices.health.v4.ObservationTimeInterval.getDefaultInstance() + : interval_; + } + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ObservationTimeInterval, + com.google.devicesandservices.health.v4.ObservationTimeInterval.Builder, + com.google.devicesandservices.health.v4.ObservationTimeIntervalOrBuilder> + internalGetIntervalFieldBuilder() { + if (intervalBuilder_ == null) { + intervalBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ObservationTimeInterval, + com.google.devicesandservices.health.v4.ObservationTimeInterval.Builder, + com.google.devicesandservices.health.v4.ObservationTimeIntervalOrBuilder>( + getInterval(), getParentForChildren(), isClean()); + interval_ = null; + } + return intervalBuilder_; + } + + private double kcal_; + + /** + * + * + *
+     * Required. Number of calories burned due to basal metabolic rate in
+     * kilocalories over the observed interval.
+     * 
+ * + * double kcal = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The kcal. + */ + @java.lang.Override + public double getKcal() { + return kcal_; + } + + /** + * + * + *
+     * Required. Number of calories burned due to basal metabolic rate in
+     * kilocalories over the observed interval.
+     * 
+ * + * double kcal = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The kcal to set. + * @return This builder for chaining. + */ + public Builder setKcal(double value) { + + kcal_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Number of calories burned due to basal metabolic rate in
+     * kilocalories over the observed interval.
+     * 
+ * + * double kcal = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearKcal() { + bitField0_ = (bitField0_ & ~0x00000002); + kcal_ = 0D; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.BasalEnergyBurned) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.BasalEnergyBurned) + private static final com.google.devicesandservices.health.v4.BasalEnergyBurned DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.BasalEnergyBurned(); + } + + public static com.google.devicesandservices.health.v4.BasalEnergyBurned getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BasalEnergyBurned parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.BasalEnergyBurned getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/BasalEnergyBurnedOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/BasalEnergyBurnedOrBuilder.java new file mode 100644 index 000000000000..cf0eff0e18ca --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/BasalEnergyBurnedOrBuilder.java @@ -0,0 +1,85 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface BasalEnergyBurnedOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.BasalEnergyBurned) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Observed interval.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the interval field is set. + */ + boolean hasInterval(); + + /** + * + * + *
+   * Required. Observed interval.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The interval. + */ + com.google.devicesandservices.health.v4.ObservationTimeInterval getInterval(); + + /** + * + * + *
+   * Required. Observed interval.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.devicesandservices.health.v4.ObservationTimeIntervalOrBuilder getIntervalOrBuilder(); + + /** + * + * + *
+   * Required. Number of calories burned due to basal metabolic rate in
+   * kilocalories over the observed interval.
+   * 
+ * + * double kcal = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The kcal. + */ + double getKcal(); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/BatchDeleteDataPointsOperationMetadata.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/BatchDeleteDataPointsOperationMetadata.java new file mode 100644 index 000000000000..dd9c8cfc496b --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/BatchDeleteDataPointsOperationMetadata.java @@ -0,0 +1,852 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_points.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * Metadata for a batch delete data points operation.
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.BatchDeleteDataPointsOperationMetadata} + */ +@com.google.protobuf.Generated +public final class BatchDeleteDataPointsOperationMetadata + extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.BatchDeleteDataPointsOperationMetadata) + BatchDeleteDataPointsOperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "BatchDeleteDataPointsOperationMetadata"); + } + + // Use BatchDeleteDataPointsOperationMetadata.newBuilder() to construct. + private BatchDeleteDataPointsOperationMetadata( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private BatchDeleteDataPointsOperationMetadata() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_BatchDeleteDataPointsOperationMetadata_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 1: + return internalGetFailedRequests(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_BatchDeleteDataPointsOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.BatchDeleteDataPointsOperationMetadata.class, + com.google.devicesandservices.health.v4.BatchDeleteDataPointsOperationMetadata.Builder + .class); + } + + public static final int FAILED_REQUESTS_FIELD_NUMBER = 1; + + private static final class FailedRequestsDefaultEntryHolder { + static final com.google.protobuf.MapEntry + defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_BatchDeleteDataPointsOperationMetadata_FailedRequestsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.INT32, + 0, + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.rpc.Status.getDefaultInstance()); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField failedRequests_; + + private com.google.protobuf.MapField + internalGetFailedRequests() { + if (failedRequests_ == null) { + return com.google.protobuf.MapField.emptyMapField( + FailedRequestsDefaultEntryHolder.defaultEntry); + } + return failedRequests_; + } + + public int getFailedRequestsCount() { + return internalGetFailedRequests().getMap().size(); + } + + /** + * + * + *
+   * The key in this map is the index of the request in the `requests` field in
+   * the batch request.
+   * 
+ * + * map<int32, .google.rpc.Status> failed_requests = 1; + */ + @java.lang.Override + public boolean containsFailedRequests(int key) { + + return internalGetFailedRequests().getMap().containsKey(key); + } + + /** Use {@link #getFailedRequestsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getFailedRequests() { + return getFailedRequestsMap(); + } + + /** + * + * + *
+   * The key in this map is the index of the request in the `requests` field in
+   * the batch request.
+   * 
+ * + * map<int32, .google.rpc.Status> failed_requests = 1; + */ + @java.lang.Override + public java.util.Map getFailedRequestsMap() { + return internalGetFailedRequests().getMap(); + } + + /** + * + * + *
+   * The key in this map is the index of the request in the `requests` field in
+   * the batch request.
+   * 
+ * + * map<int32, .google.rpc.Status> failed_requests = 1; + */ + @java.lang.Override + public /* nullable */ com.google.rpc.Status getFailedRequestsOrDefault( + int key, + /* nullable */ + com.google.rpc.Status defaultValue) { + + java.util.Map map = + internalGetFailedRequests().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+   * The key in this map is the index of the request in the `requests` field in
+   * the batch request.
+   * 
+ * + * map<int32, .google.rpc.Status> failed_requests = 1; + */ + @java.lang.Override + public com.google.rpc.Status getFailedRequestsOrThrow(int key) { + + java.util.Map map = + internalGetFailedRequests().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + com.google.protobuf.GeneratedMessage.serializeIntegerMapTo( + output, internalGetFailedRequests(), FailedRequestsDefaultEntryHolder.defaultEntry, 1); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (java.util.Map.Entry entry : + internalGetFailedRequests().getMap().entrySet()) { + com.google.protobuf.MapEntry failedRequests__ = + FailedRequestsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, failedRequests__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.devicesandservices.health.v4.BatchDeleteDataPointsOperationMetadata)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.BatchDeleteDataPointsOperationMetadata other = + (com.google.devicesandservices.health.v4.BatchDeleteDataPointsOperationMetadata) obj; + + if (!internalGetFailedRequests().equals(other.internalGetFailedRequests())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (!internalGetFailedRequests().getMap().isEmpty()) { + hash = (37 * hash) + FAILED_REQUESTS_FIELD_NUMBER; + hash = (53 * hash) + internalGetFailedRequests().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.BatchDeleteDataPointsOperationMetadata + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.BatchDeleteDataPointsOperationMetadata + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.BatchDeleteDataPointsOperationMetadata + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.BatchDeleteDataPointsOperationMetadata + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.BatchDeleteDataPointsOperationMetadata + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.BatchDeleteDataPointsOperationMetadata + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.BatchDeleteDataPointsOperationMetadata + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.BatchDeleteDataPointsOperationMetadata + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.BatchDeleteDataPointsOperationMetadata + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.BatchDeleteDataPointsOperationMetadata + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.BatchDeleteDataPointsOperationMetadata + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.BatchDeleteDataPointsOperationMetadata + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.BatchDeleteDataPointsOperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Metadata for a batch delete data points operation.
+   * 
+ * + * Protobuf type {@code + * google.devicesandservices.health.v4.BatchDeleteDataPointsOperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.BatchDeleteDataPointsOperationMetadata) + com.google.devicesandservices.health.v4.BatchDeleteDataPointsOperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_BatchDeleteDataPointsOperationMetadata_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 1: + return internalGetFailedRequests(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 1: + return internalGetMutableFailedRequests(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_BatchDeleteDataPointsOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.BatchDeleteDataPointsOperationMetadata.class, + com.google.devicesandservices.health.v4.BatchDeleteDataPointsOperationMetadata.Builder + .class); + } + + // Construct using + // com.google.devicesandservices.health.v4.BatchDeleteDataPointsOperationMetadata.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + internalGetMutableFailedRequests().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_BatchDeleteDataPointsOperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.BatchDeleteDataPointsOperationMetadata + getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.BatchDeleteDataPointsOperationMetadata + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.BatchDeleteDataPointsOperationMetadata build() { + com.google.devicesandservices.health.v4.BatchDeleteDataPointsOperationMetadata result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.BatchDeleteDataPointsOperationMetadata + buildPartial() { + com.google.devicesandservices.health.v4.BatchDeleteDataPointsOperationMetadata result = + new com.google.devicesandservices.health.v4.BatchDeleteDataPointsOperationMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.devicesandservices.health.v4.BatchDeleteDataPointsOperationMetadata result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.failedRequests_ = + internalGetFailedRequests().build(FailedRequestsDefaultEntryHolder.defaultEntry); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.devicesandservices.health.v4.BatchDeleteDataPointsOperationMetadata) { + return mergeFrom( + (com.google.devicesandservices.health.v4.BatchDeleteDataPointsOperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.devicesandservices.health.v4.BatchDeleteDataPointsOperationMetadata other) { + if (other + == com.google.devicesandservices.health.v4.BatchDeleteDataPointsOperationMetadata + .getDefaultInstance()) return this; + internalGetMutableFailedRequests().mergeFrom(other.internalGetFailedRequests()); + bitField0_ |= 0x00000001; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.protobuf.MapEntry + failedRequests__ = + input.readMessage( + FailedRequestsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableFailedRequests() + .ensureBuilderMap() + .put(failedRequests__.getKey(), failedRequests__.getValue()); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private static final class FailedRequestsConverter + implements com.google.protobuf.MapFieldBuilder.Converter< + java.lang.Integer, com.google.rpc.StatusOrBuilder, com.google.rpc.Status> { + @java.lang.Override + public com.google.rpc.Status build(com.google.rpc.StatusOrBuilder val) { + if (val instanceof com.google.rpc.Status) { + return (com.google.rpc.Status) val; + } + return ((com.google.rpc.Status.Builder) val).build(); + } + + @java.lang.Override + public com.google.protobuf.MapEntry defaultEntry() { + return FailedRequestsDefaultEntryHolder.defaultEntry; + } + } + ; + + private static final FailedRequestsConverter failedRequestsConverter = + new FailedRequestsConverter(); + + private com.google.protobuf.MapFieldBuilder< + java.lang.Integer, + com.google.rpc.StatusOrBuilder, + com.google.rpc.Status, + com.google.rpc.Status.Builder> + failedRequests_; + + private com.google.protobuf.MapFieldBuilder< + java.lang.Integer, + com.google.rpc.StatusOrBuilder, + com.google.rpc.Status, + com.google.rpc.Status.Builder> + internalGetFailedRequests() { + if (failedRequests_ == null) { + return new com.google.protobuf.MapFieldBuilder<>(failedRequestsConverter); + } + return failedRequests_; + } + + private com.google.protobuf.MapFieldBuilder< + java.lang.Integer, + com.google.rpc.StatusOrBuilder, + com.google.rpc.Status, + com.google.rpc.Status.Builder> + internalGetMutableFailedRequests() { + if (failedRequests_ == null) { + failedRequests_ = new com.google.protobuf.MapFieldBuilder<>(failedRequestsConverter); + } + bitField0_ |= 0x00000001; + onChanged(); + return failedRequests_; + } + + public int getFailedRequestsCount() { + return internalGetFailedRequests().ensureBuilderMap().size(); + } + + /** + * + * + *
+     * The key in this map is the index of the request in the `requests` field in
+     * the batch request.
+     * 
+ * + * map<int32, .google.rpc.Status> failed_requests = 1; + */ + @java.lang.Override + public boolean containsFailedRequests(int key) { + + return internalGetFailedRequests().ensureBuilderMap().containsKey(key); + } + + /** Use {@link #getFailedRequestsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getFailedRequests() { + return getFailedRequestsMap(); + } + + /** + * + * + *
+     * The key in this map is the index of the request in the `requests` field in
+     * the batch request.
+     * 
+ * + * map<int32, .google.rpc.Status> failed_requests = 1; + */ + @java.lang.Override + public java.util.Map getFailedRequestsMap() { + return internalGetFailedRequests().getImmutableMap(); + } + + /** + * + * + *
+     * The key in this map is the index of the request in the `requests` field in
+     * the batch request.
+     * 
+ * + * map<int32, .google.rpc.Status> failed_requests = 1; + */ + @java.lang.Override + public /* nullable */ com.google.rpc.Status getFailedRequestsOrDefault( + int key, + /* nullable */ + com.google.rpc.Status defaultValue) { + + java.util.Map map = + internalGetMutableFailedRequests().ensureBuilderMap(); + return map.containsKey(key) ? failedRequestsConverter.build(map.get(key)) : defaultValue; + } + + /** + * + * + *
+     * The key in this map is the index of the request in the `requests` field in
+     * the batch request.
+     * 
+ * + * map<int32, .google.rpc.Status> failed_requests = 1; + */ + @java.lang.Override + public com.google.rpc.Status getFailedRequestsOrThrow(int key) { + + java.util.Map map = + internalGetMutableFailedRequests().ensureBuilderMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return failedRequestsConverter.build(map.get(key)); + } + + public Builder clearFailedRequests() { + bitField0_ = (bitField0_ & ~0x00000001); + internalGetMutableFailedRequests().clear(); + return this; + } + + /** + * + * + *
+     * The key in this map is the index of the request in the `requests` field in
+     * the batch request.
+     * 
+ * + * map<int32, .google.rpc.Status> failed_requests = 1; + */ + public Builder removeFailedRequests(int key) { + + internalGetMutableFailedRequests().ensureBuilderMap().remove(key); + return this; + } + + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableFailedRequests() { + bitField0_ |= 0x00000001; + return internalGetMutableFailedRequests().ensureMessageMap(); + } + + /** + * + * + *
+     * The key in this map is the index of the request in the `requests` field in
+     * the batch request.
+     * 
+ * + * map<int32, .google.rpc.Status> failed_requests = 1; + */ + public Builder putFailedRequests(int key, com.google.rpc.Status value) { + + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableFailedRequests().ensureBuilderMap().put(key, value); + bitField0_ |= 0x00000001; + return this; + } + + /** + * + * + *
+     * The key in this map is the index of the request in the `requests` field in
+     * the batch request.
+     * 
+ * + * map<int32, .google.rpc.Status> failed_requests = 1; + */ + public Builder putAllFailedRequests( + java.util.Map values) { + for (java.util.Map.Entry e : values.entrySet()) { + if (e.getKey() == null || e.getValue() == null) { + throw new NullPointerException(); + } + } + internalGetMutableFailedRequests().ensureBuilderMap().putAll(values); + bitField0_ |= 0x00000001; + return this; + } + + /** + * + * + *
+     * The key in this map is the index of the request in the `requests` field in
+     * the batch request.
+     * 
+ * + * map<int32, .google.rpc.Status> failed_requests = 1; + */ + public com.google.rpc.Status.Builder putFailedRequestsBuilderIfAbsent(int key) { + java.util.Map builderMap = + internalGetMutableFailedRequests().ensureBuilderMap(); + com.google.rpc.StatusOrBuilder entry = builderMap.get(key); + if (entry == null) { + entry = com.google.rpc.Status.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof com.google.rpc.Status) { + entry = ((com.google.rpc.Status) entry).toBuilder(); + builderMap.put(key, entry); + } + return (com.google.rpc.Status.Builder) entry; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.BatchDeleteDataPointsOperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.BatchDeleteDataPointsOperationMetadata) + private static final com.google.devicesandservices.health.v4 + .BatchDeleteDataPointsOperationMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.devicesandservices.health.v4.BatchDeleteDataPointsOperationMetadata(); + } + + public static com.google.devicesandservices.health.v4.BatchDeleteDataPointsOperationMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchDeleteDataPointsOperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.BatchDeleteDataPointsOperationMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/BatchDeleteDataPointsOperationMetadataOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/BatchDeleteDataPointsOperationMetadataOrBuilder.java new file mode 100644 index 000000000000..7e9c295165cc --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/BatchDeleteDataPointsOperationMetadataOrBuilder.java @@ -0,0 +1,96 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_points.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface BatchDeleteDataPointsOperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.BatchDeleteDataPointsOperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The key in this map is the index of the request in the `requests` field in
+   * the batch request.
+   * 
+ * + * map<int32, .google.rpc.Status> failed_requests = 1; + */ + int getFailedRequestsCount(); + + /** + * + * + *
+   * The key in this map is the index of the request in the `requests` field in
+   * the batch request.
+   * 
+ * + * map<int32, .google.rpc.Status> failed_requests = 1; + */ + boolean containsFailedRequests(int key); + + /** Use {@link #getFailedRequestsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getFailedRequests(); + + /** + * + * + *
+   * The key in this map is the index of the request in the `requests` field in
+   * the batch request.
+   * 
+ * + * map<int32, .google.rpc.Status> failed_requests = 1; + */ + java.util.Map getFailedRequestsMap(); + + /** + * + * + *
+   * The key in this map is the index of the request in the `requests` field in
+   * the batch request.
+   * 
+ * + * map<int32, .google.rpc.Status> failed_requests = 1; + */ + /* nullable */ + com.google.rpc.Status getFailedRequestsOrDefault( + int key, + /* nullable */ + com.google.rpc.Status defaultValue); + + /** + * + * + *
+   * The key in this map is the index of the request in the `requests` field in
+   * the batch request.
+   * 
+ * + * map<int32, .google.rpc.Status> failed_requests = 1; + */ + com.google.rpc.Status getFailedRequestsOrThrow(int key); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/BatchDeleteDataPointsRequest.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/BatchDeleteDataPointsRequest.java new file mode 100644 index 000000000000..a49dc8a8b17c --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/BatchDeleteDataPointsRequest.java @@ -0,0 +1,1056 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_points.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * Request to delete a batch of identifiable data points.
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.BatchDeleteDataPointsRequest} + */ +@com.google.protobuf.Generated +public final class BatchDeleteDataPointsRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.BatchDeleteDataPointsRequest) + BatchDeleteDataPointsRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "BatchDeleteDataPointsRequest"); + } + + // Use BatchDeleteDataPointsRequest.newBuilder() to construct. + private BatchDeleteDataPointsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private BatchDeleteDataPointsRequest() { + parent_ = ""; + names_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_BatchDeleteDataPointsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_BatchDeleteDataPointsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.BatchDeleteDataPointsRequest.class, + com.google.devicesandservices.health.v4.BatchDeleteDataPointsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Optional. Parent (data type) for the Data Point collection
+   * Format: `users/me/dataTypes/{data_type}`, e.g.:
+   *
+   * - `users/me/dataTypes/steps`
+   * - `users/me/dataTypes/-`
+   *
+   * For a list of the supported data types see the
+   * [DataPoint
+   * data][google.devicesandservices.health.v4.DataPoint] union
+   * field.
+   *
+   * Deleting data points across multiple data type collections is supported
+   * following https://aip.dev/159.
+   *
+   * If this is set, the parent of all of the data points specified in `names`
+   * must match this field.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Parent (data type) for the Data Point collection
+   * Format: `users/me/dataTypes/{data_type}`, e.g.:
+   *
+   * - `users/me/dataTypes/steps`
+   * - `users/me/dataTypes/-`
+   *
+   * For a list of the supported data types see the
+   * [DataPoint
+   * data][google.devicesandservices.health.v4.DataPoint] union
+   * field.
+   *
+   * Deleting data points across multiple data type collections is supported
+   * following https://aip.dev/159.
+   *
+   * If this is set, the parent of all of the data points specified in `names`
+   * must match this field.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NAMES_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList names_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Required. The names of the DataPoints to delete.
+   * A maximum of 10000 data points can be deleted in a single request.
+   * 
+ * + * + * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the names. + */ + public com.google.protobuf.ProtocolStringList getNamesList() { + return names_; + } + + /** + * + * + *
+   * Required. The names of the DataPoints to delete.
+   * A maximum of 10000 data points can be deleted in a single request.
+   * 
+ * + * + * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The count of names. + */ + public int getNamesCount() { + return names_.size(); + } + + /** + * + * + *
+   * Required. The names of the DataPoints to delete.
+   * A maximum of 10000 data points can be deleted in a single request.
+   * 
+ * + * + * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The names at the given index. + */ + public java.lang.String getNames(int index) { + return names_.get(index); + } + + /** + * + * + *
+   * Required. The names of the DataPoints to delete.
+   * A maximum of 10000 data points can be deleted in a single request.
+   * 
+ * + * + * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the names at the given index. + */ + public com.google.protobuf.ByteString getNamesBytes(int index) { + return names_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + for (int i = 0; i < names_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, names_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + { + int dataSize = 0; + for (int i = 0; i < names_.size(); i++) { + dataSize += computeStringSizeNoTag(names_.getRaw(i)); + } + size += dataSize; + size += 1 * getNamesList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.BatchDeleteDataPointsRequest)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.BatchDeleteDataPointsRequest other = + (com.google.devicesandservices.health.v4.BatchDeleteDataPointsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getNamesList().equals(other.getNamesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (getNamesCount() > 0) { + hash = (37 * hash) + NAMES_FIELD_NUMBER; + hash = (53 * hash) + getNamesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.BatchDeleteDataPointsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.BatchDeleteDataPointsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.BatchDeleteDataPointsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.BatchDeleteDataPointsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.BatchDeleteDataPointsRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.BatchDeleteDataPointsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.BatchDeleteDataPointsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.BatchDeleteDataPointsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.BatchDeleteDataPointsRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.BatchDeleteDataPointsRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.BatchDeleteDataPointsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.BatchDeleteDataPointsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.BatchDeleteDataPointsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request to delete a batch of identifiable data points.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.BatchDeleteDataPointsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.BatchDeleteDataPointsRequest) + com.google.devicesandservices.health.v4.BatchDeleteDataPointsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_BatchDeleteDataPointsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_BatchDeleteDataPointsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.BatchDeleteDataPointsRequest.class, + com.google.devicesandservices.health.v4.BatchDeleteDataPointsRequest.Builder.class); + } + + // Construct using + // com.google.devicesandservices.health.v4.BatchDeleteDataPointsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + names_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_BatchDeleteDataPointsRequest_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.BatchDeleteDataPointsRequest + getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.BatchDeleteDataPointsRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.BatchDeleteDataPointsRequest build() { + com.google.devicesandservices.health.v4.BatchDeleteDataPointsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.BatchDeleteDataPointsRequest buildPartial() { + com.google.devicesandservices.health.v4.BatchDeleteDataPointsRequest result = + new com.google.devicesandservices.health.v4.BatchDeleteDataPointsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.devicesandservices.health.v4.BatchDeleteDataPointsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + names_.makeImmutable(); + result.names_ = names_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.BatchDeleteDataPointsRequest) { + return mergeFrom( + (com.google.devicesandservices.health.v4.BatchDeleteDataPointsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.devicesandservices.health.v4.BatchDeleteDataPointsRequest other) { + if (other + == com.google.devicesandservices.health.v4.BatchDeleteDataPointsRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.names_.isEmpty()) { + if (names_.isEmpty()) { + names_ = other.names_; + bitField0_ |= 0x00000002; + } else { + ensureNamesIsMutable(); + names_.addAll(other.names_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureNamesIsMutable(); + names_.add(s); + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Optional. Parent (data type) for the Data Point collection
+     * Format: `users/me/dataTypes/{data_type}`, e.g.:
+     *
+     * - `users/me/dataTypes/steps`
+     * - `users/me/dataTypes/-`
+     *
+     * For a list of the supported data types see the
+     * [DataPoint
+     * data][google.devicesandservices.health.v4.DataPoint] union
+     * field.
+     *
+     * Deleting data points across multiple data type collections is supported
+     * following https://aip.dev/159.
+     *
+     * If this is set, the parent of all of the data points specified in `names`
+     * must match this field.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Parent (data type) for the Data Point collection
+     * Format: `users/me/dataTypes/{data_type}`, e.g.:
+     *
+     * - `users/me/dataTypes/steps`
+     * - `users/me/dataTypes/-`
+     *
+     * For a list of the supported data types see the
+     * [DataPoint
+     * data][google.devicesandservices.health.v4.DataPoint] union
+     * field.
+     *
+     * Deleting data points across multiple data type collections is supported
+     * following https://aip.dev/159.
+     *
+     * If this is set, the parent of all of the data points specified in `names`
+     * must match this field.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Parent (data type) for the Data Point collection
+     * Format: `users/me/dataTypes/{data_type}`, e.g.:
+     *
+     * - `users/me/dataTypes/steps`
+     * - `users/me/dataTypes/-`
+     *
+     * For a list of the supported data types see the
+     * [DataPoint
+     * data][google.devicesandservices.health.v4.DataPoint] union
+     * field.
+     *
+     * Deleting data points across multiple data type collections is supported
+     * following https://aip.dev/159.
+     *
+     * If this is set, the parent of all of the data points specified in `names`
+     * must match this field.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Parent (data type) for the Data Point collection
+     * Format: `users/me/dataTypes/{data_type}`, e.g.:
+     *
+     * - `users/me/dataTypes/steps`
+     * - `users/me/dataTypes/-`
+     *
+     * For a list of the supported data types see the
+     * [DataPoint
+     * data][google.devicesandservices.health.v4.DataPoint] union
+     * field.
+     *
+     * Deleting data points across multiple data type collections is supported
+     * following https://aip.dev/159.
+     *
+     * If this is set, the parent of all of the data points specified in `names`
+     * must match this field.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Parent (data type) for the Data Point collection
+     * Format: `users/me/dataTypes/{data_type}`, e.g.:
+     *
+     * - `users/me/dataTypes/steps`
+     * - `users/me/dataTypes/-`
+     *
+     * For a list of the supported data types see the
+     * [DataPoint
+     * data][google.devicesandservices.health.v4.DataPoint] union
+     * field.
+     *
+     * Deleting data points across multiple data type collections is supported
+     * following https://aip.dev/159.
+     *
+     * If this is set, the parent of all of the data points specified in `names`
+     * must match this field.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList names_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureNamesIsMutable() { + if (!names_.isModifiable()) { + names_ = new com.google.protobuf.LazyStringArrayList(names_); + } + bitField0_ |= 0x00000002; + } + + /** + * + * + *
+     * Required. The names of the DataPoints to delete.
+     * A maximum of 10000 data points can be deleted in a single request.
+     * 
+ * + * + * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the names. + */ + public com.google.protobuf.ProtocolStringList getNamesList() { + names_.makeImmutable(); + return names_; + } + + /** + * + * + *
+     * Required. The names of the DataPoints to delete.
+     * A maximum of 10000 data points can be deleted in a single request.
+     * 
+ * + * + * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The count of names. + */ + public int getNamesCount() { + return names_.size(); + } + + /** + * + * + *
+     * Required. The names of the DataPoints to delete.
+     * A maximum of 10000 data points can be deleted in a single request.
+     * 
+ * + * + * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The names at the given index. + */ + public java.lang.String getNames(int index) { + return names_.get(index); + } + + /** + * + * + *
+     * Required. The names of the DataPoints to delete.
+     * A maximum of 10000 data points can be deleted in a single request.
+     * 
+ * + * + * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the names at the given index. + */ + public com.google.protobuf.ByteString getNamesBytes(int index) { + return names_.getByteString(index); + } + + /** + * + * + *
+     * Required. The names of the DataPoints to delete.
+     * A maximum of 10000 data points can be deleted in a single request.
+     * 
+ * + * + * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index to set the value at. + * @param value The names to set. + * @return This builder for chaining. + */ + public Builder setNames(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureNamesIsMutable(); + names_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The names of the DataPoints to delete.
+     * A maximum of 10000 data points can be deleted in a single request.
+     * 
+ * + * + * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The names to add. + * @return This builder for chaining. + */ + public Builder addNames(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureNamesIsMutable(); + names_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The names of the DataPoints to delete.
+     * A maximum of 10000 data points can be deleted in a single request.
+     * 
+ * + * + * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param values The names to add. + * @return This builder for chaining. + */ + public Builder addAllNames(java.lang.Iterable values) { + ensureNamesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, names_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The names of the DataPoints to delete.
+     * A maximum of 10000 data points can be deleted in a single request.
+     * 
+ * + * + * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearNames() { + names_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The names of the DataPoints to delete.
+     * A maximum of 10000 data points can be deleted in a single request.
+     * 
+ * + * + * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes of the names to add. + * @return This builder for chaining. + */ + public Builder addNamesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureNamesIsMutable(); + names_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.BatchDeleteDataPointsRequest) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.BatchDeleteDataPointsRequest) + private static final com.google.devicesandservices.health.v4.BatchDeleteDataPointsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.BatchDeleteDataPointsRequest(); + } + + public static com.google.devicesandservices.health.v4.BatchDeleteDataPointsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchDeleteDataPointsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.BatchDeleteDataPointsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/BatchDeleteDataPointsRequestOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/BatchDeleteDataPointsRequestOrBuilder.java new file mode 100644 index 000000000000..3ae346dbb006 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/BatchDeleteDataPointsRequestOrBuilder.java @@ -0,0 +1,154 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_points.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface BatchDeleteDataPointsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.BatchDeleteDataPointsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Parent (data type) for the Data Point collection
+   * Format: `users/me/dataTypes/{data_type}`, e.g.:
+   *
+   * - `users/me/dataTypes/steps`
+   * - `users/me/dataTypes/-`
+   *
+   * For a list of the supported data types see the
+   * [DataPoint
+   * data][google.devicesandservices.health.v4.DataPoint] union
+   * field.
+   *
+   * Deleting data points across multiple data type collections is supported
+   * following https://aip.dev/159.
+   *
+   * If this is set, the parent of all of the data points specified in `names`
+   * must match this field.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Optional. Parent (data type) for the Data Point collection
+   * Format: `users/me/dataTypes/{data_type}`, e.g.:
+   *
+   * - `users/me/dataTypes/steps`
+   * - `users/me/dataTypes/-`
+   *
+   * For a list of the supported data types see the
+   * [DataPoint
+   * data][google.devicesandservices.health.v4.DataPoint] union
+   * field.
+   *
+   * Deleting data points across multiple data type collections is supported
+   * following https://aip.dev/159.
+   *
+   * If this is set, the parent of all of the data points specified in `names`
+   * must match this field.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The names of the DataPoints to delete.
+   * A maximum of 10000 data points can be deleted in a single request.
+   * 
+ * + * + * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the names. + */ + java.util.List getNamesList(); + + /** + * + * + *
+   * Required. The names of the DataPoints to delete.
+   * A maximum of 10000 data points can be deleted in a single request.
+   * 
+ * + * + * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The count of names. + */ + int getNamesCount(); + + /** + * + * + *
+   * Required. The names of the DataPoints to delete.
+   * A maximum of 10000 data points can be deleted in a single request.
+   * 
+ * + * + * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The names at the given index. + */ + java.lang.String getNames(int index); + + /** + * + * + *
+   * Required. The names of the DataPoints to delete.
+   * A maximum of 10000 data points can be deleted in a single request.
+   * 
+ * + * + * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the names at the given index. + */ + com.google.protobuf.ByteString getNamesBytes(int index); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/BatchDeleteDataPointsResponse.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/BatchDeleteDataPointsResponse.java new file mode 100644 index 000000000000..1f4d4d576e24 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/BatchDeleteDataPointsResponse.java @@ -0,0 +1,967 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_points.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * Response containing the list of possibly soft-deleted DataPoints.
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.BatchDeleteDataPointsResponse} + */ +@com.google.protobuf.Generated +public final class BatchDeleteDataPointsResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.BatchDeleteDataPointsResponse) + BatchDeleteDataPointsResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "BatchDeleteDataPointsResponse"); + } + + // Use BatchDeleteDataPointsResponse.newBuilder() to construct. + private BatchDeleteDataPointsResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private BatchDeleteDataPointsResponse() { + dataPoints_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_BatchDeleteDataPointsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_BatchDeleteDataPointsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.BatchDeleteDataPointsResponse.class, + com.google.devicesandservices.health.v4.BatchDeleteDataPointsResponse.Builder.class); + } + + public static final int DATA_POINTS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List dataPoints_; + + /** + * + * + *
+   * The list of soft-deleted DataPoints, if the data type supports only soft
+   * deletion.
+   * 
+ * + * repeated .google.devicesandservices.health.v4.DataPoint data_points = 1; + */ + @java.lang.Override + public java.util.List getDataPointsList() { + return dataPoints_; + } + + /** + * + * + *
+   * The list of soft-deleted DataPoints, if the data type supports only soft
+   * deletion.
+   * 
+ * + * repeated .google.devicesandservices.health.v4.DataPoint data_points = 1; + */ + @java.lang.Override + public java.util.List + getDataPointsOrBuilderList() { + return dataPoints_; + } + + /** + * + * + *
+   * The list of soft-deleted DataPoints, if the data type supports only soft
+   * deletion.
+   * 
+ * + * repeated .google.devicesandservices.health.v4.DataPoint data_points = 1; + */ + @java.lang.Override + public int getDataPointsCount() { + return dataPoints_.size(); + } + + /** + * + * + *
+   * The list of soft-deleted DataPoints, if the data type supports only soft
+   * deletion.
+   * 
+ * + * repeated .google.devicesandservices.health.v4.DataPoint data_points = 1; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DataPoint getDataPoints(int index) { + return dataPoints_.get(index); + } + + /** + * + * + *
+   * The list of soft-deleted DataPoints, if the data type supports only soft
+   * deletion.
+   * 
+ * + * repeated .google.devicesandservices.health.v4.DataPoint data_points = 1; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DataPointOrBuilder getDataPointsOrBuilder( + int index) { + return dataPoints_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < dataPoints_.size(); i++) { + output.writeMessage(1, dataPoints_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < dataPoints_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, dataPoints_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.BatchDeleteDataPointsResponse)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.BatchDeleteDataPointsResponse other = + (com.google.devicesandservices.health.v4.BatchDeleteDataPointsResponse) obj; + + if (!getDataPointsList().equals(other.getDataPointsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getDataPointsCount() > 0) { + hash = (37 * hash) + DATA_POINTS_FIELD_NUMBER; + hash = (53 * hash) + getDataPointsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.BatchDeleteDataPointsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.BatchDeleteDataPointsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.BatchDeleteDataPointsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.BatchDeleteDataPointsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.BatchDeleteDataPointsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.BatchDeleteDataPointsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.BatchDeleteDataPointsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.BatchDeleteDataPointsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.BatchDeleteDataPointsResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.BatchDeleteDataPointsResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.BatchDeleteDataPointsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.BatchDeleteDataPointsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.BatchDeleteDataPointsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Response containing the list of possibly soft-deleted DataPoints.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.BatchDeleteDataPointsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.BatchDeleteDataPointsResponse) + com.google.devicesandservices.health.v4.BatchDeleteDataPointsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_BatchDeleteDataPointsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_BatchDeleteDataPointsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.BatchDeleteDataPointsResponse.class, + com.google.devicesandservices.health.v4.BatchDeleteDataPointsResponse.Builder.class); + } + + // Construct using + // com.google.devicesandservices.health.v4.BatchDeleteDataPointsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (dataPointsBuilder_ == null) { + dataPoints_ = java.util.Collections.emptyList(); + } else { + dataPoints_ = null; + dataPointsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_BatchDeleteDataPointsResponse_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.BatchDeleteDataPointsResponse + getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.BatchDeleteDataPointsResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.BatchDeleteDataPointsResponse build() { + com.google.devicesandservices.health.v4.BatchDeleteDataPointsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.BatchDeleteDataPointsResponse buildPartial() { + com.google.devicesandservices.health.v4.BatchDeleteDataPointsResponse result = + new com.google.devicesandservices.health.v4.BatchDeleteDataPointsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.devicesandservices.health.v4.BatchDeleteDataPointsResponse result) { + if (dataPointsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + dataPoints_ = java.util.Collections.unmodifiableList(dataPoints_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.dataPoints_ = dataPoints_; + } else { + result.dataPoints_ = dataPointsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.devicesandservices.health.v4.BatchDeleteDataPointsResponse result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.BatchDeleteDataPointsResponse) { + return mergeFrom( + (com.google.devicesandservices.health.v4.BatchDeleteDataPointsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.devicesandservices.health.v4.BatchDeleteDataPointsResponse other) { + if (other + == com.google.devicesandservices.health.v4.BatchDeleteDataPointsResponse + .getDefaultInstance()) return this; + if (dataPointsBuilder_ == null) { + if (!other.dataPoints_.isEmpty()) { + if (dataPoints_.isEmpty()) { + dataPoints_ = other.dataPoints_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDataPointsIsMutable(); + dataPoints_.addAll(other.dataPoints_); + } + onChanged(); + } + } else { + if (!other.dataPoints_.isEmpty()) { + if (dataPointsBuilder_.isEmpty()) { + dataPointsBuilder_.dispose(); + dataPointsBuilder_ = null; + dataPoints_ = other.dataPoints_; + bitField0_ = (bitField0_ & ~0x00000001); + dataPointsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetDataPointsFieldBuilder() + : null; + } else { + dataPointsBuilder_.addAllMessages(other.dataPoints_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.devicesandservices.health.v4.DataPoint m = + input.readMessage( + com.google.devicesandservices.health.v4.DataPoint.parser(), + extensionRegistry); + if (dataPointsBuilder_ == null) { + ensureDataPointsIsMutable(); + dataPoints_.add(m); + } else { + dataPointsBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List dataPoints_ = + java.util.Collections.emptyList(); + + private void ensureDataPointsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + dataPoints_ = + new java.util.ArrayList(dataPoints_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.devicesandservices.health.v4.DataPoint, + com.google.devicesandservices.health.v4.DataPoint.Builder, + com.google.devicesandservices.health.v4.DataPointOrBuilder> + dataPointsBuilder_; + + /** + * + * + *
+     * The list of soft-deleted DataPoints, if the data type supports only soft
+     * deletion.
+     * 
+ * + * repeated .google.devicesandservices.health.v4.DataPoint data_points = 1; + */ + public java.util.List getDataPointsList() { + if (dataPointsBuilder_ == null) { + return java.util.Collections.unmodifiableList(dataPoints_); + } else { + return dataPointsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The list of soft-deleted DataPoints, if the data type supports only soft
+     * deletion.
+     * 
+ * + * repeated .google.devicesandservices.health.v4.DataPoint data_points = 1; + */ + public int getDataPointsCount() { + if (dataPointsBuilder_ == null) { + return dataPoints_.size(); + } else { + return dataPointsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The list of soft-deleted DataPoints, if the data type supports only soft
+     * deletion.
+     * 
+ * + * repeated .google.devicesandservices.health.v4.DataPoint data_points = 1; + */ + public com.google.devicesandservices.health.v4.DataPoint getDataPoints(int index) { + if (dataPointsBuilder_ == null) { + return dataPoints_.get(index); + } else { + return dataPointsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The list of soft-deleted DataPoints, if the data type supports only soft
+     * deletion.
+     * 
+ * + * repeated .google.devicesandservices.health.v4.DataPoint data_points = 1; + */ + public Builder setDataPoints( + int index, com.google.devicesandservices.health.v4.DataPoint value) { + if (dataPointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataPointsIsMutable(); + dataPoints_.set(index, value); + onChanged(); + } else { + dataPointsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of soft-deleted DataPoints, if the data type supports only soft
+     * deletion.
+     * 
+ * + * repeated .google.devicesandservices.health.v4.DataPoint data_points = 1; + */ + public Builder setDataPoints( + int index, com.google.devicesandservices.health.v4.DataPoint.Builder builderForValue) { + if (dataPointsBuilder_ == null) { + ensureDataPointsIsMutable(); + dataPoints_.set(index, builderForValue.build()); + onChanged(); + } else { + dataPointsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of soft-deleted DataPoints, if the data type supports only soft
+     * deletion.
+     * 
+ * + * repeated .google.devicesandservices.health.v4.DataPoint data_points = 1; + */ + public Builder addDataPoints(com.google.devicesandservices.health.v4.DataPoint value) { + if (dataPointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataPointsIsMutable(); + dataPoints_.add(value); + onChanged(); + } else { + dataPointsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The list of soft-deleted DataPoints, if the data type supports only soft
+     * deletion.
+     * 
+ * + * repeated .google.devicesandservices.health.v4.DataPoint data_points = 1; + */ + public Builder addDataPoints( + int index, com.google.devicesandservices.health.v4.DataPoint value) { + if (dataPointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataPointsIsMutable(); + dataPoints_.add(index, value); + onChanged(); + } else { + dataPointsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of soft-deleted DataPoints, if the data type supports only soft
+     * deletion.
+     * 
+ * + * repeated .google.devicesandservices.health.v4.DataPoint data_points = 1; + */ + public Builder addDataPoints( + com.google.devicesandservices.health.v4.DataPoint.Builder builderForValue) { + if (dataPointsBuilder_ == null) { + ensureDataPointsIsMutable(); + dataPoints_.add(builderForValue.build()); + onChanged(); + } else { + dataPointsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of soft-deleted DataPoints, if the data type supports only soft
+     * deletion.
+     * 
+ * + * repeated .google.devicesandservices.health.v4.DataPoint data_points = 1; + */ + public Builder addDataPoints( + int index, com.google.devicesandservices.health.v4.DataPoint.Builder builderForValue) { + if (dataPointsBuilder_ == null) { + ensureDataPointsIsMutable(); + dataPoints_.add(index, builderForValue.build()); + onChanged(); + } else { + dataPointsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of soft-deleted DataPoints, if the data type supports only soft
+     * deletion.
+     * 
+ * + * repeated .google.devicesandservices.health.v4.DataPoint data_points = 1; + */ + public Builder addAllDataPoints( + java.lang.Iterable values) { + if (dataPointsBuilder_ == null) { + ensureDataPointsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, dataPoints_); + onChanged(); + } else { + dataPointsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The list of soft-deleted DataPoints, if the data type supports only soft
+     * deletion.
+     * 
+ * + * repeated .google.devicesandservices.health.v4.DataPoint data_points = 1; + */ + public Builder clearDataPoints() { + if (dataPointsBuilder_ == null) { + dataPoints_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + dataPointsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The list of soft-deleted DataPoints, if the data type supports only soft
+     * deletion.
+     * 
+ * + * repeated .google.devicesandservices.health.v4.DataPoint data_points = 1; + */ + public Builder removeDataPoints(int index) { + if (dataPointsBuilder_ == null) { + ensureDataPointsIsMutable(); + dataPoints_.remove(index); + onChanged(); + } else { + dataPointsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The list of soft-deleted DataPoints, if the data type supports only soft
+     * deletion.
+     * 
+ * + * repeated .google.devicesandservices.health.v4.DataPoint data_points = 1; + */ + public com.google.devicesandservices.health.v4.DataPoint.Builder getDataPointsBuilder( + int index) { + return internalGetDataPointsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The list of soft-deleted DataPoints, if the data type supports only soft
+     * deletion.
+     * 
+ * + * repeated .google.devicesandservices.health.v4.DataPoint data_points = 1; + */ + public com.google.devicesandservices.health.v4.DataPointOrBuilder getDataPointsOrBuilder( + int index) { + if (dataPointsBuilder_ == null) { + return dataPoints_.get(index); + } else { + return dataPointsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The list of soft-deleted DataPoints, if the data type supports only soft
+     * deletion.
+     * 
+ * + * repeated .google.devicesandservices.health.v4.DataPoint data_points = 1; + */ + public java.util.List + getDataPointsOrBuilderList() { + if (dataPointsBuilder_ != null) { + return dataPointsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(dataPoints_); + } + } + + /** + * + * + *
+     * The list of soft-deleted DataPoints, if the data type supports only soft
+     * deletion.
+     * 
+ * + * repeated .google.devicesandservices.health.v4.DataPoint data_points = 1; + */ + public com.google.devicesandservices.health.v4.DataPoint.Builder addDataPointsBuilder() { + return internalGetDataPointsFieldBuilder() + .addBuilder(com.google.devicesandservices.health.v4.DataPoint.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of soft-deleted DataPoints, if the data type supports only soft
+     * deletion.
+     * 
+ * + * repeated .google.devicesandservices.health.v4.DataPoint data_points = 1; + */ + public com.google.devicesandservices.health.v4.DataPoint.Builder addDataPointsBuilder( + int index) { + return internalGetDataPointsFieldBuilder() + .addBuilder( + index, com.google.devicesandservices.health.v4.DataPoint.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of soft-deleted DataPoints, if the data type supports only soft
+     * deletion.
+     * 
+ * + * repeated .google.devicesandservices.health.v4.DataPoint data_points = 1; + */ + public java.util.List + getDataPointsBuilderList() { + return internalGetDataPointsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.devicesandservices.health.v4.DataPoint, + com.google.devicesandservices.health.v4.DataPoint.Builder, + com.google.devicesandservices.health.v4.DataPointOrBuilder> + internalGetDataPointsFieldBuilder() { + if (dataPointsBuilder_ == null) { + dataPointsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.devicesandservices.health.v4.DataPoint, + com.google.devicesandservices.health.v4.DataPoint.Builder, + com.google.devicesandservices.health.v4.DataPointOrBuilder>( + dataPoints_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + dataPoints_ = null; + } + return dataPointsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.BatchDeleteDataPointsResponse) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.BatchDeleteDataPointsResponse) + private static final com.google.devicesandservices.health.v4.BatchDeleteDataPointsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.BatchDeleteDataPointsResponse(); + } + + public static com.google.devicesandservices.health.v4.BatchDeleteDataPointsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchDeleteDataPointsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.BatchDeleteDataPointsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/BatchDeleteDataPointsResponseOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/BatchDeleteDataPointsResponseOrBuilder.java new file mode 100644 index 000000000000..e5e9c8bc14d1 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/BatchDeleteDataPointsResponseOrBuilder.java @@ -0,0 +1,89 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_points.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface BatchDeleteDataPointsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.BatchDeleteDataPointsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of soft-deleted DataPoints, if the data type supports only soft
+   * deletion.
+   * 
+ * + * repeated .google.devicesandservices.health.v4.DataPoint data_points = 1; + */ + java.util.List getDataPointsList(); + + /** + * + * + *
+   * The list of soft-deleted DataPoints, if the data type supports only soft
+   * deletion.
+   * 
+ * + * repeated .google.devicesandservices.health.v4.DataPoint data_points = 1; + */ + com.google.devicesandservices.health.v4.DataPoint getDataPoints(int index); + + /** + * + * + *
+   * The list of soft-deleted DataPoints, if the data type supports only soft
+   * deletion.
+   * 
+ * + * repeated .google.devicesandservices.health.v4.DataPoint data_points = 1; + */ + int getDataPointsCount(); + + /** + * + * + *
+   * The list of soft-deleted DataPoints, if the data type supports only soft
+   * deletion.
+   * 
+ * + * repeated .google.devicesandservices.health.v4.DataPoint data_points = 1; + */ + java.util.List + getDataPointsOrBuilderList(); + + /** + * + * + *
+   * The list of soft-deleted DataPoints, if the data type supports only soft
+   * deletion.
+   * 
+ * + * repeated .google.devicesandservices.health.v4.DataPoint data_points = 1; + */ + com.google.devicesandservices.health.v4.DataPointOrBuilder getDataPointsOrBuilder(int index); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/BodyFat.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/BodyFat.java new file mode 100644 index 000000000000..97c6b92ac14f --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/BodyFat.java @@ -0,0 +1,831 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * Body fat measurement.
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.BodyFat} + */ +@com.google.protobuf.Generated +public final class BodyFat extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.BodyFat) + BodyFatOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "BodyFat"); + } + + // Use BodyFat.newBuilder() to construct. + private BodyFat(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private BodyFat() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_BodyFat_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_BodyFat_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.BodyFat.class, + com.google.devicesandservices.health.v4.BodyFat.Builder.class); + } + + private int bitField0_; + public static final int SAMPLE_TIME_FIELD_NUMBER = 2; + private com.google.devicesandservices.health.v4.ObservationSampleTime sampleTime_; + + /** + * + * + *
+   * Required. The time at which body fat was measured.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the sampleTime field is set. + */ + @java.lang.Override + public boolean hasSampleTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The time at which body fat was measured.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The sampleTime. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ObservationSampleTime getSampleTime() { + return sampleTime_ == null + ? com.google.devicesandservices.health.v4.ObservationSampleTime.getDefaultInstance() + : sampleTime_; + } + + /** + * + * + *
+   * Required. The time at which body fat was measured.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ObservationSampleTimeOrBuilder + getSampleTimeOrBuilder() { + return sampleTime_ == null + ? com.google.devicesandservices.health.v4.ObservationSampleTime.getDefaultInstance() + : sampleTime_; + } + + public static final int PERCENTAGE_FIELD_NUMBER = 3; + private double percentage_ = 0D; + + /** + * + * + *
+   * Required. Body fat percentage, in range [0, 100].
+   * 
+ * + * double percentage = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The percentage. + */ + @java.lang.Override + public double getPercentage() { + return percentage_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getSampleTime()); + } + if (java.lang.Double.doubleToRawLongBits(percentage_) != 0) { + output.writeDouble(3, percentage_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getSampleTime()); + } + if (java.lang.Double.doubleToRawLongBits(percentage_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(3, percentage_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.BodyFat)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.BodyFat other = + (com.google.devicesandservices.health.v4.BodyFat) obj; + + if (hasSampleTime() != other.hasSampleTime()) return false; + if (hasSampleTime()) { + if (!getSampleTime().equals(other.getSampleTime())) return false; + } + if (java.lang.Double.doubleToLongBits(getPercentage()) + != java.lang.Double.doubleToLongBits(other.getPercentage())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasSampleTime()) { + hash = (37 * hash) + SAMPLE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getSampleTime().hashCode(); + } + hash = (37 * hash) + PERCENTAGE_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getPercentage())); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.BodyFat parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.BodyFat parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.BodyFat parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.BodyFat parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.BodyFat parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.BodyFat parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.BodyFat parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.BodyFat parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.BodyFat parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.BodyFat parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.BodyFat parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.BodyFat parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.devicesandservices.health.v4.BodyFat prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Body fat measurement.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.BodyFat} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.BodyFat) + com.google.devicesandservices.health.v4.BodyFatOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_BodyFat_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_BodyFat_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.BodyFat.class, + com.google.devicesandservices.health.v4.BodyFat.Builder.class); + } + + // Construct using com.google.devicesandservices.health.v4.BodyFat.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetSampleTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + sampleTime_ = null; + if (sampleTimeBuilder_ != null) { + sampleTimeBuilder_.dispose(); + sampleTimeBuilder_ = null; + } + percentage_ = 0D; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_BodyFat_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.BodyFat getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.BodyFat.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.BodyFat build() { + com.google.devicesandservices.health.v4.BodyFat result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.BodyFat buildPartial() { + com.google.devicesandservices.health.v4.BodyFat result = + new com.google.devicesandservices.health.v4.BodyFat(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.devicesandservices.health.v4.BodyFat result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.sampleTime_ = sampleTimeBuilder_ == null ? sampleTime_ : sampleTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.percentage_ = percentage_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.BodyFat) { + return mergeFrom((com.google.devicesandservices.health.v4.BodyFat) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.devicesandservices.health.v4.BodyFat other) { + if (other == com.google.devicesandservices.health.v4.BodyFat.getDefaultInstance()) + return this; + if (other.hasSampleTime()) { + mergeSampleTime(other.getSampleTime()); + } + if (java.lang.Double.doubleToRawLongBits(other.getPercentage()) != 0) { + setPercentage(other.getPercentage()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + input.readMessage( + internalGetSampleTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 18 + case 25: + { + percentage_ = input.readDouble(); + bitField0_ |= 0x00000002; + break; + } // case 25 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.devicesandservices.health.v4.ObservationSampleTime sampleTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ObservationSampleTime, + com.google.devicesandservices.health.v4.ObservationSampleTime.Builder, + com.google.devicesandservices.health.v4.ObservationSampleTimeOrBuilder> + sampleTimeBuilder_; + + /** + * + * + *
+     * Required. The time at which body fat was measured.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the sampleTime field is set. + */ + public boolean hasSampleTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. The time at which body fat was measured.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The sampleTime. + */ + public com.google.devicesandservices.health.v4.ObservationSampleTime getSampleTime() { + if (sampleTimeBuilder_ == null) { + return sampleTime_ == null + ? com.google.devicesandservices.health.v4.ObservationSampleTime.getDefaultInstance() + : sampleTime_; + } else { + return sampleTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The time at which body fat was measured.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSampleTime( + com.google.devicesandservices.health.v4.ObservationSampleTime value) { + if (sampleTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sampleTime_ = value; + } else { + sampleTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The time at which body fat was measured.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSampleTime( + com.google.devicesandservices.health.v4.ObservationSampleTime.Builder builderForValue) { + if (sampleTimeBuilder_ == null) { + sampleTime_ = builderForValue.build(); + } else { + sampleTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The time at which body fat was measured.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeSampleTime( + com.google.devicesandservices.health.v4.ObservationSampleTime value) { + if (sampleTimeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && sampleTime_ != null + && sampleTime_ + != com.google.devicesandservices.health.v4.ObservationSampleTime + .getDefaultInstance()) { + getSampleTimeBuilder().mergeFrom(value); + } else { + sampleTime_ = value; + } + } else { + sampleTimeBuilder_.mergeFrom(value); + } + if (sampleTime_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The time at which body fat was measured.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearSampleTime() { + bitField0_ = (bitField0_ & ~0x00000001); + sampleTime_ = null; + if (sampleTimeBuilder_ != null) { + sampleTimeBuilder_.dispose(); + sampleTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The time at which body fat was measured.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.devicesandservices.health.v4.ObservationSampleTime.Builder + getSampleTimeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetSampleTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The time at which body fat was measured.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.devicesandservices.health.v4.ObservationSampleTimeOrBuilder + getSampleTimeOrBuilder() { + if (sampleTimeBuilder_ != null) { + return sampleTimeBuilder_.getMessageOrBuilder(); + } else { + return sampleTime_ == null + ? com.google.devicesandservices.health.v4.ObservationSampleTime.getDefaultInstance() + : sampleTime_; + } + } + + /** + * + * + *
+     * Required. The time at which body fat was measured.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ObservationSampleTime, + com.google.devicesandservices.health.v4.ObservationSampleTime.Builder, + com.google.devicesandservices.health.v4.ObservationSampleTimeOrBuilder> + internalGetSampleTimeFieldBuilder() { + if (sampleTimeBuilder_ == null) { + sampleTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ObservationSampleTime, + com.google.devicesandservices.health.v4.ObservationSampleTime.Builder, + com.google.devicesandservices.health.v4.ObservationSampleTimeOrBuilder>( + getSampleTime(), getParentForChildren(), isClean()); + sampleTime_ = null; + } + return sampleTimeBuilder_; + } + + private double percentage_; + + /** + * + * + *
+     * Required. Body fat percentage, in range [0, 100].
+     * 
+ * + * double percentage = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The percentage. + */ + @java.lang.Override + public double getPercentage() { + return percentage_; + } + + /** + * + * + *
+     * Required. Body fat percentage, in range [0, 100].
+     * 
+ * + * double percentage = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The percentage to set. + * @return This builder for chaining. + */ + public Builder setPercentage(double value) { + + percentage_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Body fat percentage, in range [0, 100].
+     * 
+ * + * double percentage = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearPercentage() { + bitField0_ = (bitField0_ & ~0x00000002); + percentage_ = 0D; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.BodyFat) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.BodyFat) + private static final com.google.devicesandservices.health.v4.BodyFat DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.BodyFat(); + } + + public static com.google.devicesandservices.health.v4.BodyFat getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BodyFat parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.BodyFat getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/BodyFatOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/BodyFatOrBuilder.java new file mode 100644 index 000000000000..e7418d61251c --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/BodyFatOrBuilder.java @@ -0,0 +1,84 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface BodyFatOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.BodyFat) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The time at which body fat was measured.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the sampleTime field is set. + */ + boolean hasSampleTime(); + + /** + * + * + *
+   * Required. The time at which body fat was measured.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The sampleTime. + */ + com.google.devicesandservices.health.v4.ObservationSampleTime getSampleTime(); + + /** + * + * + *
+   * Required. The time at which body fat was measured.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.devicesandservices.health.v4.ObservationSampleTimeOrBuilder getSampleTimeOrBuilder(); + + /** + * + * + *
+   * Required. Body fat percentage, in range [0, 100].
+   * 
+ * + * double percentage = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The percentage. + */ + double getPercentage(); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/BodyFatRollupValue.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/BodyFatRollupValue.java new file mode 100644 index 000000000000..9f925712c1fe --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/BodyFatRollupValue.java @@ -0,0 +1,508 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * Represents the result of the rollup of the body fat data type.
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.BodyFatRollupValue} + */ +@com.google.protobuf.Generated +public final class BodyFatRollupValue extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.BodyFatRollupValue) + BodyFatRollupValueOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "BodyFatRollupValue"); + } + + // Use BodyFatRollupValue.newBuilder() to construct. + private BodyFatRollupValue(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private BodyFatRollupValue() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_BodyFatRollupValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_BodyFatRollupValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.BodyFatRollupValue.class, + com.google.devicesandservices.health.v4.BodyFatRollupValue.Builder.class); + } + + public static final int BODY_FAT_PERCENTAGE_AVG_FIELD_NUMBER = 1; + private double bodyFatPercentageAvg_ = 0D; + + /** + * + * + *
+   * Average body fat percentage.
+   * 
+ * + * double body_fat_percentage_avg = 1; + * + * @return The bodyFatPercentageAvg. + */ + @java.lang.Override + public double getBodyFatPercentageAvg() { + return bodyFatPercentageAvg_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (java.lang.Double.doubleToRawLongBits(bodyFatPercentageAvg_) != 0) { + output.writeDouble(1, bodyFatPercentageAvg_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (java.lang.Double.doubleToRawLongBits(bodyFatPercentageAvg_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(1, bodyFatPercentageAvg_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.BodyFatRollupValue)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.BodyFatRollupValue other = + (com.google.devicesandservices.health.v4.BodyFatRollupValue) obj; + + if (java.lang.Double.doubleToLongBits(getBodyFatPercentageAvg()) + != java.lang.Double.doubleToLongBits(other.getBodyFatPercentageAvg())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + BODY_FAT_PERCENTAGE_AVG_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getBodyFatPercentageAvg())); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.BodyFatRollupValue parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.BodyFatRollupValue parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.BodyFatRollupValue parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.BodyFatRollupValue parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.BodyFatRollupValue parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.BodyFatRollupValue parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.BodyFatRollupValue parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.BodyFatRollupValue parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.BodyFatRollupValue parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.BodyFatRollupValue parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.BodyFatRollupValue parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.BodyFatRollupValue parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.BodyFatRollupValue prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Represents the result of the rollup of the body fat data type.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.BodyFatRollupValue} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.BodyFatRollupValue) + com.google.devicesandservices.health.v4.BodyFatRollupValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_BodyFatRollupValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_BodyFatRollupValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.BodyFatRollupValue.class, + com.google.devicesandservices.health.v4.BodyFatRollupValue.Builder.class); + } + + // Construct using com.google.devicesandservices.health.v4.BodyFatRollupValue.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + bodyFatPercentageAvg_ = 0D; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_BodyFatRollupValue_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.BodyFatRollupValue getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.BodyFatRollupValue.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.BodyFatRollupValue build() { + com.google.devicesandservices.health.v4.BodyFatRollupValue result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.BodyFatRollupValue buildPartial() { + com.google.devicesandservices.health.v4.BodyFatRollupValue result = + new com.google.devicesandservices.health.v4.BodyFatRollupValue(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.devicesandservices.health.v4.BodyFatRollupValue result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.bodyFatPercentageAvg_ = bodyFatPercentageAvg_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.BodyFatRollupValue) { + return mergeFrom((com.google.devicesandservices.health.v4.BodyFatRollupValue) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.devicesandservices.health.v4.BodyFatRollupValue other) { + if (other == com.google.devicesandservices.health.v4.BodyFatRollupValue.getDefaultInstance()) + return this; + if (java.lang.Double.doubleToRawLongBits(other.getBodyFatPercentageAvg()) != 0) { + setBodyFatPercentageAvg(other.getBodyFatPercentageAvg()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 9: + { + bodyFatPercentageAvg_ = input.readDouble(); + bitField0_ |= 0x00000001; + break; + } // case 9 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private double bodyFatPercentageAvg_; + + /** + * + * + *
+     * Average body fat percentage.
+     * 
+ * + * double body_fat_percentage_avg = 1; + * + * @return The bodyFatPercentageAvg. + */ + @java.lang.Override + public double getBodyFatPercentageAvg() { + return bodyFatPercentageAvg_; + } + + /** + * + * + *
+     * Average body fat percentage.
+     * 
+ * + * double body_fat_percentage_avg = 1; + * + * @param value The bodyFatPercentageAvg to set. + * @return This builder for chaining. + */ + public Builder setBodyFatPercentageAvg(double value) { + + bodyFatPercentageAvg_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Average body fat percentage.
+     * 
+ * + * double body_fat_percentage_avg = 1; + * + * @return This builder for chaining. + */ + public Builder clearBodyFatPercentageAvg() { + bitField0_ = (bitField0_ & ~0x00000001); + bodyFatPercentageAvg_ = 0D; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.BodyFatRollupValue) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.BodyFatRollupValue) + private static final com.google.devicesandservices.health.v4.BodyFatRollupValue DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.BodyFatRollupValue(); + } + + public static com.google.devicesandservices.health.v4.BodyFatRollupValue getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BodyFatRollupValue parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.BodyFatRollupValue getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/BodyFatRollupValueOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/BodyFatRollupValueOrBuilder.java new file mode 100644 index 000000000000..9b4c05e9a542 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/BodyFatRollupValueOrBuilder.java @@ -0,0 +1,41 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface BodyFatRollupValueOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.BodyFatRollupValue) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Average body fat percentage.
+   * 
+ * + * double body_fat_percentage_avg = 1; + * + * @return The bodyFatPercentageAvg. + */ + double getBodyFatPercentageAvg(); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/CaloriesInHeartRateZoneRollupValue.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/CaloriesInHeartRateZoneRollupValue.java new file mode 100644 index 000000000000..ad8945681b1e --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/CaloriesInHeartRateZoneRollupValue.java @@ -0,0 +1,1848 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * Represents the result of the rollup of the calories in heart rate zone data
+ * type.
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue} + */ +@com.google.protobuf.Generated +public final class CaloriesInHeartRateZoneRollupValue extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue) + CaloriesInHeartRateZoneRollupValueOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CaloriesInHeartRateZoneRollupValue"); + } + + // Use CaloriesInHeartRateZoneRollupValue.newBuilder() to construct. + private CaloriesInHeartRateZoneRollupValue( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private CaloriesInHeartRateZoneRollupValue() { + caloriesInHeartRateZones_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_CaloriesInHeartRateZoneRollupValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_CaloriesInHeartRateZoneRollupValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue.class, + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue.Builder + .class); + } + + public interface CaloriesInHeartRateZoneValueOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue.CaloriesInHeartRateZoneValue) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The heart rate zone.
+     * 
+ * + * .google.devicesandservices.health.v4.HeartRateZoneType heart_rate_zone = 1; + * + * @return The enum numeric value on the wire for heartRateZone. + */ + int getHeartRateZoneValue(); + + /** + * + * + *
+     * The heart rate zone.
+     * 
+ * + * .google.devicesandservices.health.v4.HeartRateZoneType heart_rate_zone = 1; + * + * @return The heartRateZone. + */ + com.google.devicesandservices.health.v4.HeartRateZoneType getHeartRateZone(); + + /** + * + * + *
+     * The amount of kilocalories burned in the specified heart rate zone.
+     * 
+ * + * double kcal = 2; + * + * @return The kcal. + */ + double getKcal(); + } + + /** + * + * + *
+   * Represents the amount of kilocalories burned in a specific heart rate zone.
+   * 
+ * + * Protobuf type {@code + * google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue.CaloriesInHeartRateZoneValue} + */ + public static final class CaloriesInHeartRateZoneValue + extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue.CaloriesInHeartRateZoneValue) + CaloriesInHeartRateZoneValueOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CaloriesInHeartRateZoneValue"); + } + + // Use CaloriesInHeartRateZoneValue.newBuilder() to construct. + private CaloriesInHeartRateZoneValue(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private CaloriesInHeartRateZoneValue() { + heartRateZone_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_CaloriesInHeartRateZoneRollupValue_CaloriesInHeartRateZoneValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_CaloriesInHeartRateZoneRollupValue_CaloriesInHeartRateZoneValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .CaloriesInHeartRateZoneValue.class, + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .CaloriesInHeartRateZoneValue.Builder.class); + } + + public static final int HEART_RATE_ZONE_FIELD_NUMBER = 1; + private int heartRateZone_ = 0; + + /** + * + * + *
+     * The heart rate zone.
+     * 
+ * + * .google.devicesandservices.health.v4.HeartRateZoneType heart_rate_zone = 1; + * + * @return The enum numeric value on the wire for heartRateZone. + */ + @java.lang.Override + public int getHeartRateZoneValue() { + return heartRateZone_; + } + + /** + * + * + *
+     * The heart rate zone.
+     * 
+ * + * .google.devicesandservices.health.v4.HeartRateZoneType heart_rate_zone = 1; + * + * @return The heartRateZone. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.HeartRateZoneType getHeartRateZone() { + com.google.devicesandservices.health.v4.HeartRateZoneType result = + com.google.devicesandservices.health.v4.HeartRateZoneType.forNumber(heartRateZone_); + return result == null + ? com.google.devicesandservices.health.v4.HeartRateZoneType.UNRECOGNIZED + : result; + } + + public static final int KCAL_FIELD_NUMBER = 2; + private double kcal_ = 0D; + + /** + * + * + *
+     * The amount of kilocalories burned in the specified heart rate zone.
+     * 
+ * + * double kcal = 2; + * + * @return The kcal. + */ + @java.lang.Override + public double getKcal() { + return kcal_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (heartRateZone_ + != com.google.devicesandservices.health.v4.HeartRateZoneType + .HEART_RATE_ZONE_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, heartRateZone_); + } + if (java.lang.Double.doubleToRawLongBits(kcal_) != 0) { + output.writeDouble(2, kcal_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (heartRateZone_ + != com.google.devicesandservices.health.v4.HeartRateZoneType + .HEART_RATE_ZONE_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, heartRateZone_); + } + if (java.lang.Double.doubleToRawLongBits(kcal_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(2, kcal_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .CaloriesInHeartRateZoneValue)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .CaloriesInHeartRateZoneValue + other = + (com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .CaloriesInHeartRateZoneValue) + obj; + + if (heartRateZone_ != other.heartRateZone_) return false; + if (java.lang.Double.doubleToLongBits(getKcal()) + != java.lang.Double.doubleToLongBits(other.getKcal())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + HEART_RATE_ZONE_FIELD_NUMBER; + hash = (53 * hash) + heartRateZone_; + hash = (37 * hash) + KCAL_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong(java.lang.Double.doubleToLongBits(getKcal())); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .CaloriesInHeartRateZoneValue + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .CaloriesInHeartRateZoneValue + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .CaloriesInHeartRateZoneValue + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .CaloriesInHeartRateZoneValue + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .CaloriesInHeartRateZoneValue + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .CaloriesInHeartRateZoneValue + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .CaloriesInHeartRateZoneValue + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .CaloriesInHeartRateZoneValue + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .CaloriesInHeartRateZoneValue + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .CaloriesInHeartRateZoneValue + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .CaloriesInHeartRateZoneValue + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .CaloriesInHeartRateZoneValue + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .CaloriesInHeartRateZoneValue + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+     * Represents the amount of kilocalories burned in a specific heart rate zone.
+     * 
+ * + * Protobuf type {@code + * google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue.CaloriesInHeartRateZoneValue} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue.CaloriesInHeartRateZoneValue) + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .CaloriesInHeartRateZoneValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_CaloriesInHeartRateZoneRollupValue_CaloriesInHeartRateZoneValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_CaloriesInHeartRateZoneRollupValue_CaloriesInHeartRateZoneValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .CaloriesInHeartRateZoneValue.class, + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .CaloriesInHeartRateZoneValue.Builder.class); + } + + // Construct using + // com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue.CaloriesInHeartRateZoneValue.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + heartRateZone_ = 0; + kcal_ = 0D; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_CaloriesInHeartRateZoneRollupValue_CaloriesInHeartRateZoneValue_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .CaloriesInHeartRateZoneValue + getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .CaloriesInHeartRateZoneValue.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .CaloriesInHeartRateZoneValue + build() { + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .CaloriesInHeartRateZoneValue + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .CaloriesInHeartRateZoneValue + buildPartial() { + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .CaloriesInHeartRateZoneValue + result = + new com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .CaloriesInHeartRateZoneValue(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .CaloriesInHeartRateZoneValue + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.heartRateZone_ = heartRateZone_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.kcal_ = kcal_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .CaloriesInHeartRateZoneValue) { + return mergeFrom( + (com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .CaloriesInHeartRateZoneValue) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .CaloriesInHeartRateZoneValue + other) { + if (other + == com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .CaloriesInHeartRateZoneValue.getDefaultInstance()) return this; + if (other.heartRateZone_ != 0) { + setHeartRateZoneValue(other.getHeartRateZoneValue()); + } + if (java.lang.Double.doubleToRawLongBits(other.getKcal()) != 0) { + setKcal(other.getKcal()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + heartRateZone_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 17: + { + kcal_ = input.readDouble(); + bitField0_ |= 0x00000002; + break; + } // case 17 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int heartRateZone_ = 0; + + /** + * + * + *
+       * The heart rate zone.
+       * 
+ * + * .google.devicesandservices.health.v4.HeartRateZoneType heart_rate_zone = 1; + * + * @return The enum numeric value on the wire for heartRateZone. + */ + @java.lang.Override + public int getHeartRateZoneValue() { + return heartRateZone_; + } + + /** + * + * + *
+       * The heart rate zone.
+       * 
+ * + * .google.devicesandservices.health.v4.HeartRateZoneType heart_rate_zone = 1; + * + * @param value The enum numeric value on the wire for heartRateZone to set. + * @return This builder for chaining. + */ + public Builder setHeartRateZoneValue(int value) { + heartRateZone_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * The heart rate zone.
+       * 
+ * + * .google.devicesandservices.health.v4.HeartRateZoneType heart_rate_zone = 1; + * + * @return The heartRateZone. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.HeartRateZoneType getHeartRateZone() { + com.google.devicesandservices.health.v4.HeartRateZoneType result = + com.google.devicesandservices.health.v4.HeartRateZoneType.forNumber(heartRateZone_); + return result == null + ? com.google.devicesandservices.health.v4.HeartRateZoneType.UNRECOGNIZED + : result; + } + + /** + * + * + *
+       * The heart rate zone.
+       * 
+ * + * .google.devicesandservices.health.v4.HeartRateZoneType heart_rate_zone = 1; + * + * @param value The heartRateZone to set. + * @return This builder for chaining. + */ + public Builder setHeartRateZone( + com.google.devicesandservices.health.v4.HeartRateZoneType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + heartRateZone_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+       * The heart rate zone.
+       * 
+ * + * .google.devicesandservices.health.v4.HeartRateZoneType heart_rate_zone = 1; + * + * @return This builder for chaining. + */ + public Builder clearHeartRateZone() { + bitField0_ = (bitField0_ & ~0x00000001); + heartRateZone_ = 0; + onChanged(); + return this; + } + + private double kcal_; + + /** + * + * + *
+       * The amount of kilocalories burned in the specified heart rate zone.
+       * 
+ * + * double kcal = 2; + * + * @return The kcal. + */ + @java.lang.Override + public double getKcal() { + return kcal_; + } + + /** + * + * + *
+       * The amount of kilocalories burned in the specified heart rate zone.
+       * 
+ * + * double kcal = 2; + * + * @param value The kcal to set. + * @return This builder for chaining. + */ + public Builder setKcal(double value) { + + kcal_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * The amount of kilocalories burned in the specified heart rate zone.
+       * 
+ * + * double kcal = 2; + * + * @return This builder for chaining. + */ + public Builder clearKcal() { + bitField0_ = (bitField0_ & ~0x00000002); + kcal_ = 0D; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue.CaloriesInHeartRateZoneValue) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue.CaloriesInHeartRateZoneValue) + private static final com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .CaloriesInHeartRateZoneValue + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .CaloriesInHeartRateZoneValue(); + } + + public static com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .CaloriesInHeartRateZoneValue + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CaloriesInHeartRateZoneValue parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .CaloriesInHeartRateZoneValue + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int CALORIES_IN_HEART_RATE_ZONES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List< + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .CaloriesInHeartRateZoneValue> + caloriesInHeartRateZones_; + + /** + * + * + *
+   * List of calories burned in each heart rate zone.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue.CaloriesInHeartRateZoneValue calories_in_heart_rate_zones = 1; + * + */ + @java.lang.Override + public java.util.List< + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .CaloriesInHeartRateZoneValue> + getCaloriesInHeartRateZonesList() { + return caloriesInHeartRateZones_; + } + + /** + * + * + *
+   * List of calories burned in each heart rate zone.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue.CaloriesInHeartRateZoneValue calories_in_heart_rate_zones = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .CaloriesInHeartRateZoneValueOrBuilder> + getCaloriesInHeartRateZonesOrBuilderList() { + return caloriesInHeartRateZones_; + } + + /** + * + * + *
+   * List of calories burned in each heart rate zone.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue.CaloriesInHeartRateZoneValue calories_in_heart_rate_zones = 1; + * + */ + @java.lang.Override + public int getCaloriesInHeartRateZonesCount() { + return caloriesInHeartRateZones_.size(); + } + + /** + * + * + *
+   * List of calories burned in each heart rate zone.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue.CaloriesInHeartRateZoneValue calories_in_heart_rate_zones = 1; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .CaloriesInHeartRateZoneValue + getCaloriesInHeartRateZones(int index) { + return caloriesInHeartRateZones_.get(index); + } + + /** + * + * + *
+   * List of calories burned in each heart rate zone.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue.CaloriesInHeartRateZoneValue calories_in_heart_rate_zones = 1; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .CaloriesInHeartRateZoneValueOrBuilder + getCaloriesInHeartRateZonesOrBuilder(int index) { + return caloriesInHeartRateZones_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < caloriesInHeartRateZones_.size(); i++) { + output.writeMessage(1, caloriesInHeartRateZones_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < caloriesInHeartRateZones_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, caloriesInHeartRateZones_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue other = + (com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue) obj; + + if (!getCaloriesInHeartRateZonesList().equals(other.getCaloriesInHeartRateZonesList())) + return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getCaloriesInHeartRateZonesCount() > 0) { + hash = (37 * hash) + CALORIES_IN_HEART_RATE_ZONES_FIELD_NUMBER; + hash = (53 * hash) + getCaloriesInHeartRateZonesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Represents the result of the rollup of the calories in heart rate zone data
+   * type.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue) + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_CaloriesInHeartRateZoneRollupValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_CaloriesInHeartRateZoneRollupValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue.class, + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue.Builder + .class); + } + + // Construct using + // com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (caloriesInHeartRateZonesBuilder_ == null) { + caloriesInHeartRateZones_ = java.util.Collections.emptyList(); + } else { + caloriesInHeartRateZones_ = null; + caloriesInHeartRateZonesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_CaloriesInHeartRateZoneRollupValue_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue build() { + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + buildPartial() { + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue result = + new com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue result) { + if (caloriesInHeartRateZonesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + caloriesInHeartRateZones_ = + java.util.Collections.unmodifiableList(caloriesInHeartRateZones_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.caloriesInHeartRateZones_ = caloriesInHeartRateZones_; + } else { + result.caloriesInHeartRateZones_ = caloriesInHeartRateZonesBuilder_.build(); + } + } + + private void buildPartial0( + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue) { + return mergeFrom( + (com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue other) { + if (other + == com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .getDefaultInstance()) return this; + if (caloriesInHeartRateZonesBuilder_ == null) { + if (!other.caloriesInHeartRateZones_.isEmpty()) { + if (caloriesInHeartRateZones_.isEmpty()) { + caloriesInHeartRateZones_ = other.caloriesInHeartRateZones_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureCaloriesInHeartRateZonesIsMutable(); + caloriesInHeartRateZones_.addAll(other.caloriesInHeartRateZones_); + } + onChanged(); + } + } else { + if (!other.caloriesInHeartRateZones_.isEmpty()) { + if (caloriesInHeartRateZonesBuilder_.isEmpty()) { + caloriesInHeartRateZonesBuilder_.dispose(); + caloriesInHeartRateZonesBuilder_ = null; + caloriesInHeartRateZones_ = other.caloriesInHeartRateZones_; + bitField0_ = (bitField0_ & ~0x00000001); + caloriesInHeartRateZonesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetCaloriesInHeartRateZonesFieldBuilder() + : null; + } else { + caloriesInHeartRateZonesBuilder_.addAllMessages(other.caloriesInHeartRateZones_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .CaloriesInHeartRateZoneValue + m = + input.readMessage( + com.google.devicesandservices.health.v4 + .CaloriesInHeartRateZoneRollupValue.CaloriesInHeartRateZoneValue + .parser(), + extensionRegistry); + if (caloriesInHeartRateZonesBuilder_ == null) { + ensureCaloriesInHeartRateZonesIsMutable(); + caloriesInHeartRateZones_.add(m); + } else { + caloriesInHeartRateZonesBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List< + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .CaloriesInHeartRateZoneValue> + caloriesInHeartRateZones_ = java.util.Collections.emptyList(); + + private void ensureCaloriesInHeartRateZonesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + caloriesInHeartRateZones_ = + new java.util.ArrayList< + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .CaloriesInHeartRateZoneValue>(caloriesInHeartRateZones_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .CaloriesInHeartRateZoneValue, + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .CaloriesInHeartRateZoneValue.Builder, + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .CaloriesInHeartRateZoneValueOrBuilder> + caloriesInHeartRateZonesBuilder_; + + /** + * + * + *
+     * List of calories burned in each heart rate zone.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue.CaloriesInHeartRateZoneValue calories_in_heart_rate_zones = 1; + * + */ + public java.util.List< + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .CaloriesInHeartRateZoneValue> + getCaloriesInHeartRateZonesList() { + if (caloriesInHeartRateZonesBuilder_ == null) { + return java.util.Collections.unmodifiableList(caloriesInHeartRateZones_); + } else { + return caloriesInHeartRateZonesBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * List of calories burned in each heart rate zone.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue.CaloriesInHeartRateZoneValue calories_in_heart_rate_zones = 1; + * + */ + public int getCaloriesInHeartRateZonesCount() { + if (caloriesInHeartRateZonesBuilder_ == null) { + return caloriesInHeartRateZones_.size(); + } else { + return caloriesInHeartRateZonesBuilder_.getCount(); + } + } + + /** + * + * + *
+     * List of calories burned in each heart rate zone.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue.CaloriesInHeartRateZoneValue calories_in_heart_rate_zones = 1; + * + */ + public com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .CaloriesInHeartRateZoneValue + getCaloriesInHeartRateZones(int index) { + if (caloriesInHeartRateZonesBuilder_ == null) { + return caloriesInHeartRateZones_.get(index); + } else { + return caloriesInHeartRateZonesBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * List of calories burned in each heart rate zone.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue.CaloriesInHeartRateZoneValue calories_in_heart_rate_zones = 1; + * + */ + public Builder setCaloriesInHeartRateZones( + int index, + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .CaloriesInHeartRateZoneValue + value) { + if (caloriesInHeartRateZonesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCaloriesInHeartRateZonesIsMutable(); + caloriesInHeartRateZones_.set(index, value); + onChanged(); + } else { + caloriesInHeartRateZonesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * List of calories burned in each heart rate zone.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue.CaloriesInHeartRateZoneValue calories_in_heart_rate_zones = 1; + * + */ + public Builder setCaloriesInHeartRateZones( + int index, + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .CaloriesInHeartRateZoneValue.Builder + builderForValue) { + if (caloriesInHeartRateZonesBuilder_ == null) { + ensureCaloriesInHeartRateZonesIsMutable(); + caloriesInHeartRateZones_.set(index, builderForValue.build()); + onChanged(); + } else { + caloriesInHeartRateZonesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * List of calories burned in each heart rate zone.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue.CaloriesInHeartRateZoneValue calories_in_heart_rate_zones = 1; + * + */ + public Builder addCaloriesInHeartRateZones( + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .CaloriesInHeartRateZoneValue + value) { + if (caloriesInHeartRateZonesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCaloriesInHeartRateZonesIsMutable(); + caloriesInHeartRateZones_.add(value); + onChanged(); + } else { + caloriesInHeartRateZonesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * List of calories burned in each heart rate zone.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue.CaloriesInHeartRateZoneValue calories_in_heart_rate_zones = 1; + * + */ + public Builder addCaloriesInHeartRateZones( + int index, + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .CaloriesInHeartRateZoneValue + value) { + if (caloriesInHeartRateZonesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCaloriesInHeartRateZonesIsMutable(); + caloriesInHeartRateZones_.add(index, value); + onChanged(); + } else { + caloriesInHeartRateZonesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * List of calories burned in each heart rate zone.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue.CaloriesInHeartRateZoneValue calories_in_heart_rate_zones = 1; + * + */ + public Builder addCaloriesInHeartRateZones( + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .CaloriesInHeartRateZoneValue.Builder + builderForValue) { + if (caloriesInHeartRateZonesBuilder_ == null) { + ensureCaloriesInHeartRateZonesIsMutable(); + caloriesInHeartRateZones_.add(builderForValue.build()); + onChanged(); + } else { + caloriesInHeartRateZonesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * List of calories burned in each heart rate zone.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue.CaloriesInHeartRateZoneValue calories_in_heart_rate_zones = 1; + * + */ + public Builder addCaloriesInHeartRateZones( + int index, + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .CaloriesInHeartRateZoneValue.Builder + builderForValue) { + if (caloriesInHeartRateZonesBuilder_ == null) { + ensureCaloriesInHeartRateZonesIsMutable(); + caloriesInHeartRateZones_.add(index, builderForValue.build()); + onChanged(); + } else { + caloriesInHeartRateZonesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * List of calories burned in each heart rate zone.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue.CaloriesInHeartRateZoneValue calories_in_heart_rate_zones = 1; + * + */ + public Builder addAllCaloriesInHeartRateZones( + java.lang.Iterable< + ? extends + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .CaloriesInHeartRateZoneValue> + values) { + if (caloriesInHeartRateZonesBuilder_ == null) { + ensureCaloriesInHeartRateZonesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, caloriesInHeartRateZones_); + onChanged(); + } else { + caloriesInHeartRateZonesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * List of calories burned in each heart rate zone.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue.CaloriesInHeartRateZoneValue calories_in_heart_rate_zones = 1; + * + */ + public Builder clearCaloriesInHeartRateZones() { + if (caloriesInHeartRateZonesBuilder_ == null) { + caloriesInHeartRateZones_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + caloriesInHeartRateZonesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * List of calories burned in each heart rate zone.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue.CaloriesInHeartRateZoneValue calories_in_heart_rate_zones = 1; + * + */ + public Builder removeCaloriesInHeartRateZones(int index) { + if (caloriesInHeartRateZonesBuilder_ == null) { + ensureCaloriesInHeartRateZonesIsMutable(); + caloriesInHeartRateZones_.remove(index); + onChanged(); + } else { + caloriesInHeartRateZonesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * List of calories burned in each heart rate zone.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue.CaloriesInHeartRateZoneValue calories_in_heart_rate_zones = 1; + * + */ + public com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .CaloriesInHeartRateZoneValue.Builder + getCaloriesInHeartRateZonesBuilder(int index) { + return internalGetCaloriesInHeartRateZonesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * List of calories burned in each heart rate zone.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue.CaloriesInHeartRateZoneValue calories_in_heart_rate_zones = 1; + * + */ + public com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .CaloriesInHeartRateZoneValueOrBuilder + getCaloriesInHeartRateZonesOrBuilder(int index) { + if (caloriesInHeartRateZonesBuilder_ == null) { + return caloriesInHeartRateZones_.get(index); + } else { + return caloriesInHeartRateZonesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * List of calories burned in each heart rate zone.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue.CaloriesInHeartRateZoneValue calories_in_heart_rate_zones = 1; + * + */ + public java.util.List< + ? extends + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .CaloriesInHeartRateZoneValueOrBuilder> + getCaloriesInHeartRateZonesOrBuilderList() { + if (caloriesInHeartRateZonesBuilder_ != null) { + return caloriesInHeartRateZonesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(caloriesInHeartRateZones_); + } + } + + /** + * + * + *
+     * List of calories burned in each heart rate zone.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue.CaloriesInHeartRateZoneValue calories_in_heart_rate_zones = 1; + * + */ + public com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .CaloriesInHeartRateZoneValue.Builder + addCaloriesInHeartRateZonesBuilder() { + return internalGetCaloriesInHeartRateZonesFieldBuilder() + .addBuilder( + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .CaloriesInHeartRateZoneValue.getDefaultInstance()); + } + + /** + * + * + *
+     * List of calories burned in each heart rate zone.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue.CaloriesInHeartRateZoneValue calories_in_heart_rate_zones = 1; + * + */ + public com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .CaloriesInHeartRateZoneValue.Builder + addCaloriesInHeartRateZonesBuilder(int index) { + return internalGetCaloriesInHeartRateZonesFieldBuilder() + .addBuilder( + index, + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .CaloriesInHeartRateZoneValue.getDefaultInstance()); + } + + /** + * + * + *
+     * List of calories burned in each heart rate zone.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue.CaloriesInHeartRateZoneValue calories_in_heart_rate_zones = 1; + * + */ + public java.util.List< + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .CaloriesInHeartRateZoneValue.Builder> + getCaloriesInHeartRateZonesBuilderList() { + return internalGetCaloriesInHeartRateZonesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .CaloriesInHeartRateZoneValue, + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .CaloriesInHeartRateZoneValue.Builder, + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .CaloriesInHeartRateZoneValueOrBuilder> + internalGetCaloriesInHeartRateZonesFieldBuilder() { + if (caloriesInHeartRateZonesBuilder_ == null) { + caloriesInHeartRateZonesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .CaloriesInHeartRateZoneValue, + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .CaloriesInHeartRateZoneValue.Builder, + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .CaloriesInHeartRateZoneValueOrBuilder>( + caloriesInHeartRateZones_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + caloriesInHeartRateZones_ = null; + } + return caloriesInHeartRateZonesBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue) + private static final com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue(); + } + + public static com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CaloriesInHeartRateZoneRollupValue parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/CaloriesInHeartRateZoneRollupValueOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/CaloriesInHeartRateZoneRollupValueOrBuilder.java new file mode 100644 index 000000000000..5ae1f3c6d395 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/CaloriesInHeartRateZoneRollupValueOrBuilder.java @@ -0,0 +1,104 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface CaloriesInHeartRateZoneRollupValueOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * List of calories burned in each heart rate zone.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue.CaloriesInHeartRateZoneValue calories_in_heart_rate_zones = 1; + * + */ + java.util.List< + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .CaloriesInHeartRateZoneValue> + getCaloriesInHeartRateZonesList(); + + /** + * + * + *
+   * List of calories burned in each heart rate zone.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue.CaloriesInHeartRateZoneValue calories_in_heart_rate_zones = 1; + * + */ + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .CaloriesInHeartRateZoneValue + getCaloriesInHeartRateZones(int index); + + /** + * + * + *
+   * List of calories burned in each heart rate zone.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue.CaloriesInHeartRateZoneValue calories_in_heart_rate_zones = 1; + * + */ + int getCaloriesInHeartRateZonesCount(); + + /** + * + * + *
+   * List of calories burned in each heart rate zone.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue.CaloriesInHeartRateZoneValue calories_in_heart_rate_zones = 1; + * + */ + java.util.List< + ? extends + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .CaloriesInHeartRateZoneValueOrBuilder> + getCaloriesInHeartRateZonesOrBuilderList(); + + /** + * + * + *
+   * List of calories burned in each heart rate zone.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue.CaloriesInHeartRateZoneValue calories_in_heart_rate_zones = 1; + * + */ + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .CaloriesInHeartRateZoneValueOrBuilder + getCaloriesInHeartRateZonesOrBuilder(int index); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/CivilDateTime.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/CivilDateTime.java new file mode 100644 index 000000000000..4da60d957d7b --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/CivilDateTime.java @@ -0,0 +1,973 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_coordinates.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * Civil time representation similar to
+ * [google.type.DateTime][google.type.DateTime], but ensures that neither the
+ * timezone nor the UTC offset can be set to avoid confusion between civil and
+ * physical time queries.
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.CivilDateTime} + */ +@com.google.protobuf.Generated +public final class CivilDateTime extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.CivilDateTime) + CivilDateTimeOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CivilDateTime"); + } + + // Use CivilDateTime.newBuilder() to construct. + private CivilDateTime(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private CivilDateTime() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataCoordinatesProto + .internal_static_google_devicesandservices_health_v4_CivilDateTime_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataCoordinatesProto + .internal_static_google_devicesandservices_health_v4_CivilDateTime_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.CivilDateTime.class, + com.google.devicesandservices.health.v4.CivilDateTime.Builder.class); + } + + private int bitField0_; + public static final int DATE_FIELD_NUMBER = 1; + private com.google.type.Date date_; + + /** + * + * + *
+   * Required. Calendar date.
+   * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the date field is set. + */ + @java.lang.Override + public boolean hasDate() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. Calendar date.
+   * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The date. + */ + @java.lang.Override + public com.google.type.Date getDate() { + return date_ == null ? com.google.type.Date.getDefaultInstance() : date_; + } + + /** + * + * + *
+   * Required. Calendar date.
+   * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.type.DateOrBuilder getDateOrBuilder() { + return date_ == null ? com.google.type.Date.getDefaultInstance() : date_; + } + + public static final int TIME_FIELD_NUMBER = 2; + private com.google.type.TimeOfDay time_; + + /** + * + * + *
+   * Optional. Time of day. Defaults to the start of the day, at midnight if
+   * omitted.
+   * 
+ * + * .google.type.TimeOfDay time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the time field is set. + */ + @java.lang.Override + public boolean hasTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Optional. Time of day. Defaults to the start of the day, at midnight if
+   * omitted.
+   * 
+ * + * .google.type.TimeOfDay time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The time. + */ + @java.lang.Override + public com.google.type.TimeOfDay getTime() { + return time_ == null ? com.google.type.TimeOfDay.getDefaultInstance() : time_; + } + + /** + * + * + *
+   * Optional. Time of day. Defaults to the start of the day, at midnight if
+   * omitted.
+   * 
+ * + * .google.type.TimeOfDay time = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public com.google.type.TimeOfDayOrBuilder getTimeOrBuilder() { + return time_ == null ? com.google.type.TimeOfDay.getDefaultInstance() : time_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getDate()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getDate()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getTime()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.CivilDateTime)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.CivilDateTime other = + (com.google.devicesandservices.health.v4.CivilDateTime) obj; + + if (hasDate() != other.hasDate()) return false; + if (hasDate()) { + if (!getDate().equals(other.getDate())) return false; + } + if (hasTime() != other.hasTime()) return false; + if (hasTime()) { + if (!getTime().equals(other.getTime())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasDate()) { + hash = (37 * hash) + DATE_FIELD_NUMBER; + hash = (53 * hash) + getDate().hashCode(); + } + if (hasTime()) { + hash = (37 * hash) + TIME_FIELD_NUMBER; + hash = (53 * hash) + getTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.CivilDateTime parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.CivilDateTime parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.CivilDateTime parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.CivilDateTime parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.CivilDateTime parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.CivilDateTime parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.CivilDateTime parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.CivilDateTime parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.CivilDateTime parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.CivilDateTime parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.CivilDateTime parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.CivilDateTime parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.CivilDateTime prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Civil time representation similar to
+   * [google.type.DateTime][google.type.DateTime], but ensures that neither the
+   * timezone nor the UTC offset can be set to avoid confusion between civil and
+   * physical time queries.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.CivilDateTime} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.CivilDateTime) + com.google.devicesandservices.health.v4.CivilDateTimeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataCoordinatesProto + .internal_static_google_devicesandservices_health_v4_CivilDateTime_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataCoordinatesProto + .internal_static_google_devicesandservices_health_v4_CivilDateTime_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.CivilDateTime.class, + com.google.devicesandservices.health.v4.CivilDateTime.Builder.class); + } + + // Construct using com.google.devicesandservices.health.v4.CivilDateTime.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetDateFieldBuilder(); + internalGetTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + date_ = null; + if (dateBuilder_ != null) { + dateBuilder_.dispose(); + dateBuilder_ = null; + } + time_ = null; + if (timeBuilder_ != null) { + timeBuilder_.dispose(); + timeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataCoordinatesProto + .internal_static_google_devicesandservices_health_v4_CivilDateTime_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.CivilDateTime getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.CivilDateTime.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.CivilDateTime build() { + com.google.devicesandservices.health.v4.CivilDateTime result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.CivilDateTime buildPartial() { + com.google.devicesandservices.health.v4.CivilDateTime result = + new com.google.devicesandservices.health.v4.CivilDateTime(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.devicesandservices.health.v4.CivilDateTime result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.date_ = dateBuilder_ == null ? date_ : dateBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.time_ = timeBuilder_ == null ? time_ : timeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.CivilDateTime) { + return mergeFrom((com.google.devicesandservices.health.v4.CivilDateTime) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.devicesandservices.health.v4.CivilDateTime other) { + if (other == com.google.devicesandservices.health.v4.CivilDateTime.getDefaultInstance()) + return this; + if (other.hasDate()) { + mergeDate(other.getDate()); + } + if (other.hasTime()) { + mergeTime(other.getTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(internalGetDateFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(internalGetTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.type.Date date_; + private com.google.protobuf.SingleFieldBuilder< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> + dateBuilder_; + + /** + * + * + *
+     * Required. Calendar date.
+     * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the date field is set. + */ + public boolean hasDate() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. Calendar date.
+     * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The date. + */ + public com.google.type.Date getDate() { + if (dateBuilder_ == null) { + return date_ == null ? com.google.type.Date.getDefaultInstance() : date_; + } else { + return dateBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. Calendar date.
+     * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setDate(com.google.type.Date value) { + if (dateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + date_ = value; + } else { + dateBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Calendar date.
+     * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setDate(com.google.type.Date.Builder builderForValue) { + if (dateBuilder_ == null) { + date_ = builderForValue.build(); + } else { + dateBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Calendar date.
+     * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeDate(com.google.type.Date value) { + if (dateBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && date_ != null + && date_ != com.google.type.Date.getDefaultInstance()) { + getDateBuilder().mergeFrom(value); + } else { + date_ = value; + } + } else { + dateBuilder_.mergeFrom(value); + } + if (date_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. Calendar date.
+     * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearDate() { + bitField0_ = (bitField0_ & ~0x00000001); + date_ = null; + if (dateBuilder_ != null) { + dateBuilder_.dispose(); + dateBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Calendar date.
+     * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.type.Date.Builder getDateBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetDateFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. Calendar date.
+     * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.type.DateOrBuilder getDateOrBuilder() { + if (dateBuilder_ != null) { + return dateBuilder_.getMessageOrBuilder(); + } else { + return date_ == null ? com.google.type.Date.getDefaultInstance() : date_; + } + } + + /** + * + * + *
+     * Required. Calendar date.
+     * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> + internalGetDateFieldBuilder() { + if (dateBuilder_ == null) { + dateBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder>( + getDate(), getParentForChildren(), isClean()); + date_ = null; + } + return dateBuilder_; + } + + private com.google.type.TimeOfDay time_; + private com.google.protobuf.SingleFieldBuilder< + com.google.type.TimeOfDay, + com.google.type.TimeOfDay.Builder, + com.google.type.TimeOfDayOrBuilder> + timeBuilder_; + + /** + * + * + *
+     * Optional. Time of day. Defaults to the start of the day, at midnight if
+     * omitted.
+     * 
+ * + * .google.type.TimeOfDay time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the time field is set. + */ + public boolean hasTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Optional. Time of day. Defaults to the start of the day, at midnight if
+     * omitted.
+     * 
+ * + * .google.type.TimeOfDay time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The time. + */ + public com.google.type.TimeOfDay getTime() { + if (timeBuilder_ == null) { + return time_ == null ? com.google.type.TimeOfDay.getDefaultInstance() : time_; + } else { + return timeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. Time of day. Defaults to the start of the day, at midnight if
+     * omitted.
+     * 
+ * + * .google.type.TimeOfDay time = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder setTime(com.google.type.TimeOfDay value) { + if (timeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + time_ = value; + } else { + timeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Time of day. Defaults to the start of the day, at midnight if
+     * omitted.
+     * 
+ * + * .google.type.TimeOfDay time = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder setTime(com.google.type.TimeOfDay.Builder builderForValue) { + if (timeBuilder_ == null) { + time_ = builderForValue.build(); + } else { + timeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Time of day. Defaults to the start of the day, at midnight if
+     * omitted.
+     * 
+ * + * .google.type.TimeOfDay time = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder mergeTime(com.google.type.TimeOfDay value) { + if (timeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && time_ != null + && time_ != com.google.type.TimeOfDay.getDefaultInstance()) { + getTimeBuilder().mergeFrom(value); + } else { + time_ = value; + } + } else { + timeBuilder_.mergeFrom(value); + } + if (time_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. Time of day. Defaults to the start of the day, at midnight if
+     * omitted.
+     * 
+ * + * .google.type.TimeOfDay time = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder clearTime() { + bitField0_ = (bitField0_ & ~0x00000002); + time_ = null; + if (timeBuilder_ != null) { + timeBuilder_.dispose(); + timeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Time of day. Defaults to the start of the day, at midnight if
+     * omitted.
+     * 
+ * + * .google.type.TimeOfDay time = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + public com.google.type.TimeOfDay.Builder getTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Time of day. Defaults to the start of the day, at midnight if
+     * omitted.
+     * 
+ * + * .google.type.TimeOfDay time = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + public com.google.type.TimeOfDayOrBuilder getTimeOrBuilder() { + if (timeBuilder_ != null) { + return timeBuilder_.getMessageOrBuilder(); + } else { + return time_ == null ? com.google.type.TimeOfDay.getDefaultInstance() : time_; + } + } + + /** + * + * + *
+     * Optional. Time of day. Defaults to the start of the day, at midnight if
+     * omitted.
+     * 
+ * + * .google.type.TimeOfDay time = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.type.TimeOfDay, + com.google.type.TimeOfDay.Builder, + com.google.type.TimeOfDayOrBuilder> + internalGetTimeFieldBuilder() { + if (timeBuilder_ == null) { + timeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.type.TimeOfDay, + com.google.type.TimeOfDay.Builder, + com.google.type.TimeOfDayOrBuilder>(getTime(), getParentForChildren(), isClean()); + time_ = null; + } + return timeBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.CivilDateTime) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.CivilDateTime) + private static final com.google.devicesandservices.health.v4.CivilDateTime DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.CivilDateTime(); + } + + public static com.google.devicesandservices.health.v4.CivilDateTime getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CivilDateTime parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.CivilDateTime getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/CivilDateTimeOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/CivilDateTimeOrBuilder.java new file mode 100644 index 000000000000..95a86867d1a8 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/CivilDateTimeOrBuilder.java @@ -0,0 +1,105 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_coordinates.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface CivilDateTimeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.CivilDateTime) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Calendar date.
+   * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the date field is set. + */ + boolean hasDate(); + + /** + * + * + *
+   * Required. Calendar date.
+   * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The date. + */ + com.google.type.Date getDate(); + + /** + * + * + *
+   * Required. Calendar date.
+   * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.type.DateOrBuilder getDateOrBuilder(); + + /** + * + * + *
+   * Optional. Time of day. Defaults to the start of the day, at midnight if
+   * omitted.
+   * 
+ * + * .google.type.TimeOfDay time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the time field is set. + */ + boolean hasTime(); + + /** + * + * + *
+   * Optional. Time of day. Defaults to the start of the day, at midnight if
+   * omitted.
+   * 
+ * + * .google.type.TimeOfDay time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The time. + */ + com.google.type.TimeOfDay getTime(); + + /** + * + * + *
+   * Optional. Time of day. Defaults to the start of the day, at midnight if
+   * omitted.
+   * 
+ * + * .google.type.TimeOfDay time = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + com.google.type.TimeOfDayOrBuilder getTimeOrBuilder(); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/CivilTimeInterval.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/CivilTimeInterval.java new file mode 100644 index 000000000000..e784520519a8 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/CivilTimeInterval.java @@ -0,0 +1,1031 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_coordinates.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * Counterpart of [google.type.Interval][google.type.Interval], but using
+ * [CivilDateTime][google.devicesandservices.health.v4.CivilDateTime].
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.CivilTimeInterval} + */ +@com.google.protobuf.Generated +public final class CivilTimeInterval extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.CivilTimeInterval) + CivilTimeIntervalOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CivilTimeInterval"); + } + + // Use CivilTimeInterval.newBuilder() to construct. + private CivilTimeInterval(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private CivilTimeInterval() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataCoordinatesProto + .internal_static_google_devicesandservices_health_v4_CivilTimeInterval_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataCoordinatesProto + .internal_static_google_devicesandservices_health_v4_CivilTimeInterval_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.CivilTimeInterval.class, + com.google.devicesandservices.health.v4.CivilTimeInterval.Builder.class); + } + + private int bitField0_; + public static final int START_FIELD_NUMBER = 1; + private com.google.devicesandservices.health.v4.CivilDateTime start_; + + /** + * + * + *
+   * Required. The inclusive start of the range.
+   * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime start = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the start field is set. + */ + @java.lang.Override + public boolean hasStart() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The inclusive start of the range.
+   * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime start = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The start. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.CivilDateTime getStart() { + return start_ == null + ? com.google.devicesandservices.health.v4.CivilDateTime.getDefaultInstance() + : start_; + } + + /** + * + * + *
+   * Required. The inclusive start of the range.
+   * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime start = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.CivilDateTimeOrBuilder getStartOrBuilder() { + return start_ == null + ? com.google.devicesandservices.health.v4.CivilDateTime.getDefaultInstance() + : start_; + } + + public static final int END_FIELD_NUMBER = 2; + private com.google.devicesandservices.health.v4.CivilDateTime end_; + + /** + * + * + *
+   * Required. The exclusive end of the range.
+   * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime end = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the end field is set. + */ + @java.lang.Override + public boolean hasEnd() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Required. The exclusive end of the range.
+   * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime end = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The end. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.CivilDateTime getEnd() { + return end_ == null + ? com.google.devicesandservices.health.v4.CivilDateTime.getDefaultInstance() + : end_; + } + + /** + * + * + *
+   * Required. The exclusive end of the range.
+   * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime end = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.CivilDateTimeOrBuilder getEndOrBuilder() { + return end_ == null + ? com.google.devicesandservices.health.v4.CivilDateTime.getDefaultInstance() + : end_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getStart()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getEnd()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getStart()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEnd()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.CivilTimeInterval)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.CivilTimeInterval other = + (com.google.devicesandservices.health.v4.CivilTimeInterval) obj; + + if (hasStart() != other.hasStart()) return false; + if (hasStart()) { + if (!getStart().equals(other.getStart())) return false; + } + if (hasEnd() != other.hasEnd()) return false; + if (hasEnd()) { + if (!getEnd().equals(other.getEnd())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasStart()) { + hash = (37 * hash) + START_FIELD_NUMBER; + hash = (53 * hash) + getStart().hashCode(); + } + if (hasEnd()) { + hash = (37 * hash) + END_FIELD_NUMBER; + hash = (53 * hash) + getEnd().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.CivilTimeInterval parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.CivilTimeInterval parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.CivilTimeInterval parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.CivilTimeInterval parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.CivilTimeInterval parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.CivilTimeInterval parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.CivilTimeInterval parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.CivilTimeInterval parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.CivilTimeInterval parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.CivilTimeInterval parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.CivilTimeInterval parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.CivilTimeInterval parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.CivilTimeInterval prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Counterpart of [google.type.Interval][google.type.Interval], but using
+   * [CivilDateTime][google.devicesandservices.health.v4.CivilDateTime].
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.CivilTimeInterval} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.CivilTimeInterval) + com.google.devicesandservices.health.v4.CivilTimeIntervalOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataCoordinatesProto + .internal_static_google_devicesandservices_health_v4_CivilTimeInterval_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataCoordinatesProto + .internal_static_google_devicesandservices_health_v4_CivilTimeInterval_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.CivilTimeInterval.class, + com.google.devicesandservices.health.v4.CivilTimeInterval.Builder.class); + } + + // Construct using com.google.devicesandservices.health.v4.CivilTimeInterval.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetStartFieldBuilder(); + internalGetEndFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + start_ = null; + if (startBuilder_ != null) { + startBuilder_.dispose(); + startBuilder_ = null; + } + end_ = null; + if (endBuilder_ != null) { + endBuilder_.dispose(); + endBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataCoordinatesProto + .internal_static_google_devicesandservices_health_v4_CivilTimeInterval_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.CivilTimeInterval getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.CivilTimeInterval.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.CivilTimeInterval build() { + com.google.devicesandservices.health.v4.CivilTimeInterval result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.CivilTimeInterval buildPartial() { + com.google.devicesandservices.health.v4.CivilTimeInterval result = + new com.google.devicesandservices.health.v4.CivilTimeInterval(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.devicesandservices.health.v4.CivilTimeInterval result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.start_ = startBuilder_ == null ? start_ : startBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.end_ = endBuilder_ == null ? end_ : endBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.CivilTimeInterval) { + return mergeFrom((com.google.devicesandservices.health.v4.CivilTimeInterval) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.devicesandservices.health.v4.CivilTimeInterval other) { + if (other == com.google.devicesandservices.health.v4.CivilTimeInterval.getDefaultInstance()) + return this; + if (other.hasStart()) { + mergeStart(other.getStart()); + } + if (other.hasEnd()) { + mergeEnd(other.getEnd()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(internalGetStartFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(internalGetEndFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.devicesandservices.health.v4.CivilDateTime start_; + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.CivilDateTime, + com.google.devicesandservices.health.v4.CivilDateTime.Builder, + com.google.devicesandservices.health.v4.CivilDateTimeOrBuilder> + startBuilder_; + + /** + * + * + *
+     * Required. The inclusive start of the range.
+     * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime start = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the start field is set. + */ + public boolean hasStart() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. The inclusive start of the range.
+     * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime start = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The start. + */ + public com.google.devicesandservices.health.v4.CivilDateTime getStart() { + if (startBuilder_ == null) { + return start_ == null + ? com.google.devicesandservices.health.v4.CivilDateTime.getDefaultInstance() + : start_; + } else { + return startBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The inclusive start of the range.
+     * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime start = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setStart(com.google.devicesandservices.health.v4.CivilDateTime value) { + if (startBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + start_ = value; + } else { + startBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The inclusive start of the range.
+     * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime start = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setStart( + com.google.devicesandservices.health.v4.CivilDateTime.Builder builderForValue) { + if (startBuilder_ == null) { + start_ = builderForValue.build(); + } else { + startBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The inclusive start of the range.
+     * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime start = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeStart(com.google.devicesandservices.health.v4.CivilDateTime value) { + if (startBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && start_ != null + && start_ + != com.google.devicesandservices.health.v4.CivilDateTime.getDefaultInstance()) { + getStartBuilder().mergeFrom(value); + } else { + start_ = value; + } + } else { + startBuilder_.mergeFrom(value); + } + if (start_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The inclusive start of the range.
+     * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime start = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearStart() { + bitField0_ = (bitField0_ & ~0x00000001); + start_ = null; + if (startBuilder_ != null) { + startBuilder_.dispose(); + startBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The inclusive start of the range.
+     * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime start = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.devicesandservices.health.v4.CivilDateTime.Builder getStartBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetStartFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The inclusive start of the range.
+     * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime start = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.devicesandservices.health.v4.CivilDateTimeOrBuilder getStartOrBuilder() { + if (startBuilder_ != null) { + return startBuilder_.getMessageOrBuilder(); + } else { + return start_ == null + ? com.google.devicesandservices.health.v4.CivilDateTime.getDefaultInstance() + : start_; + } + } + + /** + * + * + *
+     * Required. The inclusive start of the range.
+     * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime start = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.CivilDateTime, + com.google.devicesandservices.health.v4.CivilDateTime.Builder, + com.google.devicesandservices.health.v4.CivilDateTimeOrBuilder> + internalGetStartFieldBuilder() { + if (startBuilder_ == null) { + startBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.CivilDateTime, + com.google.devicesandservices.health.v4.CivilDateTime.Builder, + com.google.devicesandservices.health.v4.CivilDateTimeOrBuilder>( + getStart(), getParentForChildren(), isClean()); + start_ = null; + } + return startBuilder_; + } + + private com.google.devicesandservices.health.v4.CivilDateTime end_; + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.CivilDateTime, + com.google.devicesandservices.health.v4.CivilDateTime.Builder, + com.google.devicesandservices.health.v4.CivilDateTimeOrBuilder> + endBuilder_; + + /** + * + * + *
+     * Required. The exclusive end of the range.
+     * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime end = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the end field is set. + */ + public boolean hasEnd() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Required. The exclusive end of the range.
+     * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime end = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The end. + */ + public com.google.devicesandservices.health.v4.CivilDateTime getEnd() { + if (endBuilder_ == null) { + return end_ == null + ? com.google.devicesandservices.health.v4.CivilDateTime.getDefaultInstance() + : end_; + } else { + return endBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The exclusive end of the range.
+     * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime end = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setEnd(com.google.devicesandservices.health.v4.CivilDateTime value) { + if (endBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + end_ = value; + } else { + endBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The exclusive end of the range.
+     * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime end = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setEnd( + com.google.devicesandservices.health.v4.CivilDateTime.Builder builderForValue) { + if (endBuilder_ == null) { + end_ = builderForValue.build(); + } else { + endBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The exclusive end of the range.
+     * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime end = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeEnd(com.google.devicesandservices.health.v4.CivilDateTime value) { + if (endBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && end_ != null + && end_ != com.google.devicesandservices.health.v4.CivilDateTime.getDefaultInstance()) { + getEndBuilder().mergeFrom(value); + } else { + end_ = value; + } + } else { + endBuilder_.mergeFrom(value); + } + if (end_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The exclusive end of the range.
+     * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime end = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearEnd() { + bitField0_ = (bitField0_ & ~0x00000002); + end_ = null; + if (endBuilder_ != null) { + endBuilder_.dispose(); + endBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The exclusive end of the range.
+     * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime end = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.devicesandservices.health.v4.CivilDateTime.Builder getEndBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetEndFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The exclusive end of the range.
+     * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime end = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.devicesandservices.health.v4.CivilDateTimeOrBuilder getEndOrBuilder() { + if (endBuilder_ != null) { + return endBuilder_.getMessageOrBuilder(); + } else { + return end_ == null + ? com.google.devicesandservices.health.v4.CivilDateTime.getDefaultInstance() + : end_; + } + } + + /** + * + * + *
+     * Required. The exclusive end of the range.
+     * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime end = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.CivilDateTime, + com.google.devicesandservices.health.v4.CivilDateTime.Builder, + com.google.devicesandservices.health.v4.CivilDateTimeOrBuilder> + internalGetEndFieldBuilder() { + if (endBuilder_ == null) { + endBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.CivilDateTime, + com.google.devicesandservices.health.v4.CivilDateTime.Builder, + com.google.devicesandservices.health.v4.CivilDateTimeOrBuilder>( + getEnd(), getParentForChildren(), isClean()); + end_ = null; + } + return endBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.CivilTimeInterval) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.CivilTimeInterval) + private static final com.google.devicesandservices.health.v4.CivilTimeInterval DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.CivilTimeInterval(); + } + + public static com.google.devicesandservices.health.v4.CivilTimeInterval getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CivilTimeInterval parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.CivilTimeInterval getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/CivilTimeIntervalOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/CivilTimeIntervalOrBuilder.java new file mode 100644 index 000000000000..84a1c9661745 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/CivilTimeIntervalOrBuilder.java @@ -0,0 +1,114 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_coordinates.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface CivilTimeIntervalOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.CivilTimeInterval) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The inclusive start of the range.
+   * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime start = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the start field is set. + */ + boolean hasStart(); + + /** + * + * + *
+   * Required. The inclusive start of the range.
+   * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime start = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The start. + */ + com.google.devicesandservices.health.v4.CivilDateTime getStart(); + + /** + * + * + *
+   * Required. The inclusive start of the range.
+   * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime start = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.devicesandservices.health.v4.CivilDateTimeOrBuilder getStartOrBuilder(); + + /** + * + * + *
+   * Required. The exclusive end of the range.
+   * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime end = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the end field is set. + */ + boolean hasEnd(); + + /** + * + * + *
+   * Required. The exclusive end of the range.
+   * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime end = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The end. + */ + com.google.devicesandservices.health.v4.CivilDateTime getEnd(); + + /** + * + * + *
+   * Required. The exclusive end of the range.
+   * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime end = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.devicesandservices.health.v4.CivilDateTimeOrBuilder getEndOrBuilder(); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/CreateDataPointOperationMetadata.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/CreateDataPointOperationMetadata.java new file mode 100644 index 000000000000..07e121f6ce0c --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/CreateDataPointOperationMetadata.java @@ -0,0 +1,413 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_points.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * Metadata for a create data point operation.
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.CreateDataPointOperationMetadata} + */ +@com.google.protobuf.Generated +public final class CreateDataPointOperationMetadata extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.CreateDataPointOperationMetadata) + CreateDataPointOperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CreateDataPointOperationMetadata"); + } + + // Use CreateDataPointOperationMetadata.newBuilder() to construct. + private CreateDataPointOperationMetadata( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private CreateDataPointOperationMetadata() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_CreateDataPointOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_CreateDataPointOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.CreateDataPointOperationMetadata.class, + com.google.devicesandservices.health.v4.CreateDataPointOperationMetadata.Builder.class); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.devicesandservices.health.v4.CreateDataPointOperationMetadata)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.CreateDataPointOperationMetadata other = + (com.google.devicesandservices.health.v4.CreateDataPointOperationMetadata) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.CreateDataPointOperationMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.CreateDataPointOperationMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.CreateDataPointOperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.CreateDataPointOperationMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.CreateDataPointOperationMetadata parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.CreateDataPointOperationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.CreateDataPointOperationMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.CreateDataPointOperationMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.CreateDataPointOperationMetadata + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.CreateDataPointOperationMetadata + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.CreateDataPointOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.CreateDataPointOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.CreateDataPointOperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Metadata for a create data point operation.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.CreateDataPointOperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.CreateDataPointOperationMetadata) + com.google.devicesandservices.health.v4.CreateDataPointOperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_CreateDataPointOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_CreateDataPointOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.CreateDataPointOperationMetadata.class, + com.google.devicesandservices.health.v4.CreateDataPointOperationMetadata.Builder + .class); + } + + // Construct using + // com.google.devicesandservices.health.v4.CreateDataPointOperationMetadata.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_CreateDataPointOperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.CreateDataPointOperationMetadata + getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.CreateDataPointOperationMetadata + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.CreateDataPointOperationMetadata build() { + com.google.devicesandservices.health.v4.CreateDataPointOperationMetadata result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.CreateDataPointOperationMetadata buildPartial() { + com.google.devicesandservices.health.v4.CreateDataPointOperationMetadata result = + new com.google.devicesandservices.health.v4.CreateDataPointOperationMetadata(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.devicesandservices.health.v4.CreateDataPointOperationMetadata) { + return mergeFrom( + (com.google.devicesandservices.health.v4.CreateDataPointOperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.devicesandservices.health.v4.CreateDataPointOperationMetadata other) { + if (other + == com.google.devicesandservices.health.v4.CreateDataPointOperationMetadata + .getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.CreateDataPointOperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.CreateDataPointOperationMetadata) + private static final com.google.devicesandservices.health.v4.CreateDataPointOperationMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.devicesandservices.health.v4.CreateDataPointOperationMetadata(); + } + + public static com.google.devicesandservices.health.v4.CreateDataPointOperationMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateDataPointOperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.CreateDataPointOperationMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/CreateDataPointOperationMetadataOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/CreateDataPointOperationMetadataOrBuilder.java new file mode 100644 index 000000000000..cd9c6ca68417 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/CreateDataPointOperationMetadataOrBuilder.java @@ -0,0 +1,27 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_points.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface CreateDataPointOperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.CreateDataPointOperationMetadata) + com.google.protobuf.MessageOrBuilder {} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/CreateDataPointRequest.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/CreateDataPointRequest.java new file mode 100644 index 000000000000..3a6a50114ac9 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/CreateDataPointRequest.java @@ -0,0 +1,942 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_points.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * Request to create an identifiable data point.
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.CreateDataPointRequest} + */ +@com.google.protobuf.Generated +public final class CreateDataPointRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.CreateDataPointRequest) + CreateDataPointRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CreateDataPointRequest"); + } + + // Use CreateDataPointRequest.newBuilder() to construct. + private CreateDataPointRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private CreateDataPointRequest() { + parent_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_CreateDataPointRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_CreateDataPointRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.CreateDataPointRequest.class, + com.google.devicesandservices.health.v4.CreateDataPointRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The parent resource name where the data point will be created.
+   * Format: `users/{user}/dataTypes/{data_type}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The parent resource name where the data point will be created.
+   * Format: `users/{user}/dataTypes/{data_type}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATA_POINT_FIELD_NUMBER = 2; + private com.google.devicesandservices.health.v4.DataPoint dataPoint_; + + /** + * + * + *
+   * Required. The data point to create.
+   * 
+ * + * + * .google.devicesandservices.health.v4.DataPoint data_point = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the dataPoint field is set. + */ + @java.lang.Override + public boolean hasDataPoint() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The data point to create.
+   * 
+ * + * + * .google.devicesandservices.health.v4.DataPoint data_point = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The dataPoint. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DataPoint getDataPoint() { + return dataPoint_ == null + ? com.google.devicesandservices.health.v4.DataPoint.getDefaultInstance() + : dataPoint_; + } + + /** + * + * + *
+   * Required. The data point to create.
+   * 
+ * + * + * .google.devicesandservices.health.v4.DataPoint data_point = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DataPointOrBuilder getDataPointOrBuilder() { + return dataPoint_ == null + ? com.google.devicesandservices.health.v4.DataPoint.getDefaultInstance() + : dataPoint_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getDataPoint()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDataPoint()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.CreateDataPointRequest)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.CreateDataPointRequest other = + (com.google.devicesandservices.health.v4.CreateDataPointRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasDataPoint() != other.hasDataPoint()) return false; + if (hasDataPoint()) { + if (!getDataPoint().equals(other.getDataPoint())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasDataPoint()) { + hash = (37 * hash) + DATA_POINT_FIELD_NUMBER; + hash = (53 * hash) + getDataPoint().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.CreateDataPointRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.CreateDataPointRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.CreateDataPointRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.CreateDataPointRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.CreateDataPointRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.CreateDataPointRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.CreateDataPointRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.CreateDataPointRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.CreateDataPointRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.CreateDataPointRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.CreateDataPointRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.CreateDataPointRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.CreateDataPointRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request to create an identifiable data point.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.CreateDataPointRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.CreateDataPointRequest) + com.google.devicesandservices.health.v4.CreateDataPointRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_CreateDataPointRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_CreateDataPointRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.CreateDataPointRequest.class, + com.google.devicesandservices.health.v4.CreateDataPointRequest.Builder.class); + } + + // Construct using com.google.devicesandservices.health.v4.CreateDataPointRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetDataPointFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + dataPoint_ = null; + if (dataPointBuilder_ != null) { + dataPointBuilder_.dispose(); + dataPointBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_CreateDataPointRequest_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.CreateDataPointRequest + getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.CreateDataPointRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.CreateDataPointRequest build() { + com.google.devicesandservices.health.v4.CreateDataPointRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.CreateDataPointRequest buildPartial() { + com.google.devicesandservices.health.v4.CreateDataPointRequest result = + new com.google.devicesandservices.health.v4.CreateDataPointRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.devicesandservices.health.v4.CreateDataPointRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.dataPoint_ = dataPointBuilder_ == null ? dataPoint_ : dataPointBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.CreateDataPointRequest) { + return mergeFrom((com.google.devicesandservices.health.v4.CreateDataPointRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.devicesandservices.health.v4.CreateDataPointRequest other) { + if (other + == com.google.devicesandservices.health.v4.CreateDataPointRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasDataPoint()) { + mergeDataPoint(other.getDataPoint()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetDataPointFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. The parent resource name where the data point will be created.
+     * Format: `users/{user}/dataTypes/{data_type}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The parent resource name where the data point will be created.
+     * Format: `users/{user}/dataTypes/{data_type}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The parent resource name where the data point will be created.
+     * Format: `users/{user}/dataTypes/{data_type}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The parent resource name where the data point will be created.
+     * Format: `users/{user}/dataTypes/{data_type}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The parent resource name where the data point will be created.
+     * Format: `users/{user}/dataTypes/{data_type}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.devicesandservices.health.v4.DataPoint dataPoint_; + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.DataPoint, + com.google.devicesandservices.health.v4.DataPoint.Builder, + com.google.devicesandservices.health.v4.DataPointOrBuilder> + dataPointBuilder_; + + /** + * + * + *
+     * Required. The data point to create.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DataPoint data_point = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the dataPoint field is set. + */ + public boolean hasDataPoint() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Required. The data point to create.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DataPoint data_point = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The dataPoint. + */ + public com.google.devicesandservices.health.v4.DataPoint getDataPoint() { + if (dataPointBuilder_ == null) { + return dataPoint_ == null + ? com.google.devicesandservices.health.v4.DataPoint.getDefaultInstance() + : dataPoint_; + } else { + return dataPointBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The data point to create.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DataPoint data_point = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDataPoint(com.google.devicesandservices.health.v4.DataPoint value) { + if (dataPointBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dataPoint_ = value; + } else { + dataPointBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The data point to create.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DataPoint data_point = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDataPoint( + com.google.devicesandservices.health.v4.DataPoint.Builder builderForValue) { + if (dataPointBuilder_ == null) { + dataPoint_ = builderForValue.build(); + } else { + dataPointBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The data point to create.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DataPoint data_point = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeDataPoint(com.google.devicesandservices.health.v4.DataPoint value) { + if (dataPointBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && dataPoint_ != null + && dataPoint_ + != com.google.devicesandservices.health.v4.DataPoint.getDefaultInstance()) { + getDataPointBuilder().mergeFrom(value); + } else { + dataPoint_ = value; + } + } else { + dataPointBuilder_.mergeFrom(value); + } + if (dataPoint_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The data point to create.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DataPoint data_point = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearDataPoint() { + bitField0_ = (bitField0_ & ~0x00000002); + dataPoint_ = null; + if (dataPointBuilder_ != null) { + dataPointBuilder_.dispose(); + dataPointBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The data point to create.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DataPoint data_point = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.devicesandservices.health.v4.DataPoint.Builder getDataPointBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetDataPointFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The data point to create.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DataPoint data_point = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.devicesandservices.health.v4.DataPointOrBuilder getDataPointOrBuilder() { + if (dataPointBuilder_ != null) { + return dataPointBuilder_.getMessageOrBuilder(); + } else { + return dataPoint_ == null + ? com.google.devicesandservices.health.v4.DataPoint.getDefaultInstance() + : dataPoint_; + } + } + + /** + * + * + *
+     * Required. The data point to create.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DataPoint data_point = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.DataPoint, + com.google.devicesandservices.health.v4.DataPoint.Builder, + com.google.devicesandservices.health.v4.DataPointOrBuilder> + internalGetDataPointFieldBuilder() { + if (dataPointBuilder_ == null) { + dataPointBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.DataPoint, + com.google.devicesandservices.health.v4.DataPoint.Builder, + com.google.devicesandservices.health.v4.DataPointOrBuilder>( + getDataPoint(), getParentForChildren(), isClean()); + dataPoint_ = null; + } + return dataPointBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.CreateDataPointRequest) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.CreateDataPointRequest) + private static final com.google.devicesandservices.health.v4.CreateDataPointRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.CreateDataPointRequest(); + } + + public static com.google.devicesandservices.health.v4.CreateDataPointRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateDataPointRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.CreateDataPointRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/CreateDataPointRequestOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/CreateDataPointRequestOrBuilder.java new file mode 100644 index 000000000000..d755ba989cff --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/CreateDataPointRequestOrBuilder.java @@ -0,0 +1,103 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_points.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface CreateDataPointRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.CreateDataPointRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent resource name where the data point will be created.
+   * Format: `users/{user}/dataTypes/{data_type}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The parent resource name where the data point will be created.
+   * Format: `users/{user}/dataTypes/{data_type}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The data point to create.
+   * 
+ * + * + * .google.devicesandservices.health.v4.DataPoint data_point = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the dataPoint field is set. + */ + boolean hasDataPoint(); + + /** + * + * + *
+   * Required. The data point to create.
+   * 
+ * + * + * .google.devicesandservices.health.v4.DataPoint data_point = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The dataPoint. + */ + com.google.devicesandservices.health.v4.DataPoint getDataPoint(); + + /** + * + * + *
+   * Required. The data point to create.
+   * 
+ * + * + * .google.devicesandservices.health.v4.DataPoint data_point = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.devicesandservices.health.v4.DataPointOrBuilder getDataPointOrBuilder(); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DailyHeartRateVariability.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DailyHeartRateVariability.java new file mode 100644 index 000000000000..41958417a910 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DailyHeartRateVariability.java @@ -0,0 +1,1357 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * Represents the daily heart rate variability data type.
+ *
+ * At least one of the following fields must be set:
+ *
+ * - `average_heart_rate_variability_milliseconds`
+ * - `non_rem_heart_rate_beats_per_minute`
+ * - `entropy`
+ * - `deep_sleep_root_mean_square_of_successive_differences_milliseconds`
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.DailyHeartRateVariability} + */ +@com.google.protobuf.Generated +public final class DailyHeartRateVariability extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.DailyHeartRateVariability) + DailyHeartRateVariabilityOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DailyHeartRateVariability"); + } + + // Use DailyHeartRateVariability.newBuilder() to construct. + private DailyHeartRateVariability(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DailyHeartRateVariability() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_DailyHeartRateVariability_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_DailyHeartRateVariability_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.DailyHeartRateVariability.class, + com.google.devicesandservices.health.v4.DailyHeartRateVariability.Builder.class); + } + + private int bitField0_; + public static final int DATE_FIELD_NUMBER = 2; + private com.google.type.Date date_; + + /** + * + * + *
+   * Required. Date (in the user's timezone) of heart rate variability
+   * measurement.
+   * 
+ * + * .google.type.Date date = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the date field is set. + */ + @java.lang.Override + public boolean hasDate() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. Date (in the user's timezone) of heart rate variability
+   * measurement.
+   * 
+ * + * .google.type.Date date = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The date. + */ + @java.lang.Override + public com.google.type.Date getDate() { + return date_ == null ? com.google.type.Date.getDefaultInstance() : date_; + } + + /** + * + * + *
+   * Required. Date (in the user's timezone) of heart rate variability
+   * measurement.
+   * 
+ * + * .google.type.Date date = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.type.DateOrBuilder getDateOrBuilder() { + return date_ == null ? com.google.type.Date.getDefaultInstance() : date_; + } + + public static final int AVERAGE_HEART_RATE_VARIABILITY_MILLISECONDS_FIELD_NUMBER = 4; + private double averageHeartRateVariabilityMilliseconds_ = 0D; + + /** + * + * + *
+   * Optional. A user's average heart rate variability calculated using the root
+   * mean square of successive differences (RMSSD) in times between heartbeats.
+   * 
+ * + * + * optional double average_heart_rate_variability_milliseconds = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the averageHeartRateVariabilityMilliseconds field is set. + */ + @java.lang.Override + public boolean hasAverageHeartRateVariabilityMilliseconds() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Optional. A user's average heart rate variability calculated using the root
+   * mean square of successive differences (RMSSD) in times between heartbeats.
+   * 
+ * + * + * optional double average_heart_rate_variability_milliseconds = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The averageHeartRateVariabilityMilliseconds. + */ + @java.lang.Override + public double getAverageHeartRateVariabilityMilliseconds() { + return averageHeartRateVariabilityMilliseconds_; + } + + public static final int NON_REM_HEART_RATE_BEATS_PER_MINUTE_FIELD_NUMBER = 5; + private long nonRemHeartRateBeatsPerMinute_ = 0L; + + /** + * + * + *
+   * Optional. Non-REM heart rate
+   * 
+ * + * + * optional int64 non_rem_heart_rate_beats_per_minute = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the nonRemHeartRateBeatsPerMinute field is set. + */ + @java.lang.Override + public boolean hasNonRemHeartRateBeatsPerMinute() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Optional. Non-REM heart rate
+   * 
+ * + * + * optional int64 non_rem_heart_rate_beats_per_minute = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The nonRemHeartRateBeatsPerMinute. + */ + @java.lang.Override + public long getNonRemHeartRateBeatsPerMinute() { + return nonRemHeartRateBeatsPerMinute_; + } + + public static final int ENTROPY_FIELD_NUMBER = 6; + private double entropy_ = 0D; + + /** + * + * + *
+   * Optional. The Shanon entropy of heartbeat intervals.
+   * Entropy quantifies randomness or disorder in a system. High entropy
+   * indicates high HRV. Entropy is measured from the histogram of time interval
+   * between successive heart beats values measured during sleep.
+   * 
+ * + * optional double entropy = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the entropy field is set. + */ + @java.lang.Override + public boolean hasEntropy() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+   * Optional. The Shanon entropy of heartbeat intervals.
+   * Entropy quantifies randomness or disorder in a system. High entropy
+   * indicates high HRV. Entropy is measured from the histogram of time interval
+   * between successive heart beats values measured during sleep.
+   * 
+ * + * optional double entropy = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The entropy. + */ + @java.lang.Override + public double getEntropy() { + return entropy_; + } + + public static final int + DEEP_SLEEP_ROOT_MEAN_SQUARE_OF_SUCCESSIVE_DIFFERENCES_MILLISECONDS_FIELD_NUMBER = 7; + private double deepSleepRootMeanSquareOfSuccessiveDifferencesMilliseconds_ = 0D; + + /** + * + * + *
+   * Optional. The root mean square of successive differences (RMSSD) value
+   * during deep sleep.
+   * 
+ * + * + * optional double deep_sleep_root_mean_square_of_successive_differences_milliseconds = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the deepSleepRootMeanSquareOfSuccessiveDifferencesMilliseconds field is set. + */ + @java.lang.Override + public boolean hasDeepSleepRootMeanSquareOfSuccessiveDifferencesMilliseconds() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+   * Optional. The root mean square of successive differences (RMSSD) value
+   * during deep sleep.
+   * 
+ * + * + * optional double deep_sleep_root_mean_square_of_successive_differences_milliseconds = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The deepSleepRootMeanSquareOfSuccessiveDifferencesMilliseconds. + */ + @java.lang.Override + public double getDeepSleepRootMeanSquareOfSuccessiveDifferencesMilliseconds() { + return deepSleepRootMeanSquareOfSuccessiveDifferencesMilliseconds_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getDate()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeDouble(4, averageHeartRateVariabilityMilliseconds_); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeInt64(5, nonRemHeartRateBeatsPerMinute_); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeDouble(6, entropy_); + } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeDouble(7, deepSleepRootMeanSquareOfSuccessiveDifferencesMilliseconds_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDate()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeDoubleSize( + 4, averageHeartRateVariabilityMilliseconds_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeInt64Size(5, nonRemHeartRateBeatsPerMinute_); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(6, entropy_); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeDoubleSize( + 7, deepSleepRootMeanSquareOfSuccessiveDifferencesMilliseconds_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.DailyHeartRateVariability)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.DailyHeartRateVariability other = + (com.google.devicesandservices.health.v4.DailyHeartRateVariability) obj; + + if (hasDate() != other.hasDate()) return false; + if (hasDate()) { + if (!getDate().equals(other.getDate())) return false; + } + if (hasAverageHeartRateVariabilityMilliseconds() + != other.hasAverageHeartRateVariabilityMilliseconds()) return false; + if (hasAverageHeartRateVariabilityMilliseconds()) { + if (java.lang.Double.doubleToLongBits(getAverageHeartRateVariabilityMilliseconds()) + != java.lang.Double.doubleToLongBits(other.getAverageHeartRateVariabilityMilliseconds())) + return false; + } + if (hasNonRemHeartRateBeatsPerMinute() != other.hasNonRemHeartRateBeatsPerMinute()) + return false; + if (hasNonRemHeartRateBeatsPerMinute()) { + if (getNonRemHeartRateBeatsPerMinute() != other.getNonRemHeartRateBeatsPerMinute()) + return false; + } + if (hasEntropy() != other.hasEntropy()) return false; + if (hasEntropy()) { + if (java.lang.Double.doubleToLongBits(getEntropy()) + != java.lang.Double.doubleToLongBits(other.getEntropy())) return false; + } + if (hasDeepSleepRootMeanSquareOfSuccessiveDifferencesMilliseconds() + != other.hasDeepSleepRootMeanSquareOfSuccessiveDifferencesMilliseconds()) return false; + if (hasDeepSleepRootMeanSquareOfSuccessiveDifferencesMilliseconds()) { + if (java.lang.Double.doubleToLongBits( + getDeepSleepRootMeanSquareOfSuccessiveDifferencesMilliseconds()) + != java.lang.Double.doubleToLongBits( + other.getDeepSleepRootMeanSquareOfSuccessiveDifferencesMilliseconds())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasDate()) { + hash = (37 * hash) + DATE_FIELD_NUMBER; + hash = (53 * hash) + getDate().hashCode(); + } + if (hasAverageHeartRateVariabilityMilliseconds()) { + hash = (37 * hash) + AVERAGE_HEART_RATE_VARIABILITY_MILLISECONDS_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getAverageHeartRateVariabilityMilliseconds())); + } + if (hasNonRemHeartRateBeatsPerMinute()) { + hash = (37 * hash) + NON_REM_HEART_RATE_BEATS_PER_MINUTE_FIELD_NUMBER; + hash = + (53 * hash) + com.google.protobuf.Internal.hashLong(getNonRemHeartRateBeatsPerMinute()); + } + if (hasEntropy()) { + hash = (37 * hash) + ENTROPY_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getEntropy())); + } + if (hasDeepSleepRootMeanSquareOfSuccessiveDifferencesMilliseconds()) { + hash = + (37 * hash) + + DEEP_SLEEP_ROOT_MEAN_SQUARE_OF_SUCCESSIVE_DIFFERENCES_MILLISECONDS_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits( + getDeepSleepRootMeanSquareOfSuccessiveDifferencesMilliseconds())); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.DailyHeartRateVariability parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.DailyHeartRateVariability parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DailyHeartRateVariability parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.DailyHeartRateVariability parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DailyHeartRateVariability parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.DailyHeartRateVariability parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DailyHeartRateVariability parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.DailyHeartRateVariability parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DailyHeartRateVariability + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.DailyHeartRateVariability + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DailyHeartRateVariability parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.DailyHeartRateVariability parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.DailyHeartRateVariability prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Represents the daily heart rate variability data type.
+   *
+   * At least one of the following fields must be set:
+   *
+   * - `average_heart_rate_variability_milliseconds`
+   * - `non_rem_heart_rate_beats_per_minute`
+   * - `entropy`
+   * - `deep_sleep_root_mean_square_of_successive_differences_milliseconds`
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.DailyHeartRateVariability} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.DailyHeartRateVariability) + com.google.devicesandservices.health.v4.DailyHeartRateVariabilityOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_DailyHeartRateVariability_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_DailyHeartRateVariability_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.DailyHeartRateVariability.class, + com.google.devicesandservices.health.v4.DailyHeartRateVariability.Builder.class); + } + + // Construct using + // com.google.devicesandservices.health.v4.DailyHeartRateVariability.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetDateFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + date_ = null; + if (dateBuilder_ != null) { + dateBuilder_.dispose(); + dateBuilder_ = null; + } + averageHeartRateVariabilityMilliseconds_ = 0D; + nonRemHeartRateBeatsPerMinute_ = 0L; + entropy_ = 0D; + deepSleepRootMeanSquareOfSuccessiveDifferencesMilliseconds_ = 0D; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_DailyHeartRateVariability_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyHeartRateVariability + getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.DailyHeartRateVariability.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyHeartRateVariability build() { + com.google.devicesandservices.health.v4.DailyHeartRateVariability result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyHeartRateVariability buildPartial() { + com.google.devicesandservices.health.v4.DailyHeartRateVariability result = + new com.google.devicesandservices.health.v4.DailyHeartRateVariability(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.devicesandservices.health.v4.DailyHeartRateVariability result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.date_ = dateBuilder_ == null ? date_ : dateBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.averageHeartRateVariabilityMilliseconds_ = averageHeartRateVariabilityMilliseconds_; + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.nonRemHeartRateBeatsPerMinute_ = nonRemHeartRateBeatsPerMinute_; + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.entropy_ = entropy_; + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.deepSleepRootMeanSquareOfSuccessiveDifferencesMilliseconds_ = + deepSleepRootMeanSquareOfSuccessiveDifferencesMilliseconds_; + to_bitField0_ |= 0x00000010; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.DailyHeartRateVariability) { + return mergeFrom((com.google.devicesandservices.health.v4.DailyHeartRateVariability) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.devicesandservices.health.v4.DailyHeartRateVariability other) { + if (other + == com.google.devicesandservices.health.v4.DailyHeartRateVariability.getDefaultInstance()) + return this; + if (other.hasDate()) { + mergeDate(other.getDate()); + } + if (other.hasAverageHeartRateVariabilityMilliseconds()) { + setAverageHeartRateVariabilityMilliseconds( + other.getAverageHeartRateVariabilityMilliseconds()); + } + if (other.hasNonRemHeartRateBeatsPerMinute()) { + setNonRemHeartRateBeatsPerMinute(other.getNonRemHeartRateBeatsPerMinute()); + } + if (other.hasEntropy()) { + setEntropy(other.getEntropy()); + } + if (other.hasDeepSleepRootMeanSquareOfSuccessiveDifferencesMilliseconds()) { + setDeepSleepRootMeanSquareOfSuccessiveDifferencesMilliseconds( + other.getDeepSleepRootMeanSquareOfSuccessiveDifferencesMilliseconds()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + input.readMessage(internalGetDateFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 18 + case 33: + { + averageHeartRateVariabilityMilliseconds_ = input.readDouble(); + bitField0_ |= 0x00000002; + break; + } // case 33 + case 40: + { + nonRemHeartRateBeatsPerMinute_ = input.readInt64(); + bitField0_ |= 0x00000004; + break; + } // case 40 + case 49: + { + entropy_ = input.readDouble(); + bitField0_ |= 0x00000008; + break; + } // case 49 + case 57: + { + deepSleepRootMeanSquareOfSuccessiveDifferencesMilliseconds_ = input.readDouble(); + bitField0_ |= 0x00000010; + break; + } // case 57 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.type.Date date_; + private com.google.protobuf.SingleFieldBuilder< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> + dateBuilder_; + + /** + * + * + *
+     * Required. Date (in the user's timezone) of heart rate variability
+     * measurement.
+     * 
+ * + * .google.type.Date date = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the date field is set. + */ + public boolean hasDate() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. Date (in the user's timezone) of heart rate variability
+     * measurement.
+     * 
+ * + * .google.type.Date date = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The date. + */ + public com.google.type.Date getDate() { + if (dateBuilder_ == null) { + return date_ == null ? com.google.type.Date.getDefaultInstance() : date_; + } else { + return dateBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. Date (in the user's timezone) of heart rate variability
+     * measurement.
+     * 
+ * + * .google.type.Date date = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setDate(com.google.type.Date value) { + if (dateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + date_ = value; + } else { + dateBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Date (in the user's timezone) of heart rate variability
+     * measurement.
+     * 
+ * + * .google.type.Date date = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setDate(com.google.type.Date.Builder builderForValue) { + if (dateBuilder_ == null) { + date_ = builderForValue.build(); + } else { + dateBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Date (in the user's timezone) of heart rate variability
+     * measurement.
+     * 
+ * + * .google.type.Date date = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeDate(com.google.type.Date value) { + if (dateBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && date_ != null + && date_ != com.google.type.Date.getDefaultInstance()) { + getDateBuilder().mergeFrom(value); + } else { + date_ = value; + } + } else { + dateBuilder_.mergeFrom(value); + } + if (date_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. Date (in the user's timezone) of heart rate variability
+     * measurement.
+     * 
+ * + * .google.type.Date date = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearDate() { + bitField0_ = (bitField0_ & ~0x00000001); + date_ = null; + if (dateBuilder_ != null) { + dateBuilder_.dispose(); + dateBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Date (in the user's timezone) of heart rate variability
+     * measurement.
+     * 
+ * + * .google.type.Date date = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.type.Date.Builder getDateBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetDateFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. Date (in the user's timezone) of heart rate variability
+     * measurement.
+     * 
+ * + * .google.type.Date date = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.type.DateOrBuilder getDateOrBuilder() { + if (dateBuilder_ != null) { + return dateBuilder_.getMessageOrBuilder(); + } else { + return date_ == null ? com.google.type.Date.getDefaultInstance() : date_; + } + } + + /** + * + * + *
+     * Required. Date (in the user's timezone) of heart rate variability
+     * measurement.
+     * 
+ * + * .google.type.Date date = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> + internalGetDateFieldBuilder() { + if (dateBuilder_ == null) { + dateBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder>( + getDate(), getParentForChildren(), isClean()); + date_ = null; + } + return dateBuilder_; + } + + private double averageHeartRateVariabilityMilliseconds_; + + /** + * + * + *
+     * Optional. A user's average heart rate variability calculated using the root
+     * mean square of successive differences (RMSSD) in times between heartbeats.
+     * 
+ * + * + * optional double average_heart_rate_variability_milliseconds = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the averageHeartRateVariabilityMilliseconds field is set. + */ + @java.lang.Override + public boolean hasAverageHeartRateVariabilityMilliseconds() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Optional. A user's average heart rate variability calculated using the root
+     * mean square of successive differences (RMSSD) in times between heartbeats.
+     * 
+ * + * + * optional double average_heart_rate_variability_milliseconds = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The averageHeartRateVariabilityMilliseconds. + */ + @java.lang.Override + public double getAverageHeartRateVariabilityMilliseconds() { + return averageHeartRateVariabilityMilliseconds_; + } + + /** + * + * + *
+     * Optional. A user's average heart rate variability calculated using the root
+     * mean square of successive differences (RMSSD) in times between heartbeats.
+     * 
+ * + * + * optional double average_heart_rate_variability_milliseconds = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The averageHeartRateVariabilityMilliseconds to set. + * @return This builder for chaining. + */ + public Builder setAverageHeartRateVariabilityMilliseconds(double value) { + + averageHeartRateVariabilityMilliseconds_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A user's average heart rate variability calculated using the root
+     * mean square of successive differences (RMSSD) in times between heartbeats.
+     * 
+ * + * + * optional double average_heart_rate_variability_milliseconds = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearAverageHeartRateVariabilityMilliseconds() { + bitField0_ = (bitField0_ & ~0x00000002); + averageHeartRateVariabilityMilliseconds_ = 0D; + onChanged(); + return this; + } + + private long nonRemHeartRateBeatsPerMinute_; + + /** + * + * + *
+     * Optional. Non-REM heart rate
+     * 
+ * + * + * optional int64 non_rem_heart_rate_beats_per_minute = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the nonRemHeartRateBeatsPerMinute field is set. + */ + @java.lang.Override + public boolean hasNonRemHeartRateBeatsPerMinute() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Optional. Non-REM heart rate
+     * 
+ * + * + * optional int64 non_rem_heart_rate_beats_per_minute = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The nonRemHeartRateBeatsPerMinute. + */ + @java.lang.Override + public long getNonRemHeartRateBeatsPerMinute() { + return nonRemHeartRateBeatsPerMinute_; + } + + /** + * + * + *
+     * Optional. Non-REM heart rate
+     * 
+ * + * + * optional int64 non_rem_heart_rate_beats_per_minute = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The nonRemHeartRateBeatsPerMinute to set. + * @return This builder for chaining. + */ + public Builder setNonRemHeartRateBeatsPerMinute(long value) { + + nonRemHeartRateBeatsPerMinute_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Non-REM heart rate
+     * 
+ * + * + * optional int64 non_rem_heart_rate_beats_per_minute = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearNonRemHeartRateBeatsPerMinute() { + bitField0_ = (bitField0_ & ~0x00000004); + nonRemHeartRateBeatsPerMinute_ = 0L; + onChanged(); + return this; + } + + private double entropy_; + + /** + * + * + *
+     * Optional. The Shanon entropy of heartbeat intervals.
+     * Entropy quantifies randomness or disorder in a system. High entropy
+     * indicates high HRV. Entropy is measured from the histogram of time interval
+     * between successive heart beats values measured during sleep.
+     * 
+ * + * optional double entropy = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the entropy field is set. + */ + @java.lang.Override + public boolean hasEntropy() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+     * Optional. The Shanon entropy of heartbeat intervals.
+     * Entropy quantifies randomness or disorder in a system. High entropy
+     * indicates high HRV. Entropy is measured from the histogram of time interval
+     * between successive heart beats values measured during sleep.
+     * 
+ * + * optional double entropy = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The entropy. + */ + @java.lang.Override + public double getEntropy() { + return entropy_; + } + + /** + * + * + *
+     * Optional. The Shanon entropy of heartbeat intervals.
+     * Entropy quantifies randomness or disorder in a system. High entropy
+     * indicates high HRV. Entropy is measured from the histogram of time interval
+     * between successive heart beats values measured during sleep.
+     * 
+ * + * optional double entropy = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The entropy to set. + * @return This builder for chaining. + */ + public Builder setEntropy(double value) { + + entropy_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The Shanon entropy of heartbeat intervals.
+     * Entropy quantifies randomness or disorder in a system. High entropy
+     * indicates high HRV. Entropy is measured from the histogram of time interval
+     * between successive heart beats values measured during sleep.
+     * 
+ * + * optional double entropy = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEntropy() { + bitField0_ = (bitField0_ & ~0x00000008); + entropy_ = 0D; + onChanged(); + return this; + } + + private double deepSleepRootMeanSquareOfSuccessiveDifferencesMilliseconds_; + + /** + * + * + *
+     * Optional. The root mean square of successive differences (RMSSD) value
+     * during deep sleep.
+     * 
+ * + * + * optional double deep_sleep_root_mean_square_of_successive_differences_milliseconds = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the deepSleepRootMeanSquareOfSuccessiveDifferencesMilliseconds field is set. + */ + @java.lang.Override + public boolean hasDeepSleepRootMeanSquareOfSuccessiveDifferencesMilliseconds() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+     * Optional. The root mean square of successive differences (RMSSD) value
+     * during deep sleep.
+     * 
+ * + * + * optional double deep_sleep_root_mean_square_of_successive_differences_milliseconds = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The deepSleepRootMeanSquareOfSuccessiveDifferencesMilliseconds. + */ + @java.lang.Override + public double getDeepSleepRootMeanSquareOfSuccessiveDifferencesMilliseconds() { + return deepSleepRootMeanSquareOfSuccessiveDifferencesMilliseconds_; + } + + /** + * + * + *
+     * Optional. The root mean square of successive differences (RMSSD) value
+     * during deep sleep.
+     * 
+ * + * + * optional double deep_sleep_root_mean_square_of_successive_differences_milliseconds = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The deepSleepRootMeanSquareOfSuccessiveDifferencesMilliseconds to set. + * @return This builder for chaining. + */ + public Builder setDeepSleepRootMeanSquareOfSuccessiveDifferencesMilliseconds(double value) { + + deepSleepRootMeanSquareOfSuccessiveDifferencesMilliseconds_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The root mean square of successive differences (RMSSD) value
+     * during deep sleep.
+     * 
+ * + * + * optional double deep_sleep_root_mean_square_of_successive_differences_milliseconds = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearDeepSleepRootMeanSquareOfSuccessiveDifferencesMilliseconds() { + bitField0_ = (bitField0_ & ~0x00000010); + deepSleepRootMeanSquareOfSuccessiveDifferencesMilliseconds_ = 0D; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.DailyHeartRateVariability) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.DailyHeartRateVariability) + private static final com.google.devicesandservices.health.v4.DailyHeartRateVariability + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.DailyHeartRateVariability(); + } + + public static com.google.devicesandservices.health.v4.DailyHeartRateVariability + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DailyHeartRateVariability parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyHeartRateVariability + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DailyHeartRateVariabilityOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DailyHeartRateVariabilityOrBuilder.java new file mode 100644 index 000000000000..a5111adce2e6 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DailyHeartRateVariabilityOrBuilder.java @@ -0,0 +1,194 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface DailyHeartRateVariabilityOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.DailyHeartRateVariability) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Date (in the user's timezone) of heart rate variability
+   * measurement.
+   * 
+ * + * .google.type.Date date = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the date field is set. + */ + boolean hasDate(); + + /** + * + * + *
+   * Required. Date (in the user's timezone) of heart rate variability
+   * measurement.
+   * 
+ * + * .google.type.Date date = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The date. + */ + com.google.type.Date getDate(); + + /** + * + * + *
+   * Required. Date (in the user's timezone) of heart rate variability
+   * measurement.
+   * 
+ * + * .google.type.Date date = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.type.DateOrBuilder getDateOrBuilder(); + + /** + * + * + *
+   * Optional. A user's average heart rate variability calculated using the root
+   * mean square of successive differences (RMSSD) in times between heartbeats.
+   * 
+ * + * + * optional double average_heart_rate_variability_milliseconds = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the averageHeartRateVariabilityMilliseconds field is set. + */ + boolean hasAverageHeartRateVariabilityMilliseconds(); + + /** + * + * + *
+   * Optional. A user's average heart rate variability calculated using the root
+   * mean square of successive differences (RMSSD) in times between heartbeats.
+   * 
+ * + * + * optional double average_heart_rate_variability_milliseconds = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The averageHeartRateVariabilityMilliseconds. + */ + double getAverageHeartRateVariabilityMilliseconds(); + + /** + * + * + *
+   * Optional. Non-REM heart rate
+   * 
+ * + * + * optional int64 non_rem_heart_rate_beats_per_minute = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the nonRemHeartRateBeatsPerMinute field is set. + */ + boolean hasNonRemHeartRateBeatsPerMinute(); + + /** + * + * + *
+   * Optional. Non-REM heart rate
+   * 
+ * + * + * optional int64 non_rem_heart_rate_beats_per_minute = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The nonRemHeartRateBeatsPerMinute. + */ + long getNonRemHeartRateBeatsPerMinute(); + + /** + * + * + *
+   * Optional. The Shanon entropy of heartbeat intervals.
+   * Entropy quantifies randomness or disorder in a system. High entropy
+   * indicates high HRV. Entropy is measured from the histogram of time interval
+   * between successive heart beats values measured during sleep.
+   * 
+ * + * optional double entropy = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the entropy field is set. + */ + boolean hasEntropy(); + + /** + * + * + *
+   * Optional. The Shanon entropy of heartbeat intervals.
+   * Entropy quantifies randomness or disorder in a system. High entropy
+   * indicates high HRV. Entropy is measured from the histogram of time interval
+   * between successive heart beats values measured during sleep.
+   * 
+ * + * optional double entropy = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The entropy. + */ + double getEntropy(); + + /** + * + * + *
+   * Optional. The root mean square of successive differences (RMSSD) value
+   * during deep sleep.
+   * 
+ * + * + * optional double deep_sleep_root_mean_square_of_successive_differences_milliseconds = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the deepSleepRootMeanSquareOfSuccessiveDifferencesMilliseconds field is set. + */ + boolean hasDeepSleepRootMeanSquareOfSuccessiveDifferencesMilliseconds(); + + /** + * + * + *
+   * Optional. The root mean square of successive differences (RMSSD) value
+   * during deep sleep.
+   * 
+ * + * + * optional double deep_sleep_root_mean_square_of_successive_differences_milliseconds = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The deepSleepRootMeanSquareOfSuccessiveDifferencesMilliseconds. + */ + double getDeepSleepRootMeanSquareOfSuccessiveDifferencesMilliseconds(); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DailyHeartRateZones.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DailyHeartRateZones.java new file mode 100644 index 000000000000..c0021514536d --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DailyHeartRateZones.java @@ -0,0 +1,2137 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * User's heart rate zone thresholds based on the Karvonen algorithm for a
+ * specific day.
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.DailyHeartRateZones} + */ +@com.google.protobuf.Generated +public final class DailyHeartRateZones extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.DailyHeartRateZones) + DailyHeartRateZonesOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DailyHeartRateZones"); + } + + // Use DailyHeartRateZones.newBuilder() to construct. + private DailyHeartRateZones(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DailyHeartRateZones() { + heartRateZones_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_DailyHeartRateZones_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_DailyHeartRateZones_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.DailyHeartRateZones.class, + com.google.devicesandservices.health.v4.DailyHeartRateZones.Builder.class); + } + + public interface HeartRateZoneOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. The heart rate zone type.
+     * 
+ * + * + * .google.devicesandservices.health.v4.HeartRateZoneType heart_rate_zone_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for heartRateZoneType. + */ + int getHeartRateZoneTypeValue(); + + /** + * + * + *
+     * Required. The heart rate zone type.
+     * 
+ * + * + * .google.devicesandservices.health.v4.HeartRateZoneType heart_rate_zone_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The heartRateZoneType. + */ + com.google.devicesandservices.health.v4.HeartRateZoneType getHeartRateZoneType(); + + /** + * + * + *
+     * Required. Minimum heart rate for this zone in beats per minute.
+     * 
+ * + * int64 min_beats_per_minute = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The minBeatsPerMinute. + */ + long getMinBeatsPerMinute(); + + /** + * + * + *
+     * Required. Maximum heart rate for this zone in beats per minute.
+     * 
+ * + * int64 max_beats_per_minute = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The maxBeatsPerMinute. + */ + long getMaxBeatsPerMinute(); + } + + /** + * + * + *
+   * The heart rate zone.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone} + */ + public static final class HeartRateZone extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone) + HeartRateZoneOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "HeartRateZone"); + } + + // Use HeartRateZone.newBuilder() to construct. + private HeartRateZone(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private HeartRateZone() { + heartRateZoneType_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_DailyHeartRateZones_HeartRateZone_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_DailyHeartRateZones_HeartRateZone_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone.class, + com.google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone.Builder + .class); + } + + public static final int HEART_RATE_ZONE_TYPE_FIELD_NUMBER = 1; + private int heartRateZoneType_ = 0; + + /** + * + * + *
+     * Required. The heart rate zone type.
+     * 
+ * + * + * .google.devicesandservices.health.v4.HeartRateZoneType heart_rate_zone_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for heartRateZoneType. + */ + @java.lang.Override + public int getHeartRateZoneTypeValue() { + return heartRateZoneType_; + } + + /** + * + * + *
+     * Required. The heart rate zone type.
+     * 
+ * + * + * .google.devicesandservices.health.v4.HeartRateZoneType heart_rate_zone_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The heartRateZoneType. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.HeartRateZoneType getHeartRateZoneType() { + com.google.devicesandservices.health.v4.HeartRateZoneType result = + com.google.devicesandservices.health.v4.HeartRateZoneType.forNumber(heartRateZoneType_); + return result == null + ? com.google.devicesandservices.health.v4.HeartRateZoneType.UNRECOGNIZED + : result; + } + + public static final int MIN_BEATS_PER_MINUTE_FIELD_NUMBER = 2; + private long minBeatsPerMinute_ = 0L; + + /** + * + * + *
+     * Required. Minimum heart rate for this zone in beats per minute.
+     * 
+ * + * int64 min_beats_per_minute = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The minBeatsPerMinute. + */ + @java.lang.Override + public long getMinBeatsPerMinute() { + return minBeatsPerMinute_; + } + + public static final int MAX_BEATS_PER_MINUTE_FIELD_NUMBER = 3; + private long maxBeatsPerMinute_ = 0L; + + /** + * + * + *
+     * Required. Maximum heart rate for this zone in beats per minute.
+     * 
+ * + * int64 max_beats_per_minute = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The maxBeatsPerMinute. + */ + @java.lang.Override + public long getMaxBeatsPerMinute() { + return maxBeatsPerMinute_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (heartRateZoneType_ + != com.google.devicesandservices.health.v4.HeartRateZoneType + .HEART_RATE_ZONE_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, heartRateZoneType_); + } + if (minBeatsPerMinute_ != 0L) { + output.writeInt64(2, minBeatsPerMinute_); + } + if (maxBeatsPerMinute_ != 0L) { + output.writeInt64(3, maxBeatsPerMinute_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (heartRateZoneType_ + != com.google.devicesandservices.health.v4.HeartRateZoneType + .HEART_RATE_ZONE_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, heartRateZoneType_); + } + if (minBeatsPerMinute_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, minBeatsPerMinute_); + } + if (maxBeatsPerMinute_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, maxBeatsPerMinute_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone other = + (com.google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone) obj; + + if (heartRateZoneType_ != other.heartRateZoneType_) return false; + if (getMinBeatsPerMinute() != other.getMinBeatsPerMinute()) return false; + if (getMaxBeatsPerMinute() != other.getMaxBeatsPerMinute()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + HEART_RATE_ZONE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + heartRateZoneType_; + hash = (37 * hash) + MIN_BEATS_PER_MINUTE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getMinBeatsPerMinute()); + hash = (37 * hash) + MAX_BEATS_PER_MINUTE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getMaxBeatsPerMinute()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+     * The heart rate zone.
+     * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone) + com.google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZoneOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_DailyHeartRateZones_HeartRateZone_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_DailyHeartRateZones_HeartRateZone_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone.class, + com.google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone.Builder + .class); + } + + // Construct using + // com.google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + heartRateZoneType_ = 0; + minBeatsPerMinute_ = 0L; + maxBeatsPerMinute_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_DailyHeartRateZones_HeartRateZone_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone + getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone build() { + com.google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone + buildPartial() { + com.google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone result = + new com.google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.heartRateZoneType_ = heartRateZoneType_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.minBeatsPerMinute_ = minBeatsPerMinute_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.maxBeatsPerMinute_ = maxBeatsPerMinute_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone) { + return mergeFrom( + (com.google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone other) { + if (other + == com.google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone + .getDefaultInstance()) return this; + if (other.heartRateZoneType_ != 0) { + setHeartRateZoneTypeValue(other.getHeartRateZoneTypeValue()); + } + if (other.getMinBeatsPerMinute() != 0L) { + setMinBeatsPerMinute(other.getMinBeatsPerMinute()); + } + if (other.getMaxBeatsPerMinute() != 0L) { + setMaxBeatsPerMinute(other.getMaxBeatsPerMinute()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + heartRateZoneType_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + minBeatsPerMinute_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + maxBeatsPerMinute_ = input.readInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int heartRateZoneType_ = 0; + + /** + * + * + *
+       * Required. The heart rate zone type.
+       * 
+ * + * + * .google.devicesandservices.health.v4.HeartRateZoneType heart_rate_zone_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for heartRateZoneType. + */ + @java.lang.Override + public int getHeartRateZoneTypeValue() { + return heartRateZoneType_; + } + + /** + * + * + *
+       * Required. The heart rate zone type.
+       * 
+ * + * + * .google.devicesandservices.health.v4.HeartRateZoneType heart_rate_zone_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for heartRateZoneType to set. + * @return This builder for chaining. + */ + public Builder setHeartRateZoneTypeValue(int value) { + heartRateZoneType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The heart rate zone type.
+       * 
+ * + * + * .google.devicesandservices.health.v4.HeartRateZoneType heart_rate_zone_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The heartRateZoneType. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.HeartRateZoneType getHeartRateZoneType() { + com.google.devicesandservices.health.v4.HeartRateZoneType result = + com.google.devicesandservices.health.v4.HeartRateZoneType.forNumber(heartRateZoneType_); + return result == null + ? com.google.devicesandservices.health.v4.HeartRateZoneType.UNRECOGNIZED + : result; + } + + /** + * + * + *
+       * Required. The heart rate zone type.
+       * 
+ * + * + * .google.devicesandservices.health.v4.HeartRateZoneType heart_rate_zone_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The heartRateZoneType to set. + * @return This builder for chaining. + */ + public Builder setHeartRateZoneType( + com.google.devicesandservices.health.v4.HeartRateZoneType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + heartRateZoneType_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The heart rate zone type.
+       * 
+ * + * + * .google.devicesandservices.health.v4.HeartRateZoneType heart_rate_zone_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearHeartRateZoneType() { + bitField0_ = (bitField0_ & ~0x00000001); + heartRateZoneType_ = 0; + onChanged(); + return this; + } + + private long minBeatsPerMinute_; + + /** + * + * + *
+       * Required. Minimum heart rate for this zone in beats per minute.
+       * 
+ * + * int64 min_beats_per_minute = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The minBeatsPerMinute. + */ + @java.lang.Override + public long getMinBeatsPerMinute() { + return minBeatsPerMinute_; + } + + /** + * + * + *
+       * Required. Minimum heart rate for this zone in beats per minute.
+       * 
+ * + * int64 min_beats_per_minute = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The minBeatsPerMinute to set. + * @return This builder for chaining. + */ + public Builder setMinBeatsPerMinute(long value) { + + minBeatsPerMinute_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. Minimum heart rate for this zone in beats per minute.
+       * 
+ * + * int64 min_beats_per_minute = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearMinBeatsPerMinute() { + bitField0_ = (bitField0_ & ~0x00000002); + minBeatsPerMinute_ = 0L; + onChanged(); + return this; + } + + private long maxBeatsPerMinute_; + + /** + * + * + *
+       * Required. Maximum heart rate for this zone in beats per minute.
+       * 
+ * + * int64 max_beats_per_minute = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The maxBeatsPerMinute. + */ + @java.lang.Override + public long getMaxBeatsPerMinute() { + return maxBeatsPerMinute_; + } + + /** + * + * + *
+       * Required. Maximum heart rate for this zone in beats per minute.
+       * 
+ * + * int64 max_beats_per_minute = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The maxBeatsPerMinute to set. + * @return This builder for chaining. + */ + public Builder setMaxBeatsPerMinute(long value) { + + maxBeatsPerMinute_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. Maximum heart rate for this zone in beats per minute.
+       * 
+ * + * int64 max_beats_per_minute = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearMaxBeatsPerMinute() { + bitField0_ = (bitField0_ & ~0x00000004); + maxBeatsPerMinute_ = 0L; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone) + private static final com.google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone(); + } + + public static com.google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public HeartRateZone parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int DATE_FIELD_NUMBER = 1; + private com.google.type.Date date_; + + /** + * + * + *
+   * Required. Date (in user's timezone) of the heart rate zones record.
+   * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the date field is set. + */ + @java.lang.Override + public boolean hasDate() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. Date (in user's timezone) of the heart rate zones record.
+   * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The date. + */ + @java.lang.Override + public com.google.type.Date getDate() { + return date_ == null ? com.google.type.Date.getDefaultInstance() : date_; + } + + /** + * + * + *
+   * Required. Date (in user's timezone) of the heart rate zones record.
+   * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.type.DateOrBuilder getDateOrBuilder() { + return date_ == null ? com.google.type.Date.getDefaultInstance() : date_; + } + + public static final int HEART_RATE_ZONES_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List + heartRateZones_; + + /** + * + * + *
+   * Required. The heart rate zones.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone heart_rate_zones = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getHeartRateZonesList() { + return heartRateZones_; + } + + /** + * + * + *
+   * Required. The heart rate zones.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone heart_rate_zones = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZoneOrBuilder> + getHeartRateZonesOrBuilderList() { + return heartRateZones_; + } + + /** + * + * + *
+   * Required. The heart rate zones.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone heart_rate_zones = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getHeartRateZonesCount() { + return heartRateZones_.size(); + } + + /** + * + * + *
+   * Required. The heart rate zones.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone heart_rate_zones = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone + getHeartRateZones(int index) { + return heartRateZones_.get(index); + } + + /** + * + * + *
+   * Required. The heart rate zones.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone heart_rate_zones = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZoneOrBuilder + getHeartRateZonesOrBuilder(int index) { + return heartRateZones_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getDate()); + } + for (int i = 0; i < heartRateZones_.size(); i++) { + output.writeMessage(2, heartRateZones_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getDate()); + } + for (int i = 0; i < heartRateZones_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, heartRateZones_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.DailyHeartRateZones)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.DailyHeartRateZones other = + (com.google.devicesandservices.health.v4.DailyHeartRateZones) obj; + + if (hasDate() != other.hasDate()) return false; + if (hasDate()) { + if (!getDate().equals(other.getDate())) return false; + } + if (!getHeartRateZonesList().equals(other.getHeartRateZonesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasDate()) { + hash = (37 * hash) + DATE_FIELD_NUMBER; + hash = (53 * hash) + getDate().hashCode(); + } + if (getHeartRateZonesCount() > 0) { + hash = (37 * hash) + HEART_RATE_ZONES_FIELD_NUMBER; + hash = (53 * hash) + getHeartRateZonesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.DailyHeartRateZones parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.DailyHeartRateZones parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DailyHeartRateZones parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.DailyHeartRateZones parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DailyHeartRateZones parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.DailyHeartRateZones parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DailyHeartRateZones parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.DailyHeartRateZones parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DailyHeartRateZones parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.DailyHeartRateZones parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DailyHeartRateZones parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.DailyHeartRateZones parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.DailyHeartRateZones prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * User's heart rate zone thresholds based on the Karvonen algorithm for a
+   * specific day.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.DailyHeartRateZones} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.DailyHeartRateZones) + com.google.devicesandservices.health.v4.DailyHeartRateZonesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_DailyHeartRateZones_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_DailyHeartRateZones_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.DailyHeartRateZones.class, + com.google.devicesandservices.health.v4.DailyHeartRateZones.Builder.class); + } + + // Construct using com.google.devicesandservices.health.v4.DailyHeartRateZones.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetDateFieldBuilder(); + internalGetHeartRateZonesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + date_ = null; + if (dateBuilder_ != null) { + dateBuilder_.dispose(); + dateBuilder_ = null; + } + if (heartRateZonesBuilder_ == null) { + heartRateZones_ = java.util.Collections.emptyList(); + } else { + heartRateZones_ = null; + heartRateZonesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_DailyHeartRateZones_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyHeartRateZones getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.DailyHeartRateZones.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyHeartRateZones build() { + com.google.devicesandservices.health.v4.DailyHeartRateZones result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyHeartRateZones buildPartial() { + com.google.devicesandservices.health.v4.DailyHeartRateZones result = + new com.google.devicesandservices.health.v4.DailyHeartRateZones(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.devicesandservices.health.v4.DailyHeartRateZones result) { + if (heartRateZonesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + heartRateZones_ = java.util.Collections.unmodifiableList(heartRateZones_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.heartRateZones_ = heartRateZones_; + } else { + result.heartRateZones_ = heartRateZonesBuilder_.build(); + } + } + + private void buildPartial0(com.google.devicesandservices.health.v4.DailyHeartRateZones result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.date_ = dateBuilder_ == null ? date_ : dateBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.DailyHeartRateZones) { + return mergeFrom((com.google.devicesandservices.health.v4.DailyHeartRateZones) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.devicesandservices.health.v4.DailyHeartRateZones other) { + if (other == com.google.devicesandservices.health.v4.DailyHeartRateZones.getDefaultInstance()) + return this; + if (other.hasDate()) { + mergeDate(other.getDate()); + } + if (heartRateZonesBuilder_ == null) { + if (!other.heartRateZones_.isEmpty()) { + if (heartRateZones_.isEmpty()) { + heartRateZones_ = other.heartRateZones_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureHeartRateZonesIsMutable(); + heartRateZones_.addAll(other.heartRateZones_); + } + onChanged(); + } + } else { + if (!other.heartRateZones_.isEmpty()) { + if (heartRateZonesBuilder_.isEmpty()) { + heartRateZonesBuilder_.dispose(); + heartRateZonesBuilder_ = null; + heartRateZones_ = other.heartRateZones_; + bitField0_ = (bitField0_ & ~0x00000002); + heartRateZonesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetHeartRateZonesFieldBuilder() + : null; + } else { + heartRateZonesBuilder_.addAllMessages(other.heartRateZones_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(internalGetDateFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + com.google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone m = + input.readMessage( + com.google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone + .parser(), + extensionRegistry); + if (heartRateZonesBuilder_ == null) { + ensureHeartRateZonesIsMutable(); + heartRateZones_.add(m); + } else { + heartRateZonesBuilder_.addMessage(m); + } + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.type.Date date_; + private com.google.protobuf.SingleFieldBuilder< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> + dateBuilder_; + + /** + * + * + *
+     * Required. Date (in user's timezone) of the heart rate zones record.
+     * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the date field is set. + */ + public boolean hasDate() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. Date (in user's timezone) of the heart rate zones record.
+     * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The date. + */ + public com.google.type.Date getDate() { + if (dateBuilder_ == null) { + return date_ == null ? com.google.type.Date.getDefaultInstance() : date_; + } else { + return dateBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. Date (in user's timezone) of the heart rate zones record.
+     * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setDate(com.google.type.Date value) { + if (dateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + date_ = value; + } else { + dateBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Date (in user's timezone) of the heart rate zones record.
+     * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setDate(com.google.type.Date.Builder builderForValue) { + if (dateBuilder_ == null) { + date_ = builderForValue.build(); + } else { + dateBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Date (in user's timezone) of the heart rate zones record.
+     * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeDate(com.google.type.Date value) { + if (dateBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && date_ != null + && date_ != com.google.type.Date.getDefaultInstance()) { + getDateBuilder().mergeFrom(value); + } else { + date_ = value; + } + } else { + dateBuilder_.mergeFrom(value); + } + if (date_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. Date (in user's timezone) of the heart rate zones record.
+     * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearDate() { + bitField0_ = (bitField0_ & ~0x00000001); + date_ = null; + if (dateBuilder_ != null) { + dateBuilder_.dispose(); + dateBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Date (in user's timezone) of the heart rate zones record.
+     * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.type.Date.Builder getDateBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetDateFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. Date (in user's timezone) of the heart rate zones record.
+     * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.type.DateOrBuilder getDateOrBuilder() { + if (dateBuilder_ != null) { + return dateBuilder_.getMessageOrBuilder(); + } else { + return date_ == null ? com.google.type.Date.getDefaultInstance() : date_; + } + } + + /** + * + * + *
+     * Required. Date (in user's timezone) of the heart rate zones record.
+     * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> + internalGetDateFieldBuilder() { + if (dateBuilder_ == null) { + dateBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder>( + getDate(), getParentForChildren(), isClean()); + date_ = null; + } + return dateBuilder_; + } + + private java.util.List< + com.google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone> + heartRateZones_ = java.util.Collections.emptyList(); + + private void ensureHeartRateZonesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + heartRateZones_ = + new java.util.ArrayList< + com.google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone>( + heartRateZones_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone, + com.google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone.Builder, + com.google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZoneOrBuilder> + heartRateZonesBuilder_; + + /** + * + * + *
+     * Required. The heart rate zones.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone heart_rate_zones = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getHeartRateZonesList() { + if (heartRateZonesBuilder_ == null) { + return java.util.Collections.unmodifiableList(heartRateZones_); + } else { + return heartRateZonesBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Required. The heart rate zones.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone heart_rate_zones = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getHeartRateZonesCount() { + if (heartRateZonesBuilder_ == null) { + return heartRateZones_.size(); + } else { + return heartRateZonesBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Required. The heart rate zones.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone heart_rate_zones = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone + getHeartRateZones(int index) { + if (heartRateZonesBuilder_ == null) { + return heartRateZones_.get(index); + } else { + return heartRateZonesBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Required. The heart rate zones.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone heart_rate_zones = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setHeartRateZones( + int index, + com.google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone value) { + if (heartRateZonesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureHeartRateZonesIsMutable(); + heartRateZones_.set(index, value); + onChanged(); + } else { + heartRateZonesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Required. The heart rate zones.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone heart_rate_zones = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setHeartRateZones( + int index, + com.google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone.Builder + builderForValue) { + if (heartRateZonesBuilder_ == null) { + ensureHeartRateZonesIsMutable(); + heartRateZones_.set(index, builderForValue.build()); + onChanged(); + } else { + heartRateZonesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Required. The heart rate zones.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone heart_rate_zones = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addHeartRateZones( + com.google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone value) { + if (heartRateZonesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureHeartRateZonesIsMutable(); + heartRateZones_.add(value); + onChanged(); + } else { + heartRateZonesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Required. The heart rate zones.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone heart_rate_zones = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addHeartRateZones( + int index, + com.google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone value) { + if (heartRateZonesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureHeartRateZonesIsMutable(); + heartRateZones_.add(index, value); + onChanged(); + } else { + heartRateZonesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Required. The heart rate zones.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone heart_rate_zones = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addHeartRateZones( + com.google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone.Builder + builderForValue) { + if (heartRateZonesBuilder_ == null) { + ensureHeartRateZonesIsMutable(); + heartRateZones_.add(builderForValue.build()); + onChanged(); + } else { + heartRateZonesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Required. The heart rate zones.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone heart_rate_zones = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addHeartRateZones( + int index, + com.google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone.Builder + builderForValue) { + if (heartRateZonesBuilder_ == null) { + ensureHeartRateZonesIsMutable(); + heartRateZones_.add(index, builderForValue.build()); + onChanged(); + } else { + heartRateZonesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Required. The heart rate zones.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone heart_rate_zones = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllHeartRateZones( + java.lang.Iterable< + ? extends com.google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone> + values) { + if (heartRateZonesBuilder_ == null) { + ensureHeartRateZonesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, heartRateZones_); + onChanged(); + } else { + heartRateZonesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Required. The heart rate zones.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone heart_rate_zones = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearHeartRateZones() { + if (heartRateZonesBuilder_ == null) { + heartRateZones_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + heartRateZonesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Required. The heart rate zones.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone heart_rate_zones = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeHeartRateZones(int index) { + if (heartRateZonesBuilder_ == null) { + ensureHeartRateZonesIsMutable(); + heartRateZones_.remove(index); + onChanged(); + } else { + heartRateZonesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Required. The heart rate zones.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone heart_rate_zones = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone.Builder + getHeartRateZonesBuilder(int index) { + return internalGetHeartRateZonesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Required. The heart rate zones.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone heart_rate_zones = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZoneOrBuilder + getHeartRateZonesOrBuilder(int index) { + if (heartRateZonesBuilder_ == null) { + return heartRateZones_.get(index); + } else { + return heartRateZonesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Required. The heart rate zones.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone heart_rate_zones = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List< + ? extends + com.google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZoneOrBuilder> + getHeartRateZonesOrBuilderList() { + if (heartRateZonesBuilder_ != null) { + return heartRateZonesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(heartRateZones_); + } + } + + /** + * + * + *
+     * Required. The heart rate zones.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone heart_rate_zones = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone.Builder + addHeartRateZonesBuilder() { + return internalGetHeartRateZonesFieldBuilder() + .addBuilder( + com.google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone + .getDefaultInstance()); + } + + /** + * + * + *
+     * Required. The heart rate zones.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone heart_rate_zones = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone.Builder + addHeartRateZonesBuilder(int index) { + return internalGetHeartRateZonesFieldBuilder() + .addBuilder( + index, + com.google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone + .getDefaultInstance()); + } + + /** + * + * + *
+     * Required. The heart rate zones.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone heart_rate_zones = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List< + com.google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone.Builder> + getHeartRateZonesBuilderList() { + return internalGetHeartRateZonesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone, + com.google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone.Builder, + com.google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZoneOrBuilder> + internalGetHeartRateZonesFieldBuilder() { + if (heartRateZonesBuilder_ == null) { + heartRateZonesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone, + com.google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone.Builder, + com.google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZoneOrBuilder>( + heartRateZones_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + heartRateZones_ = null; + } + return heartRateZonesBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.DailyHeartRateZones) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.DailyHeartRateZones) + private static final com.google.devicesandservices.health.v4.DailyHeartRateZones DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.DailyHeartRateZones(); + } + + public static com.google.devicesandservices.health.v4.DailyHeartRateZones getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DailyHeartRateZones parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyHeartRateZones getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DailyHeartRateZonesOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DailyHeartRateZonesOrBuilder.java new file mode 100644 index 000000000000..4d47256bed67 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DailyHeartRateZonesOrBuilder.java @@ -0,0 +1,136 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface DailyHeartRateZonesOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.DailyHeartRateZones) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Date (in user's timezone) of the heart rate zones record.
+   * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the date field is set. + */ + boolean hasDate(); + + /** + * + * + *
+   * Required. Date (in user's timezone) of the heart rate zones record.
+   * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The date. + */ + com.google.type.Date getDate(); + + /** + * + * + *
+   * Required. Date (in user's timezone) of the heart rate zones record.
+   * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.type.DateOrBuilder getDateOrBuilder(); + + /** + * + * + *
+   * Required. The heart rate zones.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone heart_rate_zones = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List + getHeartRateZonesList(); + + /** + * + * + *
+   * Required. The heart rate zones.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone heart_rate_zones = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone getHeartRateZones( + int index); + + /** + * + * + *
+   * Required. The heart rate zones.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone heart_rate_zones = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getHeartRateZonesCount(); + + /** + * + * + *
+   * Required. The heart rate zones.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone heart_rate_zones = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List< + ? extends + com.google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZoneOrBuilder> + getHeartRateZonesOrBuilderList(); + + /** + * + * + *
+   * Required. The heart rate zones.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZone heart_rate_zones = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZoneOrBuilder + getHeartRateZonesOrBuilder(int index); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DailyOxygenSaturation.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DailyOxygenSaturation.java new file mode 100644 index 000000000000..e7931aaef2a5 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DailyOxygenSaturation.java @@ -0,0 +1,1117 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * A daily oxygen saturation (SpO2) record.
+ * Represents the user's daily oxygen saturation summary, typically calculated
+ * during sleep.
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.DailyOxygenSaturation} + */ +@com.google.protobuf.Generated +public final class DailyOxygenSaturation extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.DailyOxygenSaturation) + DailyOxygenSaturationOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DailyOxygenSaturation"); + } + + // Use DailyOxygenSaturation.newBuilder() to construct. + private DailyOxygenSaturation(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DailyOxygenSaturation() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_DailyOxygenSaturation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_DailyOxygenSaturation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.DailyOxygenSaturation.class, + com.google.devicesandservices.health.v4.DailyOxygenSaturation.Builder.class); + } + + private int bitField0_; + public static final int DATE_FIELD_NUMBER = 1; + private com.google.type.Date date_; + + /** + * + * + *
+   * Required. Date (in user's timezone) of the daily oxygen saturation record.
+   * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the date field is set. + */ + @java.lang.Override + public boolean hasDate() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. Date (in user's timezone) of the daily oxygen saturation record.
+   * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The date. + */ + @java.lang.Override + public com.google.type.Date getDate() { + return date_ == null ? com.google.type.Date.getDefaultInstance() : date_; + } + + /** + * + * + *
+   * Required. Date (in user's timezone) of the daily oxygen saturation record.
+   * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.type.DateOrBuilder getDateOrBuilder() { + return date_ == null ? com.google.type.Date.getDefaultInstance() : date_; + } + + public static final int AVERAGE_PERCENTAGE_FIELD_NUMBER = 2; + private double averagePercentage_ = 0D; + + /** + * + * + *
+   * Required. The average value of the oxygen saturation samples during the
+   * sleep.
+   * 
+ * + * double average_percentage = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The averagePercentage. + */ + @java.lang.Override + public double getAveragePercentage() { + return averagePercentage_; + } + + public static final int LOWER_BOUND_PERCENTAGE_FIELD_NUMBER = 3; + private double lowerBoundPercentage_ = 0D; + + /** + * + * + *
+   * Required. The lower bound of the confidence interval of oxygen saturation
+   * samples during sleep.
+   * 
+ * + * double lower_bound_percentage = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The lowerBoundPercentage. + */ + @java.lang.Override + public double getLowerBoundPercentage() { + return lowerBoundPercentage_; + } + + public static final int UPPER_BOUND_PERCENTAGE_FIELD_NUMBER = 4; + private double upperBoundPercentage_ = 0D; + + /** + * + * + *
+   * Required. The upper bound of the confidence interval of oxygen saturation
+   * samples during sleep.
+   * 
+ * + * double upper_bound_percentage = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The upperBoundPercentage. + */ + @java.lang.Override + public double getUpperBoundPercentage() { + return upperBoundPercentage_; + } + + public static final int STANDARD_DEVIATION_PERCENTAGE_FIELD_NUMBER = 5; + private double standardDeviationPercentage_ = 0D; + + /** + * + * + *
+   * Optional. Standard deviation of the daily oxygen saturation averages from
+   * the past 7-30 days.
+   * 
+ * + * double standard_deviation_percentage = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The standardDeviationPercentage. + */ + @java.lang.Override + public double getStandardDeviationPercentage() { + return standardDeviationPercentage_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getDate()); + } + if (java.lang.Double.doubleToRawLongBits(averagePercentage_) != 0) { + output.writeDouble(2, averagePercentage_); + } + if (java.lang.Double.doubleToRawLongBits(lowerBoundPercentage_) != 0) { + output.writeDouble(3, lowerBoundPercentage_); + } + if (java.lang.Double.doubleToRawLongBits(upperBoundPercentage_) != 0) { + output.writeDouble(4, upperBoundPercentage_); + } + if (java.lang.Double.doubleToRawLongBits(standardDeviationPercentage_) != 0) { + output.writeDouble(5, standardDeviationPercentage_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getDate()); + } + if (java.lang.Double.doubleToRawLongBits(averagePercentage_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(2, averagePercentage_); + } + if (java.lang.Double.doubleToRawLongBits(lowerBoundPercentage_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(3, lowerBoundPercentage_); + } + if (java.lang.Double.doubleToRawLongBits(upperBoundPercentage_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(4, upperBoundPercentage_); + } + if (java.lang.Double.doubleToRawLongBits(standardDeviationPercentage_) != 0) { + size += + com.google.protobuf.CodedOutputStream.computeDoubleSize(5, standardDeviationPercentage_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.DailyOxygenSaturation)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.DailyOxygenSaturation other = + (com.google.devicesandservices.health.v4.DailyOxygenSaturation) obj; + + if (hasDate() != other.hasDate()) return false; + if (hasDate()) { + if (!getDate().equals(other.getDate())) return false; + } + if (java.lang.Double.doubleToLongBits(getAveragePercentage()) + != java.lang.Double.doubleToLongBits(other.getAveragePercentage())) return false; + if (java.lang.Double.doubleToLongBits(getLowerBoundPercentage()) + != java.lang.Double.doubleToLongBits(other.getLowerBoundPercentage())) return false; + if (java.lang.Double.doubleToLongBits(getUpperBoundPercentage()) + != java.lang.Double.doubleToLongBits(other.getUpperBoundPercentage())) return false; + if (java.lang.Double.doubleToLongBits(getStandardDeviationPercentage()) + != java.lang.Double.doubleToLongBits(other.getStandardDeviationPercentage())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasDate()) { + hash = (37 * hash) + DATE_FIELD_NUMBER; + hash = (53 * hash) + getDate().hashCode(); + } + hash = (37 * hash) + AVERAGE_PERCENTAGE_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getAveragePercentage())); + hash = (37 * hash) + LOWER_BOUND_PERCENTAGE_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getLowerBoundPercentage())); + hash = (37 * hash) + UPPER_BOUND_PERCENTAGE_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getUpperBoundPercentage())); + hash = (37 * hash) + STANDARD_DEVIATION_PERCENTAGE_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getStandardDeviationPercentage())); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.DailyOxygenSaturation parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.DailyOxygenSaturation parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DailyOxygenSaturation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.DailyOxygenSaturation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DailyOxygenSaturation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.DailyOxygenSaturation parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DailyOxygenSaturation parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.DailyOxygenSaturation parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DailyOxygenSaturation parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.DailyOxygenSaturation parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DailyOxygenSaturation parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.DailyOxygenSaturation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.DailyOxygenSaturation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A daily oxygen saturation (SpO2) record.
+   * Represents the user's daily oxygen saturation summary, typically calculated
+   * during sleep.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.DailyOxygenSaturation} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.DailyOxygenSaturation) + com.google.devicesandservices.health.v4.DailyOxygenSaturationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_DailyOxygenSaturation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_DailyOxygenSaturation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.DailyOxygenSaturation.class, + com.google.devicesandservices.health.v4.DailyOxygenSaturation.Builder.class); + } + + // Construct using com.google.devicesandservices.health.v4.DailyOxygenSaturation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetDateFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + date_ = null; + if (dateBuilder_ != null) { + dateBuilder_.dispose(); + dateBuilder_ = null; + } + averagePercentage_ = 0D; + lowerBoundPercentage_ = 0D; + upperBoundPercentage_ = 0D; + standardDeviationPercentage_ = 0D; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_DailyOxygenSaturation_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyOxygenSaturation + getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.DailyOxygenSaturation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyOxygenSaturation build() { + com.google.devicesandservices.health.v4.DailyOxygenSaturation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyOxygenSaturation buildPartial() { + com.google.devicesandservices.health.v4.DailyOxygenSaturation result = + new com.google.devicesandservices.health.v4.DailyOxygenSaturation(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.devicesandservices.health.v4.DailyOxygenSaturation result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.date_ = dateBuilder_ == null ? date_ : dateBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.averagePercentage_ = averagePercentage_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.lowerBoundPercentage_ = lowerBoundPercentage_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.upperBoundPercentage_ = upperBoundPercentage_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.standardDeviationPercentage_ = standardDeviationPercentage_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.DailyOxygenSaturation) { + return mergeFrom((com.google.devicesandservices.health.v4.DailyOxygenSaturation) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.devicesandservices.health.v4.DailyOxygenSaturation other) { + if (other + == com.google.devicesandservices.health.v4.DailyOxygenSaturation.getDefaultInstance()) + return this; + if (other.hasDate()) { + mergeDate(other.getDate()); + } + if (java.lang.Double.doubleToRawLongBits(other.getAveragePercentage()) != 0) { + setAveragePercentage(other.getAveragePercentage()); + } + if (java.lang.Double.doubleToRawLongBits(other.getLowerBoundPercentage()) != 0) { + setLowerBoundPercentage(other.getLowerBoundPercentage()); + } + if (java.lang.Double.doubleToRawLongBits(other.getUpperBoundPercentage()) != 0) { + setUpperBoundPercentage(other.getUpperBoundPercentage()); + } + if (java.lang.Double.doubleToRawLongBits(other.getStandardDeviationPercentage()) != 0) { + setStandardDeviationPercentage(other.getStandardDeviationPercentage()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(internalGetDateFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 17: + { + averagePercentage_ = input.readDouble(); + bitField0_ |= 0x00000002; + break; + } // case 17 + case 25: + { + lowerBoundPercentage_ = input.readDouble(); + bitField0_ |= 0x00000004; + break; + } // case 25 + case 33: + { + upperBoundPercentage_ = input.readDouble(); + bitField0_ |= 0x00000008; + break; + } // case 33 + case 41: + { + standardDeviationPercentage_ = input.readDouble(); + bitField0_ |= 0x00000010; + break; + } // case 41 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.type.Date date_; + private com.google.protobuf.SingleFieldBuilder< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> + dateBuilder_; + + /** + * + * + *
+     * Required. Date (in user's timezone) of the daily oxygen saturation record.
+     * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the date field is set. + */ + public boolean hasDate() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. Date (in user's timezone) of the daily oxygen saturation record.
+     * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The date. + */ + public com.google.type.Date getDate() { + if (dateBuilder_ == null) { + return date_ == null ? com.google.type.Date.getDefaultInstance() : date_; + } else { + return dateBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. Date (in user's timezone) of the daily oxygen saturation record.
+     * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setDate(com.google.type.Date value) { + if (dateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + date_ = value; + } else { + dateBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Date (in user's timezone) of the daily oxygen saturation record.
+     * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setDate(com.google.type.Date.Builder builderForValue) { + if (dateBuilder_ == null) { + date_ = builderForValue.build(); + } else { + dateBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Date (in user's timezone) of the daily oxygen saturation record.
+     * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeDate(com.google.type.Date value) { + if (dateBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && date_ != null + && date_ != com.google.type.Date.getDefaultInstance()) { + getDateBuilder().mergeFrom(value); + } else { + date_ = value; + } + } else { + dateBuilder_.mergeFrom(value); + } + if (date_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. Date (in user's timezone) of the daily oxygen saturation record.
+     * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearDate() { + bitField0_ = (bitField0_ & ~0x00000001); + date_ = null; + if (dateBuilder_ != null) { + dateBuilder_.dispose(); + dateBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Date (in user's timezone) of the daily oxygen saturation record.
+     * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.type.Date.Builder getDateBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetDateFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. Date (in user's timezone) of the daily oxygen saturation record.
+     * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.type.DateOrBuilder getDateOrBuilder() { + if (dateBuilder_ != null) { + return dateBuilder_.getMessageOrBuilder(); + } else { + return date_ == null ? com.google.type.Date.getDefaultInstance() : date_; + } + } + + /** + * + * + *
+     * Required. Date (in user's timezone) of the daily oxygen saturation record.
+     * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> + internalGetDateFieldBuilder() { + if (dateBuilder_ == null) { + dateBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder>( + getDate(), getParentForChildren(), isClean()); + date_ = null; + } + return dateBuilder_; + } + + private double averagePercentage_; + + /** + * + * + *
+     * Required. The average value of the oxygen saturation samples during the
+     * sleep.
+     * 
+ * + * double average_percentage = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The averagePercentage. + */ + @java.lang.Override + public double getAveragePercentage() { + return averagePercentage_; + } + + /** + * + * + *
+     * Required. The average value of the oxygen saturation samples during the
+     * sleep.
+     * 
+ * + * double average_percentage = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The averagePercentage to set. + * @return This builder for chaining. + */ + public Builder setAveragePercentage(double value) { + + averagePercentage_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The average value of the oxygen saturation samples during the
+     * sleep.
+     * 
+ * + * double average_percentage = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearAveragePercentage() { + bitField0_ = (bitField0_ & ~0x00000002); + averagePercentage_ = 0D; + onChanged(); + return this; + } + + private double lowerBoundPercentage_; + + /** + * + * + *
+     * Required. The lower bound of the confidence interval of oxygen saturation
+     * samples during sleep.
+     * 
+ * + * double lower_bound_percentage = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The lowerBoundPercentage. + */ + @java.lang.Override + public double getLowerBoundPercentage() { + return lowerBoundPercentage_; + } + + /** + * + * + *
+     * Required. The lower bound of the confidence interval of oxygen saturation
+     * samples during sleep.
+     * 
+ * + * double lower_bound_percentage = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The lowerBoundPercentage to set. + * @return This builder for chaining. + */ + public Builder setLowerBoundPercentage(double value) { + + lowerBoundPercentage_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The lower bound of the confidence interval of oxygen saturation
+     * samples during sleep.
+     * 
+ * + * double lower_bound_percentage = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearLowerBoundPercentage() { + bitField0_ = (bitField0_ & ~0x00000004); + lowerBoundPercentage_ = 0D; + onChanged(); + return this; + } + + private double upperBoundPercentage_; + + /** + * + * + *
+     * Required. The upper bound of the confidence interval of oxygen saturation
+     * samples during sleep.
+     * 
+ * + * double upper_bound_percentage = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The upperBoundPercentage. + */ + @java.lang.Override + public double getUpperBoundPercentage() { + return upperBoundPercentage_; + } + + /** + * + * + *
+     * Required. The upper bound of the confidence interval of oxygen saturation
+     * samples during sleep.
+     * 
+ * + * double upper_bound_percentage = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The upperBoundPercentage to set. + * @return This builder for chaining. + */ + public Builder setUpperBoundPercentage(double value) { + + upperBoundPercentage_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The upper bound of the confidence interval of oxygen saturation
+     * samples during sleep.
+     * 
+ * + * double upper_bound_percentage = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearUpperBoundPercentage() { + bitField0_ = (bitField0_ & ~0x00000008); + upperBoundPercentage_ = 0D; + onChanged(); + return this; + } + + private double standardDeviationPercentage_; + + /** + * + * + *
+     * Optional. Standard deviation of the daily oxygen saturation averages from
+     * the past 7-30 days.
+     * 
+ * + * double standard_deviation_percentage = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The standardDeviationPercentage. + */ + @java.lang.Override + public double getStandardDeviationPercentage() { + return standardDeviationPercentage_; + } + + /** + * + * + *
+     * Optional. Standard deviation of the daily oxygen saturation averages from
+     * the past 7-30 days.
+     * 
+ * + * double standard_deviation_percentage = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The standardDeviationPercentage to set. + * @return This builder for chaining. + */ + public Builder setStandardDeviationPercentage(double value) { + + standardDeviationPercentage_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Standard deviation of the daily oxygen saturation averages from
+     * the past 7-30 days.
+     * 
+ * + * double standard_deviation_percentage = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearStandardDeviationPercentage() { + bitField0_ = (bitField0_ & ~0x00000010); + standardDeviationPercentage_ = 0D; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.DailyOxygenSaturation) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.DailyOxygenSaturation) + private static final com.google.devicesandservices.health.v4.DailyOxygenSaturation + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.DailyOxygenSaturation(); + } + + public static com.google.devicesandservices.health.v4.DailyOxygenSaturation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DailyOxygenSaturation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyOxygenSaturation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DailyOxygenSaturationOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DailyOxygenSaturationOrBuilder.java new file mode 100644 index 000000000000..db6bdd0b0a8b --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DailyOxygenSaturationOrBuilder.java @@ -0,0 +1,122 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface DailyOxygenSaturationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.DailyOxygenSaturation) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Date (in user's timezone) of the daily oxygen saturation record.
+   * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the date field is set. + */ + boolean hasDate(); + + /** + * + * + *
+   * Required. Date (in user's timezone) of the daily oxygen saturation record.
+   * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The date. + */ + com.google.type.Date getDate(); + + /** + * + * + *
+   * Required. Date (in user's timezone) of the daily oxygen saturation record.
+   * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.type.DateOrBuilder getDateOrBuilder(); + + /** + * + * + *
+   * Required. The average value of the oxygen saturation samples during the
+   * sleep.
+   * 
+ * + * double average_percentage = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The averagePercentage. + */ + double getAveragePercentage(); + + /** + * + * + *
+   * Required. The lower bound of the confidence interval of oxygen saturation
+   * samples during sleep.
+   * 
+ * + * double lower_bound_percentage = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The lowerBoundPercentage. + */ + double getLowerBoundPercentage(); + + /** + * + * + *
+   * Required. The upper bound of the confidence interval of oxygen saturation
+   * samples during sleep.
+   * 
+ * + * double upper_bound_percentage = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The upperBoundPercentage. + */ + double getUpperBoundPercentage(); + + /** + * + * + *
+   * Optional. Standard deviation of the daily oxygen saturation averages from
+   * the past 7-30 days.
+   * 
+ * + * double standard_deviation_percentage = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The standardDeviationPercentage. + */ + double getStandardDeviationPercentage(); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DailyRespiratoryRate.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DailyRespiratoryRate.java new file mode 100644 index 000000000000..eb579edbaae9 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DailyRespiratoryRate.java @@ -0,0 +1,791 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * A daily average respiratory rate (breaths per minute) for a day of the year.
+ * One data point per day calculated for the main sleep.
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.DailyRespiratoryRate} + */ +@com.google.protobuf.Generated +public final class DailyRespiratoryRate extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.DailyRespiratoryRate) + DailyRespiratoryRateOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DailyRespiratoryRate"); + } + + // Use DailyRespiratoryRate.newBuilder() to construct. + private DailyRespiratoryRate(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DailyRespiratoryRate() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_DailyRespiratoryRate_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_DailyRespiratoryRate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.DailyRespiratoryRate.class, + com.google.devicesandservices.health.v4.DailyRespiratoryRate.Builder.class); + } + + private int bitField0_; + public static final int DATE_FIELD_NUMBER = 1; + private com.google.type.Date date_; + + /** + * + * + *
+   * Required. The date on which the respiratory rate was measured.
+   * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the date field is set. + */ + @java.lang.Override + public boolean hasDate() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The date on which the respiratory rate was measured.
+   * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The date. + */ + @java.lang.Override + public com.google.type.Date getDate() { + return date_ == null ? com.google.type.Date.getDefaultInstance() : date_; + } + + /** + * + * + *
+   * Required. The date on which the respiratory rate was measured.
+   * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.type.DateOrBuilder getDateOrBuilder() { + return date_ == null ? com.google.type.Date.getDefaultInstance() : date_; + } + + public static final int BREATHS_PER_MINUTE_FIELD_NUMBER = 2; + private double breathsPerMinute_ = 0D; + + /** + * + * + *
+   * Required. The average number of breaths taken per minute.
+   * 
+ * + * double breaths_per_minute = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The breathsPerMinute. + */ + @java.lang.Override + public double getBreathsPerMinute() { + return breathsPerMinute_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getDate()); + } + if (java.lang.Double.doubleToRawLongBits(breathsPerMinute_) != 0) { + output.writeDouble(2, breathsPerMinute_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getDate()); + } + if (java.lang.Double.doubleToRawLongBits(breathsPerMinute_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(2, breathsPerMinute_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.DailyRespiratoryRate)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.DailyRespiratoryRate other = + (com.google.devicesandservices.health.v4.DailyRespiratoryRate) obj; + + if (hasDate() != other.hasDate()) return false; + if (hasDate()) { + if (!getDate().equals(other.getDate())) return false; + } + if (java.lang.Double.doubleToLongBits(getBreathsPerMinute()) + != java.lang.Double.doubleToLongBits(other.getBreathsPerMinute())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasDate()) { + hash = (37 * hash) + DATE_FIELD_NUMBER; + hash = (53 * hash) + getDate().hashCode(); + } + hash = (37 * hash) + BREATHS_PER_MINUTE_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getBreathsPerMinute())); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.DailyRespiratoryRate parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.DailyRespiratoryRate parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DailyRespiratoryRate parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.DailyRespiratoryRate parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DailyRespiratoryRate parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.DailyRespiratoryRate parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DailyRespiratoryRate parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.DailyRespiratoryRate parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DailyRespiratoryRate parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.DailyRespiratoryRate parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DailyRespiratoryRate parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.DailyRespiratoryRate parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.DailyRespiratoryRate prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A daily average respiratory rate (breaths per minute) for a day of the year.
+   * One data point per day calculated for the main sleep.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.DailyRespiratoryRate} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.DailyRespiratoryRate) + com.google.devicesandservices.health.v4.DailyRespiratoryRateOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_DailyRespiratoryRate_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_DailyRespiratoryRate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.DailyRespiratoryRate.class, + com.google.devicesandservices.health.v4.DailyRespiratoryRate.Builder.class); + } + + // Construct using com.google.devicesandservices.health.v4.DailyRespiratoryRate.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetDateFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + date_ = null; + if (dateBuilder_ != null) { + dateBuilder_.dispose(); + dateBuilder_ = null; + } + breathsPerMinute_ = 0D; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_DailyRespiratoryRate_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyRespiratoryRate + getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.DailyRespiratoryRate.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyRespiratoryRate build() { + com.google.devicesandservices.health.v4.DailyRespiratoryRate result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyRespiratoryRate buildPartial() { + com.google.devicesandservices.health.v4.DailyRespiratoryRate result = + new com.google.devicesandservices.health.v4.DailyRespiratoryRate(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.devicesandservices.health.v4.DailyRespiratoryRate result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.date_ = dateBuilder_ == null ? date_ : dateBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.breathsPerMinute_ = breathsPerMinute_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.DailyRespiratoryRate) { + return mergeFrom((com.google.devicesandservices.health.v4.DailyRespiratoryRate) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.devicesandservices.health.v4.DailyRespiratoryRate other) { + if (other + == com.google.devicesandservices.health.v4.DailyRespiratoryRate.getDefaultInstance()) + return this; + if (other.hasDate()) { + mergeDate(other.getDate()); + } + if (java.lang.Double.doubleToRawLongBits(other.getBreathsPerMinute()) != 0) { + setBreathsPerMinute(other.getBreathsPerMinute()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(internalGetDateFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 17: + { + breathsPerMinute_ = input.readDouble(); + bitField0_ |= 0x00000002; + break; + } // case 17 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.type.Date date_; + private com.google.protobuf.SingleFieldBuilder< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> + dateBuilder_; + + /** + * + * + *
+     * Required. The date on which the respiratory rate was measured.
+     * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the date field is set. + */ + public boolean hasDate() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. The date on which the respiratory rate was measured.
+     * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The date. + */ + public com.google.type.Date getDate() { + if (dateBuilder_ == null) { + return date_ == null ? com.google.type.Date.getDefaultInstance() : date_; + } else { + return dateBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The date on which the respiratory rate was measured.
+     * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setDate(com.google.type.Date value) { + if (dateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + date_ = value; + } else { + dateBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The date on which the respiratory rate was measured.
+     * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setDate(com.google.type.Date.Builder builderForValue) { + if (dateBuilder_ == null) { + date_ = builderForValue.build(); + } else { + dateBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The date on which the respiratory rate was measured.
+     * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeDate(com.google.type.Date value) { + if (dateBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && date_ != null + && date_ != com.google.type.Date.getDefaultInstance()) { + getDateBuilder().mergeFrom(value); + } else { + date_ = value; + } + } else { + dateBuilder_.mergeFrom(value); + } + if (date_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The date on which the respiratory rate was measured.
+     * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearDate() { + bitField0_ = (bitField0_ & ~0x00000001); + date_ = null; + if (dateBuilder_ != null) { + dateBuilder_.dispose(); + dateBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The date on which the respiratory rate was measured.
+     * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.type.Date.Builder getDateBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetDateFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The date on which the respiratory rate was measured.
+     * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.type.DateOrBuilder getDateOrBuilder() { + if (dateBuilder_ != null) { + return dateBuilder_.getMessageOrBuilder(); + } else { + return date_ == null ? com.google.type.Date.getDefaultInstance() : date_; + } + } + + /** + * + * + *
+     * Required. The date on which the respiratory rate was measured.
+     * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> + internalGetDateFieldBuilder() { + if (dateBuilder_ == null) { + dateBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder>( + getDate(), getParentForChildren(), isClean()); + date_ = null; + } + return dateBuilder_; + } + + private double breathsPerMinute_; + + /** + * + * + *
+     * Required. The average number of breaths taken per minute.
+     * 
+ * + * double breaths_per_minute = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The breathsPerMinute. + */ + @java.lang.Override + public double getBreathsPerMinute() { + return breathsPerMinute_; + } + + /** + * + * + *
+     * Required. The average number of breaths taken per minute.
+     * 
+ * + * double breaths_per_minute = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The breathsPerMinute to set. + * @return This builder for chaining. + */ + public Builder setBreathsPerMinute(double value) { + + breathsPerMinute_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The average number of breaths taken per minute.
+     * 
+ * + * double breaths_per_minute = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearBreathsPerMinute() { + bitField0_ = (bitField0_ & ~0x00000002); + breathsPerMinute_ = 0D; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.DailyRespiratoryRate) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.DailyRespiratoryRate) + private static final com.google.devicesandservices.health.v4.DailyRespiratoryRate + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.DailyRespiratoryRate(); + } + + public static com.google.devicesandservices.health.v4.DailyRespiratoryRate getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DailyRespiratoryRate parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyRespiratoryRate getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DailyRespiratoryRateOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DailyRespiratoryRateOrBuilder.java new file mode 100644 index 000000000000..8340168ea490 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DailyRespiratoryRateOrBuilder.java @@ -0,0 +1,78 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface DailyRespiratoryRateOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.DailyRespiratoryRate) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The date on which the respiratory rate was measured.
+   * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the date field is set. + */ + boolean hasDate(); + + /** + * + * + *
+   * Required. The date on which the respiratory rate was measured.
+   * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The date. + */ + com.google.type.Date getDate(); + + /** + * + * + *
+   * Required. The date on which the respiratory rate was measured.
+   * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.type.DateOrBuilder getDateOrBuilder(); + + /** + * + * + *
+   * Required. The average number of breaths taken per minute.
+   * 
+ * + * double breaths_per_minute = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The breathsPerMinute. + */ + double getBreathsPerMinute(); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DailyRestingHeartRate.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DailyRestingHeartRate.java new file mode 100644 index 000000000000..634c3f83c0af --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DailyRestingHeartRate.java @@ -0,0 +1,2007 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * Measures the daily resting heart rate for a user, calculated using the all
+ * day heart rate measurements.
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.DailyRestingHeartRate} + */ +@com.google.protobuf.Generated +public final class DailyRestingHeartRate extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.DailyRestingHeartRate) + DailyRestingHeartRateOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DailyRestingHeartRate"); + } + + // Use DailyRestingHeartRate.newBuilder() to construct. + private DailyRestingHeartRate(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DailyRestingHeartRate() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_DailyRestingHeartRate_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_DailyRestingHeartRate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.DailyRestingHeartRate.class, + com.google.devicesandservices.health.v4.DailyRestingHeartRate.Builder.class); + } + + public interface DailyRestingHeartRateMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.DailyRestingHeartRate.DailyRestingHeartRateMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. The method used to calculate the resting heart rate.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyRestingHeartRate.DailyRestingHeartRateMetadata.CalculationMethod calculation_method = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for calculationMethod. + */ + int getCalculationMethodValue(); + + /** + * + * + *
+     * Required. The method used to calculate the resting heart rate.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyRestingHeartRate.DailyRestingHeartRateMetadata.CalculationMethod calculation_method = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The calculationMethod. + */ + com.google.devicesandservices.health.v4.DailyRestingHeartRate.DailyRestingHeartRateMetadata + .CalculationMethod + getCalculationMethod(); + } + + /** + * + * + *
+   * Metadata for the daily resting heart rate.
+   * 
+ * + * Protobuf type {@code + * google.devicesandservices.health.v4.DailyRestingHeartRate.DailyRestingHeartRateMetadata} + */ + public static final class DailyRestingHeartRateMetadata + extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.DailyRestingHeartRate.DailyRestingHeartRateMetadata) + DailyRestingHeartRateMetadataOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DailyRestingHeartRateMetadata"); + } + + // Use DailyRestingHeartRateMetadata.newBuilder() to construct. + private DailyRestingHeartRateMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DailyRestingHeartRateMetadata() { + calculationMethod_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_DailyRestingHeartRate_DailyRestingHeartRateMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_DailyRestingHeartRate_DailyRestingHeartRateMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.DailyRestingHeartRate + .DailyRestingHeartRateMetadata.class, + com.google.devicesandservices.health.v4.DailyRestingHeartRate + .DailyRestingHeartRateMetadata.Builder.class); + } + + /** + * + * + *
+     * The method used to calculate the resting heart rate.
+     * 
+ * + * Protobuf enum {@code + * google.devicesandservices.health.v4.DailyRestingHeartRate.DailyRestingHeartRateMetadata.CalculationMethod} + */ + public enum CalculationMethod implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * The calculation method is unspecified.
+       * 
+ * + * CALCULATION_METHOD_UNSPECIFIED = 0; + */ + CALCULATION_METHOD_UNSPECIFIED(0), + /** + * + * + *
+       * The resting heart rate is calculated using the sleep data.
+       * 
+ * + * WITH_SLEEP = 1; + */ + WITH_SLEEP(1), + /** + * + * + *
+       * The resting heart rate is calculated using only awake data.
+       * 
+ * + * ONLY_WITH_AWAKE_DATA = 2; + */ + ONLY_WITH_AWAKE_DATA(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CalculationMethod"); + } + + /** + * + * + *
+       * The calculation method is unspecified.
+       * 
+ * + * CALCULATION_METHOD_UNSPECIFIED = 0; + */ + public static final int CALCULATION_METHOD_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+       * The resting heart rate is calculated using the sleep data.
+       * 
+ * + * WITH_SLEEP = 1; + */ + public static final int WITH_SLEEP_VALUE = 1; + + /** + * + * + *
+       * The resting heart rate is calculated using only awake data.
+       * 
+ * + * ONLY_WITH_AWAKE_DATA = 2; + */ + public static final int ONLY_WITH_AWAKE_DATA_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static CalculationMethod valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static CalculationMethod forNumber(int value) { + switch (value) { + case 0: + return CALCULATION_METHOD_UNSPECIFIED; + case 1: + return WITH_SLEEP; + case 2: + return ONLY_WITH_AWAKE_DATA; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public CalculationMethod findValueByNumber(int number) { + return CalculationMethod.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DailyRestingHeartRate + .DailyRestingHeartRateMetadata.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final CalculationMethod[] VALUES = values(); + + public static CalculationMethod valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private CalculationMethod(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.devicesandservices.health.v4.DailyRestingHeartRate.DailyRestingHeartRateMetadata.CalculationMethod) + } + + public static final int CALCULATION_METHOD_FIELD_NUMBER = 1; + private int calculationMethod_ = 0; + + /** + * + * + *
+     * Required. The method used to calculate the resting heart rate.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyRestingHeartRate.DailyRestingHeartRateMetadata.CalculationMethod calculation_method = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for calculationMethod. + */ + @java.lang.Override + public int getCalculationMethodValue() { + return calculationMethod_; + } + + /** + * + * + *
+     * Required. The method used to calculate the resting heart rate.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyRestingHeartRate.DailyRestingHeartRateMetadata.CalculationMethod calculation_method = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The calculationMethod. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyRestingHeartRate + .DailyRestingHeartRateMetadata.CalculationMethod + getCalculationMethod() { + com.google.devicesandservices.health.v4.DailyRestingHeartRate.DailyRestingHeartRateMetadata + .CalculationMethod + result = + com.google.devicesandservices.health.v4.DailyRestingHeartRate + .DailyRestingHeartRateMetadata.CalculationMethod.forNumber(calculationMethod_); + return result == null + ? com.google.devicesandservices.health.v4.DailyRestingHeartRate + .DailyRestingHeartRateMetadata.CalculationMethod.UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (calculationMethod_ + != com.google.devicesandservices.health.v4.DailyRestingHeartRate + .DailyRestingHeartRateMetadata.CalculationMethod.CALCULATION_METHOD_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, calculationMethod_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (calculationMethod_ + != com.google.devicesandservices.health.v4.DailyRestingHeartRate + .DailyRestingHeartRateMetadata.CalculationMethod.CALCULATION_METHOD_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, calculationMethod_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.devicesandservices.health.v4.DailyRestingHeartRate + .DailyRestingHeartRateMetadata)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.DailyRestingHeartRate.DailyRestingHeartRateMetadata + other = + (com.google.devicesandservices.health.v4.DailyRestingHeartRate + .DailyRestingHeartRateMetadata) + obj; + + if (calculationMethod_ != other.calculationMethod_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CALCULATION_METHOD_FIELD_NUMBER; + hash = (53 * hash) + calculationMethod_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.DailyRestingHeartRate + .DailyRestingHeartRateMetadata + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.DailyRestingHeartRate + .DailyRestingHeartRateMetadata + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DailyRestingHeartRate + .DailyRestingHeartRateMetadata + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.DailyRestingHeartRate + .DailyRestingHeartRateMetadata + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DailyRestingHeartRate + .DailyRestingHeartRateMetadata + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.DailyRestingHeartRate + .DailyRestingHeartRateMetadata + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DailyRestingHeartRate + .DailyRestingHeartRateMetadata + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.DailyRestingHeartRate + .DailyRestingHeartRateMetadata + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DailyRestingHeartRate + .DailyRestingHeartRateMetadata + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.DailyRestingHeartRate + .DailyRestingHeartRateMetadata + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DailyRestingHeartRate + .DailyRestingHeartRateMetadata + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.DailyRestingHeartRate + .DailyRestingHeartRateMetadata + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.DailyRestingHeartRate.DailyRestingHeartRateMetadata + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+     * Metadata for the daily resting heart rate.
+     * 
+ * + * Protobuf type {@code + * google.devicesandservices.health.v4.DailyRestingHeartRate.DailyRestingHeartRateMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.DailyRestingHeartRate.DailyRestingHeartRateMetadata) + com.google.devicesandservices.health.v4.DailyRestingHeartRate + .DailyRestingHeartRateMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_DailyRestingHeartRate_DailyRestingHeartRateMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_DailyRestingHeartRate_DailyRestingHeartRateMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.DailyRestingHeartRate + .DailyRestingHeartRateMetadata.class, + com.google.devicesandservices.health.v4.DailyRestingHeartRate + .DailyRestingHeartRateMetadata.Builder.class); + } + + // Construct using + // com.google.devicesandservices.health.v4.DailyRestingHeartRate.DailyRestingHeartRateMetadata.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + calculationMethod_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_DailyRestingHeartRate_DailyRestingHeartRateMetadata_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyRestingHeartRate + .DailyRestingHeartRateMetadata + getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.DailyRestingHeartRate + .DailyRestingHeartRateMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyRestingHeartRate + .DailyRestingHeartRateMetadata + build() { + com.google.devicesandservices.health.v4.DailyRestingHeartRate.DailyRestingHeartRateMetadata + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyRestingHeartRate + .DailyRestingHeartRateMetadata + buildPartial() { + com.google.devicesandservices.health.v4.DailyRestingHeartRate.DailyRestingHeartRateMetadata + result = + new com.google.devicesandservices.health.v4.DailyRestingHeartRate + .DailyRestingHeartRateMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.devicesandservices.health.v4.DailyRestingHeartRate + .DailyRestingHeartRateMetadata + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.calculationMethod_ = calculationMethod_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.devicesandservices.health.v4.DailyRestingHeartRate + .DailyRestingHeartRateMetadata) { + return mergeFrom( + (com.google.devicesandservices.health.v4.DailyRestingHeartRate + .DailyRestingHeartRateMetadata) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.devicesandservices.health.v4.DailyRestingHeartRate + .DailyRestingHeartRateMetadata + other) { + if (other + == com.google.devicesandservices.health.v4.DailyRestingHeartRate + .DailyRestingHeartRateMetadata.getDefaultInstance()) return this; + if (other.calculationMethod_ != 0) { + setCalculationMethodValue(other.getCalculationMethodValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + calculationMethod_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int calculationMethod_ = 0; + + /** + * + * + *
+       * Required. The method used to calculate the resting heart rate.
+       * 
+ * + * + * .google.devicesandservices.health.v4.DailyRestingHeartRate.DailyRestingHeartRateMetadata.CalculationMethod calculation_method = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for calculationMethod. + */ + @java.lang.Override + public int getCalculationMethodValue() { + return calculationMethod_; + } + + /** + * + * + *
+       * Required. The method used to calculate the resting heart rate.
+       * 
+ * + * + * .google.devicesandservices.health.v4.DailyRestingHeartRate.DailyRestingHeartRateMetadata.CalculationMethod calculation_method = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for calculationMethod to set. + * @return This builder for chaining. + */ + public Builder setCalculationMethodValue(int value) { + calculationMethod_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The method used to calculate the resting heart rate.
+       * 
+ * + * + * .google.devicesandservices.health.v4.DailyRestingHeartRate.DailyRestingHeartRateMetadata.CalculationMethod calculation_method = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The calculationMethod. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyRestingHeartRate + .DailyRestingHeartRateMetadata.CalculationMethod + getCalculationMethod() { + com.google.devicesandservices.health.v4.DailyRestingHeartRate.DailyRestingHeartRateMetadata + .CalculationMethod + result = + com.google.devicesandservices.health.v4.DailyRestingHeartRate + .DailyRestingHeartRateMetadata.CalculationMethod.forNumber(calculationMethod_); + return result == null + ? com.google.devicesandservices.health.v4.DailyRestingHeartRate + .DailyRestingHeartRateMetadata.CalculationMethod.UNRECOGNIZED + : result; + } + + /** + * + * + *
+       * Required. The method used to calculate the resting heart rate.
+       * 
+ * + * + * .google.devicesandservices.health.v4.DailyRestingHeartRate.DailyRestingHeartRateMetadata.CalculationMethod calculation_method = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The calculationMethod to set. + * @return This builder for chaining. + */ + public Builder setCalculationMethod( + com.google.devicesandservices.health.v4.DailyRestingHeartRate + .DailyRestingHeartRateMetadata.CalculationMethod + value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + calculationMethod_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The method used to calculate the resting heart rate.
+       * 
+ * + * + * .google.devicesandservices.health.v4.DailyRestingHeartRate.DailyRestingHeartRateMetadata.CalculationMethod calculation_method = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearCalculationMethod() { + bitField0_ = (bitField0_ & ~0x00000001); + calculationMethod_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.DailyRestingHeartRate.DailyRestingHeartRateMetadata) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.DailyRestingHeartRate.DailyRestingHeartRateMetadata) + private static final com.google.devicesandservices.health.v4.DailyRestingHeartRate + .DailyRestingHeartRateMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.devicesandservices.health.v4.DailyRestingHeartRate + .DailyRestingHeartRateMetadata(); + } + + public static com.google.devicesandservices.health.v4.DailyRestingHeartRate + .DailyRestingHeartRateMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DailyRestingHeartRateMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyRestingHeartRate + .DailyRestingHeartRateMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int DATE_FIELD_NUMBER = 2; + private com.google.type.Date date_; + + /** + * + * + *
+   * Required. Date  (in the user's timezone) of the resting heart rate
+   * measurement.
+   * 
+ * + * .google.type.Date date = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the date field is set. + */ + @java.lang.Override + public boolean hasDate() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. Date  (in the user's timezone) of the resting heart rate
+   * measurement.
+   * 
+ * + * .google.type.Date date = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The date. + */ + @java.lang.Override + public com.google.type.Date getDate() { + return date_ == null ? com.google.type.Date.getDefaultInstance() : date_; + } + + /** + * + * + *
+   * Required. Date  (in the user's timezone) of the resting heart rate
+   * measurement.
+   * 
+ * + * .google.type.Date date = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.type.DateOrBuilder getDateOrBuilder() { + return date_ == null ? com.google.type.Date.getDefaultInstance() : date_; + } + + public static final int BEATS_PER_MINUTE_FIELD_NUMBER = 4; + private long beatsPerMinute_ = 0L; + + /** + * + * + *
+   * Required. The resting heart rate value in beats per minute.
+   * 
+ * + * int64 beats_per_minute = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The beatsPerMinute. + */ + @java.lang.Override + public long getBeatsPerMinute() { + return beatsPerMinute_; + } + + public static final int DAILY_RESTING_HEART_RATE_METADATA_FIELD_NUMBER = 5; + private com.google.devicesandservices.health.v4.DailyRestingHeartRate + .DailyRestingHeartRateMetadata + dailyRestingHeartRateMetadata_; + + /** + * + * + *
+   * Optional. Metadata for the daily resting heart rate.
+   * 
+ * + * + * .google.devicesandservices.health.v4.DailyRestingHeartRate.DailyRestingHeartRateMetadata daily_resting_heart_rate_metadata = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the dailyRestingHeartRateMetadata field is set. + */ + @java.lang.Override + public boolean hasDailyRestingHeartRateMetadata() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Optional. Metadata for the daily resting heart rate.
+   * 
+ * + * + * .google.devicesandservices.health.v4.DailyRestingHeartRate.DailyRestingHeartRateMetadata daily_resting_heart_rate_metadata = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The dailyRestingHeartRateMetadata. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyRestingHeartRate.DailyRestingHeartRateMetadata + getDailyRestingHeartRateMetadata() { + return dailyRestingHeartRateMetadata_ == null + ? com.google.devicesandservices.health.v4.DailyRestingHeartRate + .DailyRestingHeartRateMetadata.getDefaultInstance() + : dailyRestingHeartRateMetadata_; + } + + /** + * + * + *
+   * Optional. Metadata for the daily resting heart rate.
+   * 
+ * + * + * .google.devicesandservices.health.v4.DailyRestingHeartRate.DailyRestingHeartRateMetadata daily_resting_heart_rate_metadata = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyRestingHeartRate + .DailyRestingHeartRateMetadataOrBuilder + getDailyRestingHeartRateMetadataOrBuilder() { + return dailyRestingHeartRateMetadata_ == null + ? com.google.devicesandservices.health.v4.DailyRestingHeartRate + .DailyRestingHeartRateMetadata.getDefaultInstance() + : dailyRestingHeartRateMetadata_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getDate()); + } + if (beatsPerMinute_ != 0L) { + output.writeInt64(4, beatsPerMinute_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(5, getDailyRestingHeartRateMetadata()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDate()); + } + if (beatsPerMinute_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, beatsPerMinute_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, getDailyRestingHeartRateMetadata()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.DailyRestingHeartRate)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.DailyRestingHeartRate other = + (com.google.devicesandservices.health.v4.DailyRestingHeartRate) obj; + + if (hasDate() != other.hasDate()) return false; + if (hasDate()) { + if (!getDate().equals(other.getDate())) return false; + } + if (getBeatsPerMinute() != other.getBeatsPerMinute()) return false; + if (hasDailyRestingHeartRateMetadata() != other.hasDailyRestingHeartRateMetadata()) + return false; + if (hasDailyRestingHeartRateMetadata()) { + if (!getDailyRestingHeartRateMetadata().equals(other.getDailyRestingHeartRateMetadata())) + return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasDate()) { + hash = (37 * hash) + DATE_FIELD_NUMBER; + hash = (53 * hash) + getDate().hashCode(); + } + hash = (37 * hash) + BEATS_PER_MINUTE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getBeatsPerMinute()); + if (hasDailyRestingHeartRateMetadata()) { + hash = (37 * hash) + DAILY_RESTING_HEART_RATE_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getDailyRestingHeartRateMetadata().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.DailyRestingHeartRate parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.DailyRestingHeartRate parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DailyRestingHeartRate parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.DailyRestingHeartRate parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DailyRestingHeartRate parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.DailyRestingHeartRate parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DailyRestingHeartRate parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.DailyRestingHeartRate parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DailyRestingHeartRate parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.DailyRestingHeartRate parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DailyRestingHeartRate parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.DailyRestingHeartRate parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.DailyRestingHeartRate prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Measures the daily resting heart rate for a user, calculated using the all
+   * day heart rate measurements.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.DailyRestingHeartRate} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.DailyRestingHeartRate) + com.google.devicesandservices.health.v4.DailyRestingHeartRateOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_DailyRestingHeartRate_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_DailyRestingHeartRate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.DailyRestingHeartRate.class, + com.google.devicesandservices.health.v4.DailyRestingHeartRate.Builder.class); + } + + // Construct using com.google.devicesandservices.health.v4.DailyRestingHeartRate.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetDateFieldBuilder(); + internalGetDailyRestingHeartRateMetadataFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + date_ = null; + if (dateBuilder_ != null) { + dateBuilder_.dispose(); + dateBuilder_ = null; + } + beatsPerMinute_ = 0L; + dailyRestingHeartRateMetadata_ = null; + if (dailyRestingHeartRateMetadataBuilder_ != null) { + dailyRestingHeartRateMetadataBuilder_.dispose(); + dailyRestingHeartRateMetadataBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_DailyRestingHeartRate_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyRestingHeartRate + getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.DailyRestingHeartRate.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyRestingHeartRate build() { + com.google.devicesandservices.health.v4.DailyRestingHeartRate result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyRestingHeartRate buildPartial() { + com.google.devicesandservices.health.v4.DailyRestingHeartRate result = + new com.google.devicesandservices.health.v4.DailyRestingHeartRate(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.devicesandservices.health.v4.DailyRestingHeartRate result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.date_ = dateBuilder_ == null ? date_ : dateBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.beatsPerMinute_ = beatsPerMinute_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.dailyRestingHeartRateMetadata_ = + dailyRestingHeartRateMetadataBuilder_ == null + ? dailyRestingHeartRateMetadata_ + : dailyRestingHeartRateMetadataBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.DailyRestingHeartRate) { + return mergeFrom((com.google.devicesandservices.health.v4.DailyRestingHeartRate) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.devicesandservices.health.v4.DailyRestingHeartRate other) { + if (other + == com.google.devicesandservices.health.v4.DailyRestingHeartRate.getDefaultInstance()) + return this; + if (other.hasDate()) { + mergeDate(other.getDate()); + } + if (other.getBeatsPerMinute() != 0L) { + setBeatsPerMinute(other.getBeatsPerMinute()); + } + if (other.hasDailyRestingHeartRateMetadata()) { + mergeDailyRestingHeartRateMetadata(other.getDailyRestingHeartRateMetadata()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + input.readMessage(internalGetDateFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 18 + case 32: + { + beatsPerMinute_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 32 + case 42: + { + input.readMessage( + internalGetDailyRestingHeartRateMetadataFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.type.Date date_; + private com.google.protobuf.SingleFieldBuilder< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> + dateBuilder_; + + /** + * + * + *
+     * Required. Date  (in the user's timezone) of the resting heart rate
+     * measurement.
+     * 
+ * + * .google.type.Date date = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the date field is set. + */ + public boolean hasDate() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. Date  (in the user's timezone) of the resting heart rate
+     * measurement.
+     * 
+ * + * .google.type.Date date = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The date. + */ + public com.google.type.Date getDate() { + if (dateBuilder_ == null) { + return date_ == null ? com.google.type.Date.getDefaultInstance() : date_; + } else { + return dateBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. Date  (in the user's timezone) of the resting heart rate
+     * measurement.
+     * 
+ * + * .google.type.Date date = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setDate(com.google.type.Date value) { + if (dateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + date_ = value; + } else { + dateBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Date  (in the user's timezone) of the resting heart rate
+     * measurement.
+     * 
+ * + * .google.type.Date date = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setDate(com.google.type.Date.Builder builderForValue) { + if (dateBuilder_ == null) { + date_ = builderForValue.build(); + } else { + dateBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Date  (in the user's timezone) of the resting heart rate
+     * measurement.
+     * 
+ * + * .google.type.Date date = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeDate(com.google.type.Date value) { + if (dateBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && date_ != null + && date_ != com.google.type.Date.getDefaultInstance()) { + getDateBuilder().mergeFrom(value); + } else { + date_ = value; + } + } else { + dateBuilder_.mergeFrom(value); + } + if (date_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. Date  (in the user's timezone) of the resting heart rate
+     * measurement.
+     * 
+ * + * .google.type.Date date = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearDate() { + bitField0_ = (bitField0_ & ~0x00000001); + date_ = null; + if (dateBuilder_ != null) { + dateBuilder_.dispose(); + dateBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Date  (in the user's timezone) of the resting heart rate
+     * measurement.
+     * 
+ * + * .google.type.Date date = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.type.Date.Builder getDateBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetDateFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. Date  (in the user's timezone) of the resting heart rate
+     * measurement.
+     * 
+ * + * .google.type.Date date = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.type.DateOrBuilder getDateOrBuilder() { + if (dateBuilder_ != null) { + return dateBuilder_.getMessageOrBuilder(); + } else { + return date_ == null ? com.google.type.Date.getDefaultInstance() : date_; + } + } + + /** + * + * + *
+     * Required. Date  (in the user's timezone) of the resting heart rate
+     * measurement.
+     * 
+ * + * .google.type.Date date = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> + internalGetDateFieldBuilder() { + if (dateBuilder_ == null) { + dateBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder>( + getDate(), getParentForChildren(), isClean()); + date_ = null; + } + return dateBuilder_; + } + + private long beatsPerMinute_; + + /** + * + * + *
+     * Required. The resting heart rate value in beats per minute.
+     * 
+ * + * int64 beats_per_minute = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The beatsPerMinute. + */ + @java.lang.Override + public long getBeatsPerMinute() { + return beatsPerMinute_; + } + + /** + * + * + *
+     * Required. The resting heart rate value in beats per minute.
+     * 
+ * + * int64 beats_per_minute = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The beatsPerMinute to set. + * @return This builder for chaining. + */ + public Builder setBeatsPerMinute(long value) { + + beatsPerMinute_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resting heart rate value in beats per minute.
+     * 
+ * + * int64 beats_per_minute = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearBeatsPerMinute() { + bitField0_ = (bitField0_ & ~0x00000002); + beatsPerMinute_ = 0L; + onChanged(); + return this; + } + + private com.google.devicesandservices.health.v4.DailyRestingHeartRate + .DailyRestingHeartRateMetadata + dailyRestingHeartRateMetadata_; + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.DailyRestingHeartRate + .DailyRestingHeartRateMetadata, + com.google.devicesandservices.health.v4.DailyRestingHeartRate + .DailyRestingHeartRateMetadata.Builder, + com.google.devicesandservices.health.v4.DailyRestingHeartRate + .DailyRestingHeartRateMetadataOrBuilder> + dailyRestingHeartRateMetadataBuilder_; + + /** + * + * + *
+     * Optional. Metadata for the daily resting heart rate.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyRestingHeartRate.DailyRestingHeartRateMetadata daily_resting_heart_rate_metadata = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the dailyRestingHeartRateMetadata field is set. + */ + public boolean hasDailyRestingHeartRateMetadata() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Optional. Metadata for the daily resting heart rate.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyRestingHeartRate.DailyRestingHeartRateMetadata daily_resting_heart_rate_metadata = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The dailyRestingHeartRateMetadata. + */ + public com.google.devicesandservices.health.v4.DailyRestingHeartRate + .DailyRestingHeartRateMetadata + getDailyRestingHeartRateMetadata() { + if (dailyRestingHeartRateMetadataBuilder_ == null) { + return dailyRestingHeartRateMetadata_ == null + ? com.google.devicesandservices.health.v4.DailyRestingHeartRate + .DailyRestingHeartRateMetadata.getDefaultInstance() + : dailyRestingHeartRateMetadata_; + } else { + return dailyRestingHeartRateMetadataBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. Metadata for the daily resting heart rate.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyRestingHeartRate.DailyRestingHeartRateMetadata daily_resting_heart_rate_metadata = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDailyRestingHeartRateMetadata( + com.google.devicesandservices.health.v4.DailyRestingHeartRate.DailyRestingHeartRateMetadata + value) { + if (dailyRestingHeartRateMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dailyRestingHeartRateMetadata_ = value; + } else { + dailyRestingHeartRateMetadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Metadata for the daily resting heart rate.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyRestingHeartRate.DailyRestingHeartRateMetadata daily_resting_heart_rate_metadata = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDailyRestingHeartRateMetadata( + com.google.devicesandservices.health.v4.DailyRestingHeartRate.DailyRestingHeartRateMetadata + .Builder + builderForValue) { + if (dailyRestingHeartRateMetadataBuilder_ == null) { + dailyRestingHeartRateMetadata_ = builderForValue.build(); + } else { + dailyRestingHeartRateMetadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Metadata for the daily resting heart rate.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyRestingHeartRate.DailyRestingHeartRateMetadata daily_resting_heart_rate_metadata = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeDailyRestingHeartRateMetadata( + com.google.devicesandservices.health.v4.DailyRestingHeartRate.DailyRestingHeartRateMetadata + value) { + if (dailyRestingHeartRateMetadataBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && dailyRestingHeartRateMetadata_ != null + && dailyRestingHeartRateMetadata_ + != com.google.devicesandservices.health.v4.DailyRestingHeartRate + .DailyRestingHeartRateMetadata.getDefaultInstance()) { + getDailyRestingHeartRateMetadataBuilder().mergeFrom(value); + } else { + dailyRestingHeartRateMetadata_ = value; + } + } else { + dailyRestingHeartRateMetadataBuilder_.mergeFrom(value); + } + if (dailyRestingHeartRateMetadata_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. Metadata for the daily resting heart rate.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyRestingHeartRate.DailyRestingHeartRateMetadata daily_resting_heart_rate_metadata = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearDailyRestingHeartRateMetadata() { + bitField0_ = (bitField0_ & ~0x00000004); + dailyRestingHeartRateMetadata_ = null; + if (dailyRestingHeartRateMetadataBuilder_ != null) { + dailyRestingHeartRateMetadataBuilder_.dispose(); + dailyRestingHeartRateMetadataBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Metadata for the daily resting heart rate.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyRestingHeartRate.DailyRestingHeartRateMetadata daily_resting_heart_rate_metadata = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.devicesandservices.health.v4.DailyRestingHeartRate + .DailyRestingHeartRateMetadata.Builder + getDailyRestingHeartRateMetadataBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetDailyRestingHeartRateMetadataFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Metadata for the daily resting heart rate.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyRestingHeartRate.DailyRestingHeartRateMetadata daily_resting_heart_rate_metadata = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.devicesandservices.health.v4.DailyRestingHeartRate + .DailyRestingHeartRateMetadataOrBuilder + getDailyRestingHeartRateMetadataOrBuilder() { + if (dailyRestingHeartRateMetadataBuilder_ != null) { + return dailyRestingHeartRateMetadataBuilder_.getMessageOrBuilder(); + } else { + return dailyRestingHeartRateMetadata_ == null + ? com.google.devicesandservices.health.v4.DailyRestingHeartRate + .DailyRestingHeartRateMetadata.getDefaultInstance() + : dailyRestingHeartRateMetadata_; + } + } + + /** + * + * + *
+     * Optional. Metadata for the daily resting heart rate.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyRestingHeartRate.DailyRestingHeartRateMetadata daily_resting_heart_rate_metadata = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.DailyRestingHeartRate + .DailyRestingHeartRateMetadata, + com.google.devicesandservices.health.v4.DailyRestingHeartRate + .DailyRestingHeartRateMetadata.Builder, + com.google.devicesandservices.health.v4.DailyRestingHeartRate + .DailyRestingHeartRateMetadataOrBuilder> + internalGetDailyRestingHeartRateMetadataFieldBuilder() { + if (dailyRestingHeartRateMetadataBuilder_ == null) { + dailyRestingHeartRateMetadataBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.DailyRestingHeartRate + .DailyRestingHeartRateMetadata, + com.google.devicesandservices.health.v4.DailyRestingHeartRate + .DailyRestingHeartRateMetadata.Builder, + com.google.devicesandservices.health.v4.DailyRestingHeartRate + .DailyRestingHeartRateMetadataOrBuilder>( + getDailyRestingHeartRateMetadata(), getParentForChildren(), isClean()); + dailyRestingHeartRateMetadata_ = null; + } + return dailyRestingHeartRateMetadataBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.DailyRestingHeartRate) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.DailyRestingHeartRate) + private static final com.google.devicesandservices.health.v4.DailyRestingHeartRate + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.DailyRestingHeartRate(); + } + + public static com.google.devicesandservices.health.v4.DailyRestingHeartRate getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DailyRestingHeartRate parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyRestingHeartRate getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DailyRestingHeartRateOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DailyRestingHeartRateOrBuilder.java new file mode 100644 index 000000000000..be9e8ef4a2a8 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DailyRestingHeartRateOrBuilder.java @@ -0,0 +1,127 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface DailyRestingHeartRateOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.DailyRestingHeartRate) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Date  (in the user's timezone) of the resting heart rate
+   * measurement.
+   * 
+ * + * .google.type.Date date = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the date field is set. + */ + boolean hasDate(); + + /** + * + * + *
+   * Required. Date  (in the user's timezone) of the resting heart rate
+   * measurement.
+   * 
+ * + * .google.type.Date date = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The date. + */ + com.google.type.Date getDate(); + + /** + * + * + *
+   * Required. Date  (in the user's timezone) of the resting heart rate
+   * measurement.
+   * 
+ * + * .google.type.Date date = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.type.DateOrBuilder getDateOrBuilder(); + + /** + * + * + *
+   * Required. The resting heart rate value in beats per minute.
+   * 
+ * + * int64 beats_per_minute = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The beatsPerMinute. + */ + long getBeatsPerMinute(); + + /** + * + * + *
+   * Optional. Metadata for the daily resting heart rate.
+   * 
+ * + * + * .google.devicesandservices.health.v4.DailyRestingHeartRate.DailyRestingHeartRateMetadata daily_resting_heart_rate_metadata = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the dailyRestingHeartRateMetadata field is set. + */ + boolean hasDailyRestingHeartRateMetadata(); + + /** + * + * + *
+   * Optional. Metadata for the daily resting heart rate.
+   * 
+ * + * + * .google.devicesandservices.health.v4.DailyRestingHeartRate.DailyRestingHeartRateMetadata daily_resting_heart_rate_metadata = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The dailyRestingHeartRateMetadata. + */ + com.google.devicesandservices.health.v4.DailyRestingHeartRate.DailyRestingHeartRateMetadata + getDailyRestingHeartRateMetadata(); + + /** + * + * + *
+   * Optional. Metadata for the daily resting heart rate.
+   * 
+ * + * + * .google.devicesandservices.health.v4.DailyRestingHeartRate.DailyRestingHeartRateMetadata daily_resting_heart_rate_metadata = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.devicesandservices.health.v4.DailyRestingHeartRate + .DailyRestingHeartRateMetadataOrBuilder + getDailyRestingHeartRateMetadataOrBuilder(); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DailyRollUpDataPointsRequest.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DailyRollUpDataPointsRequest.java new file mode 100644 index 000000000000..e1c4aa2b337d --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DailyRollUpDataPointsRequest.java @@ -0,0 +1,1722 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_points.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * Request to roll up data points by civil time intervals.
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.DailyRollUpDataPointsRequest} + */ +@com.google.protobuf.Generated +public final class DailyRollUpDataPointsRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.DailyRollUpDataPointsRequest) + DailyRollUpDataPointsRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DailyRollUpDataPointsRequest"); + } + + // Use DailyRollUpDataPointsRequest.newBuilder() to construct. + private DailyRollUpDataPointsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DailyRollUpDataPointsRequest() { + parent_ = ""; + pageToken_ = ""; + dataSourceFamily_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_DailyRollUpDataPointsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_DailyRollUpDataPointsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.DailyRollUpDataPointsRequest.class, + com.google.devicesandservices.health.v4.DailyRollUpDataPointsRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. Parent data type of the Data Point collection.
+   *
+   * Format: `users/{user}/dataTypes/{data_type}`, e.g.:
+   *
+   * - `users/me/dataTypes/steps`
+   * - `users/me/dataTypes/distance`
+   *
+   * For a list of the supported data types see the [DailyRollupDataPoint
+   * value][google.devicesandservices.health.v4.DailyRollupDataPoint]
+   * union field.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Parent data type of the Data Point collection.
+   *
+   * Format: `users/{user}/dataTypes/{data_type}`, e.g.:
+   *
+   * - `users/me/dataTypes/steps`
+   * - `users/me/dataTypes/distance`
+   *
+   * For a list of the supported data types see the [DailyRollupDataPoint
+   * value][google.devicesandservices.health.v4.DailyRollupDataPoint]
+   * union field.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RANGE_FIELD_NUMBER = 2; + private com.google.devicesandservices.health.v4.CivilTimeInterval range_; + + /** + * + * + *
+   * Required. Closed-open range of data points that will be rolled up.
+   * The start time must be aligned with the aggregation window.
+   * The maximum range for `calories-in-heart-rate-zone`, `heart-rate`,
+   * `active-minutes` and `total-calories` is 14 days.
+   * The maximum range for all other data types is 90 days.
+   * 
+ * + * + * .google.devicesandservices.health.v4.CivilTimeInterval range = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the range field is set. + */ + @java.lang.Override + public boolean hasRange() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. Closed-open range of data points that will be rolled up.
+   * The start time must be aligned with the aggregation window.
+   * The maximum range for `calories-in-heart-rate-zone`, `heart-rate`,
+   * `active-minutes` and `total-calories` is 14 days.
+   * The maximum range for all other data types is 90 days.
+   * 
+ * + * + * .google.devicesandservices.health.v4.CivilTimeInterval range = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The range. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.CivilTimeInterval getRange() { + return range_ == null + ? com.google.devicesandservices.health.v4.CivilTimeInterval.getDefaultInstance() + : range_; + } + + /** + * + * + *
+   * Required. Closed-open range of data points that will be rolled up.
+   * The start time must be aligned with the aggregation window.
+   * The maximum range for `calories-in-heart-rate-zone`, `heart-rate`,
+   * `active-minutes` and `total-calories` is 14 days.
+   * The maximum range for all other data types is 90 days.
+   * 
+ * + * + * .google.devicesandservices.health.v4.CivilTimeInterval range = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.CivilTimeIntervalOrBuilder getRangeOrBuilder() { + return range_ == null + ? com.google.devicesandservices.health.v4.CivilTimeInterval.getDefaultInstance() + : range_; + } + + public static final int WINDOW_SIZE_DAYS_FIELD_NUMBER = 3; + private int windowSizeDays_ = 0; + + /** + * + * + *
+   * Optional. Aggregation window size, in number of days. Defaults to 1 if not
+   * specified.
+   * 
+ * + * int32 window_size_days = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The windowSizeDays. + */ + @java.lang.Override + public int getWindowSizeDays() { + return windowSizeDays_; + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 4; + private int pageSize_ = 0; + + /** + * + * + *
+   * Optional. The maximum number of data points to return.
+   * If unspecified, at most 1440 data points will be returned.
+   * The maximum page size is 10000; values above that will be truncated
+   * accordingly.
+   * 
+ * + * int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + + /** + * + * + *
+   * Optional. The `next_page_token` from a previous request, if any.
+   * All other request fields need to be the same as in the initial request
+   * when the page token is specified.
+   * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The `next_page_token` from a previous request, if any.
+   * All other request fields need to be the same as in the initial request
+   * when the page token is specified.
+   * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATA_SOURCE_FAMILY_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object dataSourceFamily_ = ""; + + /** + * + * + *
+   * Optional. The data source family name to roll up.
+   * If empty, data points from all available data sources will be rolled up.
+   *
+   * Format: `users/me/dataSourceFamilies/{data_source_family}`
+   *
+   * The supported values are:
+   *
+   * - `users/me/dataSourceFamilies/all-sources` - default value
+   * - `users/me/dataSourceFamilies/google-wearables` - tracker devices
+   * - `users/me/dataSourceFamilies/google-sources` - Google first party
+   * sources
+   * 
+ * + * string data_source_family = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The dataSourceFamily. + */ + @java.lang.Override + public java.lang.String getDataSourceFamily() { + java.lang.Object ref = dataSourceFamily_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dataSourceFamily_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The data source family name to roll up.
+   * If empty, data points from all available data sources will be rolled up.
+   *
+   * Format: `users/me/dataSourceFamilies/{data_source_family}`
+   *
+   * The supported values are:
+   *
+   * - `users/me/dataSourceFamilies/all-sources` - default value
+   * - `users/me/dataSourceFamilies/google-wearables` - tracker devices
+   * - `users/me/dataSourceFamilies/google-sources` - Google first party
+   * sources
+   * 
+ * + * string data_source_family = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for dataSourceFamily. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDataSourceFamilyBytes() { + java.lang.Object ref = dataSourceFamily_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataSourceFamily_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getRange()); + } + if (windowSizeDays_ != 0) { + output.writeInt32(3, windowSizeDays_); + } + if (pageSize_ != 0) { + output.writeInt32(4, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(dataSourceFamily_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 7, dataSourceFamily_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getRange()); + } + if (windowSizeDays_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, windowSizeDays_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(dataSourceFamily_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(7, dataSourceFamily_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.DailyRollUpDataPointsRequest)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.DailyRollUpDataPointsRequest other = + (com.google.devicesandservices.health.v4.DailyRollUpDataPointsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasRange() != other.hasRange()) return false; + if (hasRange()) { + if (!getRange().equals(other.getRange())) return false; + } + if (getWindowSizeDays() != other.getWindowSizeDays()) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getDataSourceFamily().equals(other.getDataSourceFamily())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasRange()) { + hash = (37 * hash) + RANGE_FIELD_NUMBER; + hash = (53 * hash) + getRange().hashCode(); + } + hash = (37 * hash) + WINDOW_SIZE_DAYS_FIELD_NUMBER; + hash = (53 * hash) + getWindowSizeDays(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + DATA_SOURCE_FAMILY_FIELD_NUMBER; + hash = (53 * hash) + getDataSourceFamily().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.DailyRollUpDataPointsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.DailyRollUpDataPointsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DailyRollUpDataPointsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.DailyRollUpDataPointsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DailyRollUpDataPointsRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.DailyRollUpDataPointsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DailyRollUpDataPointsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.DailyRollUpDataPointsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DailyRollUpDataPointsRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.DailyRollUpDataPointsRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DailyRollUpDataPointsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.DailyRollUpDataPointsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.DailyRollUpDataPointsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request to roll up data points by civil time intervals.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.DailyRollUpDataPointsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.DailyRollUpDataPointsRequest) + com.google.devicesandservices.health.v4.DailyRollUpDataPointsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_DailyRollUpDataPointsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_DailyRollUpDataPointsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.DailyRollUpDataPointsRequest.class, + com.google.devicesandservices.health.v4.DailyRollUpDataPointsRequest.Builder.class); + } + + // Construct using + // com.google.devicesandservices.health.v4.DailyRollUpDataPointsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetRangeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + range_ = null; + if (rangeBuilder_ != null) { + rangeBuilder_.dispose(); + rangeBuilder_ = null; + } + windowSizeDays_ = 0; + pageSize_ = 0; + pageToken_ = ""; + dataSourceFamily_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_DailyRollUpDataPointsRequest_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyRollUpDataPointsRequest + getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.DailyRollUpDataPointsRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyRollUpDataPointsRequest build() { + com.google.devicesandservices.health.v4.DailyRollUpDataPointsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyRollUpDataPointsRequest buildPartial() { + com.google.devicesandservices.health.v4.DailyRollUpDataPointsRequest result = + new com.google.devicesandservices.health.v4.DailyRollUpDataPointsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.devicesandservices.health.v4.DailyRollUpDataPointsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.range_ = rangeBuilder_ == null ? range_ : rangeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.windowSizeDays_ = windowSizeDays_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.dataSourceFamily_ = dataSourceFamily_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.DailyRollUpDataPointsRequest) { + return mergeFrom( + (com.google.devicesandservices.health.v4.DailyRollUpDataPointsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.devicesandservices.health.v4.DailyRollUpDataPointsRequest other) { + if (other + == com.google.devicesandservices.health.v4.DailyRollUpDataPointsRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasRange()) { + mergeRange(other.getRange()); + } + if (other.getWindowSizeDays() != 0) { + setWindowSizeDays(other.getWindowSizeDays()); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getDataSourceFamily().isEmpty()) { + dataSourceFamily_ = other.dataSourceFamily_; + bitField0_ |= 0x00000020; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(internalGetRangeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + windowSizeDays_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 58: + { + dataSourceFamily_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 58 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. Parent data type of the Data Point collection.
+     *
+     * Format: `users/{user}/dataTypes/{data_type}`, e.g.:
+     *
+     * - `users/me/dataTypes/steps`
+     * - `users/me/dataTypes/distance`
+     *
+     * For a list of the supported data types see the [DailyRollupDataPoint
+     * value][google.devicesandservices.health.v4.DailyRollupDataPoint]
+     * union field.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Parent data type of the Data Point collection.
+     *
+     * Format: `users/{user}/dataTypes/{data_type}`, e.g.:
+     *
+     * - `users/me/dataTypes/steps`
+     * - `users/me/dataTypes/distance`
+     *
+     * For a list of the supported data types see the [DailyRollupDataPoint
+     * value][google.devicesandservices.health.v4.DailyRollupDataPoint]
+     * union field.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Parent data type of the Data Point collection.
+     *
+     * Format: `users/{user}/dataTypes/{data_type}`, e.g.:
+     *
+     * - `users/me/dataTypes/steps`
+     * - `users/me/dataTypes/distance`
+     *
+     * For a list of the supported data types see the [DailyRollupDataPoint
+     * value][google.devicesandservices.health.v4.DailyRollupDataPoint]
+     * union field.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Parent data type of the Data Point collection.
+     *
+     * Format: `users/{user}/dataTypes/{data_type}`, e.g.:
+     *
+     * - `users/me/dataTypes/steps`
+     * - `users/me/dataTypes/distance`
+     *
+     * For a list of the supported data types see the [DailyRollupDataPoint
+     * value][google.devicesandservices.health.v4.DailyRollupDataPoint]
+     * union field.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Parent data type of the Data Point collection.
+     *
+     * Format: `users/{user}/dataTypes/{data_type}`, e.g.:
+     *
+     * - `users/me/dataTypes/steps`
+     * - `users/me/dataTypes/distance`
+     *
+     * For a list of the supported data types see the [DailyRollupDataPoint
+     * value][google.devicesandservices.health.v4.DailyRollupDataPoint]
+     * union field.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.devicesandservices.health.v4.CivilTimeInterval range_; + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.CivilTimeInterval, + com.google.devicesandservices.health.v4.CivilTimeInterval.Builder, + com.google.devicesandservices.health.v4.CivilTimeIntervalOrBuilder> + rangeBuilder_; + + /** + * + * + *
+     * Required. Closed-open range of data points that will be rolled up.
+     * The start time must be aligned with the aggregation window.
+     * The maximum range for `calories-in-heart-rate-zone`, `heart-rate`,
+     * `active-minutes` and `total-calories` is 14 days.
+     * The maximum range for all other data types is 90 days.
+     * 
+ * + * + * .google.devicesandservices.health.v4.CivilTimeInterval range = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the range field is set. + */ + public boolean hasRange() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Required. Closed-open range of data points that will be rolled up.
+     * The start time must be aligned with the aggregation window.
+     * The maximum range for `calories-in-heart-rate-zone`, `heart-rate`,
+     * `active-minutes` and `total-calories` is 14 days.
+     * The maximum range for all other data types is 90 days.
+     * 
+ * + * + * .google.devicesandservices.health.v4.CivilTimeInterval range = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The range. + */ + public com.google.devicesandservices.health.v4.CivilTimeInterval getRange() { + if (rangeBuilder_ == null) { + return range_ == null + ? com.google.devicesandservices.health.v4.CivilTimeInterval.getDefaultInstance() + : range_; + } else { + return rangeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. Closed-open range of data points that will be rolled up.
+     * The start time must be aligned with the aggregation window.
+     * The maximum range for `calories-in-heart-rate-zone`, `heart-rate`,
+     * `active-minutes` and `total-calories` is 14 days.
+     * The maximum range for all other data types is 90 days.
+     * 
+ * + * + * .google.devicesandservices.health.v4.CivilTimeInterval range = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setRange(com.google.devicesandservices.health.v4.CivilTimeInterval value) { + if (rangeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + range_ = value; + } else { + rangeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Closed-open range of data points that will be rolled up.
+     * The start time must be aligned with the aggregation window.
+     * The maximum range for `calories-in-heart-rate-zone`, `heart-rate`,
+     * `active-minutes` and `total-calories` is 14 days.
+     * The maximum range for all other data types is 90 days.
+     * 
+ * + * + * .google.devicesandservices.health.v4.CivilTimeInterval range = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setRange( + com.google.devicesandservices.health.v4.CivilTimeInterval.Builder builderForValue) { + if (rangeBuilder_ == null) { + range_ = builderForValue.build(); + } else { + rangeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Closed-open range of data points that will be rolled up.
+     * The start time must be aligned with the aggregation window.
+     * The maximum range for `calories-in-heart-rate-zone`, `heart-rate`,
+     * `active-minutes` and `total-calories` is 14 days.
+     * The maximum range for all other data types is 90 days.
+     * 
+ * + * + * .google.devicesandservices.health.v4.CivilTimeInterval range = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeRange(com.google.devicesandservices.health.v4.CivilTimeInterval value) { + if (rangeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && range_ != null + && range_ + != com.google.devicesandservices.health.v4.CivilTimeInterval.getDefaultInstance()) { + getRangeBuilder().mergeFrom(value); + } else { + range_ = value; + } + } else { + rangeBuilder_.mergeFrom(value); + } + if (range_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. Closed-open range of data points that will be rolled up.
+     * The start time must be aligned with the aggregation window.
+     * The maximum range for `calories-in-heart-rate-zone`, `heart-rate`,
+     * `active-minutes` and `total-calories` is 14 days.
+     * The maximum range for all other data types is 90 days.
+     * 
+ * + * + * .google.devicesandservices.health.v4.CivilTimeInterval range = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearRange() { + bitField0_ = (bitField0_ & ~0x00000002); + range_ = null; + if (rangeBuilder_ != null) { + rangeBuilder_.dispose(); + rangeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Closed-open range of data points that will be rolled up.
+     * The start time must be aligned with the aggregation window.
+     * The maximum range for `calories-in-heart-rate-zone`, `heart-rate`,
+     * `active-minutes` and `total-calories` is 14 days.
+     * The maximum range for all other data types is 90 days.
+     * 
+ * + * + * .google.devicesandservices.health.v4.CivilTimeInterval range = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.devicesandservices.health.v4.CivilTimeInterval.Builder getRangeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetRangeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. Closed-open range of data points that will be rolled up.
+     * The start time must be aligned with the aggregation window.
+     * The maximum range for `calories-in-heart-rate-zone`, `heart-rate`,
+     * `active-minutes` and `total-calories` is 14 days.
+     * The maximum range for all other data types is 90 days.
+     * 
+ * + * + * .google.devicesandservices.health.v4.CivilTimeInterval range = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.devicesandservices.health.v4.CivilTimeIntervalOrBuilder getRangeOrBuilder() { + if (rangeBuilder_ != null) { + return rangeBuilder_.getMessageOrBuilder(); + } else { + return range_ == null + ? com.google.devicesandservices.health.v4.CivilTimeInterval.getDefaultInstance() + : range_; + } + } + + /** + * + * + *
+     * Required. Closed-open range of data points that will be rolled up.
+     * The start time must be aligned with the aggregation window.
+     * The maximum range for `calories-in-heart-rate-zone`, `heart-rate`,
+     * `active-minutes` and `total-calories` is 14 days.
+     * The maximum range for all other data types is 90 days.
+     * 
+ * + * + * .google.devicesandservices.health.v4.CivilTimeInterval range = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.CivilTimeInterval, + com.google.devicesandservices.health.v4.CivilTimeInterval.Builder, + com.google.devicesandservices.health.v4.CivilTimeIntervalOrBuilder> + internalGetRangeFieldBuilder() { + if (rangeBuilder_ == null) { + rangeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.CivilTimeInterval, + com.google.devicesandservices.health.v4.CivilTimeInterval.Builder, + com.google.devicesandservices.health.v4.CivilTimeIntervalOrBuilder>( + getRange(), getParentForChildren(), isClean()); + range_ = null; + } + return rangeBuilder_; + } + + private int windowSizeDays_; + + /** + * + * + *
+     * Optional. Aggregation window size, in number of days. Defaults to 1 if not
+     * specified.
+     * 
+ * + * int32 window_size_days = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The windowSizeDays. + */ + @java.lang.Override + public int getWindowSizeDays() { + return windowSizeDays_; + } + + /** + * + * + *
+     * Optional. Aggregation window size, in number of days. Defaults to 1 if not
+     * specified.
+     * 
+ * + * int32 window_size_days = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The windowSizeDays to set. + * @return This builder for chaining. + */ + public Builder setWindowSizeDays(int value) { + + windowSizeDays_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Aggregation window size, in number of days. Defaults to 1 if not
+     * specified.
+     * 
+ * + * int32 window_size_days = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearWindowSizeDays() { + bitField0_ = (bitField0_ & ~0x00000004); + windowSizeDays_ = 0; + onChanged(); + return this; + } + + private int pageSize_; + + /** + * + * + *
+     * Optional. The maximum number of data points to return.
+     * If unspecified, at most 1440 data points will be returned.
+     * The maximum page size is 10000; values above that will be truncated
+     * accordingly.
+     * 
+ * + * int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. The maximum number of data points to return.
+     * If unspecified, at most 1440 data points will be returned.
+     * The maximum page size is 10000; values above that will be truncated
+     * accordingly.
+     * 
+ * + * int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The maximum number of data points to return.
+     * If unspecified, at most 1440 data points will be returned.
+     * The maximum page size is 10000; values above that will be truncated
+     * accordingly.
+     * 
+ * + * int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000008); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
+     * Optional. The `next_page_token` from a previous request, if any.
+     * All other request fields need to be the same as in the initial request
+     * when the page token is specified.
+     * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The `next_page_token` from a previous request, if any.
+     * All other request fields need to be the same as in the initial request
+     * when the page token is specified.
+     * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The `next_page_token` from a previous request, if any.
+     * All other request fields need to be the same as in the initial request
+     * when the page token is specified.
+     * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The `next_page_token` from a previous request, if any.
+     * All other request fields need to be the same as in the initial request
+     * when the page token is specified.
+     * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The `next_page_token` from a previous request, if any.
+     * All other request fields need to be the same as in the initial request
+     * when the page token is specified.
+     * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object dataSourceFamily_ = ""; + + /** + * + * + *
+     * Optional. The data source family name to roll up.
+     * If empty, data points from all available data sources will be rolled up.
+     *
+     * Format: `users/me/dataSourceFamilies/{data_source_family}`
+     *
+     * The supported values are:
+     *
+     * - `users/me/dataSourceFamilies/all-sources` - default value
+     * - `users/me/dataSourceFamilies/google-wearables` - tracker devices
+     * - `users/me/dataSourceFamilies/google-sources` - Google first party
+     * sources
+     * 
+ * + * string data_source_family = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The dataSourceFamily. + */ + public java.lang.String getDataSourceFamily() { + java.lang.Object ref = dataSourceFamily_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dataSourceFamily_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The data source family name to roll up.
+     * If empty, data points from all available data sources will be rolled up.
+     *
+     * Format: `users/me/dataSourceFamilies/{data_source_family}`
+     *
+     * The supported values are:
+     *
+     * - `users/me/dataSourceFamilies/all-sources` - default value
+     * - `users/me/dataSourceFamilies/google-wearables` - tracker devices
+     * - `users/me/dataSourceFamilies/google-sources` - Google first party
+     * sources
+     * 
+ * + * string data_source_family = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for dataSourceFamily. + */ + public com.google.protobuf.ByteString getDataSourceFamilyBytes() { + java.lang.Object ref = dataSourceFamily_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataSourceFamily_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The data source family name to roll up.
+     * If empty, data points from all available data sources will be rolled up.
+     *
+     * Format: `users/me/dataSourceFamilies/{data_source_family}`
+     *
+     * The supported values are:
+     *
+     * - `users/me/dataSourceFamilies/all-sources` - default value
+     * - `users/me/dataSourceFamilies/google-wearables` - tracker devices
+     * - `users/me/dataSourceFamilies/google-sources` - Google first party
+     * sources
+     * 
+ * + * string data_source_family = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The dataSourceFamily to set. + * @return This builder for chaining. + */ + public Builder setDataSourceFamily(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + dataSourceFamily_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The data source family name to roll up.
+     * If empty, data points from all available data sources will be rolled up.
+     *
+     * Format: `users/me/dataSourceFamilies/{data_source_family}`
+     *
+     * The supported values are:
+     *
+     * - `users/me/dataSourceFamilies/all-sources` - default value
+     * - `users/me/dataSourceFamilies/google-wearables` - tracker devices
+     * - `users/me/dataSourceFamilies/google-sources` - Google first party
+     * sources
+     * 
+ * + * string data_source_family = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDataSourceFamily() { + dataSourceFamily_ = getDefaultInstance().getDataSourceFamily(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The data source family name to roll up.
+     * If empty, data points from all available data sources will be rolled up.
+     *
+     * Format: `users/me/dataSourceFamilies/{data_source_family}`
+     *
+     * The supported values are:
+     *
+     * - `users/me/dataSourceFamilies/all-sources` - default value
+     * - `users/me/dataSourceFamilies/google-wearables` - tracker devices
+     * - `users/me/dataSourceFamilies/google-sources` - Google first party
+     * sources
+     * 
+ * + * string data_source_family = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for dataSourceFamily to set. + * @return This builder for chaining. + */ + public Builder setDataSourceFamilyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + dataSourceFamily_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.DailyRollUpDataPointsRequest) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.DailyRollUpDataPointsRequest) + private static final com.google.devicesandservices.health.v4.DailyRollUpDataPointsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.DailyRollUpDataPointsRequest(); + } + + public static com.google.devicesandservices.health.v4.DailyRollUpDataPointsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DailyRollUpDataPointsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyRollUpDataPointsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DailyRollUpDataPointsRequestOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DailyRollUpDataPointsRequestOrBuilder.java new file mode 100644 index 000000000000..8d1a6c51e2f5 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DailyRollUpDataPointsRequestOrBuilder.java @@ -0,0 +1,237 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_points.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface DailyRollUpDataPointsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.DailyRollUpDataPointsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Parent data type of the Data Point collection.
+   *
+   * Format: `users/{user}/dataTypes/{data_type}`, e.g.:
+   *
+   * - `users/me/dataTypes/steps`
+   * - `users/me/dataTypes/distance`
+   *
+   * For a list of the supported data types see the [DailyRollupDataPoint
+   * value][google.devicesandservices.health.v4.DailyRollupDataPoint]
+   * union field.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. Parent data type of the Data Point collection.
+   *
+   * Format: `users/{user}/dataTypes/{data_type}`, e.g.:
+   *
+   * - `users/me/dataTypes/steps`
+   * - `users/me/dataTypes/distance`
+   *
+   * For a list of the supported data types see the [DailyRollupDataPoint
+   * value][google.devicesandservices.health.v4.DailyRollupDataPoint]
+   * union field.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. Closed-open range of data points that will be rolled up.
+   * The start time must be aligned with the aggregation window.
+   * The maximum range for `calories-in-heart-rate-zone`, `heart-rate`,
+   * `active-minutes` and `total-calories` is 14 days.
+   * The maximum range for all other data types is 90 days.
+   * 
+ * + * + * .google.devicesandservices.health.v4.CivilTimeInterval range = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the range field is set. + */ + boolean hasRange(); + + /** + * + * + *
+   * Required. Closed-open range of data points that will be rolled up.
+   * The start time must be aligned with the aggregation window.
+   * The maximum range for `calories-in-heart-rate-zone`, `heart-rate`,
+   * `active-minutes` and `total-calories` is 14 days.
+   * The maximum range for all other data types is 90 days.
+   * 
+ * + * + * .google.devicesandservices.health.v4.CivilTimeInterval range = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The range. + */ + com.google.devicesandservices.health.v4.CivilTimeInterval getRange(); + + /** + * + * + *
+   * Required. Closed-open range of data points that will be rolled up.
+   * The start time must be aligned with the aggregation window.
+   * The maximum range for `calories-in-heart-rate-zone`, `heart-rate`,
+   * `active-minutes` and `total-calories` is 14 days.
+   * The maximum range for all other data types is 90 days.
+   * 
+ * + * + * .google.devicesandservices.health.v4.CivilTimeInterval range = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.devicesandservices.health.v4.CivilTimeIntervalOrBuilder getRangeOrBuilder(); + + /** + * + * + *
+   * Optional. Aggregation window size, in number of days. Defaults to 1 if not
+   * specified.
+   * 
+ * + * int32 window_size_days = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The windowSizeDays. + */ + int getWindowSizeDays(); + + /** + * + * + *
+   * Optional. The maximum number of data points to return.
+   * If unspecified, at most 1440 data points will be returned.
+   * The maximum page size is 10000; values above that will be truncated
+   * accordingly.
+   * 
+ * + * int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. The `next_page_token` from a previous request, if any.
+   * All other request fields need to be the same as in the initial request
+   * when the page token is specified.
+   * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. The `next_page_token` from a previous request, if any.
+   * All other request fields need to be the same as in the initial request
+   * when the page token is specified.
+   * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. The data source family name to roll up.
+   * If empty, data points from all available data sources will be rolled up.
+   *
+   * Format: `users/me/dataSourceFamilies/{data_source_family}`
+   *
+   * The supported values are:
+   *
+   * - `users/me/dataSourceFamilies/all-sources` - default value
+   * - `users/me/dataSourceFamilies/google-wearables` - tracker devices
+   * - `users/me/dataSourceFamilies/google-sources` - Google first party
+   * sources
+   * 
+ * + * string data_source_family = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The dataSourceFamily. + */ + java.lang.String getDataSourceFamily(); + + /** + * + * + *
+   * Optional. The data source family name to roll up.
+   * If empty, data points from all available data sources will be rolled up.
+   *
+   * Format: `users/me/dataSourceFamilies/{data_source_family}`
+   *
+   * The supported values are:
+   *
+   * - `users/me/dataSourceFamilies/all-sources` - default value
+   * - `users/me/dataSourceFamilies/google-wearables` - tracker devices
+   * - `users/me/dataSourceFamilies/google-sources` - Google first party
+   * sources
+   * 
+ * + * string data_source_family = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for dataSourceFamily. + */ + com.google.protobuf.ByteString getDataSourceFamilyBytes(); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DailyRollUpDataPointsResponse.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DailyRollUpDataPointsResponse.java new file mode 100644 index 000000000000..2ce55f61d9d5 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DailyRollUpDataPointsResponse.java @@ -0,0 +1,1008 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_points.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * Response containing the list of rolled up data points.
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.DailyRollUpDataPointsResponse} + */ +@com.google.protobuf.Generated +public final class DailyRollUpDataPointsResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.DailyRollUpDataPointsResponse) + DailyRollUpDataPointsResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DailyRollUpDataPointsResponse"); + } + + // Use DailyRollUpDataPointsResponse.newBuilder() to construct. + private DailyRollUpDataPointsResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DailyRollUpDataPointsResponse() { + rollupDataPoints_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_DailyRollUpDataPointsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_DailyRollUpDataPointsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.DailyRollUpDataPointsResponse.class, + com.google.devicesandservices.health.v4.DailyRollUpDataPointsResponse.Builder.class); + } + + public static final int ROLLUP_DATA_POINTS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List + rollupDataPoints_; + + /** + * + * + *
+   * Values for each aggregation time window.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.DailyRollupDataPoint rollup_data_points = 1; + * + */ + @java.lang.Override + public java.util.List + getRollupDataPointsList() { + return rollupDataPoints_; + } + + /** + * + * + *
+   * Values for each aggregation time window.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.DailyRollupDataPoint rollup_data_points = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.devicesandservices.health.v4.DailyRollupDataPointOrBuilder> + getRollupDataPointsOrBuilderList() { + return rollupDataPoints_; + } + + /** + * + * + *
+   * Values for each aggregation time window.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.DailyRollupDataPoint rollup_data_points = 1; + * + */ + @java.lang.Override + public int getRollupDataPointsCount() { + return rollupDataPoints_.size(); + } + + /** + * + * + *
+   * Values for each aggregation time window.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.DailyRollupDataPoint rollup_data_points = 1; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyRollupDataPoint getRollupDataPoints( + int index) { + return rollupDataPoints_.get(index); + } + + /** + * + * + *
+   * Values for each aggregation time window.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.DailyRollupDataPoint rollup_data_points = 1; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyRollupDataPointOrBuilder + getRollupDataPointsOrBuilder(int index) { + return rollupDataPoints_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < rollupDataPoints_.size(); i++) { + output.writeMessage(1, rollupDataPoints_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < rollupDataPoints_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, rollupDataPoints_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.DailyRollUpDataPointsResponse)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.DailyRollUpDataPointsResponse other = + (com.google.devicesandservices.health.v4.DailyRollUpDataPointsResponse) obj; + + if (!getRollupDataPointsList().equals(other.getRollupDataPointsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getRollupDataPointsCount() > 0) { + hash = (37 * hash) + ROLLUP_DATA_POINTS_FIELD_NUMBER; + hash = (53 * hash) + getRollupDataPointsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.DailyRollUpDataPointsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.DailyRollUpDataPointsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DailyRollUpDataPointsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.DailyRollUpDataPointsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DailyRollUpDataPointsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.DailyRollUpDataPointsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DailyRollUpDataPointsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.DailyRollUpDataPointsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DailyRollUpDataPointsResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.DailyRollUpDataPointsResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DailyRollUpDataPointsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.DailyRollUpDataPointsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.DailyRollUpDataPointsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Response containing the list of rolled up data points.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.DailyRollUpDataPointsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.DailyRollUpDataPointsResponse) + com.google.devicesandservices.health.v4.DailyRollUpDataPointsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_DailyRollUpDataPointsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_DailyRollUpDataPointsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.DailyRollUpDataPointsResponse.class, + com.google.devicesandservices.health.v4.DailyRollUpDataPointsResponse.Builder.class); + } + + // Construct using + // com.google.devicesandservices.health.v4.DailyRollUpDataPointsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (rollupDataPointsBuilder_ == null) { + rollupDataPoints_ = java.util.Collections.emptyList(); + } else { + rollupDataPoints_ = null; + rollupDataPointsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_DailyRollUpDataPointsResponse_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyRollUpDataPointsResponse + getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.DailyRollUpDataPointsResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyRollUpDataPointsResponse build() { + com.google.devicesandservices.health.v4.DailyRollUpDataPointsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyRollUpDataPointsResponse buildPartial() { + com.google.devicesandservices.health.v4.DailyRollUpDataPointsResponse result = + new com.google.devicesandservices.health.v4.DailyRollUpDataPointsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.devicesandservices.health.v4.DailyRollUpDataPointsResponse result) { + if (rollupDataPointsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + rollupDataPoints_ = java.util.Collections.unmodifiableList(rollupDataPoints_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.rollupDataPoints_ = rollupDataPoints_; + } else { + result.rollupDataPoints_ = rollupDataPointsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.devicesandservices.health.v4.DailyRollUpDataPointsResponse result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.DailyRollUpDataPointsResponse) { + return mergeFrom( + (com.google.devicesandservices.health.v4.DailyRollUpDataPointsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.devicesandservices.health.v4.DailyRollUpDataPointsResponse other) { + if (other + == com.google.devicesandservices.health.v4.DailyRollUpDataPointsResponse + .getDefaultInstance()) return this; + if (rollupDataPointsBuilder_ == null) { + if (!other.rollupDataPoints_.isEmpty()) { + if (rollupDataPoints_.isEmpty()) { + rollupDataPoints_ = other.rollupDataPoints_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRollupDataPointsIsMutable(); + rollupDataPoints_.addAll(other.rollupDataPoints_); + } + onChanged(); + } + } else { + if (!other.rollupDataPoints_.isEmpty()) { + if (rollupDataPointsBuilder_.isEmpty()) { + rollupDataPointsBuilder_.dispose(); + rollupDataPointsBuilder_ = null; + rollupDataPoints_ = other.rollupDataPoints_; + bitField0_ = (bitField0_ & ~0x00000001); + rollupDataPointsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetRollupDataPointsFieldBuilder() + : null; + } else { + rollupDataPointsBuilder_.addAllMessages(other.rollupDataPoints_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.devicesandservices.health.v4.DailyRollupDataPoint m = + input.readMessage( + com.google.devicesandservices.health.v4.DailyRollupDataPoint.parser(), + extensionRegistry); + if (rollupDataPointsBuilder_ == null) { + ensureRollupDataPointsIsMutable(); + rollupDataPoints_.add(m); + } else { + rollupDataPointsBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List + rollupDataPoints_ = java.util.Collections.emptyList(); + + private void ensureRollupDataPointsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + rollupDataPoints_ = + new java.util.ArrayList( + rollupDataPoints_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.devicesandservices.health.v4.DailyRollupDataPoint, + com.google.devicesandservices.health.v4.DailyRollupDataPoint.Builder, + com.google.devicesandservices.health.v4.DailyRollupDataPointOrBuilder> + rollupDataPointsBuilder_; + + /** + * + * + *
+     * Values for each aggregation time window.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.DailyRollupDataPoint rollup_data_points = 1; + * + */ + public java.util.List + getRollupDataPointsList() { + if (rollupDataPointsBuilder_ == null) { + return java.util.Collections.unmodifiableList(rollupDataPoints_); + } else { + return rollupDataPointsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Values for each aggregation time window.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.DailyRollupDataPoint rollup_data_points = 1; + * + */ + public int getRollupDataPointsCount() { + if (rollupDataPointsBuilder_ == null) { + return rollupDataPoints_.size(); + } else { + return rollupDataPointsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Values for each aggregation time window.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.DailyRollupDataPoint rollup_data_points = 1; + * + */ + public com.google.devicesandservices.health.v4.DailyRollupDataPoint getRollupDataPoints( + int index) { + if (rollupDataPointsBuilder_ == null) { + return rollupDataPoints_.get(index); + } else { + return rollupDataPointsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Values for each aggregation time window.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.DailyRollupDataPoint rollup_data_points = 1; + * + */ + public Builder setRollupDataPoints( + int index, com.google.devicesandservices.health.v4.DailyRollupDataPoint value) { + if (rollupDataPointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRollupDataPointsIsMutable(); + rollupDataPoints_.set(index, value); + onChanged(); + } else { + rollupDataPointsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Values for each aggregation time window.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.DailyRollupDataPoint rollup_data_points = 1; + * + */ + public Builder setRollupDataPoints( + int index, + com.google.devicesandservices.health.v4.DailyRollupDataPoint.Builder builderForValue) { + if (rollupDataPointsBuilder_ == null) { + ensureRollupDataPointsIsMutable(); + rollupDataPoints_.set(index, builderForValue.build()); + onChanged(); + } else { + rollupDataPointsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Values for each aggregation time window.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.DailyRollupDataPoint rollup_data_points = 1; + * + */ + public Builder addRollupDataPoints( + com.google.devicesandservices.health.v4.DailyRollupDataPoint value) { + if (rollupDataPointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRollupDataPointsIsMutable(); + rollupDataPoints_.add(value); + onChanged(); + } else { + rollupDataPointsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Values for each aggregation time window.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.DailyRollupDataPoint rollup_data_points = 1; + * + */ + public Builder addRollupDataPoints( + int index, com.google.devicesandservices.health.v4.DailyRollupDataPoint value) { + if (rollupDataPointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRollupDataPointsIsMutable(); + rollupDataPoints_.add(index, value); + onChanged(); + } else { + rollupDataPointsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Values for each aggregation time window.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.DailyRollupDataPoint rollup_data_points = 1; + * + */ + public Builder addRollupDataPoints( + com.google.devicesandservices.health.v4.DailyRollupDataPoint.Builder builderForValue) { + if (rollupDataPointsBuilder_ == null) { + ensureRollupDataPointsIsMutable(); + rollupDataPoints_.add(builderForValue.build()); + onChanged(); + } else { + rollupDataPointsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Values for each aggregation time window.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.DailyRollupDataPoint rollup_data_points = 1; + * + */ + public Builder addRollupDataPoints( + int index, + com.google.devicesandservices.health.v4.DailyRollupDataPoint.Builder builderForValue) { + if (rollupDataPointsBuilder_ == null) { + ensureRollupDataPointsIsMutable(); + rollupDataPoints_.add(index, builderForValue.build()); + onChanged(); + } else { + rollupDataPointsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Values for each aggregation time window.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.DailyRollupDataPoint rollup_data_points = 1; + * + */ + public Builder addAllRollupDataPoints( + java.lang.Iterable + values) { + if (rollupDataPointsBuilder_ == null) { + ensureRollupDataPointsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, rollupDataPoints_); + onChanged(); + } else { + rollupDataPointsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Values for each aggregation time window.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.DailyRollupDataPoint rollup_data_points = 1; + * + */ + public Builder clearRollupDataPoints() { + if (rollupDataPointsBuilder_ == null) { + rollupDataPoints_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + rollupDataPointsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Values for each aggregation time window.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.DailyRollupDataPoint rollup_data_points = 1; + * + */ + public Builder removeRollupDataPoints(int index) { + if (rollupDataPointsBuilder_ == null) { + ensureRollupDataPointsIsMutable(); + rollupDataPoints_.remove(index); + onChanged(); + } else { + rollupDataPointsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Values for each aggregation time window.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.DailyRollupDataPoint rollup_data_points = 1; + * + */ + public com.google.devicesandservices.health.v4.DailyRollupDataPoint.Builder + getRollupDataPointsBuilder(int index) { + return internalGetRollupDataPointsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Values for each aggregation time window.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.DailyRollupDataPoint rollup_data_points = 1; + * + */ + public com.google.devicesandservices.health.v4.DailyRollupDataPointOrBuilder + getRollupDataPointsOrBuilder(int index) { + if (rollupDataPointsBuilder_ == null) { + return rollupDataPoints_.get(index); + } else { + return rollupDataPointsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Values for each aggregation time window.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.DailyRollupDataPoint rollup_data_points = 1; + * + */ + public java.util.List< + ? extends com.google.devicesandservices.health.v4.DailyRollupDataPointOrBuilder> + getRollupDataPointsOrBuilderList() { + if (rollupDataPointsBuilder_ != null) { + return rollupDataPointsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(rollupDataPoints_); + } + } + + /** + * + * + *
+     * Values for each aggregation time window.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.DailyRollupDataPoint rollup_data_points = 1; + * + */ + public com.google.devicesandservices.health.v4.DailyRollupDataPoint.Builder + addRollupDataPointsBuilder() { + return internalGetRollupDataPointsFieldBuilder() + .addBuilder( + com.google.devicesandservices.health.v4.DailyRollupDataPoint.getDefaultInstance()); + } + + /** + * + * + *
+     * Values for each aggregation time window.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.DailyRollupDataPoint rollup_data_points = 1; + * + */ + public com.google.devicesandservices.health.v4.DailyRollupDataPoint.Builder + addRollupDataPointsBuilder(int index) { + return internalGetRollupDataPointsFieldBuilder() + .addBuilder( + index, + com.google.devicesandservices.health.v4.DailyRollupDataPoint.getDefaultInstance()); + } + + /** + * + * + *
+     * Values for each aggregation time window.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.DailyRollupDataPoint rollup_data_points = 1; + * + */ + public java.util.List + getRollupDataPointsBuilderList() { + return internalGetRollupDataPointsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.devicesandservices.health.v4.DailyRollupDataPoint, + com.google.devicesandservices.health.v4.DailyRollupDataPoint.Builder, + com.google.devicesandservices.health.v4.DailyRollupDataPointOrBuilder> + internalGetRollupDataPointsFieldBuilder() { + if (rollupDataPointsBuilder_ == null) { + rollupDataPointsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.devicesandservices.health.v4.DailyRollupDataPoint, + com.google.devicesandservices.health.v4.DailyRollupDataPoint.Builder, + com.google.devicesandservices.health.v4.DailyRollupDataPointOrBuilder>( + rollupDataPoints_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + rollupDataPoints_ = null; + } + return rollupDataPointsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.DailyRollUpDataPointsResponse) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.DailyRollUpDataPointsResponse) + private static final com.google.devicesandservices.health.v4.DailyRollUpDataPointsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.DailyRollUpDataPointsResponse(); + } + + public static com.google.devicesandservices.health.v4.DailyRollUpDataPointsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DailyRollUpDataPointsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyRollUpDataPointsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DailyRollUpDataPointsResponseOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DailyRollUpDataPointsResponseOrBuilder.java new file mode 100644 index 000000000000..69f6e9327063 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DailyRollUpDataPointsResponseOrBuilder.java @@ -0,0 +1,96 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_points.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface DailyRollUpDataPointsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.DailyRollUpDataPointsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Values for each aggregation time window.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.DailyRollupDataPoint rollup_data_points = 1; + * + */ + java.util.List + getRollupDataPointsList(); + + /** + * + * + *
+   * Values for each aggregation time window.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.DailyRollupDataPoint rollup_data_points = 1; + * + */ + com.google.devicesandservices.health.v4.DailyRollupDataPoint getRollupDataPoints(int index); + + /** + * + * + *
+   * Values for each aggregation time window.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.DailyRollupDataPoint rollup_data_points = 1; + * + */ + int getRollupDataPointsCount(); + + /** + * + * + *
+   * Values for each aggregation time window.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.DailyRollupDataPoint rollup_data_points = 1; + * + */ + java.util.List + getRollupDataPointsOrBuilderList(); + + /** + * + * + *
+   * Values for each aggregation time window.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.DailyRollupDataPoint rollup_data_points = 1; + * + */ + com.google.devicesandservices.health.v4.DailyRollupDataPointOrBuilder + getRollupDataPointsOrBuilder(int index); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DailyRollupDataPoint.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DailyRollupDataPoint.java new file mode 100644 index 000000000000..d8dc74934702 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DailyRollupDataPoint.java @@ -0,0 +1,7830 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_points.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * Value of a daily rollup for a single civil time interval (aggregation window)
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.DailyRollupDataPoint} + */ +@com.google.protobuf.Generated +public final class DailyRollupDataPoint extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.DailyRollupDataPoint) + DailyRollupDataPointOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DailyRollupDataPoint"); + } + + // Use DailyRollupDataPoint.newBuilder() to construct. + private DailyRollupDataPoint(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DailyRollupDataPoint() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_DailyRollupDataPoint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_DailyRollupDataPoint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.DailyRollupDataPoint.class, + com.google.devicesandservices.health.v4.DailyRollupDataPoint.Builder.class); + } + + private int bitField0_; + private int valueCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object value_; + + public enum ValueCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + STEPS(5), + FLOORS(6), + HEART_RATE(7), + RESTING_HEART_RATE_PERSONAL_RANGE(8), + HEART_RATE_VARIABILITY_PERSONAL_RANGE(9), + WEIGHT(10), + ALTITUDE(11), + DISTANCE(12), + BODY_FAT(13), + TOTAL_CALORIES(14), + ACTIVE_ZONE_MINUTES(15), + SEDENTARY_PERIOD(17), + RUN_VO2_MAX(18), + CALORIES_IN_HEART_RATE_ZONE(19), + ACTIVITY_LEVEL(20), + HYDRATION_LOG(22), + TIME_IN_HEART_RATE_ZONE(23), + ACTIVE_MINUTES(24), + SWIM_LENGTHS_DATA(25), + VALUE_NOT_SET(0); + private final int value; + + private ValueCase(int value) { + this.value = value; + } + + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ValueCase valueOf(int value) { + return forNumber(value); + } + + public static ValueCase forNumber(int value) { + switch (value) { + case 5: + return STEPS; + case 6: + return FLOORS; + case 7: + return HEART_RATE; + case 8: + return RESTING_HEART_RATE_PERSONAL_RANGE; + case 9: + return HEART_RATE_VARIABILITY_PERSONAL_RANGE; + case 10: + return WEIGHT; + case 11: + return ALTITUDE; + case 12: + return DISTANCE; + case 13: + return BODY_FAT; + case 14: + return TOTAL_CALORIES; + case 15: + return ACTIVE_ZONE_MINUTES; + case 17: + return SEDENTARY_PERIOD; + case 18: + return RUN_VO2_MAX; + case 19: + return CALORIES_IN_HEART_RATE_ZONE; + case 20: + return ACTIVITY_LEVEL; + case 22: + return HYDRATION_LOG; + case 23: + return TIME_IN_HEART_RATE_ZONE; + case 24: + return ACTIVE_MINUTES; + case 25: + return SWIM_LENGTHS_DATA; + case 0: + return VALUE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ValueCase getValueCase() { + return ValueCase.forNumber(valueCase_); + } + + public static final int STEPS_FIELD_NUMBER = 5; + + /** + * + * + *
+   * Returned by default when rolling up data points from the `steps` data
+   * type, or when requested explicitly using the `steps` rollup type
+   * identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.StepsRollupValue steps = 5; + * + * @return Whether the steps field is set. + */ + @java.lang.Override + public boolean hasSteps() { + return valueCase_ == 5; + } + + /** + * + * + *
+   * Returned by default when rolling up data points from the `steps` data
+   * type, or when requested explicitly using the `steps` rollup type
+   * identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.StepsRollupValue steps = 5; + * + * @return The steps. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.StepsRollupValue getSteps() { + if (valueCase_ == 5) { + return (com.google.devicesandservices.health.v4.StepsRollupValue) value_; + } + return com.google.devicesandservices.health.v4.StepsRollupValue.getDefaultInstance(); + } + + /** + * + * + *
+   * Returned by default when rolling up data points from the `steps` data
+   * type, or when requested explicitly using the `steps` rollup type
+   * identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.StepsRollupValue steps = 5; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.StepsRollupValueOrBuilder getStepsOrBuilder() { + if (valueCase_ == 5) { + return (com.google.devicesandservices.health.v4.StepsRollupValue) value_; + } + return com.google.devicesandservices.health.v4.StepsRollupValue.getDefaultInstance(); + } + + public static final int FLOORS_FIELD_NUMBER = 6; + + /** + * + * + *
+   * Returned by default when rolling up data points from the `floors` data
+   * type, or when requested explicitly using the `floors` rollup type
+   * identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.FloorsRollupValue floors = 6; + * + * @return Whether the floors field is set. + */ + @java.lang.Override + public boolean hasFloors() { + return valueCase_ == 6; + } + + /** + * + * + *
+   * Returned by default when rolling up data points from the `floors` data
+   * type, or when requested explicitly using the `floors` rollup type
+   * identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.FloorsRollupValue floors = 6; + * + * @return The floors. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.FloorsRollupValue getFloors() { + if (valueCase_ == 6) { + return (com.google.devicesandservices.health.v4.FloorsRollupValue) value_; + } + return com.google.devicesandservices.health.v4.FloorsRollupValue.getDefaultInstance(); + } + + /** + * + * + *
+   * Returned by default when rolling up data points from the `floors` data
+   * type, or when requested explicitly using the `floors` rollup type
+   * identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.FloorsRollupValue floors = 6; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.FloorsRollupValueOrBuilder getFloorsOrBuilder() { + if (valueCase_ == 6) { + return (com.google.devicesandservices.health.v4.FloorsRollupValue) value_; + } + return com.google.devicesandservices.health.v4.FloorsRollupValue.getDefaultInstance(); + } + + public static final int HEART_RATE_FIELD_NUMBER = 7; + + /** + * + * + *
+   * Returned by default when rolling up data points from the `heart-rate`
+   * data type, or when requested explicitly using the `heart-rate` rollup
+   * type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.HeartRateRollupValue heart_rate = 7; + * + * @return Whether the heartRate field is set. + */ + @java.lang.Override + public boolean hasHeartRate() { + return valueCase_ == 7; + } + + /** + * + * + *
+   * Returned by default when rolling up data points from the `heart-rate`
+   * data type, or when requested explicitly using the `heart-rate` rollup
+   * type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.HeartRateRollupValue heart_rate = 7; + * + * @return The heartRate. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.HeartRateRollupValue getHeartRate() { + if (valueCase_ == 7) { + return (com.google.devicesandservices.health.v4.HeartRateRollupValue) value_; + } + return com.google.devicesandservices.health.v4.HeartRateRollupValue.getDefaultInstance(); + } + + /** + * + * + *
+   * Returned by default when rolling up data points from the `heart-rate`
+   * data type, or when requested explicitly using the `heart-rate` rollup
+   * type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.HeartRateRollupValue heart_rate = 7; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.HeartRateRollupValueOrBuilder + getHeartRateOrBuilder() { + if (valueCase_ == 7) { + return (com.google.devicesandservices.health.v4.HeartRateRollupValue) value_; + } + return com.google.devicesandservices.health.v4.HeartRateRollupValue.getDefaultInstance(); + } + + public static final int RESTING_HEART_RATE_PERSONAL_RANGE_FIELD_NUMBER = 8; + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `daily-resting-heart-rate` data type, or when requested
+   * explicitly using the `resting-heart-rate-personal-range` rollup type
+   * identifier.
+   * 
+ * + * + * .google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue resting_heart_rate_personal_range = 8; + * + * + * @return Whether the restingHeartRatePersonalRange field is set. + */ + @java.lang.Override + public boolean hasRestingHeartRatePersonalRange() { + return valueCase_ == 8; + } + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `daily-resting-heart-rate` data type, or when requested
+   * explicitly using the `resting-heart-rate-personal-range` rollup type
+   * identifier.
+   * 
+ * + * + * .google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue resting_heart_rate_personal_range = 8; + * + * + * @return The restingHeartRatePersonalRange. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue + getRestingHeartRatePersonalRange() { + if (valueCase_ == 8) { + return (com.google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue) + value_; + } + return com.google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue + .getDefaultInstance(); + } + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `daily-resting-heart-rate` data type, or when requested
+   * explicitly using the `resting-heart-rate-personal-range` rollup type
+   * identifier.
+   * 
+ * + * + * .google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue resting_heart_rate_personal_range = 8; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValueOrBuilder + getRestingHeartRatePersonalRangeOrBuilder() { + if (valueCase_ == 8) { + return (com.google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue) + value_; + } + return com.google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue + .getDefaultInstance(); + } + + public static final int HEART_RATE_VARIABILITY_PERSONAL_RANGE_FIELD_NUMBER = 9; + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `daily-heart-rate-variability` data type, or when requested explicitly
+   * using the `heart-rate-variability-personal-range` rollup type
+   * identifier.
+   * 
+ * + * + * .google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue heart_rate_variability_personal_range = 9; + * + * + * @return Whether the heartRateVariabilityPersonalRange field is set. + */ + @java.lang.Override + public boolean hasHeartRateVariabilityPersonalRange() { + return valueCase_ == 9; + } + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `daily-heart-rate-variability` data type, or when requested explicitly
+   * using the `heart-rate-variability-personal-range` rollup type
+   * identifier.
+   * 
+ * + * + * .google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue heart_rate_variability_personal_range = 9; + * + * + * @return The heartRateVariabilityPersonalRange. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue + getHeartRateVariabilityPersonalRange() { + if (valueCase_ == 9) { + return (com.google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue) + value_; + } + return com.google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue + .getDefaultInstance(); + } + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `daily-heart-rate-variability` data type, or when requested explicitly
+   * using the `heart-rate-variability-personal-range` rollup type
+   * identifier.
+   * 
+ * + * + * .google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue heart_rate_variability_personal_range = 9; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4 + .HeartRateVariabilityPersonalRangeRollupValueOrBuilder + getHeartRateVariabilityPersonalRangeOrBuilder() { + if (valueCase_ == 9) { + return (com.google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue) + value_; + } + return com.google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue + .getDefaultInstance(); + } + + public static final int WEIGHT_FIELD_NUMBER = 10; + + /** + * + * + *
+   * Returned by default when rolling up data points from the `weight` data
+   * type, or when requested explicitly using the `weight` rollup type
+   * identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.WeightRollupValue weight = 10; + * + * @return Whether the weight field is set. + */ + @java.lang.Override + public boolean hasWeight() { + return valueCase_ == 10; + } + + /** + * + * + *
+   * Returned by default when rolling up data points from the `weight` data
+   * type, or when requested explicitly using the `weight` rollup type
+   * identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.WeightRollupValue weight = 10; + * + * @return The weight. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.WeightRollupValue getWeight() { + if (valueCase_ == 10) { + return (com.google.devicesandservices.health.v4.WeightRollupValue) value_; + } + return com.google.devicesandservices.health.v4.WeightRollupValue.getDefaultInstance(); + } + + /** + * + * + *
+   * Returned by default when rolling up data points from the `weight` data
+   * type, or when requested explicitly using the `weight` rollup type
+   * identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.WeightRollupValue weight = 10; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.WeightRollupValueOrBuilder getWeightOrBuilder() { + if (valueCase_ == 10) { + return (com.google.devicesandservices.health.v4.WeightRollupValue) value_; + } + return com.google.devicesandservices.health.v4.WeightRollupValue.getDefaultInstance(); + } + + public static final int ALTITUDE_FIELD_NUMBER = 11; + + /** + * + * + *
+   * Returned by default when rolling up data points from the `altitude` data
+   * type, or when requested explicitly using the `altitude` rollup type
+   * identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.AltitudeRollupValue altitude = 11; + * + * @return Whether the altitude field is set. + */ + @java.lang.Override + public boolean hasAltitude() { + return valueCase_ == 11; + } + + /** + * + * + *
+   * Returned by default when rolling up data points from the `altitude` data
+   * type, or when requested explicitly using the `altitude` rollup type
+   * identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.AltitudeRollupValue altitude = 11; + * + * @return The altitude. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.AltitudeRollupValue getAltitude() { + if (valueCase_ == 11) { + return (com.google.devicesandservices.health.v4.AltitudeRollupValue) value_; + } + return com.google.devicesandservices.health.v4.AltitudeRollupValue.getDefaultInstance(); + } + + /** + * + * + *
+   * Returned by default when rolling up data points from the `altitude` data
+   * type, or when requested explicitly using the `altitude` rollup type
+   * identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.AltitudeRollupValue altitude = 11; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.AltitudeRollupValueOrBuilder + getAltitudeOrBuilder() { + if (valueCase_ == 11) { + return (com.google.devicesandservices.health.v4.AltitudeRollupValue) value_; + } + return com.google.devicesandservices.health.v4.AltitudeRollupValue.getDefaultInstance(); + } + + public static final int DISTANCE_FIELD_NUMBER = 12; + + /** + * + * + *
+   * Returned by default when rolling up data points from the `distance` data
+   * type, or when requested explicitly using the `distance` rollup type
+   * identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.DistanceRollupValue distance = 12; + * + * @return Whether the distance field is set. + */ + @java.lang.Override + public boolean hasDistance() { + return valueCase_ == 12; + } + + /** + * + * + *
+   * Returned by default when rolling up data points from the `distance` data
+   * type, or when requested explicitly using the `distance` rollup type
+   * identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.DistanceRollupValue distance = 12; + * + * @return The distance. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DistanceRollupValue getDistance() { + if (valueCase_ == 12) { + return (com.google.devicesandservices.health.v4.DistanceRollupValue) value_; + } + return com.google.devicesandservices.health.v4.DistanceRollupValue.getDefaultInstance(); + } + + /** + * + * + *
+   * Returned by default when rolling up data points from the `distance` data
+   * type, or when requested explicitly using the `distance` rollup type
+   * identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.DistanceRollupValue distance = 12; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DistanceRollupValueOrBuilder + getDistanceOrBuilder() { + if (valueCase_ == 12) { + return (com.google.devicesandservices.health.v4.DistanceRollupValue) value_; + } + return com.google.devicesandservices.health.v4.DistanceRollupValue.getDefaultInstance(); + } + + public static final int BODY_FAT_FIELD_NUMBER = 13; + + /** + * + * + *
+   * Returned by default when rolling up data points from the `body-fat` data
+   * type, or when requested explicitly using the `body-fat` rollup type
+   * identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.BodyFatRollupValue body_fat = 13; + * + * @return Whether the bodyFat field is set. + */ + @java.lang.Override + public boolean hasBodyFat() { + return valueCase_ == 13; + } + + /** + * + * + *
+   * Returned by default when rolling up data points from the `body-fat` data
+   * type, or when requested explicitly using the `body-fat` rollup type
+   * identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.BodyFatRollupValue body_fat = 13; + * + * @return The bodyFat. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.BodyFatRollupValue getBodyFat() { + if (valueCase_ == 13) { + return (com.google.devicesandservices.health.v4.BodyFatRollupValue) value_; + } + return com.google.devicesandservices.health.v4.BodyFatRollupValue.getDefaultInstance(); + } + + /** + * + * + *
+   * Returned by default when rolling up data points from the `body-fat` data
+   * type, or when requested explicitly using the `body-fat` rollup type
+   * identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.BodyFatRollupValue body_fat = 13; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.BodyFatRollupValueOrBuilder getBodyFatOrBuilder() { + if (valueCase_ == 13) { + return (com.google.devicesandservices.health.v4.BodyFatRollupValue) value_; + } + return com.google.devicesandservices.health.v4.BodyFatRollupValue.getDefaultInstance(); + } + + public static final int TOTAL_CALORIES_FIELD_NUMBER = 14; + + /** + * + * + *
+   * Returned by default when rolling up data points from the `total-calories`
+   * data type, or when requested explicitly using the `total-calories`
+   * rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.TotalCaloriesRollupValue total_calories = 14; + * + * @return Whether the totalCalories field is set. + */ + @java.lang.Override + public boolean hasTotalCalories() { + return valueCase_ == 14; + } + + /** + * + * + *
+   * Returned by default when rolling up data points from the `total-calories`
+   * data type, or when requested explicitly using the `total-calories`
+   * rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.TotalCaloriesRollupValue total_calories = 14; + * + * @return The totalCalories. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.TotalCaloriesRollupValue getTotalCalories() { + if (valueCase_ == 14) { + return (com.google.devicesandservices.health.v4.TotalCaloriesRollupValue) value_; + } + return com.google.devicesandservices.health.v4.TotalCaloriesRollupValue.getDefaultInstance(); + } + + /** + * + * + *
+   * Returned by default when rolling up data points from the `total-calories`
+   * data type, or when requested explicitly using the `total-calories`
+   * rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.TotalCaloriesRollupValue total_calories = 14; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.TotalCaloriesRollupValueOrBuilder + getTotalCaloriesOrBuilder() { + if (valueCase_ == 14) { + return (com.google.devicesandservices.health.v4.TotalCaloriesRollupValue) value_; + } + return com.google.devicesandservices.health.v4.TotalCaloriesRollupValue.getDefaultInstance(); + } + + public static final int ACTIVE_ZONE_MINUTES_FIELD_NUMBER = 15; + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `active-zone-minutes` data type, or when requested explicitly using the
+   * `active-zone-minutes` rollup type identifier.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue active_zone_minutes = 15; + * + * + * @return Whether the activeZoneMinutes field is set. + */ + @java.lang.Override + public boolean hasActiveZoneMinutes() { + return valueCase_ == 15; + } + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `active-zone-minutes` data type, or when requested explicitly using the
+   * `active-zone-minutes` rollup type identifier.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue active_zone_minutes = 15; + * + * + * @return The activeZoneMinutes. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue + getActiveZoneMinutes() { + if (valueCase_ == 15) { + return (com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue) value_; + } + return com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue + .getDefaultInstance(); + } + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `active-zone-minutes` data type, or when requested explicitly using the
+   * `active-zone-minutes` rollup type identifier.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue active_zone_minutes = 15; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValueOrBuilder + getActiveZoneMinutesOrBuilder() { + if (valueCase_ == 15) { + return (com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue) value_; + } + return com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue + .getDefaultInstance(); + } + + public static final int SEDENTARY_PERIOD_FIELD_NUMBER = 17; + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `sedentary-period` data type, or when requested explicitly using the
+   * `sedentary-period` rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.SedentaryPeriodRollupValue sedentary_period = 17; + * + * + * @return Whether the sedentaryPeriod field is set. + */ + @java.lang.Override + public boolean hasSedentaryPeriod() { + return valueCase_ == 17; + } + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `sedentary-period` data type, or when requested explicitly using the
+   * `sedentary-period` rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.SedentaryPeriodRollupValue sedentary_period = 17; + * + * + * @return The sedentaryPeriod. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue getSedentaryPeriod() { + if (valueCase_ == 17) { + return (com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue) value_; + } + return com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue.getDefaultInstance(); + } + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `sedentary-period` data type, or when requested explicitly using the
+   * `sedentary-period` rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.SedentaryPeriodRollupValue sedentary_period = 17; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.SedentaryPeriodRollupValueOrBuilder + getSedentaryPeriodOrBuilder() { + if (valueCase_ == 17) { + return (com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue) value_; + } + return com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue.getDefaultInstance(); + } + + public static final int RUN_VO2_MAX_FIELD_NUMBER = 18; + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `run-vo2-max` data type, or when requested explicitly using the
+   * `run-vo2-max` rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.RunVO2MaxRollupValue run_vo2_max = 18; + * + * @return Whether the runVo2Max field is set. + */ + @java.lang.Override + public boolean hasRunVo2Max() { + return valueCase_ == 18; + } + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `run-vo2-max` data type, or when requested explicitly using the
+   * `run-vo2-max` rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.RunVO2MaxRollupValue run_vo2_max = 18; + * + * @return The runVo2Max. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.RunVO2MaxRollupValue getRunVo2Max() { + if (valueCase_ == 18) { + return (com.google.devicesandservices.health.v4.RunVO2MaxRollupValue) value_; + } + return com.google.devicesandservices.health.v4.RunVO2MaxRollupValue.getDefaultInstance(); + } + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `run-vo2-max` data type, or when requested explicitly using the
+   * `run-vo2-max` rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.RunVO2MaxRollupValue run_vo2_max = 18; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.RunVO2MaxRollupValueOrBuilder + getRunVo2MaxOrBuilder() { + if (valueCase_ == 18) { + return (com.google.devicesandservices.health.v4.RunVO2MaxRollupValue) value_; + } + return com.google.devicesandservices.health.v4.RunVO2MaxRollupValue.getDefaultInstance(); + } + + public static final int CALORIES_IN_HEART_RATE_ZONE_FIELD_NUMBER = 19; + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `calories-in-heart-rate-zone` data type, or when requested explicitly
+   * using the `calories-in-heart-rate-zone` rollup type identifier.
+   * 
+ * + * + * .google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue calories_in_heart_rate_zone = 19; + * + * + * @return Whether the caloriesInHeartRateZone field is set. + */ + @java.lang.Override + public boolean hasCaloriesInHeartRateZone() { + return valueCase_ == 19; + } + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `calories-in-heart-rate-zone` data type, or when requested explicitly
+   * using the `calories-in-heart-rate-zone` rollup type identifier.
+   * 
+ * + * + * .google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue calories_in_heart_rate_zone = 19; + * + * + * @return The caloriesInHeartRateZone. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + getCaloriesInHeartRateZone() { + if (valueCase_ == 19) { + return (com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue) value_; + } + return com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .getDefaultInstance(); + } + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `calories-in-heart-rate-zone` data type, or when requested explicitly
+   * using the `calories-in-heart-rate-zone` rollup type identifier.
+   * 
+ * + * + * .google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue calories_in_heart_rate_zone = 19; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValueOrBuilder + getCaloriesInHeartRateZoneOrBuilder() { + if (valueCase_ == 19) { + return (com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue) value_; + } + return com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .getDefaultInstance(); + } + + public static final int ACTIVITY_LEVEL_FIELD_NUMBER = 20; + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `activity-level` data type, or when requested explicitly using the
+   * `activity-level` rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.ActivityLevelRollupValue activity_level = 20; + * + * @return Whether the activityLevel field is set. + */ + @java.lang.Override + public boolean hasActivityLevel() { + return valueCase_ == 20; + } + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `activity-level` data type, or when requested explicitly using the
+   * `activity-level` rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.ActivityLevelRollupValue activity_level = 20; + * + * @return The activityLevel. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ActivityLevelRollupValue getActivityLevel() { + if (valueCase_ == 20) { + return (com.google.devicesandservices.health.v4.ActivityLevelRollupValue) value_; + } + return com.google.devicesandservices.health.v4.ActivityLevelRollupValue.getDefaultInstance(); + } + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `activity-level` data type, or when requested explicitly using the
+   * `activity-level` rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.ActivityLevelRollupValue activity_level = 20; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ActivityLevelRollupValueOrBuilder + getActivityLevelOrBuilder() { + if (valueCase_ == 20) { + return (com.google.devicesandservices.health.v4.ActivityLevelRollupValue) value_; + } + return com.google.devicesandservices.health.v4.ActivityLevelRollupValue.getDefaultInstance(); + } + + public static final int HYDRATION_LOG_FIELD_NUMBER = 22; + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `hydration-log` data type, or when requested explicitly using the
+   * `hydration-log` rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.HydrationLogRollupValue hydration_log = 22; + * + * @return Whether the hydrationLog field is set. + */ + @java.lang.Override + public boolean hasHydrationLog() { + return valueCase_ == 22; + } + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `hydration-log` data type, or when requested explicitly using the
+   * `hydration-log` rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.HydrationLogRollupValue hydration_log = 22; + * + * @return The hydrationLog. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.HydrationLogRollupValue getHydrationLog() { + if (valueCase_ == 22) { + return (com.google.devicesandservices.health.v4.HydrationLogRollupValue) value_; + } + return com.google.devicesandservices.health.v4.HydrationLogRollupValue.getDefaultInstance(); + } + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `hydration-log` data type, or when requested explicitly using the
+   * `hydration-log` rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.HydrationLogRollupValue hydration_log = 22; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.HydrationLogRollupValueOrBuilder + getHydrationLogOrBuilder() { + if (valueCase_ == 22) { + return (com.google.devicesandservices.health.v4.HydrationLogRollupValue) value_; + } + return com.google.devicesandservices.health.v4.HydrationLogRollupValue.getDefaultInstance(); + } + + public static final int TIME_IN_HEART_RATE_ZONE_FIELD_NUMBER = 23; + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `time-in-heart-rate-zone` data type, or when requested explicitly using
+   * the `time-in-heart-rate-zone` rollup type identifier.
+   * 
+ * + * + * .google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue time_in_heart_rate_zone = 23; + * + * + * @return Whether the timeInHeartRateZone field is set. + */ + @java.lang.Override + public boolean hasTimeInHeartRateZone() { + return valueCase_ == 23; + } + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `time-in-heart-rate-zone` data type, or when requested explicitly using
+   * the `time-in-heart-rate-zone` rollup type identifier.
+   * 
+ * + * + * .google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue time_in_heart_rate_zone = 23; + * + * + * @return The timeInHeartRateZone. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + getTimeInHeartRateZone() { + if (valueCase_ == 23) { + return (com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue) value_; + } + return com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .getDefaultInstance(); + } + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `time-in-heart-rate-zone` data type, or when requested explicitly using
+   * the `time-in-heart-rate-zone` rollup type identifier.
+   * 
+ * + * + * .google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue time_in_heart_rate_zone = 23; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValueOrBuilder + getTimeInHeartRateZoneOrBuilder() { + if (valueCase_ == 23) { + return (com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue) value_; + } + return com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .getDefaultInstance(); + } + + public static final int ACTIVE_MINUTES_FIELD_NUMBER = 24; + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `active-minutes` data type, or when requested explicitly using the
+   * `active-minutes` rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.ActiveMinutesRollupValue active_minutes = 24; + * + * @return Whether the activeMinutes field is set. + */ + @java.lang.Override + public boolean hasActiveMinutes() { + return valueCase_ == 24; + } + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `active-minutes` data type, or when requested explicitly using the
+   * `active-minutes` rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.ActiveMinutesRollupValue active_minutes = 24; + * + * @return The activeMinutes. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ActiveMinutesRollupValue getActiveMinutes() { + if (valueCase_ == 24) { + return (com.google.devicesandservices.health.v4.ActiveMinutesRollupValue) value_; + } + return com.google.devicesandservices.health.v4.ActiveMinutesRollupValue.getDefaultInstance(); + } + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `active-minutes` data type, or when requested explicitly using the
+   * `active-minutes` rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.ActiveMinutesRollupValue active_minutes = 24; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ActiveMinutesRollupValueOrBuilder + getActiveMinutesOrBuilder() { + if (valueCase_ == 24) { + return (com.google.devicesandservices.health.v4.ActiveMinutesRollupValue) value_; + } + return com.google.devicesandservices.health.v4.ActiveMinutesRollupValue.getDefaultInstance(); + } + + public static final int SWIM_LENGTHS_DATA_FIELD_NUMBER = 25; + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `swim-lengths-data` data type, or when requested explicitly using the
+   * `swim-lengths-data` rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.SwimLengthsDataRollupValue swim_lengths_data = 25; + * + * + * @return Whether the swimLengthsData field is set. + */ + @java.lang.Override + public boolean hasSwimLengthsData() { + return valueCase_ == 25; + } + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `swim-lengths-data` data type, or when requested explicitly using the
+   * `swim-lengths-data` rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.SwimLengthsDataRollupValue swim_lengths_data = 25; + * + * + * @return The swimLengthsData. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue getSwimLengthsData() { + if (valueCase_ == 25) { + return (com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue) value_; + } + return com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue.getDefaultInstance(); + } + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `swim-lengths-data` data type, or when requested explicitly using the
+   * `swim-lengths-data` rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.SwimLengthsDataRollupValue swim_lengths_data = 25; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.SwimLengthsDataRollupValueOrBuilder + getSwimLengthsDataOrBuilder() { + if (valueCase_ == 25) { + return (com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue) value_; + } + return com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue.getDefaultInstance(); + } + + public static final int CIVIL_START_TIME_FIELD_NUMBER = 1; + private com.google.devicesandservices.health.v4.CivilDateTime civilStartTime_; + + /** + * + * + *
+   * Start time of the window this value aggregates over
+   * 
+ * + * .google.devicesandservices.health.v4.CivilDateTime civil_start_time = 1; + * + * @return Whether the civilStartTime field is set. + */ + @java.lang.Override + public boolean hasCivilStartTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Start time of the window this value aggregates over
+   * 
+ * + * .google.devicesandservices.health.v4.CivilDateTime civil_start_time = 1; + * + * @return The civilStartTime. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.CivilDateTime getCivilStartTime() { + return civilStartTime_ == null + ? com.google.devicesandservices.health.v4.CivilDateTime.getDefaultInstance() + : civilStartTime_; + } + + /** + * + * + *
+   * Start time of the window this value aggregates over
+   * 
+ * + * .google.devicesandservices.health.v4.CivilDateTime civil_start_time = 1; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.CivilDateTimeOrBuilder + getCivilStartTimeOrBuilder() { + return civilStartTime_ == null + ? com.google.devicesandservices.health.v4.CivilDateTime.getDefaultInstance() + : civilStartTime_; + } + + public static final int CIVIL_END_TIME_FIELD_NUMBER = 2; + private com.google.devicesandservices.health.v4.CivilDateTime civilEndTime_; + + /** + * + * + *
+   * End time of the window this value aggregates over
+   * 
+ * + * .google.devicesandservices.health.v4.CivilDateTime civil_end_time = 2; + * + * @return Whether the civilEndTime field is set. + */ + @java.lang.Override + public boolean hasCivilEndTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * End time of the window this value aggregates over
+   * 
+ * + * .google.devicesandservices.health.v4.CivilDateTime civil_end_time = 2; + * + * @return The civilEndTime. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.CivilDateTime getCivilEndTime() { + return civilEndTime_ == null + ? com.google.devicesandservices.health.v4.CivilDateTime.getDefaultInstance() + : civilEndTime_; + } + + /** + * + * + *
+   * End time of the window this value aggregates over
+   * 
+ * + * .google.devicesandservices.health.v4.CivilDateTime civil_end_time = 2; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.CivilDateTimeOrBuilder getCivilEndTimeOrBuilder() { + return civilEndTime_ == null + ? com.google.devicesandservices.health.v4.CivilDateTime.getDefaultInstance() + : civilEndTime_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getCivilStartTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getCivilEndTime()); + } + if (valueCase_ == 5) { + output.writeMessage(5, (com.google.devicesandservices.health.v4.StepsRollupValue) value_); + } + if (valueCase_ == 6) { + output.writeMessage(6, (com.google.devicesandservices.health.v4.FloorsRollupValue) value_); + } + if (valueCase_ == 7) { + output.writeMessage(7, (com.google.devicesandservices.health.v4.HeartRateRollupValue) value_); + } + if (valueCase_ == 8) { + output.writeMessage( + 8, + (com.google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue) + value_); + } + if (valueCase_ == 9) { + output.writeMessage( + 9, + (com.google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue) + value_); + } + if (valueCase_ == 10) { + output.writeMessage(10, (com.google.devicesandservices.health.v4.WeightRollupValue) value_); + } + if (valueCase_ == 11) { + output.writeMessage(11, (com.google.devicesandservices.health.v4.AltitudeRollupValue) value_); + } + if (valueCase_ == 12) { + output.writeMessage(12, (com.google.devicesandservices.health.v4.DistanceRollupValue) value_); + } + if (valueCase_ == 13) { + output.writeMessage(13, (com.google.devicesandservices.health.v4.BodyFatRollupValue) value_); + } + if (valueCase_ == 14) { + output.writeMessage( + 14, (com.google.devicesandservices.health.v4.TotalCaloriesRollupValue) value_); + } + if (valueCase_ == 15) { + output.writeMessage( + 15, (com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue) value_); + } + if (valueCase_ == 17) { + output.writeMessage( + 17, (com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue) value_); + } + if (valueCase_ == 18) { + output.writeMessage( + 18, (com.google.devicesandservices.health.v4.RunVO2MaxRollupValue) value_); + } + if (valueCase_ == 19) { + output.writeMessage( + 19, (com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue) value_); + } + if (valueCase_ == 20) { + output.writeMessage( + 20, (com.google.devicesandservices.health.v4.ActivityLevelRollupValue) value_); + } + if (valueCase_ == 22) { + output.writeMessage( + 22, (com.google.devicesandservices.health.v4.HydrationLogRollupValue) value_); + } + if (valueCase_ == 23) { + output.writeMessage( + 23, (com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue) value_); + } + if (valueCase_ == 24) { + output.writeMessage( + 24, (com.google.devicesandservices.health.v4.ActiveMinutesRollupValue) value_); + } + if (valueCase_ == 25) { + output.writeMessage( + 25, (com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue) value_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCivilStartTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCivilEndTime()); + } + if (valueCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, (com.google.devicesandservices.health.v4.StepsRollupValue) value_); + } + if (valueCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, (com.google.devicesandservices.health.v4.FloorsRollupValue) value_); + } + if (valueCase_ == 7) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 7, (com.google.devicesandservices.health.v4.HeartRateRollupValue) value_); + } + if (valueCase_ == 8) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 8, + (com.google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue) + value_); + } + if (valueCase_ == 9) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 9, + (com.google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue) + value_); + } + if (valueCase_ == 10) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 10, (com.google.devicesandservices.health.v4.WeightRollupValue) value_); + } + if (valueCase_ == 11) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 11, (com.google.devicesandservices.health.v4.AltitudeRollupValue) value_); + } + if (valueCase_ == 12) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 12, (com.google.devicesandservices.health.v4.DistanceRollupValue) value_); + } + if (valueCase_ == 13) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 13, (com.google.devicesandservices.health.v4.BodyFatRollupValue) value_); + } + if (valueCase_ == 14) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 14, (com.google.devicesandservices.health.v4.TotalCaloriesRollupValue) value_); + } + if (valueCase_ == 15) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 15, (com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue) value_); + } + if (valueCase_ == 17) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 17, (com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue) value_); + } + if (valueCase_ == 18) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 18, (com.google.devicesandservices.health.v4.RunVO2MaxRollupValue) value_); + } + if (valueCase_ == 19) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 19, + (com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue) value_); + } + if (valueCase_ == 20) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 20, (com.google.devicesandservices.health.v4.ActivityLevelRollupValue) value_); + } + if (valueCase_ == 22) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 22, (com.google.devicesandservices.health.v4.HydrationLogRollupValue) value_); + } + if (valueCase_ == 23) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 23, (com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue) value_); + } + if (valueCase_ == 24) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 24, (com.google.devicesandservices.health.v4.ActiveMinutesRollupValue) value_); + } + if (valueCase_ == 25) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 25, (com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue) value_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.DailyRollupDataPoint)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.DailyRollupDataPoint other = + (com.google.devicesandservices.health.v4.DailyRollupDataPoint) obj; + + if (hasCivilStartTime() != other.hasCivilStartTime()) return false; + if (hasCivilStartTime()) { + if (!getCivilStartTime().equals(other.getCivilStartTime())) return false; + } + if (hasCivilEndTime() != other.hasCivilEndTime()) return false; + if (hasCivilEndTime()) { + if (!getCivilEndTime().equals(other.getCivilEndTime())) return false; + } + if (!getValueCase().equals(other.getValueCase())) return false; + switch (valueCase_) { + case 5: + if (!getSteps().equals(other.getSteps())) return false; + break; + case 6: + if (!getFloors().equals(other.getFloors())) return false; + break; + case 7: + if (!getHeartRate().equals(other.getHeartRate())) return false; + break; + case 8: + if (!getRestingHeartRatePersonalRange().equals(other.getRestingHeartRatePersonalRange())) + return false; + break; + case 9: + if (!getHeartRateVariabilityPersonalRange() + .equals(other.getHeartRateVariabilityPersonalRange())) return false; + break; + case 10: + if (!getWeight().equals(other.getWeight())) return false; + break; + case 11: + if (!getAltitude().equals(other.getAltitude())) return false; + break; + case 12: + if (!getDistance().equals(other.getDistance())) return false; + break; + case 13: + if (!getBodyFat().equals(other.getBodyFat())) return false; + break; + case 14: + if (!getTotalCalories().equals(other.getTotalCalories())) return false; + break; + case 15: + if (!getActiveZoneMinutes().equals(other.getActiveZoneMinutes())) return false; + break; + case 17: + if (!getSedentaryPeriod().equals(other.getSedentaryPeriod())) return false; + break; + case 18: + if (!getRunVo2Max().equals(other.getRunVo2Max())) return false; + break; + case 19: + if (!getCaloriesInHeartRateZone().equals(other.getCaloriesInHeartRateZone())) return false; + break; + case 20: + if (!getActivityLevel().equals(other.getActivityLevel())) return false; + break; + case 22: + if (!getHydrationLog().equals(other.getHydrationLog())) return false; + break; + case 23: + if (!getTimeInHeartRateZone().equals(other.getTimeInHeartRateZone())) return false; + break; + case 24: + if (!getActiveMinutes().equals(other.getActiveMinutes())) return false; + break; + case 25: + if (!getSwimLengthsData().equals(other.getSwimLengthsData())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCivilStartTime()) { + hash = (37 * hash) + CIVIL_START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCivilStartTime().hashCode(); + } + if (hasCivilEndTime()) { + hash = (37 * hash) + CIVIL_END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCivilEndTime().hashCode(); + } + switch (valueCase_) { + case 5: + hash = (37 * hash) + STEPS_FIELD_NUMBER; + hash = (53 * hash) + getSteps().hashCode(); + break; + case 6: + hash = (37 * hash) + FLOORS_FIELD_NUMBER; + hash = (53 * hash) + getFloors().hashCode(); + break; + case 7: + hash = (37 * hash) + HEART_RATE_FIELD_NUMBER; + hash = (53 * hash) + getHeartRate().hashCode(); + break; + case 8: + hash = (37 * hash) + RESTING_HEART_RATE_PERSONAL_RANGE_FIELD_NUMBER; + hash = (53 * hash) + getRestingHeartRatePersonalRange().hashCode(); + break; + case 9: + hash = (37 * hash) + HEART_RATE_VARIABILITY_PERSONAL_RANGE_FIELD_NUMBER; + hash = (53 * hash) + getHeartRateVariabilityPersonalRange().hashCode(); + break; + case 10: + hash = (37 * hash) + WEIGHT_FIELD_NUMBER; + hash = (53 * hash) + getWeight().hashCode(); + break; + case 11: + hash = (37 * hash) + ALTITUDE_FIELD_NUMBER; + hash = (53 * hash) + getAltitude().hashCode(); + break; + case 12: + hash = (37 * hash) + DISTANCE_FIELD_NUMBER; + hash = (53 * hash) + getDistance().hashCode(); + break; + case 13: + hash = (37 * hash) + BODY_FAT_FIELD_NUMBER; + hash = (53 * hash) + getBodyFat().hashCode(); + break; + case 14: + hash = (37 * hash) + TOTAL_CALORIES_FIELD_NUMBER; + hash = (53 * hash) + getTotalCalories().hashCode(); + break; + case 15: + hash = (37 * hash) + ACTIVE_ZONE_MINUTES_FIELD_NUMBER; + hash = (53 * hash) + getActiveZoneMinutes().hashCode(); + break; + case 17: + hash = (37 * hash) + SEDENTARY_PERIOD_FIELD_NUMBER; + hash = (53 * hash) + getSedentaryPeriod().hashCode(); + break; + case 18: + hash = (37 * hash) + RUN_VO2_MAX_FIELD_NUMBER; + hash = (53 * hash) + getRunVo2Max().hashCode(); + break; + case 19: + hash = (37 * hash) + CALORIES_IN_HEART_RATE_ZONE_FIELD_NUMBER; + hash = (53 * hash) + getCaloriesInHeartRateZone().hashCode(); + break; + case 20: + hash = (37 * hash) + ACTIVITY_LEVEL_FIELD_NUMBER; + hash = (53 * hash) + getActivityLevel().hashCode(); + break; + case 22: + hash = (37 * hash) + HYDRATION_LOG_FIELD_NUMBER; + hash = (53 * hash) + getHydrationLog().hashCode(); + break; + case 23: + hash = (37 * hash) + TIME_IN_HEART_RATE_ZONE_FIELD_NUMBER; + hash = (53 * hash) + getTimeInHeartRateZone().hashCode(); + break; + case 24: + hash = (37 * hash) + ACTIVE_MINUTES_FIELD_NUMBER; + hash = (53 * hash) + getActiveMinutes().hashCode(); + break; + case 25: + hash = (37 * hash) + SWIM_LENGTHS_DATA_FIELD_NUMBER; + hash = (53 * hash) + getSwimLengthsData().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.DailyRollupDataPoint parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.DailyRollupDataPoint parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DailyRollupDataPoint parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.DailyRollupDataPoint parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DailyRollupDataPoint parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.DailyRollupDataPoint parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DailyRollupDataPoint parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.DailyRollupDataPoint parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DailyRollupDataPoint parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.DailyRollupDataPoint parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DailyRollupDataPoint parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.DailyRollupDataPoint parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.DailyRollupDataPoint prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Value of a daily rollup for a single civil time interval (aggregation window)
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.DailyRollupDataPoint} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.DailyRollupDataPoint) + com.google.devicesandservices.health.v4.DailyRollupDataPointOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_DailyRollupDataPoint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_DailyRollupDataPoint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.DailyRollupDataPoint.class, + com.google.devicesandservices.health.v4.DailyRollupDataPoint.Builder.class); + } + + // Construct using com.google.devicesandservices.health.v4.DailyRollupDataPoint.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetCivilStartTimeFieldBuilder(); + internalGetCivilEndTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (stepsBuilder_ != null) { + stepsBuilder_.clear(); + } + if (floorsBuilder_ != null) { + floorsBuilder_.clear(); + } + if (heartRateBuilder_ != null) { + heartRateBuilder_.clear(); + } + if (restingHeartRatePersonalRangeBuilder_ != null) { + restingHeartRatePersonalRangeBuilder_.clear(); + } + if (heartRateVariabilityPersonalRangeBuilder_ != null) { + heartRateVariabilityPersonalRangeBuilder_.clear(); + } + if (weightBuilder_ != null) { + weightBuilder_.clear(); + } + if (altitudeBuilder_ != null) { + altitudeBuilder_.clear(); + } + if (distanceBuilder_ != null) { + distanceBuilder_.clear(); + } + if (bodyFatBuilder_ != null) { + bodyFatBuilder_.clear(); + } + if (totalCaloriesBuilder_ != null) { + totalCaloriesBuilder_.clear(); + } + if (activeZoneMinutesBuilder_ != null) { + activeZoneMinutesBuilder_.clear(); + } + if (sedentaryPeriodBuilder_ != null) { + sedentaryPeriodBuilder_.clear(); + } + if (runVo2MaxBuilder_ != null) { + runVo2MaxBuilder_.clear(); + } + if (caloriesInHeartRateZoneBuilder_ != null) { + caloriesInHeartRateZoneBuilder_.clear(); + } + if (activityLevelBuilder_ != null) { + activityLevelBuilder_.clear(); + } + if (hydrationLogBuilder_ != null) { + hydrationLogBuilder_.clear(); + } + if (timeInHeartRateZoneBuilder_ != null) { + timeInHeartRateZoneBuilder_.clear(); + } + if (activeMinutesBuilder_ != null) { + activeMinutesBuilder_.clear(); + } + if (swimLengthsDataBuilder_ != null) { + swimLengthsDataBuilder_.clear(); + } + civilStartTime_ = null; + if (civilStartTimeBuilder_ != null) { + civilStartTimeBuilder_.dispose(); + civilStartTimeBuilder_ = null; + } + civilEndTime_ = null; + if (civilEndTimeBuilder_ != null) { + civilEndTimeBuilder_.dispose(); + civilEndTimeBuilder_ = null; + } + valueCase_ = 0; + value_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_DailyRollupDataPoint_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyRollupDataPoint + getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.DailyRollupDataPoint.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyRollupDataPoint build() { + com.google.devicesandservices.health.v4.DailyRollupDataPoint result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyRollupDataPoint buildPartial() { + com.google.devicesandservices.health.v4.DailyRollupDataPoint result = + new com.google.devicesandservices.health.v4.DailyRollupDataPoint(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.devicesandservices.health.v4.DailyRollupDataPoint result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00080000) != 0)) { + result.civilStartTime_ = + civilStartTimeBuilder_ == null ? civilStartTime_ : civilStartTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00100000) != 0)) { + result.civilEndTime_ = + civilEndTimeBuilder_ == null ? civilEndTime_ : civilEndTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartialOneofs( + com.google.devicesandservices.health.v4.DailyRollupDataPoint result) { + result.valueCase_ = valueCase_; + result.value_ = this.value_; + if (valueCase_ == 5 && stepsBuilder_ != null) { + result.value_ = stepsBuilder_.build(); + } + if (valueCase_ == 6 && floorsBuilder_ != null) { + result.value_ = floorsBuilder_.build(); + } + if (valueCase_ == 7 && heartRateBuilder_ != null) { + result.value_ = heartRateBuilder_.build(); + } + if (valueCase_ == 8 && restingHeartRatePersonalRangeBuilder_ != null) { + result.value_ = restingHeartRatePersonalRangeBuilder_.build(); + } + if (valueCase_ == 9 && heartRateVariabilityPersonalRangeBuilder_ != null) { + result.value_ = heartRateVariabilityPersonalRangeBuilder_.build(); + } + if (valueCase_ == 10 && weightBuilder_ != null) { + result.value_ = weightBuilder_.build(); + } + if (valueCase_ == 11 && altitudeBuilder_ != null) { + result.value_ = altitudeBuilder_.build(); + } + if (valueCase_ == 12 && distanceBuilder_ != null) { + result.value_ = distanceBuilder_.build(); + } + if (valueCase_ == 13 && bodyFatBuilder_ != null) { + result.value_ = bodyFatBuilder_.build(); + } + if (valueCase_ == 14 && totalCaloriesBuilder_ != null) { + result.value_ = totalCaloriesBuilder_.build(); + } + if (valueCase_ == 15 && activeZoneMinutesBuilder_ != null) { + result.value_ = activeZoneMinutesBuilder_.build(); + } + if (valueCase_ == 17 && sedentaryPeriodBuilder_ != null) { + result.value_ = sedentaryPeriodBuilder_.build(); + } + if (valueCase_ == 18 && runVo2MaxBuilder_ != null) { + result.value_ = runVo2MaxBuilder_.build(); + } + if (valueCase_ == 19 && caloriesInHeartRateZoneBuilder_ != null) { + result.value_ = caloriesInHeartRateZoneBuilder_.build(); + } + if (valueCase_ == 20 && activityLevelBuilder_ != null) { + result.value_ = activityLevelBuilder_.build(); + } + if (valueCase_ == 22 && hydrationLogBuilder_ != null) { + result.value_ = hydrationLogBuilder_.build(); + } + if (valueCase_ == 23 && timeInHeartRateZoneBuilder_ != null) { + result.value_ = timeInHeartRateZoneBuilder_.build(); + } + if (valueCase_ == 24 && activeMinutesBuilder_ != null) { + result.value_ = activeMinutesBuilder_.build(); + } + if (valueCase_ == 25 && swimLengthsDataBuilder_ != null) { + result.value_ = swimLengthsDataBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.DailyRollupDataPoint) { + return mergeFrom((com.google.devicesandservices.health.v4.DailyRollupDataPoint) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.devicesandservices.health.v4.DailyRollupDataPoint other) { + if (other + == com.google.devicesandservices.health.v4.DailyRollupDataPoint.getDefaultInstance()) + return this; + if (other.hasCivilStartTime()) { + mergeCivilStartTime(other.getCivilStartTime()); + } + if (other.hasCivilEndTime()) { + mergeCivilEndTime(other.getCivilEndTime()); + } + switch (other.getValueCase()) { + case STEPS: + { + mergeSteps(other.getSteps()); + break; + } + case FLOORS: + { + mergeFloors(other.getFloors()); + break; + } + case HEART_RATE: + { + mergeHeartRate(other.getHeartRate()); + break; + } + case RESTING_HEART_RATE_PERSONAL_RANGE: + { + mergeRestingHeartRatePersonalRange(other.getRestingHeartRatePersonalRange()); + break; + } + case HEART_RATE_VARIABILITY_PERSONAL_RANGE: + { + mergeHeartRateVariabilityPersonalRange(other.getHeartRateVariabilityPersonalRange()); + break; + } + case WEIGHT: + { + mergeWeight(other.getWeight()); + break; + } + case ALTITUDE: + { + mergeAltitude(other.getAltitude()); + break; + } + case DISTANCE: + { + mergeDistance(other.getDistance()); + break; + } + case BODY_FAT: + { + mergeBodyFat(other.getBodyFat()); + break; + } + case TOTAL_CALORIES: + { + mergeTotalCalories(other.getTotalCalories()); + break; + } + case ACTIVE_ZONE_MINUTES: + { + mergeActiveZoneMinutes(other.getActiveZoneMinutes()); + break; + } + case SEDENTARY_PERIOD: + { + mergeSedentaryPeriod(other.getSedentaryPeriod()); + break; + } + case RUN_VO2_MAX: + { + mergeRunVo2Max(other.getRunVo2Max()); + break; + } + case CALORIES_IN_HEART_RATE_ZONE: + { + mergeCaloriesInHeartRateZone(other.getCaloriesInHeartRateZone()); + break; + } + case ACTIVITY_LEVEL: + { + mergeActivityLevel(other.getActivityLevel()); + break; + } + case HYDRATION_LOG: + { + mergeHydrationLog(other.getHydrationLog()); + break; + } + case TIME_IN_HEART_RATE_ZONE: + { + mergeTimeInHeartRateZone(other.getTimeInHeartRateZone()); + break; + } + case ACTIVE_MINUTES: + { + mergeActiveMinutes(other.getActiveMinutes()); + break; + } + case SWIM_LENGTHS_DATA: + { + mergeSwimLengthsData(other.getSwimLengthsData()); + break; + } + case VALUE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetCivilStartTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00080000; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetCivilEndTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00100000; + break; + } // case 18 + case 42: + { + input.readMessage(internalGetStepsFieldBuilder().getBuilder(), extensionRegistry); + valueCase_ = 5; + break; + } // case 42 + case 50: + { + input.readMessage(internalGetFloorsFieldBuilder().getBuilder(), extensionRegistry); + valueCase_ = 6; + break; + } // case 50 + case 58: + { + input.readMessage( + internalGetHeartRateFieldBuilder().getBuilder(), extensionRegistry); + valueCase_ = 7; + break; + } // case 58 + case 66: + { + input.readMessage( + internalGetRestingHeartRatePersonalRangeFieldBuilder().getBuilder(), + extensionRegistry); + valueCase_ = 8; + break; + } // case 66 + case 74: + { + input.readMessage( + internalGetHeartRateVariabilityPersonalRangeFieldBuilder().getBuilder(), + extensionRegistry); + valueCase_ = 9; + break; + } // case 74 + case 82: + { + input.readMessage(internalGetWeightFieldBuilder().getBuilder(), extensionRegistry); + valueCase_ = 10; + break; + } // case 82 + case 90: + { + input.readMessage( + internalGetAltitudeFieldBuilder().getBuilder(), extensionRegistry); + valueCase_ = 11; + break; + } // case 90 + case 98: + { + input.readMessage( + internalGetDistanceFieldBuilder().getBuilder(), extensionRegistry); + valueCase_ = 12; + break; + } // case 98 + case 106: + { + input.readMessage(internalGetBodyFatFieldBuilder().getBuilder(), extensionRegistry); + valueCase_ = 13; + break; + } // case 106 + case 114: + { + input.readMessage( + internalGetTotalCaloriesFieldBuilder().getBuilder(), extensionRegistry); + valueCase_ = 14; + break; + } // case 114 + case 122: + { + input.readMessage( + internalGetActiveZoneMinutesFieldBuilder().getBuilder(), extensionRegistry); + valueCase_ = 15; + break; + } // case 122 + case 138: + { + input.readMessage( + internalGetSedentaryPeriodFieldBuilder().getBuilder(), extensionRegistry); + valueCase_ = 17; + break; + } // case 138 + case 146: + { + input.readMessage( + internalGetRunVo2MaxFieldBuilder().getBuilder(), extensionRegistry); + valueCase_ = 18; + break; + } // case 146 + case 154: + { + input.readMessage( + internalGetCaloriesInHeartRateZoneFieldBuilder().getBuilder(), + extensionRegistry); + valueCase_ = 19; + break; + } // case 154 + case 162: + { + input.readMessage( + internalGetActivityLevelFieldBuilder().getBuilder(), extensionRegistry); + valueCase_ = 20; + break; + } // case 162 + case 178: + { + input.readMessage( + internalGetHydrationLogFieldBuilder().getBuilder(), extensionRegistry); + valueCase_ = 22; + break; + } // case 178 + case 186: + { + input.readMessage( + internalGetTimeInHeartRateZoneFieldBuilder().getBuilder(), extensionRegistry); + valueCase_ = 23; + break; + } // case 186 + case 194: + { + input.readMessage( + internalGetActiveMinutesFieldBuilder().getBuilder(), extensionRegistry); + valueCase_ = 24; + break; + } // case 194 + case 202: + { + input.readMessage( + internalGetSwimLengthsDataFieldBuilder().getBuilder(), extensionRegistry); + valueCase_ = 25; + break; + } // case 202 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int valueCase_ = 0; + private java.lang.Object value_; + + public ValueCase getValueCase() { + return ValueCase.forNumber(valueCase_); + } + + public Builder clearValue() { + valueCase_ = 0; + value_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.StepsRollupValue, + com.google.devicesandservices.health.v4.StepsRollupValue.Builder, + com.google.devicesandservices.health.v4.StepsRollupValueOrBuilder> + stepsBuilder_; + + /** + * + * + *
+     * Returned by default when rolling up data points from the `steps` data
+     * type, or when requested explicitly using the `steps` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.StepsRollupValue steps = 5; + * + * @return Whether the steps field is set. + */ + @java.lang.Override + public boolean hasSteps() { + return valueCase_ == 5; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `steps` data
+     * type, or when requested explicitly using the `steps` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.StepsRollupValue steps = 5; + * + * @return The steps. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.StepsRollupValue getSteps() { + if (stepsBuilder_ == null) { + if (valueCase_ == 5) { + return (com.google.devicesandservices.health.v4.StepsRollupValue) value_; + } + return com.google.devicesandservices.health.v4.StepsRollupValue.getDefaultInstance(); + } else { + if (valueCase_ == 5) { + return stepsBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.StepsRollupValue.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `steps` data
+     * type, or when requested explicitly using the `steps` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.StepsRollupValue steps = 5; + */ + public Builder setSteps(com.google.devicesandservices.health.v4.StepsRollupValue value) { + if (stepsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + onChanged(); + } else { + stepsBuilder_.setMessage(value); + } + valueCase_ = 5; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `steps` data
+     * type, or when requested explicitly using the `steps` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.StepsRollupValue steps = 5; + */ + public Builder setSteps( + com.google.devicesandservices.health.v4.StepsRollupValue.Builder builderForValue) { + if (stepsBuilder_ == null) { + value_ = builderForValue.build(); + onChanged(); + } else { + stepsBuilder_.setMessage(builderForValue.build()); + } + valueCase_ = 5; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `steps` data
+     * type, or when requested explicitly using the `steps` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.StepsRollupValue steps = 5; + */ + public Builder mergeSteps(com.google.devicesandservices.health.v4.StepsRollupValue value) { + if (stepsBuilder_ == null) { + if (valueCase_ == 5 + && value_ + != com.google.devicesandservices.health.v4.StepsRollupValue.getDefaultInstance()) { + value_ = + com.google.devicesandservices.health.v4.StepsRollupValue.newBuilder( + (com.google.devicesandservices.health.v4.StepsRollupValue) value_) + .mergeFrom(value) + .buildPartial(); + } else { + value_ = value; + } + onChanged(); + } else { + if (valueCase_ == 5) { + stepsBuilder_.mergeFrom(value); + } else { + stepsBuilder_.setMessage(value); + } + } + valueCase_ = 5; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `steps` data
+     * type, or when requested explicitly using the `steps` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.StepsRollupValue steps = 5; + */ + public Builder clearSteps() { + if (stepsBuilder_ == null) { + if (valueCase_ == 5) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + } else { + if (valueCase_ == 5) { + valueCase_ = 0; + value_ = null; + } + stepsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `steps` data
+     * type, or when requested explicitly using the `steps` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.StepsRollupValue steps = 5; + */ + public com.google.devicesandservices.health.v4.StepsRollupValue.Builder getStepsBuilder() { + return internalGetStepsFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `steps` data
+     * type, or when requested explicitly using the `steps` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.StepsRollupValue steps = 5; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.StepsRollupValueOrBuilder getStepsOrBuilder() { + if ((valueCase_ == 5) && (stepsBuilder_ != null)) { + return stepsBuilder_.getMessageOrBuilder(); + } else { + if (valueCase_ == 5) { + return (com.google.devicesandservices.health.v4.StepsRollupValue) value_; + } + return com.google.devicesandservices.health.v4.StepsRollupValue.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `steps` data
+     * type, or when requested explicitly using the `steps` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.StepsRollupValue steps = 5; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.StepsRollupValue, + com.google.devicesandservices.health.v4.StepsRollupValue.Builder, + com.google.devicesandservices.health.v4.StepsRollupValueOrBuilder> + internalGetStepsFieldBuilder() { + if (stepsBuilder_ == null) { + if (!(valueCase_ == 5)) { + value_ = com.google.devicesandservices.health.v4.StepsRollupValue.getDefaultInstance(); + } + stepsBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.StepsRollupValue, + com.google.devicesandservices.health.v4.StepsRollupValue.Builder, + com.google.devicesandservices.health.v4.StepsRollupValueOrBuilder>( + (com.google.devicesandservices.health.v4.StepsRollupValue) value_, + getParentForChildren(), + isClean()); + value_ = null; + } + valueCase_ = 5; + onChanged(); + return stepsBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.FloorsRollupValue, + com.google.devicesandservices.health.v4.FloorsRollupValue.Builder, + com.google.devicesandservices.health.v4.FloorsRollupValueOrBuilder> + floorsBuilder_; + + /** + * + * + *
+     * Returned by default when rolling up data points from the `floors` data
+     * type, or when requested explicitly using the `floors` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.FloorsRollupValue floors = 6; + * + * @return Whether the floors field is set. + */ + @java.lang.Override + public boolean hasFloors() { + return valueCase_ == 6; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `floors` data
+     * type, or when requested explicitly using the `floors` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.FloorsRollupValue floors = 6; + * + * @return The floors. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.FloorsRollupValue getFloors() { + if (floorsBuilder_ == null) { + if (valueCase_ == 6) { + return (com.google.devicesandservices.health.v4.FloorsRollupValue) value_; + } + return com.google.devicesandservices.health.v4.FloorsRollupValue.getDefaultInstance(); + } else { + if (valueCase_ == 6) { + return floorsBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.FloorsRollupValue.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `floors` data
+     * type, or when requested explicitly using the `floors` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.FloorsRollupValue floors = 6; + */ + public Builder setFloors(com.google.devicesandservices.health.v4.FloorsRollupValue value) { + if (floorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + onChanged(); + } else { + floorsBuilder_.setMessage(value); + } + valueCase_ = 6; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `floors` data
+     * type, or when requested explicitly using the `floors` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.FloorsRollupValue floors = 6; + */ + public Builder setFloors( + com.google.devicesandservices.health.v4.FloorsRollupValue.Builder builderForValue) { + if (floorsBuilder_ == null) { + value_ = builderForValue.build(); + onChanged(); + } else { + floorsBuilder_.setMessage(builderForValue.build()); + } + valueCase_ = 6; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `floors` data
+     * type, or when requested explicitly using the `floors` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.FloorsRollupValue floors = 6; + */ + public Builder mergeFloors(com.google.devicesandservices.health.v4.FloorsRollupValue value) { + if (floorsBuilder_ == null) { + if (valueCase_ == 6 + && value_ + != com.google.devicesandservices.health.v4.FloorsRollupValue.getDefaultInstance()) { + value_ = + com.google.devicesandservices.health.v4.FloorsRollupValue.newBuilder( + (com.google.devicesandservices.health.v4.FloorsRollupValue) value_) + .mergeFrom(value) + .buildPartial(); + } else { + value_ = value; + } + onChanged(); + } else { + if (valueCase_ == 6) { + floorsBuilder_.mergeFrom(value); + } else { + floorsBuilder_.setMessage(value); + } + } + valueCase_ = 6; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `floors` data
+     * type, or when requested explicitly using the `floors` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.FloorsRollupValue floors = 6; + */ + public Builder clearFloors() { + if (floorsBuilder_ == null) { + if (valueCase_ == 6) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + } else { + if (valueCase_ == 6) { + valueCase_ = 0; + value_ = null; + } + floorsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `floors` data
+     * type, or when requested explicitly using the `floors` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.FloorsRollupValue floors = 6; + */ + public com.google.devicesandservices.health.v4.FloorsRollupValue.Builder getFloorsBuilder() { + return internalGetFloorsFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `floors` data
+     * type, or when requested explicitly using the `floors` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.FloorsRollupValue floors = 6; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.FloorsRollupValueOrBuilder getFloorsOrBuilder() { + if ((valueCase_ == 6) && (floorsBuilder_ != null)) { + return floorsBuilder_.getMessageOrBuilder(); + } else { + if (valueCase_ == 6) { + return (com.google.devicesandservices.health.v4.FloorsRollupValue) value_; + } + return com.google.devicesandservices.health.v4.FloorsRollupValue.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `floors` data
+     * type, or when requested explicitly using the `floors` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.FloorsRollupValue floors = 6; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.FloorsRollupValue, + com.google.devicesandservices.health.v4.FloorsRollupValue.Builder, + com.google.devicesandservices.health.v4.FloorsRollupValueOrBuilder> + internalGetFloorsFieldBuilder() { + if (floorsBuilder_ == null) { + if (!(valueCase_ == 6)) { + value_ = com.google.devicesandservices.health.v4.FloorsRollupValue.getDefaultInstance(); + } + floorsBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.FloorsRollupValue, + com.google.devicesandservices.health.v4.FloorsRollupValue.Builder, + com.google.devicesandservices.health.v4.FloorsRollupValueOrBuilder>( + (com.google.devicesandservices.health.v4.FloorsRollupValue) value_, + getParentForChildren(), + isClean()); + value_ = null; + } + valueCase_ = 6; + onChanged(); + return floorsBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.HeartRateRollupValue, + com.google.devicesandservices.health.v4.HeartRateRollupValue.Builder, + com.google.devicesandservices.health.v4.HeartRateRollupValueOrBuilder> + heartRateBuilder_; + + /** + * + * + *
+     * Returned by default when rolling up data points from the `heart-rate`
+     * data type, or when requested explicitly using the `heart-rate` rollup
+     * type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.HeartRateRollupValue heart_rate = 7; + * + * @return Whether the heartRate field is set. + */ + @java.lang.Override + public boolean hasHeartRate() { + return valueCase_ == 7; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `heart-rate`
+     * data type, or when requested explicitly using the `heart-rate` rollup
+     * type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.HeartRateRollupValue heart_rate = 7; + * + * @return The heartRate. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.HeartRateRollupValue getHeartRate() { + if (heartRateBuilder_ == null) { + if (valueCase_ == 7) { + return (com.google.devicesandservices.health.v4.HeartRateRollupValue) value_; + } + return com.google.devicesandservices.health.v4.HeartRateRollupValue.getDefaultInstance(); + } else { + if (valueCase_ == 7) { + return heartRateBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.HeartRateRollupValue.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `heart-rate`
+     * data type, or when requested explicitly using the `heart-rate` rollup
+     * type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.HeartRateRollupValue heart_rate = 7; + */ + public Builder setHeartRate( + com.google.devicesandservices.health.v4.HeartRateRollupValue value) { + if (heartRateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + onChanged(); + } else { + heartRateBuilder_.setMessage(value); + } + valueCase_ = 7; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `heart-rate`
+     * data type, or when requested explicitly using the `heart-rate` rollup
+     * type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.HeartRateRollupValue heart_rate = 7; + */ + public Builder setHeartRate( + com.google.devicesandservices.health.v4.HeartRateRollupValue.Builder builderForValue) { + if (heartRateBuilder_ == null) { + value_ = builderForValue.build(); + onChanged(); + } else { + heartRateBuilder_.setMessage(builderForValue.build()); + } + valueCase_ = 7; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `heart-rate`
+     * data type, or when requested explicitly using the `heart-rate` rollup
+     * type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.HeartRateRollupValue heart_rate = 7; + */ + public Builder mergeHeartRate( + com.google.devicesandservices.health.v4.HeartRateRollupValue value) { + if (heartRateBuilder_ == null) { + if (valueCase_ == 7 + && value_ + != com.google.devicesandservices.health.v4.HeartRateRollupValue + .getDefaultInstance()) { + value_ = + com.google.devicesandservices.health.v4.HeartRateRollupValue.newBuilder( + (com.google.devicesandservices.health.v4.HeartRateRollupValue) value_) + .mergeFrom(value) + .buildPartial(); + } else { + value_ = value; + } + onChanged(); + } else { + if (valueCase_ == 7) { + heartRateBuilder_.mergeFrom(value); + } else { + heartRateBuilder_.setMessage(value); + } + } + valueCase_ = 7; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `heart-rate`
+     * data type, or when requested explicitly using the `heart-rate` rollup
+     * type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.HeartRateRollupValue heart_rate = 7; + */ + public Builder clearHeartRate() { + if (heartRateBuilder_ == null) { + if (valueCase_ == 7) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + } else { + if (valueCase_ == 7) { + valueCase_ = 0; + value_ = null; + } + heartRateBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `heart-rate`
+     * data type, or when requested explicitly using the `heart-rate` rollup
+     * type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.HeartRateRollupValue heart_rate = 7; + */ + public com.google.devicesandservices.health.v4.HeartRateRollupValue.Builder + getHeartRateBuilder() { + return internalGetHeartRateFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `heart-rate`
+     * data type, or when requested explicitly using the `heart-rate` rollup
+     * type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.HeartRateRollupValue heart_rate = 7; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.HeartRateRollupValueOrBuilder + getHeartRateOrBuilder() { + if ((valueCase_ == 7) && (heartRateBuilder_ != null)) { + return heartRateBuilder_.getMessageOrBuilder(); + } else { + if (valueCase_ == 7) { + return (com.google.devicesandservices.health.v4.HeartRateRollupValue) value_; + } + return com.google.devicesandservices.health.v4.HeartRateRollupValue.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `heart-rate`
+     * data type, or when requested explicitly using the `heart-rate` rollup
+     * type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.HeartRateRollupValue heart_rate = 7; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.HeartRateRollupValue, + com.google.devicesandservices.health.v4.HeartRateRollupValue.Builder, + com.google.devicesandservices.health.v4.HeartRateRollupValueOrBuilder> + internalGetHeartRateFieldBuilder() { + if (heartRateBuilder_ == null) { + if (!(valueCase_ == 7)) { + value_ = + com.google.devicesandservices.health.v4.HeartRateRollupValue.getDefaultInstance(); + } + heartRateBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.HeartRateRollupValue, + com.google.devicesandservices.health.v4.HeartRateRollupValue.Builder, + com.google.devicesandservices.health.v4.HeartRateRollupValueOrBuilder>( + (com.google.devicesandservices.health.v4.HeartRateRollupValue) value_, + getParentForChildren(), + isClean()); + value_ = null; + } + valueCase_ = 7; + onChanged(); + return heartRateBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue, + com.google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue + .Builder, + com.google.devicesandservices.health.v4 + .RestingHeartRatePersonalRangeRollupValueOrBuilder> + restingHeartRatePersonalRangeBuilder_; + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `daily-resting-heart-rate` data type, or when requested
+     * explicitly using the `resting-heart-rate-personal-range` rollup type
+     * identifier.
+     * 
+ * + * + * .google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue resting_heart_rate_personal_range = 8; + * + * + * @return Whether the restingHeartRatePersonalRange field is set. + */ + @java.lang.Override + public boolean hasRestingHeartRatePersonalRange() { + return valueCase_ == 8; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `daily-resting-heart-rate` data type, or when requested
+     * explicitly using the `resting-heart-rate-personal-range` rollup type
+     * identifier.
+     * 
+ * + * + * .google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue resting_heart_rate_personal_range = 8; + * + * + * @return The restingHeartRatePersonalRange. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue + getRestingHeartRatePersonalRange() { + if (restingHeartRatePersonalRangeBuilder_ == null) { + if (valueCase_ == 8) { + return (com.google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue) + value_; + } + return com.google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue + .getDefaultInstance(); + } else { + if (valueCase_ == 8) { + return restingHeartRatePersonalRangeBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `daily-resting-heart-rate` data type, or when requested
+     * explicitly using the `resting-heart-rate-personal-range` rollup type
+     * identifier.
+     * 
+ * + * + * .google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue resting_heart_rate_personal_range = 8; + * + */ + public Builder setRestingHeartRatePersonalRange( + com.google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue value) { + if (restingHeartRatePersonalRangeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + onChanged(); + } else { + restingHeartRatePersonalRangeBuilder_.setMessage(value); + } + valueCase_ = 8; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `daily-resting-heart-rate` data type, or when requested
+     * explicitly using the `resting-heart-rate-personal-range` rollup type
+     * identifier.
+     * 
+ * + * + * .google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue resting_heart_rate_personal_range = 8; + * + */ + public Builder setRestingHeartRatePersonalRange( + com.google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue.Builder + builderForValue) { + if (restingHeartRatePersonalRangeBuilder_ == null) { + value_ = builderForValue.build(); + onChanged(); + } else { + restingHeartRatePersonalRangeBuilder_.setMessage(builderForValue.build()); + } + valueCase_ = 8; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `daily-resting-heart-rate` data type, or when requested
+     * explicitly using the `resting-heart-rate-personal-range` rollup type
+     * identifier.
+     * 
+ * + * + * .google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue resting_heart_rate_personal_range = 8; + * + */ + public Builder mergeRestingHeartRatePersonalRange( + com.google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue value) { + if (restingHeartRatePersonalRangeBuilder_ == null) { + if (valueCase_ == 8 + && value_ + != com.google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue + .getDefaultInstance()) { + value_ = + com.google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue + .newBuilder( + (com.google.devicesandservices.health.v4 + .RestingHeartRatePersonalRangeRollupValue) + value_) + .mergeFrom(value) + .buildPartial(); + } else { + value_ = value; + } + onChanged(); + } else { + if (valueCase_ == 8) { + restingHeartRatePersonalRangeBuilder_.mergeFrom(value); + } else { + restingHeartRatePersonalRangeBuilder_.setMessage(value); + } + } + valueCase_ = 8; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `daily-resting-heart-rate` data type, or when requested
+     * explicitly using the `resting-heart-rate-personal-range` rollup type
+     * identifier.
+     * 
+ * + * + * .google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue resting_heart_rate_personal_range = 8; + * + */ + public Builder clearRestingHeartRatePersonalRange() { + if (restingHeartRatePersonalRangeBuilder_ == null) { + if (valueCase_ == 8) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + } else { + if (valueCase_ == 8) { + valueCase_ = 0; + value_ = null; + } + restingHeartRatePersonalRangeBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `daily-resting-heart-rate` data type, or when requested
+     * explicitly using the `resting-heart-rate-personal-range` rollup type
+     * identifier.
+     * 
+ * + * + * .google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue resting_heart_rate_personal_range = 8; + * + */ + public com.google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue.Builder + getRestingHeartRatePersonalRangeBuilder() { + return internalGetRestingHeartRatePersonalRangeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `daily-resting-heart-rate` data type, or when requested
+     * explicitly using the `resting-heart-rate-personal-range` rollup type
+     * identifier.
+     * 
+ * + * + * .google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue resting_heart_rate_personal_range = 8; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValueOrBuilder + getRestingHeartRatePersonalRangeOrBuilder() { + if ((valueCase_ == 8) && (restingHeartRatePersonalRangeBuilder_ != null)) { + return restingHeartRatePersonalRangeBuilder_.getMessageOrBuilder(); + } else { + if (valueCase_ == 8) { + return (com.google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue) + value_; + } + return com.google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `daily-resting-heart-rate` data type, or when requested
+     * explicitly using the `resting-heart-rate-personal-range` rollup type
+     * identifier.
+     * 
+ * + * + * .google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue resting_heart_rate_personal_range = 8; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue, + com.google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue + .Builder, + com.google.devicesandservices.health.v4 + .RestingHeartRatePersonalRangeRollupValueOrBuilder> + internalGetRestingHeartRatePersonalRangeFieldBuilder() { + if (restingHeartRatePersonalRangeBuilder_ == null) { + if (!(valueCase_ == 8)) { + value_ = + com.google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue + .getDefaultInstance(); + } + restingHeartRatePersonalRangeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue, + com.google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue + .Builder, + com.google.devicesandservices.health.v4 + .RestingHeartRatePersonalRangeRollupValueOrBuilder>( + (com.google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue) + value_, + getParentForChildren(), + isClean()); + value_ = null; + } + valueCase_ = 8; + onChanged(); + return restingHeartRatePersonalRangeBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue, + com.google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue + .Builder, + com.google.devicesandservices.health.v4 + .HeartRateVariabilityPersonalRangeRollupValueOrBuilder> + heartRateVariabilityPersonalRangeBuilder_; + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `daily-heart-rate-variability` data type, or when requested explicitly
+     * using the `heart-rate-variability-personal-range` rollup type
+     * identifier.
+     * 
+ * + * + * .google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue heart_rate_variability_personal_range = 9; + * + * + * @return Whether the heartRateVariabilityPersonalRange field is set. + */ + @java.lang.Override + public boolean hasHeartRateVariabilityPersonalRange() { + return valueCase_ == 9; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `daily-heart-rate-variability` data type, or when requested explicitly
+     * using the `heart-rate-variability-personal-range` rollup type
+     * identifier.
+     * 
+ * + * + * .google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue heart_rate_variability_personal_range = 9; + * + * + * @return The heartRateVariabilityPersonalRange. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue + getHeartRateVariabilityPersonalRange() { + if (heartRateVariabilityPersonalRangeBuilder_ == null) { + if (valueCase_ == 9) { + return (com.google.devicesandservices.health.v4 + .HeartRateVariabilityPersonalRangeRollupValue) + value_; + } + return com.google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue + .getDefaultInstance(); + } else { + if (valueCase_ == 9) { + return heartRateVariabilityPersonalRangeBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `daily-heart-rate-variability` data type, or when requested explicitly
+     * using the `heart-rate-variability-personal-range` rollup type
+     * identifier.
+     * 
+ * + * + * .google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue heart_rate_variability_personal_range = 9; + * + */ + public Builder setHeartRateVariabilityPersonalRange( + com.google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue + value) { + if (heartRateVariabilityPersonalRangeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + onChanged(); + } else { + heartRateVariabilityPersonalRangeBuilder_.setMessage(value); + } + valueCase_ = 9; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `daily-heart-rate-variability` data type, or when requested explicitly
+     * using the `heart-rate-variability-personal-range` rollup type
+     * identifier.
+     * 
+ * + * + * .google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue heart_rate_variability_personal_range = 9; + * + */ + public Builder setHeartRateVariabilityPersonalRange( + com.google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue.Builder + builderForValue) { + if (heartRateVariabilityPersonalRangeBuilder_ == null) { + value_ = builderForValue.build(); + onChanged(); + } else { + heartRateVariabilityPersonalRangeBuilder_.setMessage(builderForValue.build()); + } + valueCase_ = 9; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `daily-heart-rate-variability` data type, or when requested explicitly
+     * using the `heart-rate-variability-personal-range` rollup type
+     * identifier.
+     * 
+ * + * + * .google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue heart_rate_variability_personal_range = 9; + * + */ + public Builder mergeHeartRateVariabilityPersonalRange( + com.google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue + value) { + if (heartRateVariabilityPersonalRangeBuilder_ == null) { + if (valueCase_ == 9 + && value_ + != com.google.devicesandservices.health.v4 + .HeartRateVariabilityPersonalRangeRollupValue.getDefaultInstance()) { + value_ = + com.google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue + .newBuilder( + (com.google.devicesandservices.health.v4 + .HeartRateVariabilityPersonalRangeRollupValue) + value_) + .mergeFrom(value) + .buildPartial(); + } else { + value_ = value; + } + onChanged(); + } else { + if (valueCase_ == 9) { + heartRateVariabilityPersonalRangeBuilder_.mergeFrom(value); + } else { + heartRateVariabilityPersonalRangeBuilder_.setMessage(value); + } + } + valueCase_ = 9; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `daily-heart-rate-variability` data type, or when requested explicitly
+     * using the `heart-rate-variability-personal-range` rollup type
+     * identifier.
+     * 
+ * + * + * .google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue heart_rate_variability_personal_range = 9; + * + */ + public Builder clearHeartRateVariabilityPersonalRange() { + if (heartRateVariabilityPersonalRangeBuilder_ == null) { + if (valueCase_ == 9) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + } else { + if (valueCase_ == 9) { + valueCase_ = 0; + value_ = null; + } + heartRateVariabilityPersonalRangeBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `daily-heart-rate-variability` data type, or when requested explicitly
+     * using the `heart-rate-variability-personal-range` rollup type
+     * identifier.
+     * 
+ * + * + * .google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue heart_rate_variability_personal_range = 9; + * + */ + public com.google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue + .Builder + getHeartRateVariabilityPersonalRangeBuilder() { + return internalGetHeartRateVariabilityPersonalRangeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `daily-heart-rate-variability` data type, or when requested explicitly
+     * using the `heart-rate-variability-personal-range` rollup type
+     * identifier.
+     * 
+ * + * + * .google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue heart_rate_variability_personal_range = 9; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4 + .HeartRateVariabilityPersonalRangeRollupValueOrBuilder + getHeartRateVariabilityPersonalRangeOrBuilder() { + if ((valueCase_ == 9) && (heartRateVariabilityPersonalRangeBuilder_ != null)) { + return heartRateVariabilityPersonalRangeBuilder_.getMessageOrBuilder(); + } else { + if (valueCase_ == 9) { + return (com.google.devicesandservices.health.v4 + .HeartRateVariabilityPersonalRangeRollupValue) + value_; + } + return com.google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `daily-heart-rate-variability` data type, or when requested explicitly
+     * using the `heart-rate-variability-personal-range` rollup type
+     * identifier.
+     * 
+ * + * + * .google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue heart_rate_variability_personal_range = 9; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue, + com.google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue + .Builder, + com.google.devicesandservices.health.v4 + .HeartRateVariabilityPersonalRangeRollupValueOrBuilder> + internalGetHeartRateVariabilityPersonalRangeFieldBuilder() { + if (heartRateVariabilityPersonalRangeBuilder_ == null) { + if (!(valueCase_ == 9)) { + value_ = + com.google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue + .getDefaultInstance(); + } + heartRateVariabilityPersonalRangeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4 + .HeartRateVariabilityPersonalRangeRollupValue, + com.google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue + .Builder, + com.google.devicesandservices.health.v4 + .HeartRateVariabilityPersonalRangeRollupValueOrBuilder>( + (com.google.devicesandservices.health.v4 + .HeartRateVariabilityPersonalRangeRollupValue) + value_, + getParentForChildren(), + isClean()); + value_ = null; + } + valueCase_ = 9; + onChanged(); + return heartRateVariabilityPersonalRangeBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.WeightRollupValue, + com.google.devicesandservices.health.v4.WeightRollupValue.Builder, + com.google.devicesandservices.health.v4.WeightRollupValueOrBuilder> + weightBuilder_; + + /** + * + * + *
+     * Returned by default when rolling up data points from the `weight` data
+     * type, or when requested explicitly using the `weight` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.WeightRollupValue weight = 10; + * + * @return Whether the weight field is set. + */ + @java.lang.Override + public boolean hasWeight() { + return valueCase_ == 10; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `weight` data
+     * type, or when requested explicitly using the `weight` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.WeightRollupValue weight = 10; + * + * @return The weight. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.WeightRollupValue getWeight() { + if (weightBuilder_ == null) { + if (valueCase_ == 10) { + return (com.google.devicesandservices.health.v4.WeightRollupValue) value_; + } + return com.google.devicesandservices.health.v4.WeightRollupValue.getDefaultInstance(); + } else { + if (valueCase_ == 10) { + return weightBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.WeightRollupValue.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `weight` data
+     * type, or when requested explicitly using the `weight` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.WeightRollupValue weight = 10; + */ + public Builder setWeight(com.google.devicesandservices.health.v4.WeightRollupValue value) { + if (weightBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + onChanged(); + } else { + weightBuilder_.setMessage(value); + } + valueCase_ = 10; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `weight` data
+     * type, or when requested explicitly using the `weight` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.WeightRollupValue weight = 10; + */ + public Builder setWeight( + com.google.devicesandservices.health.v4.WeightRollupValue.Builder builderForValue) { + if (weightBuilder_ == null) { + value_ = builderForValue.build(); + onChanged(); + } else { + weightBuilder_.setMessage(builderForValue.build()); + } + valueCase_ = 10; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `weight` data
+     * type, or when requested explicitly using the `weight` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.WeightRollupValue weight = 10; + */ + public Builder mergeWeight(com.google.devicesandservices.health.v4.WeightRollupValue value) { + if (weightBuilder_ == null) { + if (valueCase_ == 10 + && value_ + != com.google.devicesandservices.health.v4.WeightRollupValue.getDefaultInstance()) { + value_ = + com.google.devicesandservices.health.v4.WeightRollupValue.newBuilder( + (com.google.devicesandservices.health.v4.WeightRollupValue) value_) + .mergeFrom(value) + .buildPartial(); + } else { + value_ = value; + } + onChanged(); + } else { + if (valueCase_ == 10) { + weightBuilder_.mergeFrom(value); + } else { + weightBuilder_.setMessage(value); + } + } + valueCase_ = 10; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `weight` data
+     * type, or when requested explicitly using the `weight` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.WeightRollupValue weight = 10; + */ + public Builder clearWeight() { + if (weightBuilder_ == null) { + if (valueCase_ == 10) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + } else { + if (valueCase_ == 10) { + valueCase_ = 0; + value_ = null; + } + weightBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `weight` data
+     * type, or when requested explicitly using the `weight` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.WeightRollupValue weight = 10; + */ + public com.google.devicesandservices.health.v4.WeightRollupValue.Builder getWeightBuilder() { + return internalGetWeightFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `weight` data
+     * type, or when requested explicitly using the `weight` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.WeightRollupValue weight = 10; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.WeightRollupValueOrBuilder getWeightOrBuilder() { + if ((valueCase_ == 10) && (weightBuilder_ != null)) { + return weightBuilder_.getMessageOrBuilder(); + } else { + if (valueCase_ == 10) { + return (com.google.devicesandservices.health.v4.WeightRollupValue) value_; + } + return com.google.devicesandservices.health.v4.WeightRollupValue.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `weight` data
+     * type, or when requested explicitly using the `weight` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.WeightRollupValue weight = 10; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.WeightRollupValue, + com.google.devicesandservices.health.v4.WeightRollupValue.Builder, + com.google.devicesandservices.health.v4.WeightRollupValueOrBuilder> + internalGetWeightFieldBuilder() { + if (weightBuilder_ == null) { + if (!(valueCase_ == 10)) { + value_ = com.google.devicesandservices.health.v4.WeightRollupValue.getDefaultInstance(); + } + weightBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.WeightRollupValue, + com.google.devicesandservices.health.v4.WeightRollupValue.Builder, + com.google.devicesandservices.health.v4.WeightRollupValueOrBuilder>( + (com.google.devicesandservices.health.v4.WeightRollupValue) value_, + getParentForChildren(), + isClean()); + value_ = null; + } + valueCase_ = 10; + onChanged(); + return weightBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.AltitudeRollupValue, + com.google.devicesandservices.health.v4.AltitudeRollupValue.Builder, + com.google.devicesandservices.health.v4.AltitudeRollupValueOrBuilder> + altitudeBuilder_; + + /** + * + * + *
+     * Returned by default when rolling up data points from the `altitude` data
+     * type, or when requested explicitly using the `altitude` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.AltitudeRollupValue altitude = 11; + * + * @return Whether the altitude field is set. + */ + @java.lang.Override + public boolean hasAltitude() { + return valueCase_ == 11; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `altitude` data
+     * type, or when requested explicitly using the `altitude` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.AltitudeRollupValue altitude = 11; + * + * @return The altitude. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.AltitudeRollupValue getAltitude() { + if (altitudeBuilder_ == null) { + if (valueCase_ == 11) { + return (com.google.devicesandservices.health.v4.AltitudeRollupValue) value_; + } + return com.google.devicesandservices.health.v4.AltitudeRollupValue.getDefaultInstance(); + } else { + if (valueCase_ == 11) { + return altitudeBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.AltitudeRollupValue.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `altitude` data
+     * type, or when requested explicitly using the `altitude` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.AltitudeRollupValue altitude = 11; + */ + public Builder setAltitude(com.google.devicesandservices.health.v4.AltitudeRollupValue value) { + if (altitudeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + onChanged(); + } else { + altitudeBuilder_.setMessage(value); + } + valueCase_ = 11; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `altitude` data
+     * type, or when requested explicitly using the `altitude` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.AltitudeRollupValue altitude = 11; + */ + public Builder setAltitude( + com.google.devicesandservices.health.v4.AltitudeRollupValue.Builder builderForValue) { + if (altitudeBuilder_ == null) { + value_ = builderForValue.build(); + onChanged(); + } else { + altitudeBuilder_.setMessage(builderForValue.build()); + } + valueCase_ = 11; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `altitude` data
+     * type, or when requested explicitly using the `altitude` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.AltitudeRollupValue altitude = 11; + */ + public Builder mergeAltitude( + com.google.devicesandservices.health.v4.AltitudeRollupValue value) { + if (altitudeBuilder_ == null) { + if (valueCase_ == 11 + && value_ + != com.google.devicesandservices.health.v4.AltitudeRollupValue + .getDefaultInstance()) { + value_ = + com.google.devicesandservices.health.v4.AltitudeRollupValue.newBuilder( + (com.google.devicesandservices.health.v4.AltitudeRollupValue) value_) + .mergeFrom(value) + .buildPartial(); + } else { + value_ = value; + } + onChanged(); + } else { + if (valueCase_ == 11) { + altitudeBuilder_.mergeFrom(value); + } else { + altitudeBuilder_.setMessage(value); + } + } + valueCase_ = 11; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `altitude` data
+     * type, or when requested explicitly using the `altitude` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.AltitudeRollupValue altitude = 11; + */ + public Builder clearAltitude() { + if (altitudeBuilder_ == null) { + if (valueCase_ == 11) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + } else { + if (valueCase_ == 11) { + valueCase_ = 0; + value_ = null; + } + altitudeBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `altitude` data
+     * type, or when requested explicitly using the `altitude` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.AltitudeRollupValue altitude = 11; + */ + public com.google.devicesandservices.health.v4.AltitudeRollupValue.Builder + getAltitudeBuilder() { + return internalGetAltitudeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `altitude` data
+     * type, or when requested explicitly using the `altitude` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.AltitudeRollupValue altitude = 11; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.AltitudeRollupValueOrBuilder + getAltitudeOrBuilder() { + if ((valueCase_ == 11) && (altitudeBuilder_ != null)) { + return altitudeBuilder_.getMessageOrBuilder(); + } else { + if (valueCase_ == 11) { + return (com.google.devicesandservices.health.v4.AltitudeRollupValue) value_; + } + return com.google.devicesandservices.health.v4.AltitudeRollupValue.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `altitude` data
+     * type, or when requested explicitly using the `altitude` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.AltitudeRollupValue altitude = 11; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.AltitudeRollupValue, + com.google.devicesandservices.health.v4.AltitudeRollupValue.Builder, + com.google.devicesandservices.health.v4.AltitudeRollupValueOrBuilder> + internalGetAltitudeFieldBuilder() { + if (altitudeBuilder_ == null) { + if (!(valueCase_ == 11)) { + value_ = com.google.devicesandservices.health.v4.AltitudeRollupValue.getDefaultInstance(); + } + altitudeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.AltitudeRollupValue, + com.google.devicesandservices.health.v4.AltitudeRollupValue.Builder, + com.google.devicesandservices.health.v4.AltitudeRollupValueOrBuilder>( + (com.google.devicesandservices.health.v4.AltitudeRollupValue) value_, + getParentForChildren(), + isClean()); + value_ = null; + } + valueCase_ = 11; + onChanged(); + return altitudeBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.DistanceRollupValue, + com.google.devicesandservices.health.v4.DistanceRollupValue.Builder, + com.google.devicesandservices.health.v4.DistanceRollupValueOrBuilder> + distanceBuilder_; + + /** + * + * + *
+     * Returned by default when rolling up data points from the `distance` data
+     * type, or when requested explicitly using the `distance` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.DistanceRollupValue distance = 12; + * + * @return Whether the distance field is set. + */ + @java.lang.Override + public boolean hasDistance() { + return valueCase_ == 12; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `distance` data
+     * type, or when requested explicitly using the `distance` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.DistanceRollupValue distance = 12; + * + * @return The distance. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DistanceRollupValue getDistance() { + if (distanceBuilder_ == null) { + if (valueCase_ == 12) { + return (com.google.devicesandservices.health.v4.DistanceRollupValue) value_; + } + return com.google.devicesandservices.health.v4.DistanceRollupValue.getDefaultInstance(); + } else { + if (valueCase_ == 12) { + return distanceBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.DistanceRollupValue.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `distance` data
+     * type, or when requested explicitly using the `distance` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.DistanceRollupValue distance = 12; + */ + public Builder setDistance(com.google.devicesandservices.health.v4.DistanceRollupValue value) { + if (distanceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + onChanged(); + } else { + distanceBuilder_.setMessage(value); + } + valueCase_ = 12; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `distance` data
+     * type, or when requested explicitly using the `distance` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.DistanceRollupValue distance = 12; + */ + public Builder setDistance( + com.google.devicesandservices.health.v4.DistanceRollupValue.Builder builderForValue) { + if (distanceBuilder_ == null) { + value_ = builderForValue.build(); + onChanged(); + } else { + distanceBuilder_.setMessage(builderForValue.build()); + } + valueCase_ = 12; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `distance` data
+     * type, or when requested explicitly using the `distance` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.DistanceRollupValue distance = 12; + */ + public Builder mergeDistance( + com.google.devicesandservices.health.v4.DistanceRollupValue value) { + if (distanceBuilder_ == null) { + if (valueCase_ == 12 + && value_ + != com.google.devicesandservices.health.v4.DistanceRollupValue + .getDefaultInstance()) { + value_ = + com.google.devicesandservices.health.v4.DistanceRollupValue.newBuilder( + (com.google.devicesandservices.health.v4.DistanceRollupValue) value_) + .mergeFrom(value) + .buildPartial(); + } else { + value_ = value; + } + onChanged(); + } else { + if (valueCase_ == 12) { + distanceBuilder_.mergeFrom(value); + } else { + distanceBuilder_.setMessage(value); + } + } + valueCase_ = 12; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `distance` data
+     * type, or when requested explicitly using the `distance` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.DistanceRollupValue distance = 12; + */ + public Builder clearDistance() { + if (distanceBuilder_ == null) { + if (valueCase_ == 12) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + } else { + if (valueCase_ == 12) { + valueCase_ = 0; + value_ = null; + } + distanceBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `distance` data
+     * type, or when requested explicitly using the `distance` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.DistanceRollupValue distance = 12; + */ + public com.google.devicesandservices.health.v4.DistanceRollupValue.Builder + getDistanceBuilder() { + return internalGetDistanceFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `distance` data
+     * type, or when requested explicitly using the `distance` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.DistanceRollupValue distance = 12; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DistanceRollupValueOrBuilder + getDistanceOrBuilder() { + if ((valueCase_ == 12) && (distanceBuilder_ != null)) { + return distanceBuilder_.getMessageOrBuilder(); + } else { + if (valueCase_ == 12) { + return (com.google.devicesandservices.health.v4.DistanceRollupValue) value_; + } + return com.google.devicesandservices.health.v4.DistanceRollupValue.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `distance` data
+     * type, or when requested explicitly using the `distance` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.DistanceRollupValue distance = 12; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.DistanceRollupValue, + com.google.devicesandservices.health.v4.DistanceRollupValue.Builder, + com.google.devicesandservices.health.v4.DistanceRollupValueOrBuilder> + internalGetDistanceFieldBuilder() { + if (distanceBuilder_ == null) { + if (!(valueCase_ == 12)) { + value_ = com.google.devicesandservices.health.v4.DistanceRollupValue.getDefaultInstance(); + } + distanceBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.DistanceRollupValue, + com.google.devicesandservices.health.v4.DistanceRollupValue.Builder, + com.google.devicesandservices.health.v4.DistanceRollupValueOrBuilder>( + (com.google.devicesandservices.health.v4.DistanceRollupValue) value_, + getParentForChildren(), + isClean()); + value_ = null; + } + valueCase_ = 12; + onChanged(); + return distanceBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.BodyFatRollupValue, + com.google.devicesandservices.health.v4.BodyFatRollupValue.Builder, + com.google.devicesandservices.health.v4.BodyFatRollupValueOrBuilder> + bodyFatBuilder_; + + /** + * + * + *
+     * Returned by default when rolling up data points from the `body-fat` data
+     * type, or when requested explicitly using the `body-fat` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.BodyFatRollupValue body_fat = 13; + * + * @return Whether the bodyFat field is set. + */ + @java.lang.Override + public boolean hasBodyFat() { + return valueCase_ == 13; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `body-fat` data
+     * type, or when requested explicitly using the `body-fat` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.BodyFatRollupValue body_fat = 13; + * + * @return The bodyFat. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.BodyFatRollupValue getBodyFat() { + if (bodyFatBuilder_ == null) { + if (valueCase_ == 13) { + return (com.google.devicesandservices.health.v4.BodyFatRollupValue) value_; + } + return com.google.devicesandservices.health.v4.BodyFatRollupValue.getDefaultInstance(); + } else { + if (valueCase_ == 13) { + return bodyFatBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.BodyFatRollupValue.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `body-fat` data
+     * type, or when requested explicitly using the `body-fat` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.BodyFatRollupValue body_fat = 13; + */ + public Builder setBodyFat(com.google.devicesandservices.health.v4.BodyFatRollupValue value) { + if (bodyFatBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + onChanged(); + } else { + bodyFatBuilder_.setMessage(value); + } + valueCase_ = 13; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `body-fat` data
+     * type, or when requested explicitly using the `body-fat` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.BodyFatRollupValue body_fat = 13; + */ + public Builder setBodyFat( + com.google.devicesandservices.health.v4.BodyFatRollupValue.Builder builderForValue) { + if (bodyFatBuilder_ == null) { + value_ = builderForValue.build(); + onChanged(); + } else { + bodyFatBuilder_.setMessage(builderForValue.build()); + } + valueCase_ = 13; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `body-fat` data
+     * type, or when requested explicitly using the `body-fat` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.BodyFatRollupValue body_fat = 13; + */ + public Builder mergeBodyFat(com.google.devicesandservices.health.v4.BodyFatRollupValue value) { + if (bodyFatBuilder_ == null) { + if (valueCase_ == 13 + && value_ + != com.google.devicesandservices.health.v4.BodyFatRollupValue + .getDefaultInstance()) { + value_ = + com.google.devicesandservices.health.v4.BodyFatRollupValue.newBuilder( + (com.google.devicesandservices.health.v4.BodyFatRollupValue) value_) + .mergeFrom(value) + .buildPartial(); + } else { + value_ = value; + } + onChanged(); + } else { + if (valueCase_ == 13) { + bodyFatBuilder_.mergeFrom(value); + } else { + bodyFatBuilder_.setMessage(value); + } + } + valueCase_ = 13; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `body-fat` data
+     * type, or when requested explicitly using the `body-fat` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.BodyFatRollupValue body_fat = 13; + */ + public Builder clearBodyFat() { + if (bodyFatBuilder_ == null) { + if (valueCase_ == 13) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + } else { + if (valueCase_ == 13) { + valueCase_ = 0; + value_ = null; + } + bodyFatBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `body-fat` data
+     * type, or when requested explicitly using the `body-fat` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.BodyFatRollupValue body_fat = 13; + */ + public com.google.devicesandservices.health.v4.BodyFatRollupValue.Builder getBodyFatBuilder() { + return internalGetBodyFatFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `body-fat` data
+     * type, or when requested explicitly using the `body-fat` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.BodyFatRollupValue body_fat = 13; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.BodyFatRollupValueOrBuilder + getBodyFatOrBuilder() { + if ((valueCase_ == 13) && (bodyFatBuilder_ != null)) { + return bodyFatBuilder_.getMessageOrBuilder(); + } else { + if (valueCase_ == 13) { + return (com.google.devicesandservices.health.v4.BodyFatRollupValue) value_; + } + return com.google.devicesandservices.health.v4.BodyFatRollupValue.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `body-fat` data
+     * type, or when requested explicitly using the `body-fat` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.BodyFatRollupValue body_fat = 13; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.BodyFatRollupValue, + com.google.devicesandservices.health.v4.BodyFatRollupValue.Builder, + com.google.devicesandservices.health.v4.BodyFatRollupValueOrBuilder> + internalGetBodyFatFieldBuilder() { + if (bodyFatBuilder_ == null) { + if (!(valueCase_ == 13)) { + value_ = com.google.devicesandservices.health.v4.BodyFatRollupValue.getDefaultInstance(); + } + bodyFatBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.BodyFatRollupValue, + com.google.devicesandservices.health.v4.BodyFatRollupValue.Builder, + com.google.devicesandservices.health.v4.BodyFatRollupValueOrBuilder>( + (com.google.devicesandservices.health.v4.BodyFatRollupValue) value_, + getParentForChildren(), + isClean()); + value_ = null; + } + valueCase_ = 13; + onChanged(); + return bodyFatBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.TotalCaloriesRollupValue, + com.google.devicesandservices.health.v4.TotalCaloriesRollupValue.Builder, + com.google.devicesandservices.health.v4.TotalCaloriesRollupValueOrBuilder> + totalCaloriesBuilder_; + + /** + * + * + *
+     * Returned by default when rolling up data points from the `total-calories`
+     * data type, or when requested explicitly using the `total-calories`
+     * rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.TotalCaloriesRollupValue total_calories = 14; + * + * + * @return Whether the totalCalories field is set. + */ + @java.lang.Override + public boolean hasTotalCalories() { + return valueCase_ == 14; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `total-calories`
+     * data type, or when requested explicitly using the `total-calories`
+     * rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.TotalCaloriesRollupValue total_calories = 14; + * + * + * @return The totalCalories. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.TotalCaloriesRollupValue getTotalCalories() { + if (totalCaloriesBuilder_ == null) { + if (valueCase_ == 14) { + return (com.google.devicesandservices.health.v4.TotalCaloriesRollupValue) value_; + } + return com.google.devicesandservices.health.v4.TotalCaloriesRollupValue + .getDefaultInstance(); + } else { + if (valueCase_ == 14) { + return totalCaloriesBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.TotalCaloriesRollupValue + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `total-calories`
+     * data type, or when requested explicitly using the `total-calories`
+     * rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.TotalCaloriesRollupValue total_calories = 14; + * + */ + public Builder setTotalCalories( + com.google.devicesandservices.health.v4.TotalCaloriesRollupValue value) { + if (totalCaloriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + onChanged(); + } else { + totalCaloriesBuilder_.setMessage(value); + } + valueCase_ = 14; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `total-calories`
+     * data type, or when requested explicitly using the `total-calories`
+     * rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.TotalCaloriesRollupValue total_calories = 14; + * + */ + public Builder setTotalCalories( + com.google.devicesandservices.health.v4.TotalCaloriesRollupValue.Builder builderForValue) { + if (totalCaloriesBuilder_ == null) { + value_ = builderForValue.build(); + onChanged(); + } else { + totalCaloriesBuilder_.setMessage(builderForValue.build()); + } + valueCase_ = 14; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `total-calories`
+     * data type, or when requested explicitly using the `total-calories`
+     * rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.TotalCaloriesRollupValue total_calories = 14; + * + */ + public Builder mergeTotalCalories( + com.google.devicesandservices.health.v4.TotalCaloriesRollupValue value) { + if (totalCaloriesBuilder_ == null) { + if (valueCase_ == 14 + && value_ + != com.google.devicesandservices.health.v4.TotalCaloriesRollupValue + .getDefaultInstance()) { + value_ = + com.google.devicesandservices.health.v4.TotalCaloriesRollupValue.newBuilder( + (com.google.devicesandservices.health.v4.TotalCaloriesRollupValue) value_) + .mergeFrom(value) + .buildPartial(); + } else { + value_ = value; + } + onChanged(); + } else { + if (valueCase_ == 14) { + totalCaloriesBuilder_.mergeFrom(value); + } else { + totalCaloriesBuilder_.setMessage(value); + } + } + valueCase_ = 14; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `total-calories`
+     * data type, or when requested explicitly using the `total-calories`
+     * rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.TotalCaloriesRollupValue total_calories = 14; + * + */ + public Builder clearTotalCalories() { + if (totalCaloriesBuilder_ == null) { + if (valueCase_ == 14) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + } else { + if (valueCase_ == 14) { + valueCase_ = 0; + value_ = null; + } + totalCaloriesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `total-calories`
+     * data type, or when requested explicitly using the `total-calories`
+     * rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.TotalCaloriesRollupValue total_calories = 14; + * + */ + public com.google.devicesandservices.health.v4.TotalCaloriesRollupValue.Builder + getTotalCaloriesBuilder() { + return internalGetTotalCaloriesFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `total-calories`
+     * data type, or when requested explicitly using the `total-calories`
+     * rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.TotalCaloriesRollupValue total_calories = 14; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.TotalCaloriesRollupValueOrBuilder + getTotalCaloriesOrBuilder() { + if ((valueCase_ == 14) && (totalCaloriesBuilder_ != null)) { + return totalCaloriesBuilder_.getMessageOrBuilder(); + } else { + if (valueCase_ == 14) { + return (com.google.devicesandservices.health.v4.TotalCaloriesRollupValue) value_; + } + return com.google.devicesandservices.health.v4.TotalCaloriesRollupValue + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `total-calories`
+     * data type, or when requested explicitly using the `total-calories`
+     * rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.TotalCaloriesRollupValue total_calories = 14; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.TotalCaloriesRollupValue, + com.google.devicesandservices.health.v4.TotalCaloriesRollupValue.Builder, + com.google.devicesandservices.health.v4.TotalCaloriesRollupValueOrBuilder> + internalGetTotalCaloriesFieldBuilder() { + if (totalCaloriesBuilder_ == null) { + if (!(valueCase_ == 14)) { + value_ = + com.google.devicesandservices.health.v4.TotalCaloriesRollupValue.getDefaultInstance(); + } + totalCaloriesBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.TotalCaloriesRollupValue, + com.google.devicesandservices.health.v4.TotalCaloriesRollupValue.Builder, + com.google.devicesandservices.health.v4.TotalCaloriesRollupValueOrBuilder>( + (com.google.devicesandservices.health.v4.TotalCaloriesRollupValue) value_, + getParentForChildren(), + isClean()); + value_ = null; + } + valueCase_ = 14; + onChanged(); + return totalCaloriesBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue, + com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue.Builder, + com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValueOrBuilder> + activeZoneMinutesBuilder_; + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `active-zone-minutes` data type, or when requested explicitly using the
+     * `active-zone-minutes` rollup type identifier.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue active_zone_minutes = 15; + * + * + * @return Whether the activeZoneMinutes field is set. + */ + @java.lang.Override + public boolean hasActiveZoneMinutes() { + return valueCase_ == 15; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `active-zone-minutes` data type, or when requested explicitly using the
+     * `active-zone-minutes` rollup type identifier.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue active_zone_minutes = 15; + * + * + * @return The activeZoneMinutes. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue + getActiveZoneMinutes() { + if (activeZoneMinutesBuilder_ == null) { + if (valueCase_ == 15) { + return (com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue) value_; + } + return com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue + .getDefaultInstance(); + } else { + if (valueCase_ == 15) { + return activeZoneMinutesBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `active-zone-minutes` data type, or when requested explicitly using the
+     * `active-zone-minutes` rollup type identifier.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue active_zone_minutes = 15; + * + */ + public Builder setActiveZoneMinutes( + com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue value) { + if (activeZoneMinutesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + onChanged(); + } else { + activeZoneMinutesBuilder_.setMessage(value); + } + valueCase_ = 15; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `active-zone-minutes` data type, or when requested explicitly using the
+     * `active-zone-minutes` rollup type identifier.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue active_zone_minutes = 15; + * + */ + public Builder setActiveZoneMinutes( + com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue.Builder + builderForValue) { + if (activeZoneMinutesBuilder_ == null) { + value_ = builderForValue.build(); + onChanged(); + } else { + activeZoneMinutesBuilder_.setMessage(builderForValue.build()); + } + valueCase_ = 15; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `active-zone-minutes` data type, or when requested explicitly using the
+     * `active-zone-minutes` rollup type identifier.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue active_zone_minutes = 15; + * + */ + public Builder mergeActiveZoneMinutes( + com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue value) { + if (activeZoneMinutesBuilder_ == null) { + if (valueCase_ == 15 + && value_ + != com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue + .getDefaultInstance()) { + value_ = + com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue.newBuilder( + (com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue) value_) + .mergeFrom(value) + .buildPartial(); + } else { + value_ = value; + } + onChanged(); + } else { + if (valueCase_ == 15) { + activeZoneMinutesBuilder_.mergeFrom(value); + } else { + activeZoneMinutesBuilder_.setMessage(value); + } + } + valueCase_ = 15; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `active-zone-minutes` data type, or when requested explicitly using the
+     * `active-zone-minutes` rollup type identifier.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue active_zone_minutes = 15; + * + */ + public Builder clearActiveZoneMinutes() { + if (activeZoneMinutesBuilder_ == null) { + if (valueCase_ == 15) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + } else { + if (valueCase_ == 15) { + valueCase_ = 0; + value_ = null; + } + activeZoneMinutesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `active-zone-minutes` data type, or when requested explicitly using the
+     * `active-zone-minutes` rollup type identifier.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue active_zone_minutes = 15; + * + */ + public com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue.Builder + getActiveZoneMinutesBuilder() { + return internalGetActiveZoneMinutesFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `active-zone-minutes` data type, or when requested explicitly using the
+     * `active-zone-minutes` rollup type identifier.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue active_zone_minutes = 15; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValueOrBuilder + getActiveZoneMinutesOrBuilder() { + if ((valueCase_ == 15) && (activeZoneMinutesBuilder_ != null)) { + return activeZoneMinutesBuilder_.getMessageOrBuilder(); + } else { + if (valueCase_ == 15) { + return (com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue) value_; + } + return com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `active-zone-minutes` data type, or when requested explicitly using the
+     * `active-zone-minutes` rollup type identifier.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue active_zone_minutes = 15; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue, + com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue.Builder, + com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValueOrBuilder> + internalGetActiveZoneMinutesFieldBuilder() { + if (activeZoneMinutesBuilder_ == null) { + if (!(valueCase_ == 15)) { + value_ = + com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue + .getDefaultInstance(); + } + activeZoneMinutesBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue, + com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue.Builder, + com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValueOrBuilder>( + (com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue) value_, + getParentForChildren(), + isClean()); + value_ = null; + } + valueCase_ = 15; + onChanged(); + return activeZoneMinutesBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue, + com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue.Builder, + com.google.devicesandservices.health.v4.SedentaryPeriodRollupValueOrBuilder> + sedentaryPeriodBuilder_; + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `sedentary-period` data type, or when requested explicitly using the
+     * `sedentary-period` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.SedentaryPeriodRollupValue sedentary_period = 17; + * + * + * @return Whether the sedentaryPeriod field is set. + */ + @java.lang.Override + public boolean hasSedentaryPeriod() { + return valueCase_ == 17; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `sedentary-period` data type, or when requested explicitly using the
+     * `sedentary-period` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.SedentaryPeriodRollupValue sedentary_period = 17; + * + * + * @return The sedentaryPeriod. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue getSedentaryPeriod() { + if (sedentaryPeriodBuilder_ == null) { + if (valueCase_ == 17) { + return (com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue) value_; + } + return com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue + .getDefaultInstance(); + } else { + if (valueCase_ == 17) { + return sedentaryPeriodBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `sedentary-period` data type, or when requested explicitly using the
+     * `sedentary-period` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.SedentaryPeriodRollupValue sedentary_period = 17; + * + */ + public Builder setSedentaryPeriod( + com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue value) { + if (sedentaryPeriodBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + onChanged(); + } else { + sedentaryPeriodBuilder_.setMessage(value); + } + valueCase_ = 17; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `sedentary-period` data type, or when requested explicitly using the
+     * `sedentary-period` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.SedentaryPeriodRollupValue sedentary_period = 17; + * + */ + public Builder setSedentaryPeriod( + com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue.Builder + builderForValue) { + if (sedentaryPeriodBuilder_ == null) { + value_ = builderForValue.build(); + onChanged(); + } else { + sedentaryPeriodBuilder_.setMessage(builderForValue.build()); + } + valueCase_ = 17; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `sedentary-period` data type, or when requested explicitly using the
+     * `sedentary-period` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.SedentaryPeriodRollupValue sedentary_period = 17; + * + */ + public Builder mergeSedentaryPeriod( + com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue value) { + if (sedentaryPeriodBuilder_ == null) { + if (valueCase_ == 17 + && value_ + != com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue + .getDefaultInstance()) { + value_ = + com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue.newBuilder( + (com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue) value_) + .mergeFrom(value) + .buildPartial(); + } else { + value_ = value; + } + onChanged(); + } else { + if (valueCase_ == 17) { + sedentaryPeriodBuilder_.mergeFrom(value); + } else { + sedentaryPeriodBuilder_.setMessage(value); + } + } + valueCase_ = 17; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `sedentary-period` data type, or when requested explicitly using the
+     * `sedentary-period` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.SedentaryPeriodRollupValue sedentary_period = 17; + * + */ + public Builder clearSedentaryPeriod() { + if (sedentaryPeriodBuilder_ == null) { + if (valueCase_ == 17) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + } else { + if (valueCase_ == 17) { + valueCase_ = 0; + value_ = null; + } + sedentaryPeriodBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `sedentary-period` data type, or when requested explicitly using the
+     * `sedentary-period` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.SedentaryPeriodRollupValue sedentary_period = 17; + * + */ + public com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue.Builder + getSedentaryPeriodBuilder() { + return internalGetSedentaryPeriodFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `sedentary-period` data type, or when requested explicitly using the
+     * `sedentary-period` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.SedentaryPeriodRollupValue sedentary_period = 17; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.SedentaryPeriodRollupValueOrBuilder + getSedentaryPeriodOrBuilder() { + if ((valueCase_ == 17) && (sedentaryPeriodBuilder_ != null)) { + return sedentaryPeriodBuilder_.getMessageOrBuilder(); + } else { + if (valueCase_ == 17) { + return (com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue) value_; + } + return com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `sedentary-period` data type, or when requested explicitly using the
+     * `sedentary-period` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.SedentaryPeriodRollupValue sedentary_period = 17; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue, + com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue.Builder, + com.google.devicesandservices.health.v4.SedentaryPeriodRollupValueOrBuilder> + internalGetSedentaryPeriodFieldBuilder() { + if (sedentaryPeriodBuilder_ == null) { + if (!(valueCase_ == 17)) { + value_ = + com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue + .getDefaultInstance(); + } + sedentaryPeriodBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue, + com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue.Builder, + com.google.devicesandservices.health.v4.SedentaryPeriodRollupValueOrBuilder>( + (com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue) value_, + getParentForChildren(), + isClean()); + value_ = null; + } + valueCase_ = 17; + onChanged(); + return sedentaryPeriodBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.RunVO2MaxRollupValue, + com.google.devicesandservices.health.v4.RunVO2MaxRollupValue.Builder, + com.google.devicesandservices.health.v4.RunVO2MaxRollupValueOrBuilder> + runVo2MaxBuilder_; + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `run-vo2-max` data type, or when requested explicitly using the
+     * `run-vo2-max` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.RunVO2MaxRollupValue run_vo2_max = 18; + * + * @return Whether the runVo2Max field is set. + */ + @java.lang.Override + public boolean hasRunVo2Max() { + return valueCase_ == 18; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `run-vo2-max` data type, or when requested explicitly using the
+     * `run-vo2-max` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.RunVO2MaxRollupValue run_vo2_max = 18; + * + * @return The runVo2Max. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.RunVO2MaxRollupValue getRunVo2Max() { + if (runVo2MaxBuilder_ == null) { + if (valueCase_ == 18) { + return (com.google.devicesandservices.health.v4.RunVO2MaxRollupValue) value_; + } + return com.google.devicesandservices.health.v4.RunVO2MaxRollupValue.getDefaultInstance(); + } else { + if (valueCase_ == 18) { + return runVo2MaxBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.RunVO2MaxRollupValue.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `run-vo2-max` data type, or when requested explicitly using the
+     * `run-vo2-max` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.RunVO2MaxRollupValue run_vo2_max = 18; + */ + public Builder setRunVo2Max( + com.google.devicesandservices.health.v4.RunVO2MaxRollupValue value) { + if (runVo2MaxBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + onChanged(); + } else { + runVo2MaxBuilder_.setMessage(value); + } + valueCase_ = 18; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `run-vo2-max` data type, or when requested explicitly using the
+     * `run-vo2-max` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.RunVO2MaxRollupValue run_vo2_max = 18; + */ + public Builder setRunVo2Max( + com.google.devicesandservices.health.v4.RunVO2MaxRollupValue.Builder builderForValue) { + if (runVo2MaxBuilder_ == null) { + value_ = builderForValue.build(); + onChanged(); + } else { + runVo2MaxBuilder_.setMessage(builderForValue.build()); + } + valueCase_ = 18; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `run-vo2-max` data type, or when requested explicitly using the
+     * `run-vo2-max` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.RunVO2MaxRollupValue run_vo2_max = 18; + */ + public Builder mergeRunVo2Max( + com.google.devicesandservices.health.v4.RunVO2MaxRollupValue value) { + if (runVo2MaxBuilder_ == null) { + if (valueCase_ == 18 + && value_ + != com.google.devicesandservices.health.v4.RunVO2MaxRollupValue + .getDefaultInstance()) { + value_ = + com.google.devicesandservices.health.v4.RunVO2MaxRollupValue.newBuilder( + (com.google.devicesandservices.health.v4.RunVO2MaxRollupValue) value_) + .mergeFrom(value) + .buildPartial(); + } else { + value_ = value; + } + onChanged(); + } else { + if (valueCase_ == 18) { + runVo2MaxBuilder_.mergeFrom(value); + } else { + runVo2MaxBuilder_.setMessage(value); + } + } + valueCase_ = 18; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `run-vo2-max` data type, or when requested explicitly using the
+     * `run-vo2-max` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.RunVO2MaxRollupValue run_vo2_max = 18; + */ + public Builder clearRunVo2Max() { + if (runVo2MaxBuilder_ == null) { + if (valueCase_ == 18) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + } else { + if (valueCase_ == 18) { + valueCase_ = 0; + value_ = null; + } + runVo2MaxBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `run-vo2-max` data type, or when requested explicitly using the
+     * `run-vo2-max` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.RunVO2MaxRollupValue run_vo2_max = 18; + */ + public com.google.devicesandservices.health.v4.RunVO2MaxRollupValue.Builder + getRunVo2MaxBuilder() { + return internalGetRunVo2MaxFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `run-vo2-max` data type, or when requested explicitly using the
+     * `run-vo2-max` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.RunVO2MaxRollupValue run_vo2_max = 18; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.RunVO2MaxRollupValueOrBuilder + getRunVo2MaxOrBuilder() { + if ((valueCase_ == 18) && (runVo2MaxBuilder_ != null)) { + return runVo2MaxBuilder_.getMessageOrBuilder(); + } else { + if (valueCase_ == 18) { + return (com.google.devicesandservices.health.v4.RunVO2MaxRollupValue) value_; + } + return com.google.devicesandservices.health.v4.RunVO2MaxRollupValue.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `run-vo2-max` data type, or when requested explicitly using the
+     * `run-vo2-max` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.RunVO2MaxRollupValue run_vo2_max = 18; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.RunVO2MaxRollupValue, + com.google.devicesandservices.health.v4.RunVO2MaxRollupValue.Builder, + com.google.devicesandservices.health.v4.RunVO2MaxRollupValueOrBuilder> + internalGetRunVo2MaxFieldBuilder() { + if (runVo2MaxBuilder_ == null) { + if (!(valueCase_ == 18)) { + value_ = + com.google.devicesandservices.health.v4.RunVO2MaxRollupValue.getDefaultInstance(); + } + runVo2MaxBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.RunVO2MaxRollupValue, + com.google.devicesandservices.health.v4.RunVO2MaxRollupValue.Builder, + com.google.devicesandservices.health.v4.RunVO2MaxRollupValueOrBuilder>( + (com.google.devicesandservices.health.v4.RunVO2MaxRollupValue) value_, + getParentForChildren(), + isClean()); + value_ = null; + } + valueCase_ = 18; + onChanged(); + return runVo2MaxBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue, + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue.Builder, + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValueOrBuilder> + caloriesInHeartRateZoneBuilder_; + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `calories-in-heart-rate-zone` data type, or when requested explicitly
+     * using the `calories-in-heart-rate-zone` rollup type identifier.
+     * 
+ * + * + * .google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue calories_in_heart_rate_zone = 19; + * + * + * @return Whether the caloriesInHeartRateZone field is set. + */ + @java.lang.Override + public boolean hasCaloriesInHeartRateZone() { + return valueCase_ == 19; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `calories-in-heart-rate-zone` data type, or when requested explicitly
+     * using the `calories-in-heart-rate-zone` rollup type identifier.
+     * 
+ * + * + * .google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue calories_in_heart_rate_zone = 19; + * + * + * @return The caloriesInHeartRateZone. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + getCaloriesInHeartRateZone() { + if (caloriesInHeartRateZoneBuilder_ == null) { + if (valueCase_ == 19) { + return (com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue) + value_; + } + return com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .getDefaultInstance(); + } else { + if (valueCase_ == 19) { + return caloriesInHeartRateZoneBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `calories-in-heart-rate-zone` data type, or when requested explicitly
+     * using the `calories-in-heart-rate-zone` rollup type identifier.
+     * 
+ * + * + * .google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue calories_in_heart_rate_zone = 19; + * + */ + public Builder setCaloriesInHeartRateZone( + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue value) { + if (caloriesInHeartRateZoneBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + onChanged(); + } else { + caloriesInHeartRateZoneBuilder_.setMessage(value); + } + valueCase_ = 19; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `calories-in-heart-rate-zone` data type, or when requested explicitly
+     * using the `calories-in-heart-rate-zone` rollup type identifier.
+     * 
+ * + * + * .google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue calories_in_heart_rate_zone = 19; + * + */ + public Builder setCaloriesInHeartRateZone( + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue.Builder + builderForValue) { + if (caloriesInHeartRateZoneBuilder_ == null) { + value_ = builderForValue.build(); + onChanged(); + } else { + caloriesInHeartRateZoneBuilder_.setMessage(builderForValue.build()); + } + valueCase_ = 19; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `calories-in-heart-rate-zone` data type, or when requested explicitly
+     * using the `calories-in-heart-rate-zone` rollup type identifier.
+     * 
+ * + * + * .google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue calories_in_heart_rate_zone = 19; + * + */ + public Builder mergeCaloriesInHeartRateZone( + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue value) { + if (caloriesInHeartRateZoneBuilder_ == null) { + if (valueCase_ == 19 + && value_ + != com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .getDefaultInstance()) { + value_ = + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue.newBuilder( + (com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue) + value_) + .mergeFrom(value) + .buildPartial(); + } else { + value_ = value; + } + onChanged(); + } else { + if (valueCase_ == 19) { + caloriesInHeartRateZoneBuilder_.mergeFrom(value); + } else { + caloriesInHeartRateZoneBuilder_.setMessage(value); + } + } + valueCase_ = 19; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `calories-in-heart-rate-zone` data type, or when requested explicitly
+     * using the `calories-in-heart-rate-zone` rollup type identifier.
+     * 
+ * + * + * .google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue calories_in_heart_rate_zone = 19; + * + */ + public Builder clearCaloriesInHeartRateZone() { + if (caloriesInHeartRateZoneBuilder_ == null) { + if (valueCase_ == 19) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + } else { + if (valueCase_ == 19) { + valueCase_ = 0; + value_ = null; + } + caloriesInHeartRateZoneBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `calories-in-heart-rate-zone` data type, or when requested explicitly
+     * using the `calories-in-heart-rate-zone` rollup type identifier.
+     * 
+ * + * + * .google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue calories_in_heart_rate_zone = 19; + * + */ + public com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue.Builder + getCaloriesInHeartRateZoneBuilder() { + return internalGetCaloriesInHeartRateZoneFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `calories-in-heart-rate-zone` data type, or when requested explicitly
+     * using the `calories-in-heart-rate-zone` rollup type identifier.
+     * 
+ * + * + * .google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue calories_in_heart_rate_zone = 19; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValueOrBuilder + getCaloriesInHeartRateZoneOrBuilder() { + if ((valueCase_ == 19) && (caloriesInHeartRateZoneBuilder_ != null)) { + return caloriesInHeartRateZoneBuilder_.getMessageOrBuilder(); + } else { + if (valueCase_ == 19) { + return (com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue) + value_; + } + return com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `calories-in-heart-rate-zone` data type, or when requested explicitly
+     * using the `calories-in-heart-rate-zone` rollup type identifier.
+     * 
+ * + * + * .google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue calories_in_heart_rate_zone = 19; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue, + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue.Builder, + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValueOrBuilder> + internalGetCaloriesInHeartRateZoneFieldBuilder() { + if (caloriesInHeartRateZoneBuilder_ == null) { + if (!(valueCase_ == 19)) { + value_ = + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .getDefaultInstance(); + } + caloriesInHeartRateZoneBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue, + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue.Builder, + com.google.devicesandservices.health.v4 + .CaloriesInHeartRateZoneRollupValueOrBuilder>( + (com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue) value_, + getParentForChildren(), + isClean()); + value_ = null; + } + valueCase_ = 19; + onChanged(); + return caloriesInHeartRateZoneBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ActivityLevelRollupValue, + com.google.devicesandservices.health.v4.ActivityLevelRollupValue.Builder, + com.google.devicesandservices.health.v4.ActivityLevelRollupValueOrBuilder> + activityLevelBuilder_; + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `activity-level` data type, or when requested explicitly using the
+     * `activity-level` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.ActivityLevelRollupValue activity_level = 20; + * + * + * @return Whether the activityLevel field is set. + */ + @java.lang.Override + public boolean hasActivityLevel() { + return valueCase_ == 20; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `activity-level` data type, or when requested explicitly using the
+     * `activity-level` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.ActivityLevelRollupValue activity_level = 20; + * + * + * @return The activityLevel. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ActivityLevelRollupValue getActivityLevel() { + if (activityLevelBuilder_ == null) { + if (valueCase_ == 20) { + return (com.google.devicesandservices.health.v4.ActivityLevelRollupValue) value_; + } + return com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .getDefaultInstance(); + } else { + if (valueCase_ == 20) { + return activityLevelBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `activity-level` data type, or when requested explicitly using the
+     * `activity-level` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.ActivityLevelRollupValue activity_level = 20; + * + */ + public Builder setActivityLevel( + com.google.devicesandservices.health.v4.ActivityLevelRollupValue value) { + if (activityLevelBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + onChanged(); + } else { + activityLevelBuilder_.setMessage(value); + } + valueCase_ = 20; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `activity-level` data type, or when requested explicitly using the
+     * `activity-level` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.ActivityLevelRollupValue activity_level = 20; + * + */ + public Builder setActivityLevel( + com.google.devicesandservices.health.v4.ActivityLevelRollupValue.Builder builderForValue) { + if (activityLevelBuilder_ == null) { + value_ = builderForValue.build(); + onChanged(); + } else { + activityLevelBuilder_.setMessage(builderForValue.build()); + } + valueCase_ = 20; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `activity-level` data type, or when requested explicitly using the
+     * `activity-level` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.ActivityLevelRollupValue activity_level = 20; + * + */ + public Builder mergeActivityLevel( + com.google.devicesandservices.health.v4.ActivityLevelRollupValue value) { + if (activityLevelBuilder_ == null) { + if (valueCase_ == 20 + && value_ + != com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .getDefaultInstance()) { + value_ = + com.google.devicesandservices.health.v4.ActivityLevelRollupValue.newBuilder( + (com.google.devicesandservices.health.v4.ActivityLevelRollupValue) value_) + .mergeFrom(value) + .buildPartial(); + } else { + value_ = value; + } + onChanged(); + } else { + if (valueCase_ == 20) { + activityLevelBuilder_.mergeFrom(value); + } else { + activityLevelBuilder_.setMessage(value); + } + } + valueCase_ = 20; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `activity-level` data type, or when requested explicitly using the
+     * `activity-level` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.ActivityLevelRollupValue activity_level = 20; + * + */ + public Builder clearActivityLevel() { + if (activityLevelBuilder_ == null) { + if (valueCase_ == 20) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + } else { + if (valueCase_ == 20) { + valueCase_ = 0; + value_ = null; + } + activityLevelBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `activity-level` data type, or when requested explicitly using the
+     * `activity-level` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.ActivityLevelRollupValue activity_level = 20; + * + */ + public com.google.devicesandservices.health.v4.ActivityLevelRollupValue.Builder + getActivityLevelBuilder() { + return internalGetActivityLevelFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `activity-level` data type, or when requested explicitly using the
+     * `activity-level` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.ActivityLevelRollupValue activity_level = 20; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ActivityLevelRollupValueOrBuilder + getActivityLevelOrBuilder() { + if ((valueCase_ == 20) && (activityLevelBuilder_ != null)) { + return activityLevelBuilder_.getMessageOrBuilder(); + } else { + if (valueCase_ == 20) { + return (com.google.devicesandservices.health.v4.ActivityLevelRollupValue) value_; + } + return com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `activity-level` data type, or when requested explicitly using the
+     * `activity-level` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.ActivityLevelRollupValue activity_level = 20; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ActivityLevelRollupValue, + com.google.devicesandservices.health.v4.ActivityLevelRollupValue.Builder, + com.google.devicesandservices.health.v4.ActivityLevelRollupValueOrBuilder> + internalGetActivityLevelFieldBuilder() { + if (activityLevelBuilder_ == null) { + if (!(valueCase_ == 20)) { + value_ = + com.google.devicesandservices.health.v4.ActivityLevelRollupValue.getDefaultInstance(); + } + activityLevelBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ActivityLevelRollupValue, + com.google.devicesandservices.health.v4.ActivityLevelRollupValue.Builder, + com.google.devicesandservices.health.v4.ActivityLevelRollupValueOrBuilder>( + (com.google.devicesandservices.health.v4.ActivityLevelRollupValue) value_, + getParentForChildren(), + isClean()); + value_ = null; + } + valueCase_ = 20; + onChanged(); + return activityLevelBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.HydrationLogRollupValue, + com.google.devicesandservices.health.v4.HydrationLogRollupValue.Builder, + com.google.devicesandservices.health.v4.HydrationLogRollupValueOrBuilder> + hydrationLogBuilder_; + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `hydration-log` data type, or when requested explicitly using the
+     * `hydration-log` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.HydrationLogRollupValue hydration_log = 22; + * + * @return Whether the hydrationLog field is set. + */ + @java.lang.Override + public boolean hasHydrationLog() { + return valueCase_ == 22; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `hydration-log` data type, or when requested explicitly using the
+     * `hydration-log` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.HydrationLogRollupValue hydration_log = 22; + * + * @return The hydrationLog. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.HydrationLogRollupValue getHydrationLog() { + if (hydrationLogBuilder_ == null) { + if (valueCase_ == 22) { + return (com.google.devicesandservices.health.v4.HydrationLogRollupValue) value_; + } + return com.google.devicesandservices.health.v4.HydrationLogRollupValue.getDefaultInstance(); + } else { + if (valueCase_ == 22) { + return hydrationLogBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.HydrationLogRollupValue.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `hydration-log` data type, or when requested explicitly using the
+     * `hydration-log` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.HydrationLogRollupValue hydration_log = 22; + */ + public Builder setHydrationLog( + com.google.devicesandservices.health.v4.HydrationLogRollupValue value) { + if (hydrationLogBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + onChanged(); + } else { + hydrationLogBuilder_.setMessage(value); + } + valueCase_ = 22; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `hydration-log` data type, or when requested explicitly using the
+     * `hydration-log` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.HydrationLogRollupValue hydration_log = 22; + */ + public Builder setHydrationLog( + com.google.devicesandservices.health.v4.HydrationLogRollupValue.Builder builderForValue) { + if (hydrationLogBuilder_ == null) { + value_ = builderForValue.build(); + onChanged(); + } else { + hydrationLogBuilder_.setMessage(builderForValue.build()); + } + valueCase_ = 22; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `hydration-log` data type, or when requested explicitly using the
+     * `hydration-log` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.HydrationLogRollupValue hydration_log = 22; + */ + public Builder mergeHydrationLog( + com.google.devicesandservices.health.v4.HydrationLogRollupValue value) { + if (hydrationLogBuilder_ == null) { + if (valueCase_ == 22 + && value_ + != com.google.devicesandservices.health.v4.HydrationLogRollupValue + .getDefaultInstance()) { + value_ = + com.google.devicesandservices.health.v4.HydrationLogRollupValue.newBuilder( + (com.google.devicesandservices.health.v4.HydrationLogRollupValue) value_) + .mergeFrom(value) + .buildPartial(); + } else { + value_ = value; + } + onChanged(); + } else { + if (valueCase_ == 22) { + hydrationLogBuilder_.mergeFrom(value); + } else { + hydrationLogBuilder_.setMessage(value); + } + } + valueCase_ = 22; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `hydration-log` data type, or when requested explicitly using the
+     * `hydration-log` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.HydrationLogRollupValue hydration_log = 22; + */ + public Builder clearHydrationLog() { + if (hydrationLogBuilder_ == null) { + if (valueCase_ == 22) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + } else { + if (valueCase_ == 22) { + valueCase_ = 0; + value_ = null; + } + hydrationLogBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `hydration-log` data type, or when requested explicitly using the
+     * `hydration-log` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.HydrationLogRollupValue hydration_log = 22; + */ + public com.google.devicesandservices.health.v4.HydrationLogRollupValue.Builder + getHydrationLogBuilder() { + return internalGetHydrationLogFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `hydration-log` data type, or when requested explicitly using the
+     * `hydration-log` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.HydrationLogRollupValue hydration_log = 22; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.HydrationLogRollupValueOrBuilder + getHydrationLogOrBuilder() { + if ((valueCase_ == 22) && (hydrationLogBuilder_ != null)) { + return hydrationLogBuilder_.getMessageOrBuilder(); + } else { + if (valueCase_ == 22) { + return (com.google.devicesandservices.health.v4.HydrationLogRollupValue) value_; + } + return com.google.devicesandservices.health.v4.HydrationLogRollupValue.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `hydration-log` data type, or when requested explicitly using the
+     * `hydration-log` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.HydrationLogRollupValue hydration_log = 22; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.HydrationLogRollupValue, + com.google.devicesandservices.health.v4.HydrationLogRollupValue.Builder, + com.google.devicesandservices.health.v4.HydrationLogRollupValueOrBuilder> + internalGetHydrationLogFieldBuilder() { + if (hydrationLogBuilder_ == null) { + if (!(valueCase_ == 22)) { + value_ = + com.google.devicesandservices.health.v4.HydrationLogRollupValue.getDefaultInstance(); + } + hydrationLogBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.HydrationLogRollupValue, + com.google.devicesandservices.health.v4.HydrationLogRollupValue.Builder, + com.google.devicesandservices.health.v4.HydrationLogRollupValueOrBuilder>( + (com.google.devicesandservices.health.v4.HydrationLogRollupValue) value_, + getParentForChildren(), + isClean()); + value_ = null; + } + valueCase_ = 22; + onChanged(); + return hydrationLogBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue, + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue.Builder, + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValueOrBuilder> + timeInHeartRateZoneBuilder_; + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `time-in-heart-rate-zone` data type, or when requested explicitly using
+     * the `time-in-heart-rate-zone` rollup type identifier.
+     * 
+ * + * + * .google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue time_in_heart_rate_zone = 23; + * + * + * @return Whether the timeInHeartRateZone field is set. + */ + @java.lang.Override + public boolean hasTimeInHeartRateZone() { + return valueCase_ == 23; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `time-in-heart-rate-zone` data type, or when requested explicitly using
+     * the `time-in-heart-rate-zone` rollup type identifier.
+     * 
+ * + * + * .google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue time_in_heart_rate_zone = 23; + * + * + * @return The timeInHeartRateZone. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + getTimeInHeartRateZone() { + if (timeInHeartRateZoneBuilder_ == null) { + if (valueCase_ == 23) { + return (com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue) value_; + } + return com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .getDefaultInstance(); + } else { + if (valueCase_ == 23) { + return timeInHeartRateZoneBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `time-in-heart-rate-zone` data type, or when requested explicitly using
+     * the `time-in-heart-rate-zone` rollup type identifier.
+     * 
+ * + * + * .google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue time_in_heart_rate_zone = 23; + * + */ + public Builder setTimeInHeartRateZone( + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue value) { + if (timeInHeartRateZoneBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + onChanged(); + } else { + timeInHeartRateZoneBuilder_.setMessage(value); + } + valueCase_ = 23; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `time-in-heart-rate-zone` data type, or when requested explicitly using
+     * the `time-in-heart-rate-zone` rollup type identifier.
+     * 
+ * + * + * .google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue time_in_heart_rate_zone = 23; + * + */ + public Builder setTimeInHeartRateZone( + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue.Builder + builderForValue) { + if (timeInHeartRateZoneBuilder_ == null) { + value_ = builderForValue.build(); + onChanged(); + } else { + timeInHeartRateZoneBuilder_.setMessage(builderForValue.build()); + } + valueCase_ = 23; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `time-in-heart-rate-zone` data type, or when requested explicitly using
+     * the `time-in-heart-rate-zone` rollup type identifier.
+     * 
+ * + * + * .google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue time_in_heart_rate_zone = 23; + * + */ + public Builder mergeTimeInHeartRateZone( + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue value) { + if (timeInHeartRateZoneBuilder_ == null) { + if (valueCase_ == 23 + && value_ + != com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .getDefaultInstance()) { + value_ = + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue.newBuilder( + (com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue) + value_) + .mergeFrom(value) + .buildPartial(); + } else { + value_ = value; + } + onChanged(); + } else { + if (valueCase_ == 23) { + timeInHeartRateZoneBuilder_.mergeFrom(value); + } else { + timeInHeartRateZoneBuilder_.setMessage(value); + } + } + valueCase_ = 23; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `time-in-heart-rate-zone` data type, or when requested explicitly using
+     * the `time-in-heart-rate-zone` rollup type identifier.
+     * 
+ * + * + * .google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue time_in_heart_rate_zone = 23; + * + */ + public Builder clearTimeInHeartRateZone() { + if (timeInHeartRateZoneBuilder_ == null) { + if (valueCase_ == 23) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + } else { + if (valueCase_ == 23) { + valueCase_ = 0; + value_ = null; + } + timeInHeartRateZoneBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `time-in-heart-rate-zone` data type, or when requested explicitly using
+     * the `time-in-heart-rate-zone` rollup type identifier.
+     * 
+ * + * + * .google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue time_in_heart_rate_zone = 23; + * + */ + public com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue.Builder + getTimeInHeartRateZoneBuilder() { + return internalGetTimeInHeartRateZoneFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `time-in-heart-rate-zone` data type, or when requested explicitly using
+     * the `time-in-heart-rate-zone` rollup type identifier.
+     * 
+ * + * + * .google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue time_in_heart_rate_zone = 23; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValueOrBuilder + getTimeInHeartRateZoneOrBuilder() { + if ((valueCase_ == 23) && (timeInHeartRateZoneBuilder_ != null)) { + return timeInHeartRateZoneBuilder_.getMessageOrBuilder(); + } else { + if (valueCase_ == 23) { + return (com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue) value_; + } + return com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `time-in-heart-rate-zone` data type, or when requested explicitly using
+     * the `time-in-heart-rate-zone` rollup type identifier.
+     * 
+ * + * + * .google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue time_in_heart_rate_zone = 23; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue, + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue.Builder, + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValueOrBuilder> + internalGetTimeInHeartRateZoneFieldBuilder() { + if (timeInHeartRateZoneBuilder_ == null) { + if (!(valueCase_ == 23)) { + value_ = + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .getDefaultInstance(); + } + timeInHeartRateZoneBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue, + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue.Builder, + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValueOrBuilder>( + (com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue) value_, + getParentForChildren(), + isClean()); + value_ = null; + } + valueCase_ = 23; + onChanged(); + return timeInHeartRateZoneBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ActiveMinutesRollupValue, + com.google.devicesandservices.health.v4.ActiveMinutesRollupValue.Builder, + com.google.devicesandservices.health.v4.ActiveMinutesRollupValueOrBuilder> + activeMinutesBuilder_; + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `active-minutes` data type, or when requested explicitly using the
+     * `active-minutes` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.ActiveMinutesRollupValue active_minutes = 24; + * + * + * @return Whether the activeMinutes field is set. + */ + @java.lang.Override + public boolean hasActiveMinutes() { + return valueCase_ == 24; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `active-minutes` data type, or when requested explicitly using the
+     * `active-minutes` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.ActiveMinutesRollupValue active_minutes = 24; + * + * + * @return The activeMinutes. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ActiveMinutesRollupValue getActiveMinutes() { + if (activeMinutesBuilder_ == null) { + if (valueCase_ == 24) { + return (com.google.devicesandservices.health.v4.ActiveMinutesRollupValue) value_; + } + return com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .getDefaultInstance(); + } else { + if (valueCase_ == 24) { + return activeMinutesBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `active-minutes` data type, or when requested explicitly using the
+     * `active-minutes` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.ActiveMinutesRollupValue active_minutes = 24; + * + */ + public Builder setActiveMinutes( + com.google.devicesandservices.health.v4.ActiveMinutesRollupValue value) { + if (activeMinutesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + onChanged(); + } else { + activeMinutesBuilder_.setMessage(value); + } + valueCase_ = 24; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `active-minutes` data type, or when requested explicitly using the
+     * `active-minutes` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.ActiveMinutesRollupValue active_minutes = 24; + * + */ + public Builder setActiveMinutes( + com.google.devicesandservices.health.v4.ActiveMinutesRollupValue.Builder builderForValue) { + if (activeMinutesBuilder_ == null) { + value_ = builderForValue.build(); + onChanged(); + } else { + activeMinutesBuilder_.setMessage(builderForValue.build()); + } + valueCase_ = 24; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `active-minutes` data type, or when requested explicitly using the
+     * `active-minutes` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.ActiveMinutesRollupValue active_minutes = 24; + * + */ + public Builder mergeActiveMinutes( + com.google.devicesandservices.health.v4.ActiveMinutesRollupValue value) { + if (activeMinutesBuilder_ == null) { + if (valueCase_ == 24 + && value_ + != com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .getDefaultInstance()) { + value_ = + com.google.devicesandservices.health.v4.ActiveMinutesRollupValue.newBuilder( + (com.google.devicesandservices.health.v4.ActiveMinutesRollupValue) value_) + .mergeFrom(value) + .buildPartial(); + } else { + value_ = value; + } + onChanged(); + } else { + if (valueCase_ == 24) { + activeMinutesBuilder_.mergeFrom(value); + } else { + activeMinutesBuilder_.setMessage(value); + } + } + valueCase_ = 24; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `active-minutes` data type, or when requested explicitly using the
+     * `active-minutes` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.ActiveMinutesRollupValue active_minutes = 24; + * + */ + public Builder clearActiveMinutes() { + if (activeMinutesBuilder_ == null) { + if (valueCase_ == 24) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + } else { + if (valueCase_ == 24) { + valueCase_ = 0; + value_ = null; + } + activeMinutesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `active-minutes` data type, or when requested explicitly using the
+     * `active-minutes` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.ActiveMinutesRollupValue active_minutes = 24; + * + */ + public com.google.devicesandservices.health.v4.ActiveMinutesRollupValue.Builder + getActiveMinutesBuilder() { + return internalGetActiveMinutesFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `active-minutes` data type, or when requested explicitly using the
+     * `active-minutes` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.ActiveMinutesRollupValue active_minutes = 24; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ActiveMinutesRollupValueOrBuilder + getActiveMinutesOrBuilder() { + if ((valueCase_ == 24) && (activeMinutesBuilder_ != null)) { + return activeMinutesBuilder_.getMessageOrBuilder(); + } else { + if (valueCase_ == 24) { + return (com.google.devicesandservices.health.v4.ActiveMinutesRollupValue) value_; + } + return com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `active-minutes` data type, or when requested explicitly using the
+     * `active-minutes` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.ActiveMinutesRollupValue active_minutes = 24; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ActiveMinutesRollupValue, + com.google.devicesandservices.health.v4.ActiveMinutesRollupValue.Builder, + com.google.devicesandservices.health.v4.ActiveMinutesRollupValueOrBuilder> + internalGetActiveMinutesFieldBuilder() { + if (activeMinutesBuilder_ == null) { + if (!(valueCase_ == 24)) { + value_ = + com.google.devicesandservices.health.v4.ActiveMinutesRollupValue.getDefaultInstance(); + } + activeMinutesBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ActiveMinutesRollupValue, + com.google.devicesandservices.health.v4.ActiveMinutesRollupValue.Builder, + com.google.devicesandservices.health.v4.ActiveMinutesRollupValueOrBuilder>( + (com.google.devicesandservices.health.v4.ActiveMinutesRollupValue) value_, + getParentForChildren(), + isClean()); + value_ = null; + } + valueCase_ = 24; + onChanged(); + return activeMinutesBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue, + com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue.Builder, + com.google.devicesandservices.health.v4.SwimLengthsDataRollupValueOrBuilder> + swimLengthsDataBuilder_; + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `swim-lengths-data` data type, or when requested explicitly using the
+     * `swim-lengths-data` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.SwimLengthsDataRollupValue swim_lengths_data = 25; + * + * + * @return Whether the swimLengthsData field is set. + */ + @java.lang.Override + public boolean hasSwimLengthsData() { + return valueCase_ == 25; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `swim-lengths-data` data type, or when requested explicitly using the
+     * `swim-lengths-data` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.SwimLengthsDataRollupValue swim_lengths_data = 25; + * + * + * @return The swimLengthsData. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue getSwimLengthsData() { + if (swimLengthsDataBuilder_ == null) { + if (valueCase_ == 25) { + return (com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue) value_; + } + return com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue + .getDefaultInstance(); + } else { + if (valueCase_ == 25) { + return swimLengthsDataBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `swim-lengths-data` data type, or when requested explicitly using the
+     * `swim-lengths-data` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.SwimLengthsDataRollupValue swim_lengths_data = 25; + * + */ + public Builder setSwimLengthsData( + com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue value) { + if (swimLengthsDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + onChanged(); + } else { + swimLengthsDataBuilder_.setMessage(value); + } + valueCase_ = 25; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `swim-lengths-data` data type, or when requested explicitly using the
+     * `swim-lengths-data` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.SwimLengthsDataRollupValue swim_lengths_data = 25; + * + */ + public Builder setSwimLengthsData( + com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue.Builder + builderForValue) { + if (swimLengthsDataBuilder_ == null) { + value_ = builderForValue.build(); + onChanged(); + } else { + swimLengthsDataBuilder_.setMessage(builderForValue.build()); + } + valueCase_ = 25; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `swim-lengths-data` data type, or when requested explicitly using the
+     * `swim-lengths-data` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.SwimLengthsDataRollupValue swim_lengths_data = 25; + * + */ + public Builder mergeSwimLengthsData( + com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue value) { + if (swimLengthsDataBuilder_ == null) { + if (valueCase_ == 25 + && value_ + != com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue + .getDefaultInstance()) { + value_ = + com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue.newBuilder( + (com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue) value_) + .mergeFrom(value) + .buildPartial(); + } else { + value_ = value; + } + onChanged(); + } else { + if (valueCase_ == 25) { + swimLengthsDataBuilder_.mergeFrom(value); + } else { + swimLengthsDataBuilder_.setMessage(value); + } + } + valueCase_ = 25; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `swim-lengths-data` data type, or when requested explicitly using the
+     * `swim-lengths-data` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.SwimLengthsDataRollupValue swim_lengths_data = 25; + * + */ + public Builder clearSwimLengthsData() { + if (swimLengthsDataBuilder_ == null) { + if (valueCase_ == 25) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + } else { + if (valueCase_ == 25) { + valueCase_ = 0; + value_ = null; + } + swimLengthsDataBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `swim-lengths-data` data type, or when requested explicitly using the
+     * `swim-lengths-data` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.SwimLengthsDataRollupValue swim_lengths_data = 25; + * + */ + public com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue.Builder + getSwimLengthsDataBuilder() { + return internalGetSwimLengthsDataFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `swim-lengths-data` data type, or when requested explicitly using the
+     * `swim-lengths-data` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.SwimLengthsDataRollupValue swim_lengths_data = 25; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.SwimLengthsDataRollupValueOrBuilder + getSwimLengthsDataOrBuilder() { + if ((valueCase_ == 25) && (swimLengthsDataBuilder_ != null)) { + return swimLengthsDataBuilder_.getMessageOrBuilder(); + } else { + if (valueCase_ == 25) { + return (com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue) value_; + } + return com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `swim-lengths-data` data type, or when requested explicitly using the
+     * `swim-lengths-data` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.SwimLengthsDataRollupValue swim_lengths_data = 25; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue, + com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue.Builder, + com.google.devicesandservices.health.v4.SwimLengthsDataRollupValueOrBuilder> + internalGetSwimLengthsDataFieldBuilder() { + if (swimLengthsDataBuilder_ == null) { + if (!(valueCase_ == 25)) { + value_ = + com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue + .getDefaultInstance(); + } + swimLengthsDataBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue, + com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue.Builder, + com.google.devicesandservices.health.v4.SwimLengthsDataRollupValueOrBuilder>( + (com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue) value_, + getParentForChildren(), + isClean()); + value_ = null; + } + valueCase_ = 25; + onChanged(); + return swimLengthsDataBuilder_; + } + + private com.google.devicesandservices.health.v4.CivilDateTime civilStartTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.CivilDateTime, + com.google.devicesandservices.health.v4.CivilDateTime.Builder, + com.google.devicesandservices.health.v4.CivilDateTimeOrBuilder> + civilStartTimeBuilder_; + + /** + * + * + *
+     * Start time of the window this value aggregates over
+     * 
+ * + * .google.devicesandservices.health.v4.CivilDateTime civil_start_time = 1; + * + * @return Whether the civilStartTime field is set. + */ + public boolean hasCivilStartTime() { + return ((bitField0_ & 0x00080000) != 0); + } + + /** + * + * + *
+     * Start time of the window this value aggregates over
+     * 
+ * + * .google.devicesandservices.health.v4.CivilDateTime civil_start_time = 1; + * + * @return The civilStartTime. + */ + public com.google.devicesandservices.health.v4.CivilDateTime getCivilStartTime() { + if (civilStartTimeBuilder_ == null) { + return civilStartTime_ == null + ? com.google.devicesandservices.health.v4.CivilDateTime.getDefaultInstance() + : civilStartTime_; + } else { + return civilStartTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Start time of the window this value aggregates over
+     * 
+ * + * .google.devicesandservices.health.v4.CivilDateTime civil_start_time = 1; + */ + public Builder setCivilStartTime(com.google.devicesandservices.health.v4.CivilDateTime value) { + if (civilStartTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + civilStartTime_ = value; + } else { + civilStartTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00080000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Start time of the window this value aggregates over
+     * 
+ * + * .google.devicesandservices.health.v4.CivilDateTime civil_start_time = 1; + */ + public Builder setCivilStartTime( + com.google.devicesandservices.health.v4.CivilDateTime.Builder builderForValue) { + if (civilStartTimeBuilder_ == null) { + civilStartTime_ = builderForValue.build(); + } else { + civilStartTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00080000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Start time of the window this value aggregates over
+     * 
+ * + * .google.devicesandservices.health.v4.CivilDateTime civil_start_time = 1; + */ + public Builder mergeCivilStartTime( + com.google.devicesandservices.health.v4.CivilDateTime value) { + if (civilStartTimeBuilder_ == null) { + if (((bitField0_ & 0x00080000) != 0) + && civilStartTime_ != null + && civilStartTime_ + != com.google.devicesandservices.health.v4.CivilDateTime.getDefaultInstance()) { + getCivilStartTimeBuilder().mergeFrom(value); + } else { + civilStartTime_ = value; + } + } else { + civilStartTimeBuilder_.mergeFrom(value); + } + if (civilStartTime_ != null) { + bitField0_ |= 0x00080000; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Start time of the window this value aggregates over
+     * 
+ * + * .google.devicesandservices.health.v4.CivilDateTime civil_start_time = 1; + */ + public Builder clearCivilStartTime() { + bitField0_ = (bitField0_ & ~0x00080000); + civilStartTime_ = null; + if (civilStartTimeBuilder_ != null) { + civilStartTimeBuilder_.dispose(); + civilStartTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Start time of the window this value aggregates over
+     * 
+ * + * .google.devicesandservices.health.v4.CivilDateTime civil_start_time = 1; + */ + public com.google.devicesandservices.health.v4.CivilDateTime.Builder + getCivilStartTimeBuilder() { + bitField0_ |= 0x00080000; + onChanged(); + return internalGetCivilStartTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Start time of the window this value aggregates over
+     * 
+ * + * .google.devicesandservices.health.v4.CivilDateTime civil_start_time = 1; + */ + public com.google.devicesandservices.health.v4.CivilDateTimeOrBuilder + getCivilStartTimeOrBuilder() { + if (civilStartTimeBuilder_ != null) { + return civilStartTimeBuilder_.getMessageOrBuilder(); + } else { + return civilStartTime_ == null + ? com.google.devicesandservices.health.v4.CivilDateTime.getDefaultInstance() + : civilStartTime_; + } + } + + /** + * + * + *
+     * Start time of the window this value aggregates over
+     * 
+ * + * .google.devicesandservices.health.v4.CivilDateTime civil_start_time = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.CivilDateTime, + com.google.devicesandservices.health.v4.CivilDateTime.Builder, + com.google.devicesandservices.health.v4.CivilDateTimeOrBuilder> + internalGetCivilStartTimeFieldBuilder() { + if (civilStartTimeBuilder_ == null) { + civilStartTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.CivilDateTime, + com.google.devicesandservices.health.v4.CivilDateTime.Builder, + com.google.devicesandservices.health.v4.CivilDateTimeOrBuilder>( + getCivilStartTime(), getParentForChildren(), isClean()); + civilStartTime_ = null; + } + return civilStartTimeBuilder_; + } + + private com.google.devicesandservices.health.v4.CivilDateTime civilEndTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.CivilDateTime, + com.google.devicesandservices.health.v4.CivilDateTime.Builder, + com.google.devicesandservices.health.v4.CivilDateTimeOrBuilder> + civilEndTimeBuilder_; + + /** + * + * + *
+     * End time of the window this value aggregates over
+     * 
+ * + * .google.devicesandservices.health.v4.CivilDateTime civil_end_time = 2; + * + * @return Whether the civilEndTime field is set. + */ + public boolean hasCivilEndTime() { + return ((bitField0_ & 0x00100000) != 0); + } + + /** + * + * + *
+     * End time of the window this value aggregates over
+     * 
+ * + * .google.devicesandservices.health.v4.CivilDateTime civil_end_time = 2; + * + * @return The civilEndTime. + */ + public com.google.devicesandservices.health.v4.CivilDateTime getCivilEndTime() { + if (civilEndTimeBuilder_ == null) { + return civilEndTime_ == null + ? com.google.devicesandservices.health.v4.CivilDateTime.getDefaultInstance() + : civilEndTime_; + } else { + return civilEndTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * End time of the window this value aggregates over
+     * 
+ * + * .google.devicesandservices.health.v4.CivilDateTime civil_end_time = 2; + */ + public Builder setCivilEndTime(com.google.devicesandservices.health.v4.CivilDateTime value) { + if (civilEndTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + civilEndTime_ = value; + } else { + civilEndTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00100000; + onChanged(); + return this; + } + + /** + * + * + *
+     * End time of the window this value aggregates over
+     * 
+ * + * .google.devicesandservices.health.v4.CivilDateTime civil_end_time = 2; + */ + public Builder setCivilEndTime( + com.google.devicesandservices.health.v4.CivilDateTime.Builder builderForValue) { + if (civilEndTimeBuilder_ == null) { + civilEndTime_ = builderForValue.build(); + } else { + civilEndTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00100000; + onChanged(); + return this; + } + + /** + * + * + *
+     * End time of the window this value aggregates over
+     * 
+ * + * .google.devicesandservices.health.v4.CivilDateTime civil_end_time = 2; + */ + public Builder mergeCivilEndTime(com.google.devicesandservices.health.v4.CivilDateTime value) { + if (civilEndTimeBuilder_ == null) { + if (((bitField0_ & 0x00100000) != 0) + && civilEndTime_ != null + && civilEndTime_ + != com.google.devicesandservices.health.v4.CivilDateTime.getDefaultInstance()) { + getCivilEndTimeBuilder().mergeFrom(value); + } else { + civilEndTime_ = value; + } + } else { + civilEndTimeBuilder_.mergeFrom(value); + } + if (civilEndTime_ != null) { + bitField0_ |= 0x00100000; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * End time of the window this value aggregates over
+     * 
+ * + * .google.devicesandservices.health.v4.CivilDateTime civil_end_time = 2; + */ + public Builder clearCivilEndTime() { + bitField0_ = (bitField0_ & ~0x00100000); + civilEndTime_ = null; + if (civilEndTimeBuilder_ != null) { + civilEndTimeBuilder_.dispose(); + civilEndTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * End time of the window this value aggregates over
+     * 
+ * + * .google.devicesandservices.health.v4.CivilDateTime civil_end_time = 2; + */ + public com.google.devicesandservices.health.v4.CivilDateTime.Builder getCivilEndTimeBuilder() { + bitField0_ |= 0x00100000; + onChanged(); + return internalGetCivilEndTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * End time of the window this value aggregates over
+     * 
+ * + * .google.devicesandservices.health.v4.CivilDateTime civil_end_time = 2; + */ + public com.google.devicesandservices.health.v4.CivilDateTimeOrBuilder + getCivilEndTimeOrBuilder() { + if (civilEndTimeBuilder_ != null) { + return civilEndTimeBuilder_.getMessageOrBuilder(); + } else { + return civilEndTime_ == null + ? com.google.devicesandservices.health.v4.CivilDateTime.getDefaultInstance() + : civilEndTime_; + } + } + + /** + * + * + *
+     * End time of the window this value aggregates over
+     * 
+ * + * .google.devicesandservices.health.v4.CivilDateTime civil_end_time = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.CivilDateTime, + com.google.devicesandservices.health.v4.CivilDateTime.Builder, + com.google.devicesandservices.health.v4.CivilDateTimeOrBuilder> + internalGetCivilEndTimeFieldBuilder() { + if (civilEndTimeBuilder_ == null) { + civilEndTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.CivilDateTime, + com.google.devicesandservices.health.v4.CivilDateTime.Builder, + com.google.devicesandservices.health.v4.CivilDateTimeOrBuilder>( + getCivilEndTime(), getParentForChildren(), isClean()); + civilEndTime_ = null; + } + return civilEndTimeBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.DailyRollupDataPoint) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.DailyRollupDataPoint) + private static final com.google.devicesandservices.health.v4.DailyRollupDataPoint + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.DailyRollupDataPoint(); + } + + public static com.google.devicesandservices.health.v4.DailyRollupDataPoint getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DailyRollupDataPoint parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyRollupDataPoint getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DailyRollupDataPointOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DailyRollupDataPointOrBuilder.java new file mode 100644 index 000000000000..57d252f2d13a --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DailyRollupDataPointOrBuilder.java @@ -0,0 +1,977 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_points.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface DailyRollupDataPointOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.DailyRollupDataPoint) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Returned by default when rolling up data points from the `steps` data
+   * type, or when requested explicitly using the `steps` rollup type
+   * identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.StepsRollupValue steps = 5; + * + * @return Whether the steps field is set. + */ + boolean hasSteps(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the `steps` data
+   * type, or when requested explicitly using the `steps` rollup type
+   * identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.StepsRollupValue steps = 5; + * + * @return The steps. + */ + com.google.devicesandservices.health.v4.StepsRollupValue getSteps(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the `steps` data
+   * type, or when requested explicitly using the `steps` rollup type
+   * identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.StepsRollupValue steps = 5; + */ + com.google.devicesandservices.health.v4.StepsRollupValueOrBuilder getStepsOrBuilder(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the `floors` data
+   * type, or when requested explicitly using the `floors` rollup type
+   * identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.FloorsRollupValue floors = 6; + * + * @return Whether the floors field is set. + */ + boolean hasFloors(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the `floors` data
+   * type, or when requested explicitly using the `floors` rollup type
+   * identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.FloorsRollupValue floors = 6; + * + * @return The floors. + */ + com.google.devicesandservices.health.v4.FloorsRollupValue getFloors(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the `floors` data
+   * type, or when requested explicitly using the `floors` rollup type
+   * identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.FloorsRollupValue floors = 6; + */ + com.google.devicesandservices.health.v4.FloorsRollupValueOrBuilder getFloorsOrBuilder(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the `heart-rate`
+   * data type, or when requested explicitly using the `heart-rate` rollup
+   * type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.HeartRateRollupValue heart_rate = 7; + * + * @return Whether the heartRate field is set. + */ + boolean hasHeartRate(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the `heart-rate`
+   * data type, or when requested explicitly using the `heart-rate` rollup
+   * type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.HeartRateRollupValue heart_rate = 7; + * + * @return The heartRate. + */ + com.google.devicesandservices.health.v4.HeartRateRollupValue getHeartRate(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the `heart-rate`
+   * data type, or when requested explicitly using the `heart-rate` rollup
+   * type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.HeartRateRollupValue heart_rate = 7; + */ + com.google.devicesandservices.health.v4.HeartRateRollupValueOrBuilder getHeartRateOrBuilder(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `daily-resting-heart-rate` data type, or when requested
+   * explicitly using the `resting-heart-rate-personal-range` rollup type
+   * identifier.
+   * 
+ * + * + * .google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue resting_heart_rate_personal_range = 8; + * + * + * @return Whether the restingHeartRatePersonalRange field is set. + */ + boolean hasRestingHeartRatePersonalRange(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `daily-resting-heart-rate` data type, or when requested
+   * explicitly using the `resting-heart-rate-personal-range` rollup type
+   * identifier.
+   * 
+ * + * + * .google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue resting_heart_rate_personal_range = 8; + * + * + * @return The restingHeartRatePersonalRange. + */ + com.google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue + getRestingHeartRatePersonalRange(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `daily-resting-heart-rate` data type, or when requested
+   * explicitly using the `resting-heart-rate-personal-range` rollup type
+   * identifier.
+   * 
+ * + * + * .google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue resting_heart_rate_personal_range = 8; + * + */ + com.google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValueOrBuilder + getRestingHeartRatePersonalRangeOrBuilder(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `daily-heart-rate-variability` data type, or when requested explicitly
+   * using the `heart-rate-variability-personal-range` rollup type
+   * identifier.
+   * 
+ * + * + * .google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue heart_rate_variability_personal_range = 9; + * + * + * @return Whether the heartRateVariabilityPersonalRange field is set. + */ + boolean hasHeartRateVariabilityPersonalRange(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `daily-heart-rate-variability` data type, or when requested explicitly
+   * using the `heart-rate-variability-personal-range` rollup type
+   * identifier.
+   * 
+ * + * + * .google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue heart_rate_variability_personal_range = 9; + * + * + * @return The heartRateVariabilityPersonalRange. + */ + com.google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue + getHeartRateVariabilityPersonalRange(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `daily-heart-rate-variability` data type, or when requested explicitly
+   * using the `heart-rate-variability-personal-range` rollup type
+   * identifier.
+   * 
+ * + * + * .google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue heart_rate_variability_personal_range = 9; + * + */ + com.google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValueOrBuilder + getHeartRateVariabilityPersonalRangeOrBuilder(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the `weight` data
+   * type, or when requested explicitly using the `weight` rollup type
+   * identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.WeightRollupValue weight = 10; + * + * @return Whether the weight field is set. + */ + boolean hasWeight(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the `weight` data
+   * type, or when requested explicitly using the `weight` rollup type
+   * identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.WeightRollupValue weight = 10; + * + * @return The weight. + */ + com.google.devicesandservices.health.v4.WeightRollupValue getWeight(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the `weight` data
+   * type, or when requested explicitly using the `weight` rollup type
+   * identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.WeightRollupValue weight = 10; + */ + com.google.devicesandservices.health.v4.WeightRollupValueOrBuilder getWeightOrBuilder(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the `altitude` data
+   * type, or when requested explicitly using the `altitude` rollup type
+   * identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.AltitudeRollupValue altitude = 11; + * + * @return Whether the altitude field is set. + */ + boolean hasAltitude(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the `altitude` data
+   * type, or when requested explicitly using the `altitude` rollup type
+   * identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.AltitudeRollupValue altitude = 11; + * + * @return The altitude. + */ + com.google.devicesandservices.health.v4.AltitudeRollupValue getAltitude(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the `altitude` data
+   * type, or when requested explicitly using the `altitude` rollup type
+   * identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.AltitudeRollupValue altitude = 11; + */ + com.google.devicesandservices.health.v4.AltitudeRollupValueOrBuilder getAltitudeOrBuilder(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the `distance` data
+   * type, or when requested explicitly using the `distance` rollup type
+   * identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.DistanceRollupValue distance = 12; + * + * @return Whether the distance field is set. + */ + boolean hasDistance(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the `distance` data
+   * type, or when requested explicitly using the `distance` rollup type
+   * identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.DistanceRollupValue distance = 12; + * + * @return The distance. + */ + com.google.devicesandservices.health.v4.DistanceRollupValue getDistance(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the `distance` data
+   * type, or when requested explicitly using the `distance` rollup type
+   * identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.DistanceRollupValue distance = 12; + */ + com.google.devicesandservices.health.v4.DistanceRollupValueOrBuilder getDistanceOrBuilder(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the `body-fat` data
+   * type, or when requested explicitly using the `body-fat` rollup type
+   * identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.BodyFatRollupValue body_fat = 13; + * + * @return Whether the bodyFat field is set. + */ + boolean hasBodyFat(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the `body-fat` data
+   * type, or when requested explicitly using the `body-fat` rollup type
+   * identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.BodyFatRollupValue body_fat = 13; + * + * @return The bodyFat. + */ + com.google.devicesandservices.health.v4.BodyFatRollupValue getBodyFat(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the `body-fat` data
+   * type, or when requested explicitly using the `body-fat` rollup type
+   * identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.BodyFatRollupValue body_fat = 13; + */ + com.google.devicesandservices.health.v4.BodyFatRollupValueOrBuilder getBodyFatOrBuilder(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the `total-calories`
+   * data type, or when requested explicitly using the `total-calories`
+   * rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.TotalCaloriesRollupValue total_calories = 14; + * + * @return Whether the totalCalories field is set. + */ + boolean hasTotalCalories(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the `total-calories`
+   * data type, or when requested explicitly using the `total-calories`
+   * rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.TotalCaloriesRollupValue total_calories = 14; + * + * @return The totalCalories. + */ + com.google.devicesandservices.health.v4.TotalCaloriesRollupValue getTotalCalories(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the `total-calories`
+   * data type, or when requested explicitly using the `total-calories`
+   * rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.TotalCaloriesRollupValue total_calories = 14; + */ + com.google.devicesandservices.health.v4.TotalCaloriesRollupValueOrBuilder + getTotalCaloriesOrBuilder(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `active-zone-minutes` data type, or when requested explicitly using the
+   * `active-zone-minutes` rollup type identifier.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue active_zone_minutes = 15; + * + * + * @return Whether the activeZoneMinutes field is set. + */ + boolean hasActiveZoneMinutes(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `active-zone-minutes` data type, or when requested explicitly using the
+   * `active-zone-minutes` rollup type identifier.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue active_zone_minutes = 15; + * + * + * @return The activeZoneMinutes. + */ + com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue getActiveZoneMinutes(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `active-zone-minutes` data type, or when requested explicitly using the
+   * `active-zone-minutes` rollup type identifier.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue active_zone_minutes = 15; + * + */ + com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValueOrBuilder + getActiveZoneMinutesOrBuilder(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `sedentary-period` data type, or when requested explicitly using the
+   * `sedentary-period` rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.SedentaryPeriodRollupValue sedentary_period = 17; + * + * + * @return Whether the sedentaryPeriod field is set. + */ + boolean hasSedentaryPeriod(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `sedentary-period` data type, or when requested explicitly using the
+   * `sedentary-period` rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.SedentaryPeriodRollupValue sedentary_period = 17; + * + * + * @return The sedentaryPeriod. + */ + com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue getSedentaryPeriod(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `sedentary-period` data type, or when requested explicitly using the
+   * `sedentary-period` rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.SedentaryPeriodRollupValue sedentary_period = 17; + * + */ + com.google.devicesandservices.health.v4.SedentaryPeriodRollupValueOrBuilder + getSedentaryPeriodOrBuilder(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `run-vo2-max` data type, or when requested explicitly using the
+   * `run-vo2-max` rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.RunVO2MaxRollupValue run_vo2_max = 18; + * + * @return Whether the runVo2Max field is set. + */ + boolean hasRunVo2Max(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `run-vo2-max` data type, or when requested explicitly using the
+   * `run-vo2-max` rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.RunVO2MaxRollupValue run_vo2_max = 18; + * + * @return The runVo2Max. + */ + com.google.devicesandservices.health.v4.RunVO2MaxRollupValue getRunVo2Max(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `run-vo2-max` data type, or when requested explicitly using the
+   * `run-vo2-max` rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.RunVO2MaxRollupValue run_vo2_max = 18; + */ + com.google.devicesandservices.health.v4.RunVO2MaxRollupValueOrBuilder getRunVo2MaxOrBuilder(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `calories-in-heart-rate-zone` data type, or when requested explicitly
+   * using the `calories-in-heart-rate-zone` rollup type identifier.
+   * 
+ * + * + * .google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue calories_in_heart_rate_zone = 19; + * + * + * @return Whether the caloriesInHeartRateZone field is set. + */ + boolean hasCaloriesInHeartRateZone(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `calories-in-heart-rate-zone` data type, or when requested explicitly
+   * using the `calories-in-heart-rate-zone` rollup type identifier.
+   * 
+ * + * + * .google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue calories_in_heart_rate_zone = 19; + * + * + * @return The caloriesInHeartRateZone. + */ + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + getCaloriesInHeartRateZone(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `calories-in-heart-rate-zone` data type, or when requested explicitly
+   * using the `calories-in-heart-rate-zone` rollup type identifier.
+   * 
+ * + * + * .google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue calories_in_heart_rate_zone = 19; + * + */ + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValueOrBuilder + getCaloriesInHeartRateZoneOrBuilder(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `activity-level` data type, or when requested explicitly using the
+   * `activity-level` rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.ActivityLevelRollupValue activity_level = 20; + * + * @return Whether the activityLevel field is set. + */ + boolean hasActivityLevel(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `activity-level` data type, or when requested explicitly using the
+   * `activity-level` rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.ActivityLevelRollupValue activity_level = 20; + * + * @return The activityLevel. + */ + com.google.devicesandservices.health.v4.ActivityLevelRollupValue getActivityLevel(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `activity-level` data type, or when requested explicitly using the
+   * `activity-level` rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.ActivityLevelRollupValue activity_level = 20; + */ + com.google.devicesandservices.health.v4.ActivityLevelRollupValueOrBuilder + getActivityLevelOrBuilder(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `hydration-log` data type, or when requested explicitly using the
+   * `hydration-log` rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.HydrationLogRollupValue hydration_log = 22; + * + * @return Whether the hydrationLog field is set. + */ + boolean hasHydrationLog(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `hydration-log` data type, or when requested explicitly using the
+   * `hydration-log` rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.HydrationLogRollupValue hydration_log = 22; + * + * @return The hydrationLog. + */ + com.google.devicesandservices.health.v4.HydrationLogRollupValue getHydrationLog(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `hydration-log` data type, or when requested explicitly using the
+   * `hydration-log` rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.HydrationLogRollupValue hydration_log = 22; + */ + com.google.devicesandservices.health.v4.HydrationLogRollupValueOrBuilder + getHydrationLogOrBuilder(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `time-in-heart-rate-zone` data type, or when requested explicitly using
+   * the `time-in-heart-rate-zone` rollup type identifier.
+   * 
+ * + * + * .google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue time_in_heart_rate_zone = 23; + * + * + * @return Whether the timeInHeartRateZone field is set. + */ + boolean hasTimeInHeartRateZone(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `time-in-heart-rate-zone` data type, or when requested explicitly using
+   * the `time-in-heart-rate-zone` rollup type identifier.
+   * 
+ * + * + * .google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue time_in_heart_rate_zone = 23; + * + * + * @return The timeInHeartRateZone. + */ + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue getTimeInHeartRateZone(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `time-in-heart-rate-zone` data type, or when requested explicitly using
+   * the `time-in-heart-rate-zone` rollup type identifier.
+   * 
+ * + * + * .google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue time_in_heart_rate_zone = 23; + * + */ + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValueOrBuilder + getTimeInHeartRateZoneOrBuilder(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `active-minutes` data type, or when requested explicitly using the
+   * `active-minutes` rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.ActiveMinutesRollupValue active_minutes = 24; + * + * @return Whether the activeMinutes field is set. + */ + boolean hasActiveMinutes(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `active-minutes` data type, or when requested explicitly using the
+   * `active-minutes` rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.ActiveMinutesRollupValue active_minutes = 24; + * + * @return The activeMinutes. + */ + com.google.devicesandservices.health.v4.ActiveMinutesRollupValue getActiveMinutes(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `active-minutes` data type, or when requested explicitly using the
+   * `active-minutes` rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.ActiveMinutesRollupValue active_minutes = 24; + */ + com.google.devicesandservices.health.v4.ActiveMinutesRollupValueOrBuilder + getActiveMinutesOrBuilder(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `swim-lengths-data` data type, or when requested explicitly using the
+   * `swim-lengths-data` rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.SwimLengthsDataRollupValue swim_lengths_data = 25; + * + * + * @return Whether the swimLengthsData field is set. + */ + boolean hasSwimLengthsData(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `swim-lengths-data` data type, or when requested explicitly using the
+   * `swim-lengths-data` rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.SwimLengthsDataRollupValue swim_lengths_data = 25; + * + * + * @return The swimLengthsData. + */ + com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue getSwimLengthsData(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `swim-lengths-data` data type, or when requested explicitly using the
+   * `swim-lengths-data` rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.SwimLengthsDataRollupValue swim_lengths_data = 25; + * + */ + com.google.devicesandservices.health.v4.SwimLengthsDataRollupValueOrBuilder + getSwimLengthsDataOrBuilder(); + + /** + * + * + *
+   * Start time of the window this value aggregates over
+   * 
+ * + * .google.devicesandservices.health.v4.CivilDateTime civil_start_time = 1; + * + * @return Whether the civilStartTime field is set. + */ + boolean hasCivilStartTime(); + + /** + * + * + *
+   * Start time of the window this value aggregates over
+   * 
+ * + * .google.devicesandservices.health.v4.CivilDateTime civil_start_time = 1; + * + * @return The civilStartTime. + */ + com.google.devicesandservices.health.v4.CivilDateTime getCivilStartTime(); + + /** + * + * + *
+   * Start time of the window this value aggregates over
+   * 
+ * + * .google.devicesandservices.health.v4.CivilDateTime civil_start_time = 1; + */ + com.google.devicesandservices.health.v4.CivilDateTimeOrBuilder getCivilStartTimeOrBuilder(); + + /** + * + * + *
+   * End time of the window this value aggregates over
+   * 
+ * + * .google.devicesandservices.health.v4.CivilDateTime civil_end_time = 2; + * + * @return Whether the civilEndTime field is set. + */ + boolean hasCivilEndTime(); + + /** + * + * + *
+   * End time of the window this value aggregates over
+   * 
+ * + * .google.devicesandservices.health.v4.CivilDateTime civil_end_time = 2; + * + * @return The civilEndTime. + */ + com.google.devicesandservices.health.v4.CivilDateTime getCivilEndTime(); + + /** + * + * + *
+   * End time of the window this value aggregates over
+   * 
+ * + * .google.devicesandservices.health.v4.CivilDateTime civil_end_time = 2; + */ + com.google.devicesandservices.health.v4.CivilDateTimeOrBuilder getCivilEndTimeOrBuilder(); + + com.google.devicesandservices.health.v4.DailyRollupDataPoint.ValueCase getValueCase(); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DailySleepTemperatureDerivations.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DailySleepTemperatureDerivations.java new file mode 100644 index 000000000000..77edae28f193 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DailySleepTemperatureDerivations.java @@ -0,0 +1,1036 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * Provides derived sleep temperature values, calculated from skin or internal
+ * device temperature readings during sleep.
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.DailySleepTemperatureDerivations} + */ +@com.google.protobuf.Generated +public final class DailySleepTemperatureDerivations extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.DailySleepTemperatureDerivations) + DailySleepTemperatureDerivationsOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DailySleepTemperatureDerivations"); + } + + // Use DailySleepTemperatureDerivations.newBuilder() to construct. + private DailySleepTemperatureDerivations( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DailySleepTemperatureDerivations() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_DailySleepTemperatureDerivations_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_DailySleepTemperatureDerivations_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations.class, + com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations.Builder.class); + } + + private int bitField0_; + public static final int DATE_FIELD_NUMBER = 1; + private com.google.type.Date date_; + + /** + * + * + *
+   * Required. Date for which the sleep temperature derivations are calculated.
+   * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the date field is set. + */ + @java.lang.Override + public boolean hasDate() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. Date for which the sleep temperature derivations are calculated.
+   * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The date. + */ + @java.lang.Override + public com.google.type.Date getDate() { + return date_ == null ? com.google.type.Date.getDefaultInstance() : date_; + } + + /** + * + * + *
+   * Required. Date for which the sleep temperature derivations are calculated.
+   * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.type.DateOrBuilder getDateOrBuilder() { + return date_ == null ? com.google.type.Date.getDefaultInstance() : date_; + } + + public static final int NIGHTLY_TEMPERATURE_CELSIUS_FIELD_NUMBER = 2; + private double nightlyTemperatureCelsius_ = 0D; + + /** + * + * + *
+   * Required. The user's nightly skin temperature. It is the mean of skin
+   * temperature samples taken from the user’s sleep.
+   * 
+ * + * double nightly_temperature_celsius = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The nightlyTemperatureCelsius. + */ + @java.lang.Override + public double getNightlyTemperatureCelsius() { + return nightlyTemperatureCelsius_; + } + + public static final int BASELINE_TEMPERATURE_CELSIUS_FIELD_NUMBER = 3; + private double baselineTemperatureCelsius_ = 0D; + + /** + * + * + *
+   * Optional. The user's baseline skin temperature. It is the median of the
+   * user's nightly skin temperature over the past 30 days.
+   * 
+ * + * double baseline_temperature_celsius = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The baselineTemperatureCelsius. + */ + @java.lang.Override + public double getBaselineTemperatureCelsius() { + return baselineTemperatureCelsius_; + } + + public static final int RELATIVE_NIGHTLY_STDDEV_30D_CELSIUS_FIELD_NUMBER = 4; + private double relativeNightlyStddev30DCelsius_ = 0D; + + /** + * + * + *
+   * Optional. The standard deviation of the user’s relative nightly skin
+   * temperature (temperature - baseline) over the past 30 days.
+   * 
+ * + * double relative_nightly_stddev_30d_celsius = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The relativeNightlyStddev30dCelsius. + */ + @java.lang.Override + public double getRelativeNightlyStddev30DCelsius() { + return relativeNightlyStddev30DCelsius_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getDate()); + } + if (java.lang.Double.doubleToRawLongBits(nightlyTemperatureCelsius_) != 0) { + output.writeDouble(2, nightlyTemperatureCelsius_); + } + if (java.lang.Double.doubleToRawLongBits(baselineTemperatureCelsius_) != 0) { + output.writeDouble(3, baselineTemperatureCelsius_); + } + if (java.lang.Double.doubleToRawLongBits(relativeNightlyStddev30DCelsius_) != 0) { + output.writeDouble(4, relativeNightlyStddev30DCelsius_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getDate()); + } + if (java.lang.Double.doubleToRawLongBits(nightlyTemperatureCelsius_) != 0) { + size += + com.google.protobuf.CodedOutputStream.computeDoubleSize(2, nightlyTemperatureCelsius_); + } + if (java.lang.Double.doubleToRawLongBits(baselineTemperatureCelsius_) != 0) { + size += + com.google.protobuf.CodedOutputStream.computeDoubleSize(3, baselineTemperatureCelsius_); + } + if (java.lang.Double.doubleToRawLongBits(relativeNightlyStddev30DCelsius_) != 0) { + size += + com.google.protobuf.CodedOutputStream.computeDoubleSize( + 4, relativeNightlyStddev30DCelsius_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations other = + (com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations) obj; + + if (hasDate() != other.hasDate()) return false; + if (hasDate()) { + if (!getDate().equals(other.getDate())) return false; + } + if (java.lang.Double.doubleToLongBits(getNightlyTemperatureCelsius()) + != java.lang.Double.doubleToLongBits(other.getNightlyTemperatureCelsius())) return false; + if (java.lang.Double.doubleToLongBits(getBaselineTemperatureCelsius()) + != java.lang.Double.doubleToLongBits(other.getBaselineTemperatureCelsius())) return false; + if (java.lang.Double.doubleToLongBits(getRelativeNightlyStddev30DCelsius()) + != java.lang.Double.doubleToLongBits(other.getRelativeNightlyStddev30DCelsius())) + return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasDate()) { + hash = (37 * hash) + DATE_FIELD_NUMBER; + hash = (53 * hash) + getDate().hashCode(); + } + hash = (37 * hash) + NIGHTLY_TEMPERATURE_CELSIUS_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getNightlyTemperatureCelsius())); + hash = (37 * hash) + BASELINE_TEMPERATURE_CELSIUS_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getBaselineTemperatureCelsius())); + hash = (37 * hash) + RELATIVE_NIGHTLY_STDDEV_30D_CELSIUS_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getRelativeNightlyStddev30DCelsius())); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Provides derived sleep temperature values, calculated from skin or internal
+   * device temperature readings during sleep.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.DailySleepTemperatureDerivations} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.DailySleepTemperatureDerivations) + com.google.devicesandservices.health.v4.DailySleepTemperatureDerivationsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_DailySleepTemperatureDerivations_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_DailySleepTemperatureDerivations_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations.class, + com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations.Builder + .class); + } + + // Construct using + // com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetDateFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + date_ = null; + if (dateBuilder_ != null) { + dateBuilder_.dispose(); + dateBuilder_ = null; + } + nightlyTemperatureCelsius_ = 0D; + baselineTemperatureCelsius_ = 0D; + relativeNightlyStddev30DCelsius_ = 0D; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_DailySleepTemperatureDerivations_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations + getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations build() { + com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations buildPartial() { + com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations result = + new com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.date_ = dateBuilder_ == null ? date_ : dateBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nightlyTemperatureCelsius_ = nightlyTemperatureCelsius_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.baselineTemperatureCelsius_ = baselineTemperatureCelsius_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.relativeNightlyStddev30DCelsius_ = relativeNightlyStddev30DCelsius_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations) { + return mergeFrom( + (com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations other) { + if (other + == com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations + .getDefaultInstance()) return this; + if (other.hasDate()) { + mergeDate(other.getDate()); + } + if (java.lang.Double.doubleToRawLongBits(other.getNightlyTemperatureCelsius()) != 0) { + setNightlyTemperatureCelsius(other.getNightlyTemperatureCelsius()); + } + if (java.lang.Double.doubleToRawLongBits(other.getBaselineTemperatureCelsius()) != 0) { + setBaselineTemperatureCelsius(other.getBaselineTemperatureCelsius()); + } + if (java.lang.Double.doubleToRawLongBits(other.getRelativeNightlyStddev30DCelsius()) != 0) { + setRelativeNightlyStddev30DCelsius(other.getRelativeNightlyStddev30DCelsius()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(internalGetDateFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 17: + { + nightlyTemperatureCelsius_ = input.readDouble(); + bitField0_ |= 0x00000002; + break; + } // case 17 + case 25: + { + baselineTemperatureCelsius_ = input.readDouble(); + bitField0_ |= 0x00000004; + break; + } // case 25 + case 33: + { + relativeNightlyStddev30DCelsius_ = input.readDouble(); + bitField0_ |= 0x00000008; + break; + } // case 33 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.type.Date date_; + private com.google.protobuf.SingleFieldBuilder< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> + dateBuilder_; + + /** + * + * + *
+     * Required. Date for which the sleep temperature derivations are calculated.
+     * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the date field is set. + */ + public boolean hasDate() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. Date for which the sleep temperature derivations are calculated.
+     * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The date. + */ + public com.google.type.Date getDate() { + if (dateBuilder_ == null) { + return date_ == null ? com.google.type.Date.getDefaultInstance() : date_; + } else { + return dateBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. Date for which the sleep temperature derivations are calculated.
+     * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setDate(com.google.type.Date value) { + if (dateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + date_ = value; + } else { + dateBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Date for which the sleep temperature derivations are calculated.
+     * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setDate(com.google.type.Date.Builder builderForValue) { + if (dateBuilder_ == null) { + date_ = builderForValue.build(); + } else { + dateBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Date for which the sleep temperature derivations are calculated.
+     * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeDate(com.google.type.Date value) { + if (dateBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && date_ != null + && date_ != com.google.type.Date.getDefaultInstance()) { + getDateBuilder().mergeFrom(value); + } else { + date_ = value; + } + } else { + dateBuilder_.mergeFrom(value); + } + if (date_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. Date for which the sleep temperature derivations are calculated.
+     * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearDate() { + bitField0_ = (bitField0_ & ~0x00000001); + date_ = null; + if (dateBuilder_ != null) { + dateBuilder_.dispose(); + dateBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Date for which the sleep temperature derivations are calculated.
+     * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.type.Date.Builder getDateBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetDateFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. Date for which the sleep temperature derivations are calculated.
+     * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.type.DateOrBuilder getDateOrBuilder() { + if (dateBuilder_ != null) { + return dateBuilder_.getMessageOrBuilder(); + } else { + return date_ == null ? com.google.type.Date.getDefaultInstance() : date_; + } + } + + /** + * + * + *
+     * Required. Date for which the sleep temperature derivations are calculated.
+     * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> + internalGetDateFieldBuilder() { + if (dateBuilder_ == null) { + dateBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder>( + getDate(), getParentForChildren(), isClean()); + date_ = null; + } + return dateBuilder_; + } + + private double nightlyTemperatureCelsius_; + + /** + * + * + *
+     * Required. The user's nightly skin temperature. It is the mean of skin
+     * temperature samples taken from the user’s sleep.
+     * 
+ * + * double nightly_temperature_celsius = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The nightlyTemperatureCelsius. + */ + @java.lang.Override + public double getNightlyTemperatureCelsius() { + return nightlyTemperatureCelsius_; + } + + /** + * + * + *
+     * Required. The user's nightly skin temperature. It is the mean of skin
+     * temperature samples taken from the user’s sleep.
+     * 
+ * + * double nightly_temperature_celsius = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The nightlyTemperatureCelsius to set. + * @return This builder for chaining. + */ + public Builder setNightlyTemperatureCelsius(double value) { + + nightlyTemperatureCelsius_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The user's nightly skin temperature. It is the mean of skin
+     * temperature samples taken from the user’s sleep.
+     * 
+ * + * double nightly_temperature_celsius = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearNightlyTemperatureCelsius() { + bitField0_ = (bitField0_ & ~0x00000002); + nightlyTemperatureCelsius_ = 0D; + onChanged(); + return this; + } + + private double baselineTemperatureCelsius_; + + /** + * + * + *
+     * Optional. The user's baseline skin temperature. It is the median of the
+     * user's nightly skin temperature over the past 30 days.
+     * 
+ * + * double baseline_temperature_celsius = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The baselineTemperatureCelsius. + */ + @java.lang.Override + public double getBaselineTemperatureCelsius() { + return baselineTemperatureCelsius_; + } + + /** + * + * + *
+     * Optional. The user's baseline skin temperature. It is the median of the
+     * user's nightly skin temperature over the past 30 days.
+     * 
+ * + * double baseline_temperature_celsius = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The baselineTemperatureCelsius to set. + * @return This builder for chaining. + */ + public Builder setBaselineTemperatureCelsius(double value) { + + baselineTemperatureCelsius_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The user's baseline skin temperature. It is the median of the
+     * user's nightly skin temperature over the past 30 days.
+     * 
+ * + * double baseline_temperature_celsius = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearBaselineTemperatureCelsius() { + bitField0_ = (bitField0_ & ~0x00000004); + baselineTemperatureCelsius_ = 0D; + onChanged(); + return this; + } + + private double relativeNightlyStddev30DCelsius_; + + /** + * + * + *
+     * Optional. The standard deviation of the user’s relative nightly skin
+     * temperature (temperature - baseline) over the past 30 days.
+     * 
+ * + * + * double relative_nightly_stddev_30d_celsius = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The relativeNightlyStddev30dCelsius. + */ + @java.lang.Override + public double getRelativeNightlyStddev30DCelsius() { + return relativeNightlyStddev30DCelsius_; + } + + /** + * + * + *
+     * Optional. The standard deviation of the user’s relative nightly skin
+     * temperature (temperature - baseline) over the past 30 days.
+     * 
+ * + * + * double relative_nightly_stddev_30d_celsius = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The relativeNightlyStddev30dCelsius to set. + * @return This builder for chaining. + */ + public Builder setRelativeNightlyStddev30DCelsius(double value) { + + relativeNightlyStddev30DCelsius_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The standard deviation of the user’s relative nightly skin
+     * temperature (temperature - baseline) over the past 30 days.
+     * 
+ * + * + * double relative_nightly_stddev_30d_celsius = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearRelativeNightlyStddev30DCelsius() { + bitField0_ = (bitField0_ & ~0x00000008); + relativeNightlyStddev30DCelsius_ = 0D; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.DailySleepTemperatureDerivations) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.DailySleepTemperatureDerivations) + private static final com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations(); + } + + public static com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DailySleepTemperatureDerivations parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DailySleepTemperatureDerivationsOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DailySleepTemperatureDerivationsOrBuilder.java new file mode 100644 index 000000000000..03446aab7f30 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DailySleepTemperatureDerivationsOrBuilder.java @@ -0,0 +1,108 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface DailySleepTemperatureDerivationsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.DailySleepTemperatureDerivations) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Date for which the sleep temperature derivations are calculated.
+   * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the date field is set. + */ + boolean hasDate(); + + /** + * + * + *
+   * Required. Date for which the sleep temperature derivations are calculated.
+   * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The date. + */ + com.google.type.Date getDate(); + + /** + * + * + *
+   * Required. Date for which the sleep temperature derivations are calculated.
+   * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.type.DateOrBuilder getDateOrBuilder(); + + /** + * + * + *
+   * Required. The user's nightly skin temperature. It is the mean of skin
+   * temperature samples taken from the user’s sleep.
+   * 
+ * + * double nightly_temperature_celsius = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The nightlyTemperatureCelsius. + */ + double getNightlyTemperatureCelsius(); + + /** + * + * + *
+   * Optional. The user's baseline skin temperature. It is the median of the
+   * user's nightly skin temperature over the past 30 days.
+   * 
+ * + * double baseline_temperature_celsius = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The baselineTemperatureCelsius. + */ + double getBaselineTemperatureCelsius(); + + /** + * + * + *
+   * Optional. The standard deviation of the user’s relative nightly skin
+   * temperature (temperature - baseline) over the past 30 days.
+   * 
+ * + * double relative_nightly_stddev_30d_celsius = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The relativeNightlyStddev30dCelsius. + */ + double getRelativeNightlyStddev30DCelsius(); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DailyVO2Max.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DailyVO2Max.java new file mode 100644 index 000000000000..b61c5092f410 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DailyVO2Max.java @@ -0,0 +1,1449 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * Contains a daily summary of the user's VO2 max (cardio fitness score),
+ * which is the maximum rate of oxygen the body can use during exercise.
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.DailyVO2Max} + */ +@com.google.protobuf.Generated +public final class DailyVO2Max extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.DailyVO2Max) + DailyVO2MaxOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DailyVO2Max"); + } + + // Use DailyVO2Max.newBuilder() to construct. + private DailyVO2Max(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DailyVO2Max() { + cardioFitnessLevel_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_DailyVO2Max_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_DailyVO2Max_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.DailyVO2Max.class, + com.google.devicesandservices.health.v4.DailyVO2Max.Builder.class); + } + + /** + * + * + *
+   * The cardio fitness level categories.
+   * 
+ * + * Protobuf enum {@code google.devicesandservices.health.v4.DailyVO2Max.CardioFitnessLevel} + */ + public enum CardioFitnessLevel implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified cardio fitness level.
+     * 
+ * + * CARDIO_FITNESS_LEVEL_UNSPECIFIED = 0; + */ + CARDIO_FITNESS_LEVEL_UNSPECIFIED(0), + /** + * + * + *
+     * Poor cardio fitness level.
+     * 
+ * + * POOR = 1; + */ + POOR(1), + /** + * + * + *
+     * Fair cardio fitness level.
+     * 
+ * + * FAIR = 2; + */ + FAIR(2), + /** + * + * + *
+     * Average cardio fitness level.
+     * 
+ * + * AVERAGE = 3; + */ + AVERAGE(3), + /** + * + * + *
+     * Good cardio fitness level.
+     * 
+ * + * GOOD = 4; + */ + GOOD(4), + /** + * + * + *
+     * Very good cardio fitness level.
+     * 
+ * + * VERY_GOOD = 5; + */ + VERY_GOOD(5), + /** + * + * + *
+     * Excellent cardio fitness level.
+     * 
+ * + * EXCELLENT = 6; + */ + EXCELLENT(6), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CardioFitnessLevel"); + } + + /** + * + * + *
+     * Unspecified cardio fitness level.
+     * 
+ * + * CARDIO_FITNESS_LEVEL_UNSPECIFIED = 0; + */ + public static final int CARDIO_FITNESS_LEVEL_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Poor cardio fitness level.
+     * 
+ * + * POOR = 1; + */ + public static final int POOR_VALUE = 1; + + /** + * + * + *
+     * Fair cardio fitness level.
+     * 
+ * + * FAIR = 2; + */ + public static final int FAIR_VALUE = 2; + + /** + * + * + *
+     * Average cardio fitness level.
+     * 
+ * + * AVERAGE = 3; + */ + public static final int AVERAGE_VALUE = 3; + + /** + * + * + *
+     * Good cardio fitness level.
+     * 
+ * + * GOOD = 4; + */ + public static final int GOOD_VALUE = 4; + + /** + * + * + *
+     * Very good cardio fitness level.
+     * 
+ * + * VERY_GOOD = 5; + */ + public static final int VERY_GOOD_VALUE = 5; + + /** + * + * + *
+     * Excellent cardio fitness level.
+     * 
+ * + * EXCELLENT = 6; + */ + public static final int EXCELLENT_VALUE = 6; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static CardioFitnessLevel valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static CardioFitnessLevel forNumber(int value) { + switch (value) { + case 0: + return CARDIO_FITNESS_LEVEL_UNSPECIFIED; + case 1: + return POOR; + case 2: + return FAIR; + case 3: + return AVERAGE; + case 4: + return GOOD; + case 5: + return VERY_GOOD; + case 6: + return EXCELLENT; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public CardioFitnessLevel findValueByNumber(int number) { + return CardioFitnessLevel.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DailyVO2Max.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final CardioFitnessLevel[] VALUES = values(); + + public static CardioFitnessLevel valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private CardioFitnessLevel(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.devicesandservices.health.v4.DailyVO2Max.CardioFitnessLevel) + } + + private int bitField0_; + public static final int DATE_FIELD_NUMBER = 1; + private com.google.type.Date date_; + + /** + * + * + *
+   * Required. The date for which the Daily VO2 max was measured.
+   * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the date field is set. + */ + @java.lang.Override + public boolean hasDate() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The date for which the Daily VO2 max was measured.
+   * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The date. + */ + @java.lang.Override + public com.google.type.Date getDate() { + return date_ == null ? com.google.type.Date.getDefaultInstance() : date_; + } + + /** + * + * + *
+   * Required. The date for which the Daily VO2 max was measured.
+   * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.type.DateOrBuilder getDateOrBuilder() { + return date_ == null ? com.google.type.Date.getDefaultInstance() : date_; + } + + public static final int VO2_MAX_FIELD_NUMBER = 2; + private double vo2Max_ = 0D; + + /** + * + * + *
+   * Required. Daily VO2 max value measured as in ml consumed oxygen / kg of
+   * body weight / min.
+   * 
+ * + * double vo2_max = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The vo2Max. + */ + @java.lang.Override + public double getVo2Max() { + return vo2Max_; + } + + public static final int ESTIMATED_FIELD_NUMBER = 3; + private boolean estimated_ = false; + + /** + * + * + *
+   * Optional. An estimated field is added to indicate when the confidence has
+   * decreased sufficiently to consider the value an estimation.
+   * 
+ * + * bool estimated = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The estimated. + */ + @java.lang.Override + public boolean getEstimated() { + return estimated_; + } + + public static final int CARDIO_FITNESS_LEVEL_FIELD_NUMBER = 4; + private int cardioFitnessLevel_ = 0; + + /** + * + * + *
+   * Optional. Represents the user's cardio fitness level based on their VO2
+   * max.
+   * 
+ * + * + * .google.devicesandservices.health.v4.DailyVO2Max.CardioFitnessLevel cardio_fitness_level = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for cardioFitnessLevel. + */ + @java.lang.Override + public int getCardioFitnessLevelValue() { + return cardioFitnessLevel_; + } + + /** + * + * + *
+   * Optional. Represents the user's cardio fitness level based on their VO2
+   * max.
+   * 
+ * + * + * .google.devicesandservices.health.v4.DailyVO2Max.CardioFitnessLevel cardio_fitness_level = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The cardioFitnessLevel. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyVO2Max.CardioFitnessLevel + getCardioFitnessLevel() { + com.google.devicesandservices.health.v4.DailyVO2Max.CardioFitnessLevel result = + com.google.devicesandservices.health.v4.DailyVO2Max.CardioFitnessLevel.forNumber( + cardioFitnessLevel_); + return result == null + ? com.google.devicesandservices.health.v4.DailyVO2Max.CardioFitnessLevel.UNRECOGNIZED + : result; + } + + public static final int VO2_MAX_COVARIANCE_FIELD_NUMBER = 5; + private double vo2MaxCovariance_ = 0D; + + /** + * + * + *
+   * Optional. The covariance of the VO2 max value.
+   * 
+ * + * double vo2_max_covariance = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The vo2MaxCovariance. + */ + @java.lang.Override + public double getVo2MaxCovariance() { + return vo2MaxCovariance_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getDate()); + } + if (java.lang.Double.doubleToRawLongBits(vo2Max_) != 0) { + output.writeDouble(2, vo2Max_); + } + if (estimated_ != false) { + output.writeBool(3, estimated_); + } + if (cardioFitnessLevel_ + != com.google.devicesandservices.health.v4.DailyVO2Max.CardioFitnessLevel + .CARDIO_FITNESS_LEVEL_UNSPECIFIED + .getNumber()) { + output.writeEnum(4, cardioFitnessLevel_); + } + if (java.lang.Double.doubleToRawLongBits(vo2MaxCovariance_) != 0) { + output.writeDouble(5, vo2MaxCovariance_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getDate()); + } + if (java.lang.Double.doubleToRawLongBits(vo2Max_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(2, vo2Max_); + } + if (estimated_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, estimated_); + } + if (cardioFitnessLevel_ + != com.google.devicesandservices.health.v4.DailyVO2Max.CardioFitnessLevel + .CARDIO_FITNESS_LEVEL_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, cardioFitnessLevel_); + } + if (java.lang.Double.doubleToRawLongBits(vo2MaxCovariance_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(5, vo2MaxCovariance_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.DailyVO2Max)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.DailyVO2Max other = + (com.google.devicesandservices.health.v4.DailyVO2Max) obj; + + if (hasDate() != other.hasDate()) return false; + if (hasDate()) { + if (!getDate().equals(other.getDate())) return false; + } + if (java.lang.Double.doubleToLongBits(getVo2Max()) + != java.lang.Double.doubleToLongBits(other.getVo2Max())) return false; + if (getEstimated() != other.getEstimated()) return false; + if (cardioFitnessLevel_ != other.cardioFitnessLevel_) return false; + if (java.lang.Double.doubleToLongBits(getVo2MaxCovariance()) + != java.lang.Double.doubleToLongBits(other.getVo2MaxCovariance())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasDate()) { + hash = (37 * hash) + DATE_FIELD_NUMBER; + hash = (53 * hash) + getDate().hashCode(); + } + hash = (37 * hash) + VO2_MAX_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong(java.lang.Double.doubleToLongBits(getVo2Max())); + hash = (37 * hash) + ESTIMATED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEstimated()); + hash = (37 * hash) + CARDIO_FITNESS_LEVEL_FIELD_NUMBER; + hash = (53 * hash) + cardioFitnessLevel_; + hash = (37 * hash) + VO2_MAX_COVARIANCE_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getVo2MaxCovariance())); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.DailyVO2Max parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.DailyVO2Max parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DailyVO2Max parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.DailyVO2Max parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DailyVO2Max parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.DailyVO2Max parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DailyVO2Max parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.DailyVO2Max parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DailyVO2Max parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.DailyVO2Max parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DailyVO2Max parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.DailyVO2Max parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.devicesandservices.health.v4.DailyVO2Max prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Contains a daily summary of the user's VO2 max (cardio fitness score),
+   * which is the maximum rate of oxygen the body can use during exercise.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.DailyVO2Max} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.DailyVO2Max) + com.google.devicesandservices.health.v4.DailyVO2MaxOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_DailyVO2Max_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_DailyVO2Max_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.DailyVO2Max.class, + com.google.devicesandservices.health.v4.DailyVO2Max.Builder.class); + } + + // Construct using com.google.devicesandservices.health.v4.DailyVO2Max.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetDateFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + date_ = null; + if (dateBuilder_ != null) { + dateBuilder_.dispose(); + dateBuilder_ = null; + } + vo2Max_ = 0D; + estimated_ = false; + cardioFitnessLevel_ = 0; + vo2MaxCovariance_ = 0D; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_DailyVO2Max_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyVO2Max getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.DailyVO2Max.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyVO2Max build() { + com.google.devicesandservices.health.v4.DailyVO2Max result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyVO2Max buildPartial() { + com.google.devicesandservices.health.v4.DailyVO2Max result = + new com.google.devicesandservices.health.v4.DailyVO2Max(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.devicesandservices.health.v4.DailyVO2Max result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.date_ = dateBuilder_ == null ? date_ : dateBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.vo2Max_ = vo2Max_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.estimated_ = estimated_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.cardioFitnessLevel_ = cardioFitnessLevel_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.vo2MaxCovariance_ = vo2MaxCovariance_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.DailyVO2Max) { + return mergeFrom((com.google.devicesandservices.health.v4.DailyVO2Max) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.devicesandservices.health.v4.DailyVO2Max other) { + if (other == com.google.devicesandservices.health.v4.DailyVO2Max.getDefaultInstance()) + return this; + if (other.hasDate()) { + mergeDate(other.getDate()); + } + if (java.lang.Double.doubleToRawLongBits(other.getVo2Max()) != 0) { + setVo2Max(other.getVo2Max()); + } + if (other.getEstimated() != false) { + setEstimated(other.getEstimated()); + } + if (other.cardioFitnessLevel_ != 0) { + setCardioFitnessLevelValue(other.getCardioFitnessLevelValue()); + } + if (java.lang.Double.doubleToRawLongBits(other.getVo2MaxCovariance()) != 0) { + setVo2MaxCovariance(other.getVo2MaxCovariance()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(internalGetDateFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 17: + { + vo2Max_ = input.readDouble(); + bitField0_ |= 0x00000002; + break; + } // case 17 + case 24: + { + estimated_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: + { + cardioFitnessLevel_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 41: + { + vo2MaxCovariance_ = input.readDouble(); + bitField0_ |= 0x00000010; + break; + } // case 41 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.type.Date date_; + private com.google.protobuf.SingleFieldBuilder< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> + dateBuilder_; + + /** + * + * + *
+     * Required. The date for which the Daily VO2 max was measured.
+     * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the date field is set. + */ + public boolean hasDate() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. The date for which the Daily VO2 max was measured.
+     * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The date. + */ + public com.google.type.Date getDate() { + if (dateBuilder_ == null) { + return date_ == null ? com.google.type.Date.getDefaultInstance() : date_; + } else { + return dateBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The date for which the Daily VO2 max was measured.
+     * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setDate(com.google.type.Date value) { + if (dateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + date_ = value; + } else { + dateBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The date for which the Daily VO2 max was measured.
+     * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setDate(com.google.type.Date.Builder builderForValue) { + if (dateBuilder_ == null) { + date_ = builderForValue.build(); + } else { + dateBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The date for which the Daily VO2 max was measured.
+     * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeDate(com.google.type.Date value) { + if (dateBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && date_ != null + && date_ != com.google.type.Date.getDefaultInstance()) { + getDateBuilder().mergeFrom(value); + } else { + date_ = value; + } + } else { + dateBuilder_.mergeFrom(value); + } + if (date_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The date for which the Daily VO2 max was measured.
+     * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearDate() { + bitField0_ = (bitField0_ & ~0x00000001); + date_ = null; + if (dateBuilder_ != null) { + dateBuilder_.dispose(); + dateBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The date for which the Daily VO2 max was measured.
+     * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.type.Date.Builder getDateBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetDateFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The date for which the Daily VO2 max was measured.
+     * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.type.DateOrBuilder getDateOrBuilder() { + if (dateBuilder_ != null) { + return dateBuilder_.getMessageOrBuilder(); + } else { + return date_ == null ? com.google.type.Date.getDefaultInstance() : date_; + } + } + + /** + * + * + *
+     * Required. The date for which the Daily VO2 max was measured.
+     * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> + internalGetDateFieldBuilder() { + if (dateBuilder_ == null) { + dateBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder>( + getDate(), getParentForChildren(), isClean()); + date_ = null; + } + return dateBuilder_; + } + + private double vo2Max_; + + /** + * + * + *
+     * Required. Daily VO2 max value measured as in ml consumed oxygen / kg of
+     * body weight / min.
+     * 
+ * + * double vo2_max = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The vo2Max. + */ + @java.lang.Override + public double getVo2Max() { + return vo2Max_; + } + + /** + * + * + *
+     * Required. Daily VO2 max value measured as in ml consumed oxygen / kg of
+     * body weight / min.
+     * 
+ * + * double vo2_max = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The vo2Max to set. + * @return This builder for chaining. + */ + public Builder setVo2Max(double value) { + + vo2Max_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Daily VO2 max value measured as in ml consumed oxygen / kg of
+     * body weight / min.
+     * 
+ * + * double vo2_max = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearVo2Max() { + bitField0_ = (bitField0_ & ~0x00000002); + vo2Max_ = 0D; + onChanged(); + return this; + } + + private boolean estimated_; + + /** + * + * + *
+     * Optional. An estimated field is added to indicate when the confidence has
+     * decreased sufficiently to consider the value an estimation.
+     * 
+ * + * bool estimated = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The estimated. + */ + @java.lang.Override + public boolean getEstimated() { + return estimated_; + } + + /** + * + * + *
+     * Optional. An estimated field is added to indicate when the confidence has
+     * decreased sufficiently to consider the value an estimation.
+     * 
+ * + * bool estimated = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The estimated to set. + * @return This builder for chaining. + */ + public Builder setEstimated(boolean value) { + + estimated_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An estimated field is added to indicate when the confidence has
+     * decreased sufficiently to consider the value an estimation.
+     * 
+ * + * bool estimated = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEstimated() { + bitField0_ = (bitField0_ & ~0x00000004); + estimated_ = false; + onChanged(); + return this; + } + + private int cardioFitnessLevel_ = 0; + + /** + * + * + *
+     * Optional. Represents the user's cardio fitness level based on their VO2
+     * max.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyVO2Max.CardioFitnessLevel cardio_fitness_level = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for cardioFitnessLevel. + */ + @java.lang.Override + public int getCardioFitnessLevelValue() { + return cardioFitnessLevel_; + } + + /** + * + * + *
+     * Optional. Represents the user's cardio fitness level based on their VO2
+     * max.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyVO2Max.CardioFitnessLevel cardio_fitness_level = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for cardioFitnessLevel to set. + * @return This builder for chaining. + */ + public Builder setCardioFitnessLevelValue(int value) { + cardioFitnessLevel_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Represents the user's cardio fitness level based on their VO2
+     * max.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyVO2Max.CardioFitnessLevel cardio_fitness_level = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The cardioFitnessLevel. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyVO2Max.CardioFitnessLevel + getCardioFitnessLevel() { + com.google.devicesandservices.health.v4.DailyVO2Max.CardioFitnessLevel result = + com.google.devicesandservices.health.v4.DailyVO2Max.CardioFitnessLevel.forNumber( + cardioFitnessLevel_); + return result == null + ? com.google.devicesandservices.health.v4.DailyVO2Max.CardioFitnessLevel.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Optional. Represents the user's cardio fitness level based on their VO2
+     * max.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyVO2Max.CardioFitnessLevel cardio_fitness_level = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The cardioFitnessLevel to set. + * @return This builder for chaining. + */ + public Builder setCardioFitnessLevel( + com.google.devicesandservices.health.v4.DailyVO2Max.CardioFitnessLevel value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + cardioFitnessLevel_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Represents the user's cardio fitness level based on their VO2
+     * max.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyVO2Max.CardioFitnessLevel cardio_fitness_level = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearCardioFitnessLevel() { + bitField0_ = (bitField0_ & ~0x00000008); + cardioFitnessLevel_ = 0; + onChanged(); + return this; + } + + private double vo2MaxCovariance_; + + /** + * + * + *
+     * Optional. The covariance of the VO2 max value.
+     * 
+ * + * double vo2_max_covariance = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The vo2MaxCovariance. + */ + @java.lang.Override + public double getVo2MaxCovariance() { + return vo2MaxCovariance_; + } + + /** + * + * + *
+     * Optional. The covariance of the VO2 max value.
+     * 
+ * + * double vo2_max_covariance = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The vo2MaxCovariance to set. + * @return This builder for chaining. + */ + public Builder setVo2MaxCovariance(double value) { + + vo2MaxCovariance_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The covariance of the VO2 max value.
+     * 
+ * + * double vo2_max_covariance = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearVo2MaxCovariance() { + bitField0_ = (bitField0_ & ~0x00000010); + vo2MaxCovariance_ = 0D; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.DailyVO2Max) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.DailyVO2Max) + private static final com.google.devicesandservices.health.v4.DailyVO2Max DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.DailyVO2Max(); + } + + public static com.google.devicesandservices.health.v4.DailyVO2Max getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DailyVO2Max parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyVO2Max getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DailyVO2MaxOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DailyVO2MaxOrBuilder.java new file mode 100644 index 000000000000..a7300dd706cc --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DailyVO2MaxOrBuilder.java @@ -0,0 +1,138 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface DailyVO2MaxOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.DailyVO2Max) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The date for which the Daily VO2 max was measured.
+   * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the date field is set. + */ + boolean hasDate(); + + /** + * + * + *
+   * Required. The date for which the Daily VO2 max was measured.
+   * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The date. + */ + com.google.type.Date getDate(); + + /** + * + * + *
+   * Required. The date for which the Daily VO2 max was measured.
+   * 
+ * + * .google.type.Date date = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.type.DateOrBuilder getDateOrBuilder(); + + /** + * + * + *
+   * Required. Daily VO2 max value measured as in ml consumed oxygen / kg of
+   * body weight / min.
+   * 
+ * + * double vo2_max = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The vo2Max. + */ + double getVo2Max(); + + /** + * + * + *
+   * Optional. An estimated field is added to indicate when the confidence has
+   * decreased sufficiently to consider the value an estimation.
+   * 
+ * + * bool estimated = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The estimated. + */ + boolean getEstimated(); + + /** + * + * + *
+   * Optional. Represents the user's cardio fitness level based on their VO2
+   * max.
+   * 
+ * + * + * .google.devicesandservices.health.v4.DailyVO2Max.CardioFitnessLevel cardio_fitness_level = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for cardioFitnessLevel. + */ + int getCardioFitnessLevelValue(); + + /** + * + * + *
+   * Optional. Represents the user's cardio fitness level based on their VO2
+   * max.
+   * 
+ * + * + * .google.devicesandservices.health.v4.DailyVO2Max.CardioFitnessLevel cardio_fitness_level = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The cardioFitnessLevel. + */ + com.google.devicesandservices.health.v4.DailyVO2Max.CardioFitnessLevel getCardioFitnessLevel(); + + /** + * + * + *
+   * Optional. The covariance of the VO2 max value.
+   * 
+ * + * double vo2_max_covariance = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The vo2MaxCovariance. + */ + double getVo2MaxCovariance(); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DataCoordinatesProto.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DataCoordinatesProto.java new file mode 100644 index 000000000000..77910e180fdf --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DataCoordinatesProto.java @@ -0,0 +1,193 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_coordinates.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public final class DataCoordinatesProto extends com.google.protobuf.GeneratedFile { + private DataCoordinatesProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DataCoordinatesProto"); + } + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_CivilDateTime_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_CivilDateTime_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_CivilTimeInterval_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_CivilTimeInterval_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_ObservationTimeInterval_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_ObservationTimeInterval_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_SessionTimeInterval_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_SessionTimeInterval_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_ObservationSampleTime_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_ObservationSampleTime_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n:google/devicesandservices/health/v4/da" + + "ta_coordinates.proto\022#google.devicesands" + + "ervices.health.v4\032\037google/api/field_beha" + + "vior.proto\032\036google/protobuf/duration.pro" + + "to\032\037google/protobuf/timestamp.proto\032\026goo" + + "gle/type/date.proto\032\033google/type/timeofd" + + "ay.proto\"`\n\rCivilDateTime\022$\n\004date\030\001 \001(\0132" + + "\021.google.type.DateB\003\340A\002\022)\n\004time\030\002 \001(\0132\026." + + "google.type.TimeOfDayB\003\340A\001\"\241\001\n\021CivilTime" + + "Interval\022F\n\005start\030\001 \001(\01322.google.devices" + + "andservices.health.v4.CivilDateTimeB\003\340A\002" + + "\022D\n\003end\030\002 \001(\01322.google.devicesandservice" + + "s.health.v4.CivilDateTimeB\003\340A\002\"\227\003\n\027Obser" + + "vationTimeInterval\0223\n\nstart_time\030\001 \001(\0132\032" + + ".google.protobuf.TimestampB\003\340A\002\0228\n\020start" + + "_utc_offset\030\002 \001(\0132\031.google.protobuf.Dura" + + "tionB\003\340A\002\0221\n\010end_time\030\003 \001(\0132\032.google.pro" + + "tobuf.TimestampB\003\340A\002\0226\n\016end_utc_offset\030\004" + + " \001(\0132\031.google.protobuf.DurationB\003\340A\002\022Q\n\020" + + "civil_start_time\030\005 \001(\01322.google.devicesa" + + "ndservices.health.v4.CivilDateTimeB\003\340A\003\022" + + "O\n\016civil_end_time\030\006 \001(\01322.google.devices" + + "andservices.health.v4.CivilDateTimeB\003\340A\003" + + "\"\223\003\n\023SessionTimeInterval\0223\n\nstart_time\030\001" + + " \001(\0132\032.google.protobuf.TimestampB\003\340A\002\0228\n" + + "\020start_utc_offset\030\002 \001(\0132\031.google.protobu" + + "f.DurationB\003\340A\002\0221\n\010end_time\030\003 \001(\0132\032.goog" + + "le.protobuf.TimestampB\003\340A\002\0226\n\016end_utc_of" + + "fset\030\004 \001(\0132\031.google.protobuf.DurationB\003\340" + + "A\002\022Q\n\020civil_start_time\030\005 \001(\01322.google.de" + + "vicesandservices.health.v4.CivilDateTime" + + "B\003\340A\003\022O\n\016civil_end_time\030\006 \001(\01322.google.d" + + "evicesandservices.health.v4.CivilDateTim" + + "eB\003\340A\003\"\320\001\n\025ObservationSampleTime\0226\n\rphys" + + "ical_time\030\001 \001(\0132\032.google.protobuf.Timest" + + "ampB\003\340A\002\0222\n\nutc_offset\030\002 \001(\0132\031.google.pr" + + "otobuf.DurationB\003\340A\002\022K\n\ncivil_time\030\003 \001(\013" + + "22.google.devicesandservices.health.v4.C" + + "ivilDateTimeB\003\340A\003B\212\002\n\'com.google.devices" + + "andservices.health.v4B\024DataCoordinatesPr" + + "otoP\001ZRgoogle.golang.org/genproto/google" + + "apis/devicesandservices/health/apiv4main" + + ";healthpb\252\002#Google.DevicesAndServices.He" + + "alth.V4\312\002#Google\\DevicesAndServices\\Heal" + + "th\\V4\352\002&Google::DevicesAndServices::Heal" + + "th::V4b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.protobuf.DurationProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.type.DateProto.getDescriptor(), + com.google.type.TimeOfDayProto.getDescriptor(), + }); + internal_static_google_devicesandservices_health_v4_CivilDateTime_descriptor = + getDescriptor().getMessageType(0); + internal_static_google_devicesandservices_health_v4_CivilDateTime_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_CivilDateTime_descriptor, + new java.lang.String[] { + "Date", "Time", + }); + internal_static_google_devicesandservices_health_v4_CivilTimeInterval_descriptor = + getDescriptor().getMessageType(1); + internal_static_google_devicesandservices_health_v4_CivilTimeInterval_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_CivilTimeInterval_descriptor, + new java.lang.String[] { + "Start", "End", + }); + internal_static_google_devicesandservices_health_v4_ObservationTimeInterval_descriptor = + getDescriptor().getMessageType(2); + internal_static_google_devicesandservices_health_v4_ObservationTimeInterval_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_ObservationTimeInterval_descriptor, + new java.lang.String[] { + "StartTime", + "StartUtcOffset", + "EndTime", + "EndUtcOffset", + "CivilStartTime", + "CivilEndTime", + }); + internal_static_google_devicesandservices_health_v4_SessionTimeInterval_descriptor = + getDescriptor().getMessageType(3); + internal_static_google_devicesandservices_health_v4_SessionTimeInterval_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_SessionTimeInterval_descriptor, + new java.lang.String[] { + "StartTime", + "StartUtcOffset", + "EndTime", + "EndUtcOffset", + "CivilStartTime", + "CivilEndTime", + }); + internal_static_google_devicesandservices_health_v4_ObservationSampleTime_descriptor = + getDescriptor().getMessageType(4); + internal_static_google_devicesandservices_health_v4_ObservationSampleTime_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_ObservationSampleTime_descriptor, + new java.lang.String[] { + "PhysicalTime", "UtcOffset", "CivilTime", + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.protobuf.DurationProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.type.DateProto.getDescriptor(); + com.google.type.TimeOfDayProto.getDescriptor(); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DataModelProto.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DataModelProto.java new file mode 100644 index 000000000000..78c158615289 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DataModelProto.java @@ -0,0 +1,1563 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public final class DataModelProto extends com.google.protobuf.GeneratedFile { + private DataModelProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DataModelProto"); + } + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_ActiveZoneMinutes_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_ActiveZoneMinutes_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_ActiveZoneMinutesRollupValue_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_ActiveZoneMinutesRollupValue_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_ActiveMinutes_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_ActiveMinutes_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_ActiveMinutes_ActiveMinutesByActivityLevel_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_ActiveMinutes_ActiveMinutesByActivityLevel_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_ActiveMinutesRollupValue_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_ActiveMinutesRollupValue_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_ActiveMinutesRollupValue_ActiveMinutesRollupByActivityLevel_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_ActiveMinutesRollupValue_ActiveMinutesRollupByActivityLevel_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_ActivityLevel_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_ActivityLevel_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_ActivityLevelRollupValue_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_ActivityLevelRollupValue_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_ActivityLevelRollupValue_ActivityLevelRollupByActivityLevelType_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_ActivityLevelRollupValue_ActivityLevelRollupByActivityLevelType_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_Altitude_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_Altitude_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_BasalEnergyBurned_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_BasalEnergyBurned_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_BodyFat_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_BodyFat_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_BodyFatRollupValue_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_BodyFatRollupValue_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_CaloriesInHeartRateZoneRollupValue_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_CaloriesInHeartRateZoneRollupValue_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_CaloriesInHeartRateZoneRollupValue_CaloriesInHeartRateZoneValue_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_CaloriesInHeartRateZoneRollupValue_CaloriesInHeartRateZoneValue_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_DailyHeartRateZones_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_DailyHeartRateZones_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_DailyHeartRateZones_HeartRateZone_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_DailyHeartRateZones_HeartRateZone_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_DailyHeartRateVariability_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_DailyHeartRateVariability_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_DailyRespiratoryRate_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_DailyRespiratoryRate_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_DailyOxygenSaturation_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_DailyOxygenSaturation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_DailyRestingHeartRate_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_DailyRestingHeartRate_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_DailyRestingHeartRate_DailyRestingHeartRateMetadata_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_DailyRestingHeartRate_DailyRestingHeartRateMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_DailySleepTemperatureDerivations_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_DailySleepTemperatureDerivations_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_DailyVO2Max_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_DailyVO2Max_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_Distance_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_Distance_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_DistanceRollupValue_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_DistanceRollupValue_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_Exercise_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_Exercise_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_Exercise_SplitSummary_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_Exercise_SplitSummary_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_Exercise_ExerciseEvent_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_Exercise_ExerciseEvent_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_Exercise_ExerciseMetadata_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_Exercise_ExerciseMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_Floors_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_Floors_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_FloorsRollupValue_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_FloorsRollupValue_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_AltitudeRollupValue_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_AltitudeRollupValue_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_HeartRate_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_HeartRate_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_HeartRate_HeartRateMetadata_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_HeartRate_HeartRateMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_HeartRateRollupValue_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_HeartRateRollupValue_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_RunVO2MaxRollupValue_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_RunVO2MaxRollupValue_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_RunVO2Max_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_RunVO2Max_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_HeartRateVariabilityPersonalRangeRollupValue_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_HeartRateVariabilityPersonalRangeRollupValue_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_Height_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_Height_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_HeartRateVariability_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_HeartRateVariability_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_VolumeQuantity_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_VolumeQuantity_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_HydrationLog_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_HydrationLog_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_HydrationLogRollupValue_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_HydrationLogRollupValue_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_HydrationLogRollupValue_VolumeQuantityRollup_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_HydrationLogRollupValue_VolumeQuantityRollup_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_MetricsSummary_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_MetricsSummary_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_MetricsSummary_TimeInHeartRateZones_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_MetricsSummary_TimeInHeartRateZones_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_MetricsSummary_MobilityMetrics_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_MetricsSummary_MobilityMetrics_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_OxygenSaturation_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_OxygenSaturation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_RestingHeartRatePersonalRangeRollupValue_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_RestingHeartRatePersonalRangeRollupValue_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_RespiratoryRateSleepSummary_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_RespiratoryRateSleepSummary_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_RespiratoryRateSleepSummary_RespiratoryRateSleepSummaryStatistics_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_RespiratoryRateSleepSummary_RespiratoryRateSleepSummaryStatistics_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_Sleep_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_Sleep_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_Sleep_SleepStage_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_Sleep_SleepStage_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_Sleep_OutOfBedSegment_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_Sleep_OutOfBedSegment_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_Sleep_SleepMetadata_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_Sleep_SleepMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_Sleep_SleepSummary_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_Sleep_SleepSummary_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_Sleep_SleepSummary_StageSummary_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_Sleep_SleepSummary_StageSummary_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_Steps_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_Steps_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_StepsRollupValue_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_StepsRollupValue_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_SwimLengthsData_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_SwimLengthsData_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_SwimLengthsDataRollupValue_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_SwimLengthsDataRollupValue_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_TimeInHeartRateZone_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_TimeInHeartRateZone_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_TimeInHeartRateZoneRollupValue_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_TimeInHeartRateZoneRollupValue_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_TimeInHeartRateZoneRollupValue_TimeInHeartRateZoneValue_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_TimeInHeartRateZoneRollupValue_TimeInHeartRateZoneValue_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_TotalCaloriesRollupValue_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_TotalCaloriesRollupValue_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_VO2Max_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_VO2Max_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_Weight_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_Weight_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_WeightRollupValue_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_WeightRollupValue_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_SedentaryPeriod_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_SedentaryPeriod_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_SedentaryPeriodRollupValue_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_SedentaryPeriodRollupValue_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n" + + "4google/devicesandservices/health/v4/data_model.proto\022#google.devicesandservice" + + "s.health.v4\032\037google/api/field_behavior.p" + + "roto\032\031google/api/resource.proto\032:google/" + + "devicesandservices/health/v4/data_coordinates.proto\032\036google/protobuf/duration.pr" + + "oto\032\037google/protobuf/timestamp.proto\032\026google/type/date.proto\"\304\002\n" + + "\021ActiveZoneMinutes\022S\n" + + "\010interval\030\001 \001(\0132<.google.devicesand" + + "services.health.v4.ObservationTimeIntervalB\003\340A\002\022b\n" + + "\017heart_rate_zone\030\002 \001(\0162D.googl" + + "e.devicesandservices.health.v4.ActiveZoneMinutes.HeartRateZoneB\003\340A\002\022 \n" + + "\023active_zone_minutes\030\003 \001(\003B\003\340A\002\"T\n\r" + + "HeartRateZone\022\037\n" + + "\033HEART_RATE_ZONE_UNSPECIFIED\020\000\022\014\n" + + "\010FAT_BURN\020\001\022\n\n" + + "\006CARDIO\020\002\022\010\n" + + "\004PEAK\020\003\"\204\001\n" + + "\034ActiveZoneMinutesRollupValue\022 \n" + + "\030sum_in_cardio_heart_zone\030\001 \001(\003\022\036\n" + + "\026sum_in_peak_heart_zone\030\002 \001(\003\022\"\n" + + "\032sum_in_fat_burn_heart_zone\030\003 \001(\003\"\331\003\n\r" + + "ActiveMinutes\022S\n" + + "\010interval\030\001 \001(\0132<" + + ".google.devicesandservices.health.v4.ObservationTimeIntervalB\003\340A\002\022~\n" + + " active_minutes_by_activity_level\030\002 \003(\0132O.google.dev" + + "icesandservices.health.v4.ActiveMinutes.ActiveMinutesByActivityLevelB\003\340A\002\032\232\001\n" + + "\034ActiveMinutesByActivityLevel\022]\n" + + "\016activity_level\030\001 \001(\0162@.google.devicesandservices.h" + + "ealth.v4.ActiveMinutes.ActivityLevelB\003\340A\002\022\033\n" + + "\016active_minutes\030\002 \001(\003B\003\340A\002\"V\n\r" + + "ActivityLevel\022\036\n" + + "\032ACTIVITY_LEVEL_UNSPECIFIED\020\000\022\t\n" + + "\005LIGHT\020\001\022\014\n" + + "\010MODERATE\020\002\022\014\n" + + "\010VIGOROUS\020\003\"\313\002\n" + + "\030ActiveMinutesRollupValue\022\221\001\n" + + "\'active_minutes_rollup_by_activity_level\030\001 \003(\0132`." + + "google.devicesandservices.health.v4.Acti" + + "veMinutesRollupValue.ActiveMinutesRollupByActivityLevel\032\232\001\n" + + "\"ActiveMinutesRollupByActivityLevel\022X\n" + + "\016activity_level\030\001 \001(\0162@" + + ".google.devicesandservices.health.v4.ActiveMinutes.ActivityLevel\022\032\n" + + "\022active_minutes_sum\030\002 \001(\003\"\322\002\n\r" + + "ActivityLevel\022S\n" + + "\010interval\030\001" + + " \001(\0132<.google.devicesandservices.health.v4.ObservationTimeIntervalB\003\340A\002\022f\n" + + "\023activity_level_type\030\002 \001(\0162D.google.device" + + "sandservices.health.v4.ActivityLevel.ActivityLevelTypeB\003\340A\002\"\203\001\n" + + "\021ActivityLevelType\022#\n" + + "\037ACTIVITY_LEVEL_TYPE_UNSPECIFIED\020\000\022\r" + + "\n" + + "\tSEDENTARY\020\001\022\022\n" + + "\016LIGHTLY_ACTIVE\020\002\022\025\n" + + "\021MODERATELY_ACTIVE\020\003\022\017\n" + + "\013VERY_ACTIVE\020\004\"\371\002\n" + + "\030ActivityLevelRollupValue\022\233\001\n" + + "-activity_level_rollups_by_activity_level_type\030\001 \003(\0132d" + + ".google.devicesandservices.health.v4.Act" + + "ivityLevelRollupValue.ActivityLevelRollupByActivityLevelType\032\276\001\n" + + "&ActivityLevelRollupByActivityLevelType\022a\n" + + "\023activity_level_type\030\001 \001(\0162D.google.devicesandservices" + + ".health.v4.ActivityLevel.ActivityLevelType\0221\n" + + "\016total_duration\030\002 \001(\0132\031.google.protobuf.Duration\"~\n" + + "\010Altitude\022S\n" + + "\010interval\030\002 " + + "\001(\0132<.google.devicesandservices.health.v4.ObservationTimeIntervalB\003\340A\002\022\035\n" + + "\020gain_millimeters\030\003 \001(\003B\003\340A\002\"{\n" + + "\021BasalEnergyBurned\022S\n" + + "\010interval\030\001 \001(\0132<.google.devicesand" + + "services.health.v4.ObservationTimeIntervalB\003\340A\002\022\021\n" + + "\004kcal\030\002 \001(\001B\003\340A\002\"x\n" + + "\007BodyFat\022T\n" + + "\013sample_time\030\002 \001(\0132:.google.devicesandse" + + "rvices.health.v4.ObservationSampleTimeB\003\340A\002\022\027\n\n" + + "percentage\030\003 \001(\001B\003\340A\002\"5\n" + + "\022BodyFatRollupValue\022\037\n" + + "\027body_fat_percentage_avg\030\001 \001(\001\"\260\002\n" + + "\"CaloriesInHeartRateZoneRollupValue\022\212\001\n" + + "\034calories_in_heart_rate_zones\030\001 \003(" + + "\0132d.google.devicesandservices.health.v4." + + "CaloriesInHeartRateZoneRollupValue.CaloriesInHeartRateZoneValue\032}\n" + + "\034CaloriesInHeartRateZoneValue\022O\n" + + "\017heart_rate_zone\030\001 \001(\016" + + "26.google.devicesandservices.health.v4.HeartRateZoneType\022\014\n" + + "\004kcal\030\002 \001(\001\"\325\002\n" + + "\023DailyHeartRateZones\022$\n" + + "\004date\030\001 \001(\0132\021.google.type.DateB\003\340A\002\022e\n" + + "\020heart_rate_zones\030\002 \003(\0132F" + + ".google.devicesandservices.health.v4.DailyHeartRateZones.HeartRateZoneB\003\340A\002\032\260\001\n\r" + + "HeartRateZone\022Y\n" + + "\024heart_rate_zone_type\030\001 " + + "\001(\01626.google.devicesandservices.health.v4.HeartRateZoneTypeB\003\340A\002\022!\n" + + "\024min_beats_per_minute\030\002 \001(\003B\003\340A\002\022!\n" + + "\024max_beats_per_minute\030\003 \001(\003B\003\340A\002\"\323\003\n" + + "\031DailyHeartRateVariability\022$\n" + + "\004date\030\002 \001(\0132\021.google.type.DateB\003\340A\002\022=\n" + + "+average_heart_rate_variability_milliseconds\030\004" + + " \001(\001B\003\340A\001H\000\210\001\001\0225\n" + + "#non_rem_heart_rate_beats_per_minute\030\005" + + " \001(\003B\003\340A\001H\001\210\001\001\022\031\n" + + "\007entropy\030\006 \001(\001B\003\340A\001H\002\210\001\001\022T\n" + + "Bdeep_sleep_root_mean_square_of_successive_differences_milliseconds\030\007" + + " \001(\001B\003\340A\001H\003\210\001\001B.\n" + + ",_average_heart_rate_variability_millisecondsB&\n" + + "$_non_rem_heart_rate_beats_per_minuteB\n\n" + + "\010_entropyBE\n" + + "C_deep_sleep_root_mean_square_of_successive_differences_milliseconds\"]\n" + + "\024DailyRespiratoryRate\022$\n" + + "\004date\030\001 \001(\0132\021.google.type.DateB\003\340A\002\022\037\n" + + "\022breaths_per_minute\030\002 \001(\001B\003\340A\002\"\324\001\n" + + "\025DailyOxygenSaturation\022$\n" + + "\004date\030\001 \001(\0132\021.google.type.DateB\003\340A\002\022\037\n" + + "\022average_percentage\030\002 \001(\001B\003\340A\002\022#\n" + + "\026lower_bound_percentage\030\003 \001(\001B\003\340A\002\022#\n" + + "\026upper_bound_percentage\030\004 \001(\001B\003\340A\002\022*\n" + + "\035standard_deviation_percentage\030\005 \001(\001B\003\340A\001\"\372\003\n" + + "\025DailyRestingHeartRate\022$\n" + + "\004date\030\002 \001(\0132\021.google.type.DateB\003\340A\002\022\035\n" + + "\020beats_per_minute\030\004 \001(\003B\003\340A\002\022\210\001\n" + + "!daily_resting_heart_rate_metadata\030\005 \001(\0132X.google.devicesandservice" + + "s.health.v4.DailyRestingHeartRate.DailyRestingHeartRateMetadataB\003\340A\001\032\220\002\n" + + "\035DailyRestingHeartRateMetadata\022\213\001\n" + + "\022calculation_method\030\001 \001(\0162j.google.devicesandservices." + + "health.v4.DailyRestingHeartRate.DailyRes" + + "tingHeartRateMetadata.CalculationMethodB\003\340A\002\"a\n" + + "\021CalculationMethod\022\"\n" + + "\036CALCULATION_METHOD_UNSPECIFIED\020\000\022\016\n\n" + + "WITH_SLEEP\020\001\022\030\n" + + "\024ONLY_WITH_AWAKE_DATA\020\002\"\317\001\n" + + " DailySleepTemperatureDerivations\022$\n" + + "\004date\030\001 \001(\0132\021.google.type.DateB\003\340A\002\022(\n" + + "\033nightly_temperature_celsius\030\002 \001(\001B\003\340A\002\022)\n" + + "\034baseline_temperature_celsius\030\003 \001(\001B\003\340A\001\0220\n" + + "#relative_nightly_stddev_30d_celsius\030\004 \001(\001B\003\340A\001\"\360\002\n" + + "\013DailyVO2Max\022$\n" + + "\004date\030\001 \001(\0132\021.google.type.DateB\003\340A\002\022\024\n" + + "\007vo2_max\030\002 \001(\001B\003\340A\002\022\026\n" + + "\testimated\030\003 \001(\010B\003\340A\001\022f\n" + + "\024cardio_fitness_level\030\004 " + + "\001(\0162C.google.devicesandservices.health.v4.DailyVO2Max.CardioFitnessLevelB\003\340A\001\022\037\n" + + "\022vo2_max_covariance\030\005 \001(\001B\003\340A\001\"\203\001\n" + + "\022CardioFitnessLevel\022$\n" + + " CARDIO_FITNESS_LEVEL_UNSPECIFIED\020\000\022\010\n" + + "\004POOR\020\001\022\010\n" + + "\004FAIR\020\002\022\013\n" + + "\007AVERAGE\020\003\022\010\n" + + "\004GOOD\020\004\022\r\n" + + "\tVERY_GOOD\020\005\022\r\n" + + "\tEXCELLENT\020\006\"y\n" + + "\010Distance\022S\n" + + "\010interval\030\002 \001(\0132<.goo" + + "gle.devicesandservices.health.v4.ObservationTimeIntervalB\003\340A\002\022\030\n" + + "\013millimeters\030\003 \001(\003B\003\340A\002\".\n" + + "\023DistanceRollupValue\022\027\n" + + "\017millimeters_sum\030\001 \001(\003\"\222\020\n" + + "\010Exercise\022O\n" + + "\010interval\030\002" + + " \001(\01328.google.devicesandservices.health.v4.SessionTimeIntervalB\003\340A\002\022V\n\r" + + "exercise_type\030\006" + + " \001(\0162:.google.devicesandservices.health.v4.Exercise.ExerciseTypeB\003\340A\002\022O\n" + + "\006splits\030\010 \003(\0132:.google.devicesandservice" + + "s.health.v4.Exercise.SplitSummaryB\003\340A\001\022Y\n" + + "\017exercise_events\030\017 \003(\0132;.google.devices" + + "andservices.health.v4.Exercise.ExerciseEventB\003\340A\001\022X\n" + + "\017split_summaries\030\t \003(\0132:.goo" + + "gle.devicesandservices.health.v4.Exercise.SplitSummaryB\003\340A\001\022Q\n" + + "\017metrics_summary\030\n" + + " \001(\01323.google.devicesandservices.health.v4.MetricsSummaryB\003\340A\002\022^\n" + + "\021exercise_metadata\030\013 \001(\0132>.google.devicesandservices.he" + + "alth.v4.Exercise.ExerciseMetadataB\003\340A\001\022\031\n" + + "\014display_name\030\014 \001(\tB\003\340A\002\0227\n" + + "\017active_duration\030\r" + + " \001(\0132\031.google.protobuf.DurationB\003\340A\001\022\022\n" + + "\005notes\030\016 \001(\tB\003\340A\001\0224\n" + + "\013update_time\030\020 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" + + "\013create_time\030\021" + + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\032\262\004\n" + + "\014SplitSummary\0223\n\n" + + "start_time\030\001 \001(\0132\032.google.protobuf.TimestampB\003\340A\002\0228\n" + + "\020start_utc_offset\030\002" + + " \001(\0132\031.google.protobuf.DurationB\003\340A\002\0221\n" + + "\010end_time\030\003 \001(\0132\032.google.protobuf.TimestampB\003\340A\002\0226\n" + + "\016end_utc_offset\030\004" + + " \001(\0132\031.google.protobuf.DurationB\003\340A\002\0227\n" + + "\017active_duration\030\005" + + " \001(\0132\031.google.protobuf.DurationB\003\340A\003\022Q\n" + + "\017metrics_summary\030\006" + + " \001(\01323.google.devicesandservices.health.v4.MetricsSummaryB\003\340A\002\022]\n\n" + + "split_type\030\007 \001(\0162D.google.devicesandservices.health" + + ".v4.Exercise.SplitSummary.SplitTypeB\003\340A\002\"]\n" + + "\tSplitType\022\032\n" + + "\026SPLIT_TYPE_UNSPECIFIED\020\000\022\n\n" + + "\006MANUAL\020\001\022\014\n" + + "\010DURATION\020\002\022\014\n" + + "\010DISTANCE\020\003\022\014\n" + + "\010CALORIES\020\004\032\367\002\n\r" + + "ExerciseEvent\0223\n\n" + + "event_time\030\001 \001(\0132\032.google.protobuf.TimestampB\003\340A\002\0228\n" + + "\020event_utc_offset\030\002" + + " \001(\0132\031.google.protobuf.DurationB\003\340A\002\022o\n" + + "\023exercise_event_type\030\003 \001(\0162M.google.devicesandservice" + + "s.health.v4.Exercise.ExerciseEvent.ExerciseEventTypeB\003\340A\002\"\205\001\n" + + "\021ExerciseEventType\022#\n" + + "\037EXERCISE_EVENT_TYPE_UNSPECIFIED\020\000\022\t\n" + + "\005START\020\001\022\010\n" + + "\004STOP\020\002\022\t\n" + + "\005PAUSE\020\003\022\n\n" + + "\006RESUME\020\004\022\016\n\n" + + "AUTO_PAUSE\020\005\022\017\n" + + "\013AUTO_RESUME\020\006\032N\n" + + "\020ExerciseMetadata\022$\n" + + "\027pool_length_millimeters\030\001 \001(\003B\003\340A\001\022\024\n" + + "\007has_gps\030\002 \001(\010B\003\340A\001\"\320\001\n" + + "\014ExerciseType\022\035\n" + + "\031EXERCISE_TYPE_UNSPECIFIED\020\000\022\013\n" + + "\007RUNNING\020\001\022\013\n" + + "\007WALKING\020\002\022\n\n" + + "\006BIKING\020\003\022\014\n" + + "\010SWIMMING\020\004\022\n\n" + + "\006HIKING\020\005\022\010\n" + + "\004YOGA\020\006\022\013\n" + + "\007PILATES\020\007\022\013\n" + + "\007WORKOUT\020\010\022\010\n" + + "\004HIIT\020\t\022\021\n\r" + + "WEIGHTLIFTING\020\n" + + "\022\025\n" + + "\021STRENGTH_TRAINING\020\013\022\t\n" + + "\005OTHER\020\014\"q\n" + + "\006Floors\022S\n" + + "\010interval\030\002 \001(\0132<.googl" + + "e.devicesandservices.health.v4.ObservationTimeIntervalB\003\340A\002\022\022\n" + + "\005count\030\004 \001(\003B\003\340A\002\"&\n" + + "\021FloorsRollupValue\022\021\n" + + "\tcount_sum\030\001 \001(\003\"3\n" + + "\023AltitudeRollupValue\022\034\n" + + "\024gain_millimeters_sum\030\001 \001(\003\"\216\005\n" + + "\tHeartRate\022T\n" + + "\013sample_time\030\002" + + " \001(\0132:.google.devicesandservices.health.v4.ObservationSampleTimeB\003\340A\002\022\035\n" + + "\020beats_per_minute\030\004 \001(\003B\003\340A\002\022W\n" + + "\010metadata\030\006 \001(" + + "\0132@.google.devicesandservices.health.v4.HeartRate.HeartRateMetadataB\003\340A\001\032\262\003\n" + + "\021HeartRateMetadata\022k\n" + + "\016motion_context\030\001 \001(\0162N.google.devicesandservices.health.v4.Hea" + + "rtRate.HeartRateMetadata.MotionContextB\003\340A\001\022m\n" + + "\017sensor_location\030\002 \001(\0162O.google.de" + + "vicesandservices.health.v4.HeartRate.HeartRateMetadata.SensorLocationB\003\340A\001\"J\n\r" + + "MotionContext\022\036\n" + + "\032MOTION_CONTEXT_UNSPECIFIED\020\000\022\n\n" + + "\006ACTIVE\020\001\022\r\n" + + "\tSEDENTARY\020\002\"u\n" + + "\016SensorLocation\022\037\n" + + "\033SENSOR_LOCATION_UNSPECIFIED\020\000\022\t\n" + + "\005CHEST\020\001\022\t\n" + + "\005WRIST\020\002\022\n\n" + + "\006FINGER\020\003\022\010\n" + + "\004HAND\020\004\022\014\n" + + "\010EAR_LOBE\020\005\022\010\n" + + "\004FOOT\020\006\"\312\001\n" + + "\024HeartRateRollupValue\022!\n" + + "\024beats_per_minute_avg\030\001 \001(\001H\000\210\001\001\022!\n" + + "\024beats_per_minute_max\030\002 \001(\001H\001\210\001\001\022!\n" + + "\024beats_per_minute_min\030\003 \001(\001H\002\210\001\001B\027\n" + + "\025_beats_per_minute_avgB\027\n" + + "\025_beats_per_minute_maxB\027\n" + + "\025_beats_per_minute_min\"L\n" + + "\024RunVO2MaxRollupValue\022\020\n" + + "\010rate_min\030\001 \001(\001\022\020\n" + + "\010rate_max\030\002 \001(\001\022\020\n" + + "\010rate_avg\030\003 \001(\001\"{\n" + + "\tRunVO2Max\022T\n" + + "\013sample_time\030\001 \001(\0132:.google.devi" + + "cesandservices.health.v4.ObservationSampleTimeB\003\340A\002\022\030\n" + + "\013run_vo2_max\030\002 \001(\001B\003\340A\002\"\222\002\n" + + ",HeartRateVariabilityPersonalRangeRollupValue\022<\n" + + "/average_heart_rate_variability_milliseconds_min\030\001" + + " \001(\001H\000\210\001\001\022<\n" + + "/average_heart_rate_variability_milliseconds_max\030\002" + + " \001(\001H\001\210\001\001B2\n" + + "0_average_heart_rate_variability_milliseconds_minB2\n" + + "0_average_heart_rate_variability_milliseconds_max\"\177\n" + + "\006Height\022T\n" + + "\013sample_time\030\001 \001(\0132:.google.devic" + + "esandservices.health.v4.ObservationSampleTimeB\003\340A\002\022\037\n" + + "\022height_millimeters\030\002 \001(\003B\003\340A\002\"\340\001\n" + + "\024HeartRateVariability\022T\n" + + "\013sample_time\030\001" + + " \001(\0132:.google.devicesandservices.health.v4.ObservationSampleTimeB\003\340A\002\022D\n" + + "7root_mean_square_of_successive_differences_milliseconds\030\002" + + " \001(\001B\003\340A\001\022,\n" + + "\037standard_deviation_milliseconds\030\003 \001(\001B\003\340A\001\"|\n" + + "\016VolumeQuantity\022\030\n" + + "\013milliliters\030\001 \001(\001B\003\340A\002\022P\n" + + "\022user_provided_unit\030\002" + + " \001(\0162/.google.devicesandservices.health.v4.VolumeUnitB\003\340A\001\"\262\001\n" + + "\014HydrationLog\022O\n" + + "\010interval\030\001 \001(\01328.google" + + ".devicesandservices.health.v4.SessionTimeIntervalB\003\340A\002\022Q\n" + + "\017amount_consumed\030\002 \001(\0132" + + "3.google.devicesandservices.health.v4.VolumeQuantityB\003\340A\002\"\223\002\n" + + "\027HydrationLogRollupValue\022j\n" + + "\017amount_consumed\030\001 \001(\0132Q.google." + + "devicesandservices.health.v4.HydrationLogRollupValue.VolumeQuantityRollup\032\213\001\n" + + "\024VolumeQuantityRollup\022\034\n" + + "\017milliliters_sum\030\001 \001(\001B\003\340A\002\022U\n" + + "\027user_provided_unit_last\030\002 \001(" + + "\0162/.google.devicesandservices.health.v4.VolumeUnitB\003\340A\001\"\230\014\n" + + "\016MetricsSummary\022\037\n\r" + + "calories_kcal\030\001 \001(\001B\003\340A\001H\000\210\001\001\022&\n" + + "\024distance_millimeters\030\002 \001(\001B\003\340A\001H\001\210\001\001\022\027\n" + + "\005steps\030\003 \001(\003B\003\340A\001H\002\210\001\001\0226\n" + + "$average_speed_millimeters_per_second\030\004" + + " \001(\001B\003\340A\001H\003\210\001\001\0220\n" + + "\036average_pace_seconds_per_meter\030\005" + + " \001(\001B\003\340A\001H\004\210\001\001\0225\n" + + "#average_heart_rate_beats_per_minute\030\006" + + " \001(\003B\003\340A\001H\005\210\001\001\022,\n" + + "\032elevation_gain_millimeters\030\007 \001(\001B\003\340A\001H\006\210\001\001\022%\n" + + "\023active_zone_minutes\030\t \001(\003B\003\340A\001H\007\210\001\001\022\035\n" + + "\013run_vo2_max\030\n" + + " \001(\001B\003\340A\001H\010\210\001\001\022$\n" + + "\022total_swim_lengths\030\013 \001(\001B\003\340A\001H\t\210\001\001\022p\n" + + "\031heart_rate_zone_durations\030\014 \001(\0132H.google.devicesandservices.health.v4" + + ".MetricsSummary.TimeInHeartRateZonesB\003\340A\001\022b\n" + + "\020mobility_metrics\030\r" + + " \001(\0132C.google.dev" + + "icesandservices.health.v4.MetricsSummary.MobilityMetricsB\003\340A\001\032\353\001\n" + + "\024TimeInHeartRateZones\0222\n\n" + + "light_time\030\001 \001(\0132\031.google.protobuf.DurationB\003\340A\001\0225\n\r" + + "moderate_time\030\002 \001(\0132\031.google.protobuf.DurationB\003\340A\001\0225\n\r" + + "vigorous_time\030\003 \001(\0132\031.google.protobuf.DurationB\003\340A\001\0221\n" + + "\tpeak_time\030\004" + + " \001(\0132\031.google.protobuf.DurationB\003\340A\001\032\235\003\n" + + "\017MobilityMetrics\022.\n" + + "\034avg_cadence_steps_per_minute\030\001" + + " \001(\001B\003\340A\001H\000\210\001\001\022/\n" + + "\035avg_stride_length_millimeters\030\002" + + " \001(\003B\003\340A\001H\001\210\001\001\0226\n" + + "$avg_vertical_oscillation_millimeters\030\003" + + " \001(\003B\003\340A\001H\002\210\001\001\022$\n" + + "\022avg_vertical_ratio\030\004 \001(\001B\003\340A\001H\003\210\001\001\022H\n" + + " avg_ground_contact_time_duration\030\005" + + " \001(\0132\031.google.protobuf.DurationB\003\340A\001B\037\n" + + "\035_avg_cadence_steps_per_minuteB \n" + + "\036_avg_stride_length_millimetersB\'\n" + + "%_avg_vertical_oscillation_millimetersB\025\n" + + "\023_avg_vertical_ratioB\020\n" + + "\016_calories_kcalB\027\n" + + "\025_distance_millimetersB\010\n" + + "\006_stepsB\'\n" + + "%_average_speed_millimeters_per_secondB!\n" + + "\037_average_pace_seconds_per_meterB&\n" + + "$_average_heart_rate_beats_per_minuteB\035\n" + + "\033_elevation_gain_millimetersB\026\n" + + "\024_active_zone_minutesB\016\n" + + "\014_run_vo2_maxB\025\n" + + "\023_total_swim_lengths\"\201\001\n" + + "\020OxygenSaturation\022T\n" + + "\013sample_time\030\001 \001(\0132:.google.devicesand" + + "services.health.v4.ObservationSampleTimeB\003\340A\002\022\027\n\n" + + "percentage\030\002 \001(\001B\003\340A\002\"\242\001\n" + + "(RestingHeartRatePersonalRangeRollupValue\022!\n" + + "\024beats_per_minute_min\030\001 \001(\001H\000\210\001\001\022!\n" + + "\024beats_per_minute_max\030\002 \001(\001H\001\210\001\001B\027\n" + + "\025_beats_per_minute_minB\027\n" + + "\025_beats_per_minute_max\"\235\006\n" + + "\033RespiratoryRateSleepSummary\022T\n" + + "\013sample_time\030\001" + + " \001(\0132:.google.devicesandservices.health.v4.ObservationSampleTimeB\003\340A\002\022\205\001\n" + + "\020deep_sleep_stats\030\002 \001(\0132f.google.devicesand" + + "services.health.v4.RespiratoryRateSleepS" + + "ummary.RespiratoryRateSleepSummaryStatisticsB\003\340A\001\022\206\001\n" + + "\021light_sleep_stats\030\003 \001(\0132f.google.devicesandservices.health.v4.Resp" + + "iratoryRateSleepSummary.RespiratoryRateSleepSummaryStatisticsB\003\340A\001\022\204\001\n" + + "\017rem_sleep_stats\030\004 \001(\0132f.google.devicesandservices" + + ".health.v4.RespiratoryRateSleepSummary.R" + + "espiratoryRateSleepSummaryStatisticsB\003\340A\001\022\205\001\n" + + "\020full_sleep_stats\030\005 \001(\0132f.google.de" + + "vicesandservices.health.v4.RespiratoryRa" + + "teSleepSummary.RespiratoryRateSleepSummaryStatisticsB\003\340A\002\032\207\001\n" + + "%RespiratoryRateSleepSummaryStatistics\022\037\n" + + "\022breaths_per_minute\030\001 \001(\001B\003\340A\002\022\037\n" + + "\022standard_deviation\030\002 \001(\001B\003\340A\001\022\034\n" + + "\017signal_to_noise\030\003 \001(\001B\003\340A\001\"\226\023\n" + + "\005Sleep\022O\n" + + "\010interval\030\003 \001(\01328.google.devices" + + "andservices.health.v4.SessionTimeIntervalB\003\340A\002\022G\n" + + "\004type\030\004 \001(\01624.google.devicesand" + + "services.health.v4.Sleep.SleepTypeB\003\340A\001\022J\n" + + "\006stages\030\005" + + " \003(\01325.google.devicesandservices.health.v4.Sleep.SleepStageB\003\340A\001\022\\\n" + + "\023out_of_bed_segments\030\006 \003(\0132:.google.device" + + "sandservices.health.v4.Sleep.OutOfBedSegmentB\003\340A\001\022O\n" + + "\010metadata\030\010 \001(\01328.google.dev" + + "icesandservices.health.v4.Sleep.SleepMetadataB\003\340A\001\022M\n" + + "\007summary\030\t \001(\01327.google.dev" + + "icesandservices.health.v4.Sleep.SleepSummaryB\003\340A\003\0224\n" + + "\013create_time\030\n" + + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" + + "\013update_time\030\013" + + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\032\240\003\n\n" + + "SleepStage\0223\n\n" + + "start_time\030\003 \001(\0132\032.google.protobuf.TimestampB\003\340A\002\0228\n" + + "\020start_utc_offset\030\004" + + " \001(\0132\031.google.protobuf.DurationB\003\340A\002\0221\n" + + "\010end_time\030\005 \001(\0132\032.google.protobuf.TimestampB\003\340A\002\0226\n" + + "\016end_utc_offset\030\006" + + " \001(\0132\031.google.protobuf.DurationB\003\340A\002\022L\n" + + "\004type\030\007" + + " \001(\01629.google.devicesandservices.health.v4.Sleep.SleepStageTypeB\003\340A\002\0224\n" + + "\013create_time\030\010 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" + + "\013update_time\030\t" + + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\032\353\001\n" + + "\017OutOfBedSegment\0223\n\n" + + "start_time\030\001 \001(\0132\032.google.protobuf.TimestampB\003\340A\002\0228\n" + + "\020start_utc_offset\030\002" + + " \001(\0132\031.google.protobuf.DurationB\003\340A\002\0221\n" + + "\010end_time\030\003 \001(\0132\032.google.protobuf.TimestampB\003\340A\002\0226\n" + + "\016end_utc_offset\030\004" + + " \001(\0132\031.google.protobuf.DurationB\003\340A\002\032\276\003\n\r" + + "SleepMetadata\022`\n\r" + + "stages_status\030\001 \001(\0162D.google.devicesandservi" + + "ces.health.v4.Sleep.SleepMetadata.StagesStateB\003\340A\003\022\026\n" + + "\tprocessed\030\002 \001(\010B\003\340A\003\022\020\n" + + "\003nap\030\005 \001(\010B\003\340A\003\022\034\n" + + "\017manually_edited\030\006 \001(\010B\003\340A\003\022\030\n" + + "\013external_id\030\007 \001(\tB\003\340A\001\"\350\001\n" + + "\013StagesState\022\034\n" + + "\030STAGES_STATE_UNSPECIFIED\020\000\022\025\n" + + "\021REJECTED_COVERAGE\020\001\022\024\n" + + "\020REJECTED_MAX_GAP\020\002\022\026\n" + + "\022REJECTED_START_GAP\020\003\022\024\n" + + "\020REJECTED_END_GAP\020\004\022\020\n" + + "\014REJECTED_NAP\020\005\022\023\n" + + "\017REJECTED_SERVER\020\006\022\013\n" + + "\007TIMEOUT\020\007\022\r\n" + + "\tSUCCEEDED\020\010\022\035\n" + + "\031PROCESSING_INTERNAL_ERROR\020\t\032\261\004\n" + + "\014SleepSummary\022)\n" + + "\027minutes_in_sleep_period\030\001 \001(\003B\003\340A\003H\000\210\001\001\022\'\n" + + "\025minutes_after_wake_up\030\002 \001(\003B\003\340A\003H\001\210\001\001\022(\n" + + "\026minutes_to_fall_asleep\030\003 \001(\003B\003\340A\003H\002\210\001\001\022 \n" + + "\016minutes_asleep\030\004 \001(\003B\003\340A\003H\003\210\001\001\022\037\n\r" + + "minutes_awake\030\005 \001(\003B\003\340A\003H\004\210\001\001\022a\n" + + "\016stages_summary\030\006 \003(\0132D.google.devicesandser" + + "vices.health.v4.Sleep.SleepSummary.StageSummaryB\003\340A\003\032\206\001\n" + + "\014StageSummary\022L\n" + + "\004type\030\001 " + + "\001(\01629.google.devicesandservices.health.v4.Sleep.SleepStageTypeB\003\340A\003\022\024\n" + + "\007minutes\030\002 \001(\003B\003\340A\003\022\022\n" + + "\005count\030\003 \001(\003B\003\340A\003B\032\n" + + "\030_minutes_in_sleep_periodB\030\n" + + "\026_minutes_after_wake_upB\031\n" + + "\027_minutes_to_fall_asleepB\021\n" + + "\017_minutes_asleepB\020\n" + + "\016_minutes_awake\"@\n" + + "\tSleepType\022\032\n" + + "\026SLEEP_TYPE_UNSPECIFIED\020\000\022\013\n" + + "\007CLASSIC\020\001\022\n\n" + + "\006STAGES\020\002\"u\n" + + "\016SleepStageType\022 \n" + + "\034SLEEP_STAGE_TYPE_UNSPECIFIED\020\000\022\t\n" + + "\005AWAKE\020\001\022\t\n" + + "\005LIGHT\020\002\022\010\n" + + "\004DEEP\020\003\022\007\n" + + "\003REM\020\004\022\n\n" + + "\006ASLEEP\020\005\022\014\n" + + "\010RESTLESS\020\006\"p\n" + + "\005Steps\022S\n" + + "\010interval\030\002 \001(\0132" + + "<.google.devicesandservices.health.v4.ObservationTimeIntervalB\003\340A\002\022\022\n" + + "\005count\030\004 \001(\003B\003\340A\002\"%\n" + + "\020StepsRollupValue\022\021\n" + + "\tcount_sum\030\001 \001(\003\"\331\002\n" + + "\017SwimLengthsData\022S\n" + + "\010interval\030\001 " + + "\001(\0132<.google.devicesandservices.health.v4.ObservationTimeIntervalB\003\340A\002\022b\n" + + "\020swim_stroke_type\030\002 \001(\0162C.google.devicesandserv" + + "ices.health.v4.SwimLengthsData.SwimStrokeTypeB\003\340A\002\022\031\n" + + "\014stroke_count\030\003 \001(\003B\003\340A\002\"r\n" + + "\016SwimStrokeType\022 \n" + + "\034SWIM_STROKE_TYPE_UNSPECIFIED\020\000\022\r\n" + + "\tFREESTYLE\020\001\022\016\n\n" + + "BACKSTROKE\020\002\022\020\n" + + "\014BREASTSTROKE\020\003\022\r\n" + + "\tBUTTERFLY\020\004\"6\n" + + "\032SwimLengthsDataRollupValue\022\030\n" + + "\020stroke_count_sum\030\001 \001(\003\"\305\001\n" + + "\023TimeInHeartRateZone\022S\n" + + "\010interval\030\001 \001(\0132<.google.devicesandservices." + + "health.v4.ObservationTimeIntervalB\003\340A\002\022Y\n" + + "\024heart_rate_zone_type\030\002 \001(\01626.google.de" + + "vicesandservices.health.v4.HeartRateZoneTypeB\003\340A\002\"\273\002\n" + + "\036TimeInHeartRateZoneRollupValue\022~\n" + + "\030time_in_heart_rate_zones\030\001 \003(\0132\\" + + ".google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue.TimeInHeartR", + "ateZoneValue\032\230\001\n" + + "\030TimeInHeartRateZoneValue\022O\n" + + "\017heart_rate_zone\030\001 \001(\01626.google.devi" + + "cesandservices.health.v4.HeartRateZoneType\022+\n" + + "\010duration\030\002 \001(\0132\031.google.protobuf.Duration\",\n" + + "\030TotalCaloriesRollupValue\022\020\n" + + "\010kcal_sum\030\001 \001(\001\"\204\004\n" + + "\006VO2Max\022T\n" + + "\013sample_time\030\001" + + " \001(\0132:.google.devicesandservices.health.v4.ObservationSampleTimeB\003\340A\002\022\024\n" + + "\007vo2_max\030\002 \001(\001B\003\340A\002\022^\n" + + "\022measurement_method\030\004 \001(\016" + + "2=.google.devicesandservices.health.v4.VO2Max.MeasurementMethodB\003\340A\001\"\255\002\n" + + "\021MeasurementMethod\022\"\n" + + "\036MEASUREMENT_METHOD_UNSPECIFIED\020\000\022\016\n\n" + + "FITBIT_RUN\020\001\022\026\n" + + "\022GOOGLE_DEMOGRAPHIC\020\002\022\017\n" + + "\013COOPER_TEST\020\003\022\024\n" + + "\020HEART_RATE_RATIO\020\004\022\022\n" + + "\016METABOLIC_CART\020\005\022\033\n" + + "\027MULTISTAGE_FITNESS_TEST\020\006\022\031\n" + + "\025ROCKPORT_FITNESS_TEST\020\007\022\020\n" + + "\014MAX_EXERCISE\020\010\022\037\n" + + "\033PREDICTION_SUB_MAX_EXERCISE\020\t\022\033\n" + + "\027PREDICTION_NON_EXERCISE\020\n" + + "\022\t\n" + + "\005OTHER\020\013\"\215\001\n" + + "\006Weight\022T\n" + + "\013sample_time\030\002" + + " \001(\0132:.google.devicesandservices.health.v4.ObservationSampleTimeB\003\340A\002\022\031\n" + + "\014weight_grams\030\003 \001(\001B\003\340A\002\022\022\n" + + "\005notes\030\004 \001(\tB\003\340A\001\"-\n" + + "\021WeightRollupValue\022\030\n" + + "\020weight_grams_avg\030\001 \001(\001\"f\n" + + "\017SedentaryPeriod\022S\n" + + "\010interval\030\001 \001(\013" + + "2<.google.devicesandservices.health.v4.ObservationTimeIntervalB\003\340A\002\"M\n" + + "\032SedentaryPeriodRollupValue\022/\n" + + "\014duration_sum\030\001 \001(\0132\031.google.protobuf.Duration*j\n" + + "\021HeartRateZoneType\022$\n" + + " HEART_RATE_ZONE_TYPE_UNSPECIFIED\020\000\022\t\n" + + "\005LIGHT\020\001\022\014\n" + + "\010MODERATE\020\002\022\014\n" + + "\010VIGOROUS\020\003\022\010\n" + + "\004PEAK\020\004*\260\001\n\n" + + "VolumeUnit\022\033\n" + + "\027VOLUME_UNIT_UNSPECIFIED\020\000\022\020\n" + + "\014CUP_IMPERIAL\020\001\022\n\n" + + "\006CUP_US\020\002\022\030\n" + + "\024FLUID_OUNCE_IMPERIAL\020\003\022\022\n" + + "\016FLUID_OUNCE_US\020\004\022\t\n" + + "\005LITER\020\005\022\016\n\n" + + "MILLILITER\020\006\022\021\n\r" + + "PINT_IMPERIAL\020\007\022\013\n" + + "\007PINT_US\020\010B\204\002\n" + + "\'com.google.devicesandservices.health.v4B\016D" + + "ataModelProtoP\001ZRgoogle.golang.org/genproto/googleapis/devicesandservices/health" + + "/apiv4main;healthpb\252\002#Google.DevicesAndS" + + "ervices.Health.V4\312\002#Google\\DevicesAndSer" + + "vices\\Health\\V4\352\002&Google::DevicesAndServices::Health::V4b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.devicesandservices.health.v4.DataCoordinatesProto.getDescriptor(), + com.google.protobuf.DurationProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.type.DateProto.getDescriptor(), + }); + internal_static_google_devicesandservices_health_v4_ActiveZoneMinutes_descriptor = + getDescriptor().getMessageType(0); + internal_static_google_devicesandservices_health_v4_ActiveZoneMinutes_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_ActiveZoneMinutes_descriptor, + new java.lang.String[] { + "Interval", "HeartRateZone", "ActiveZoneMinutes", + }); + internal_static_google_devicesandservices_health_v4_ActiveZoneMinutesRollupValue_descriptor = + getDescriptor().getMessageType(1); + internal_static_google_devicesandservices_health_v4_ActiveZoneMinutesRollupValue_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_ActiveZoneMinutesRollupValue_descriptor, + new java.lang.String[] { + "SumInCardioHeartZone", "SumInPeakHeartZone", "SumInFatBurnHeartZone", + }); + internal_static_google_devicesandservices_health_v4_ActiveMinutes_descriptor = + getDescriptor().getMessageType(2); + internal_static_google_devicesandservices_health_v4_ActiveMinutes_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_ActiveMinutes_descriptor, + new java.lang.String[] { + "Interval", "ActiveMinutesByActivityLevel", + }); + internal_static_google_devicesandservices_health_v4_ActiveMinutes_ActiveMinutesByActivityLevel_descriptor = + internal_static_google_devicesandservices_health_v4_ActiveMinutes_descriptor.getNestedType( + 0); + internal_static_google_devicesandservices_health_v4_ActiveMinutes_ActiveMinutesByActivityLevel_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_ActiveMinutes_ActiveMinutesByActivityLevel_descriptor, + new java.lang.String[] { + "ActivityLevel", "ActiveMinutes", + }); + internal_static_google_devicesandservices_health_v4_ActiveMinutesRollupValue_descriptor = + getDescriptor().getMessageType(3); + internal_static_google_devicesandservices_health_v4_ActiveMinutesRollupValue_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_ActiveMinutesRollupValue_descriptor, + new java.lang.String[] { + "ActiveMinutesRollupByActivityLevel", + }); + internal_static_google_devicesandservices_health_v4_ActiveMinutesRollupValue_ActiveMinutesRollupByActivityLevel_descriptor = + internal_static_google_devicesandservices_health_v4_ActiveMinutesRollupValue_descriptor + .getNestedType(0); + internal_static_google_devicesandservices_health_v4_ActiveMinutesRollupValue_ActiveMinutesRollupByActivityLevel_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_ActiveMinutesRollupValue_ActiveMinutesRollupByActivityLevel_descriptor, + new java.lang.String[] { + "ActivityLevel", "ActiveMinutesSum", + }); + internal_static_google_devicesandservices_health_v4_ActivityLevel_descriptor = + getDescriptor().getMessageType(4); + internal_static_google_devicesandservices_health_v4_ActivityLevel_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_ActivityLevel_descriptor, + new java.lang.String[] { + "Interval", "ActivityLevelType", + }); + internal_static_google_devicesandservices_health_v4_ActivityLevelRollupValue_descriptor = + getDescriptor().getMessageType(5); + internal_static_google_devicesandservices_health_v4_ActivityLevelRollupValue_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_ActivityLevelRollupValue_descriptor, + new java.lang.String[] { + "ActivityLevelRollupsByActivityLevelType", + }); + internal_static_google_devicesandservices_health_v4_ActivityLevelRollupValue_ActivityLevelRollupByActivityLevelType_descriptor = + internal_static_google_devicesandservices_health_v4_ActivityLevelRollupValue_descriptor + .getNestedType(0); + internal_static_google_devicesandservices_health_v4_ActivityLevelRollupValue_ActivityLevelRollupByActivityLevelType_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_ActivityLevelRollupValue_ActivityLevelRollupByActivityLevelType_descriptor, + new java.lang.String[] { + "ActivityLevelType", "TotalDuration", + }); + internal_static_google_devicesandservices_health_v4_Altitude_descriptor = + getDescriptor().getMessageType(6); + internal_static_google_devicesandservices_health_v4_Altitude_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_Altitude_descriptor, + new java.lang.String[] { + "Interval", "GainMillimeters", + }); + internal_static_google_devicesandservices_health_v4_BasalEnergyBurned_descriptor = + getDescriptor().getMessageType(7); + internal_static_google_devicesandservices_health_v4_BasalEnergyBurned_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_BasalEnergyBurned_descriptor, + new java.lang.String[] { + "Interval", "Kcal", + }); + internal_static_google_devicesandservices_health_v4_BodyFat_descriptor = + getDescriptor().getMessageType(8); + internal_static_google_devicesandservices_health_v4_BodyFat_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_BodyFat_descriptor, + new java.lang.String[] { + "SampleTime", "Percentage", + }); + internal_static_google_devicesandservices_health_v4_BodyFatRollupValue_descriptor = + getDescriptor().getMessageType(9); + internal_static_google_devicesandservices_health_v4_BodyFatRollupValue_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_BodyFatRollupValue_descriptor, + new java.lang.String[] { + "BodyFatPercentageAvg", + }); + internal_static_google_devicesandservices_health_v4_CaloriesInHeartRateZoneRollupValue_descriptor = + getDescriptor().getMessageType(10); + internal_static_google_devicesandservices_health_v4_CaloriesInHeartRateZoneRollupValue_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_CaloriesInHeartRateZoneRollupValue_descriptor, + new java.lang.String[] { + "CaloriesInHeartRateZones", + }); + internal_static_google_devicesandservices_health_v4_CaloriesInHeartRateZoneRollupValue_CaloriesInHeartRateZoneValue_descriptor = + internal_static_google_devicesandservices_health_v4_CaloriesInHeartRateZoneRollupValue_descriptor + .getNestedType(0); + internal_static_google_devicesandservices_health_v4_CaloriesInHeartRateZoneRollupValue_CaloriesInHeartRateZoneValue_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_CaloriesInHeartRateZoneRollupValue_CaloriesInHeartRateZoneValue_descriptor, + new java.lang.String[] { + "HeartRateZone", "Kcal", + }); + internal_static_google_devicesandservices_health_v4_DailyHeartRateZones_descriptor = + getDescriptor().getMessageType(11); + internal_static_google_devicesandservices_health_v4_DailyHeartRateZones_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_DailyHeartRateZones_descriptor, + new java.lang.String[] { + "Date", "HeartRateZones", + }); + internal_static_google_devicesandservices_health_v4_DailyHeartRateZones_HeartRateZone_descriptor = + internal_static_google_devicesandservices_health_v4_DailyHeartRateZones_descriptor + .getNestedType(0); + internal_static_google_devicesandservices_health_v4_DailyHeartRateZones_HeartRateZone_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_DailyHeartRateZones_HeartRateZone_descriptor, + new java.lang.String[] { + "HeartRateZoneType", "MinBeatsPerMinute", "MaxBeatsPerMinute", + }); + internal_static_google_devicesandservices_health_v4_DailyHeartRateVariability_descriptor = + getDescriptor().getMessageType(12); + internal_static_google_devicesandservices_health_v4_DailyHeartRateVariability_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_DailyHeartRateVariability_descriptor, + new java.lang.String[] { + "Date", + "AverageHeartRateVariabilityMilliseconds", + "NonRemHeartRateBeatsPerMinute", + "Entropy", + "DeepSleepRootMeanSquareOfSuccessiveDifferencesMilliseconds", + }); + internal_static_google_devicesandservices_health_v4_DailyRespiratoryRate_descriptor = + getDescriptor().getMessageType(13); + internal_static_google_devicesandservices_health_v4_DailyRespiratoryRate_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_DailyRespiratoryRate_descriptor, + new java.lang.String[] { + "Date", "BreathsPerMinute", + }); + internal_static_google_devicesandservices_health_v4_DailyOxygenSaturation_descriptor = + getDescriptor().getMessageType(14); + internal_static_google_devicesandservices_health_v4_DailyOxygenSaturation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_DailyOxygenSaturation_descriptor, + new java.lang.String[] { + "Date", + "AveragePercentage", + "LowerBoundPercentage", + "UpperBoundPercentage", + "StandardDeviationPercentage", + }); + internal_static_google_devicesandservices_health_v4_DailyRestingHeartRate_descriptor = + getDescriptor().getMessageType(15); + internal_static_google_devicesandservices_health_v4_DailyRestingHeartRate_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_DailyRestingHeartRate_descriptor, + new java.lang.String[] { + "Date", "BeatsPerMinute", "DailyRestingHeartRateMetadata", + }); + internal_static_google_devicesandservices_health_v4_DailyRestingHeartRate_DailyRestingHeartRateMetadata_descriptor = + internal_static_google_devicesandservices_health_v4_DailyRestingHeartRate_descriptor + .getNestedType(0); + internal_static_google_devicesandservices_health_v4_DailyRestingHeartRate_DailyRestingHeartRateMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_DailyRestingHeartRate_DailyRestingHeartRateMetadata_descriptor, + new java.lang.String[] { + "CalculationMethod", + }); + internal_static_google_devicesandservices_health_v4_DailySleepTemperatureDerivations_descriptor = + getDescriptor().getMessageType(16); + internal_static_google_devicesandservices_health_v4_DailySleepTemperatureDerivations_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_DailySleepTemperatureDerivations_descriptor, + new java.lang.String[] { + "Date", + "NightlyTemperatureCelsius", + "BaselineTemperatureCelsius", + "RelativeNightlyStddev30DCelsius", + }); + internal_static_google_devicesandservices_health_v4_DailyVO2Max_descriptor = + getDescriptor().getMessageType(17); + internal_static_google_devicesandservices_health_v4_DailyVO2Max_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_DailyVO2Max_descriptor, + new java.lang.String[] { + "Date", "Vo2Max", "Estimated", "CardioFitnessLevel", "Vo2MaxCovariance", + }); + internal_static_google_devicesandservices_health_v4_Distance_descriptor = + getDescriptor().getMessageType(18); + internal_static_google_devicesandservices_health_v4_Distance_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_Distance_descriptor, + new java.lang.String[] { + "Interval", "Millimeters", + }); + internal_static_google_devicesandservices_health_v4_DistanceRollupValue_descriptor = + getDescriptor().getMessageType(19); + internal_static_google_devicesandservices_health_v4_DistanceRollupValue_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_DistanceRollupValue_descriptor, + new java.lang.String[] { + "MillimetersSum", + }); + internal_static_google_devicesandservices_health_v4_Exercise_descriptor = + getDescriptor().getMessageType(20); + internal_static_google_devicesandservices_health_v4_Exercise_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_Exercise_descriptor, + new java.lang.String[] { + "Interval", + "ExerciseType", + "Splits", + "ExerciseEvents", + "SplitSummaries", + "MetricsSummary", + "ExerciseMetadata", + "DisplayName", + "ActiveDuration", + "Notes", + "UpdateTime", + "CreateTime", + }); + internal_static_google_devicesandservices_health_v4_Exercise_SplitSummary_descriptor = + internal_static_google_devicesandservices_health_v4_Exercise_descriptor.getNestedType(0); + internal_static_google_devicesandservices_health_v4_Exercise_SplitSummary_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_Exercise_SplitSummary_descriptor, + new java.lang.String[] { + "StartTime", + "StartUtcOffset", + "EndTime", + "EndUtcOffset", + "ActiveDuration", + "MetricsSummary", + "SplitType", + }); + internal_static_google_devicesandservices_health_v4_Exercise_ExerciseEvent_descriptor = + internal_static_google_devicesandservices_health_v4_Exercise_descriptor.getNestedType(1); + internal_static_google_devicesandservices_health_v4_Exercise_ExerciseEvent_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_Exercise_ExerciseEvent_descriptor, + new java.lang.String[] { + "EventTime", "EventUtcOffset", "ExerciseEventType", + }); + internal_static_google_devicesandservices_health_v4_Exercise_ExerciseMetadata_descriptor = + internal_static_google_devicesandservices_health_v4_Exercise_descriptor.getNestedType(2); + internal_static_google_devicesandservices_health_v4_Exercise_ExerciseMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_Exercise_ExerciseMetadata_descriptor, + new java.lang.String[] { + "PoolLengthMillimeters", "HasGps", + }); + internal_static_google_devicesandservices_health_v4_Floors_descriptor = + getDescriptor().getMessageType(21); + internal_static_google_devicesandservices_health_v4_Floors_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_Floors_descriptor, + new java.lang.String[] { + "Interval", "Count", + }); + internal_static_google_devicesandservices_health_v4_FloorsRollupValue_descriptor = + getDescriptor().getMessageType(22); + internal_static_google_devicesandservices_health_v4_FloorsRollupValue_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_FloorsRollupValue_descriptor, + new java.lang.String[] { + "CountSum", + }); + internal_static_google_devicesandservices_health_v4_AltitudeRollupValue_descriptor = + getDescriptor().getMessageType(23); + internal_static_google_devicesandservices_health_v4_AltitudeRollupValue_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_AltitudeRollupValue_descriptor, + new java.lang.String[] { + "GainMillimetersSum", + }); + internal_static_google_devicesandservices_health_v4_HeartRate_descriptor = + getDescriptor().getMessageType(24); + internal_static_google_devicesandservices_health_v4_HeartRate_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_HeartRate_descriptor, + new java.lang.String[] { + "SampleTime", "BeatsPerMinute", "Metadata", + }); + internal_static_google_devicesandservices_health_v4_HeartRate_HeartRateMetadata_descriptor = + internal_static_google_devicesandservices_health_v4_HeartRate_descriptor.getNestedType(0); + internal_static_google_devicesandservices_health_v4_HeartRate_HeartRateMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_HeartRate_HeartRateMetadata_descriptor, + new java.lang.String[] { + "MotionContext", "SensorLocation", + }); + internal_static_google_devicesandservices_health_v4_HeartRateRollupValue_descriptor = + getDescriptor().getMessageType(25); + internal_static_google_devicesandservices_health_v4_HeartRateRollupValue_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_HeartRateRollupValue_descriptor, + new java.lang.String[] { + "BeatsPerMinuteAvg", "BeatsPerMinuteMax", "BeatsPerMinuteMin", + }); + internal_static_google_devicesandservices_health_v4_RunVO2MaxRollupValue_descriptor = + getDescriptor().getMessageType(26); + internal_static_google_devicesandservices_health_v4_RunVO2MaxRollupValue_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_RunVO2MaxRollupValue_descriptor, + new java.lang.String[] { + "RateMin", "RateMax", "RateAvg", + }); + internal_static_google_devicesandservices_health_v4_RunVO2Max_descriptor = + getDescriptor().getMessageType(27); + internal_static_google_devicesandservices_health_v4_RunVO2Max_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_RunVO2Max_descriptor, + new java.lang.String[] { + "SampleTime", "RunVo2Max", + }); + internal_static_google_devicesandservices_health_v4_HeartRateVariabilityPersonalRangeRollupValue_descriptor = + getDescriptor().getMessageType(28); + internal_static_google_devicesandservices_health_v4_HeartRateVariabilityPersonalRangeRollupValue_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_HeartRateVariabilityPersonalRangeRollupValue_descriptor, + new java.lang.String[] { + "AverageHeartRateVariabilityMillisecondsMin", + "AverageHeartRateVariabilityMillisecondsMax", + }); + internal_static_google_devicesandservices_health_v4_Height_descriptor = + getDescriptor().getMessageType(29); + internal_static_google_devicesandservices_health_v4_Height_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_Height_descriptor, + new java.lang.String[] { + "SampleTime", "HeightMillimeters", + }); + internal_static_google_devicesandservices_health_v4_HeartRateVariability_descriptor = + getDescriptor().getMessageType(30); + internal_static_google_devicesandservices_health_v4_HeartRateVariability_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_HeartRateVariability_descriptor, + new java.lang.String[] { + "SampleTime", + "RootMeanSquareOfSuccessiveDifferencesMilliseconds", + "StandardDeviationMilliseconds", + }); + internal_static_google_devicesandservices_health_v4_VolumeQuantity_descriptor = + getDescriptor().getMessageType(31); + internal_static_google_devicesandservices_health_v4_VolumeQuantity_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_VolumeQuantity_descriptor, + new java.lang.String[] { + "Milliliters", "UserProvidedUnit", + }); + internal_static_google_devicesandservices_health_v4_HydrationLog_descriptor = + getDescriptor().getMessageType(32); + internal_static_google_devicesandservices_health_v4_HydrationLog_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_HydrationLog_descriptor, + new java.lang.String[] { + "Interval", "AmountConsumed", + }); + internal_static_google_devicesandservices_health_v4_HydrationLogRollupValue_descriptor = + getDescriptor().getMessageType(33); + internal_static_google_devicesandservices_health_v4_HydrationLogRollupValue_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_HydrationLogRollupValue_descriptor, + new java.lang.String[] { + "AmountConsumed", + }); + internal_static_google_devicesandservices_health_v4_HydrationLogRollupValue_VolumeQuantityRollup_descriptor = + internal_static_google_devicesandservices_health_v4_HydrationLogRollupValue_descriptor + .getNestedType(0); + internal_static_google_devicesandservices_health_v4_HydrationLogRollupValue_VolumeQuantityRollup_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_HydrationLogRollupValue_VolumeQuantityRollup_descriptor, + new java.lang.String[] { + "MillilitersSum", "UserProvidedUnitLast", + }); + internal_static_google_devicesandservices_health_v4_MetricsSummary_descriptor = + getDescriptor().getMessageType(34); + internal_static_google_devicesandservices_health_v4_MetricsSummary_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_MetricsSummary_descriptor, + new java.lang.String[] { + "CaloriesKcal", + "DistanceMillimeters", + "Steps", + "AverageSpeedMillimetersPerSecond", + "AveragePaceSecondsPerMeter", + "AverageHeartRateBeatsPerMinute", + "ElevationGainMillimeters", + "ActiveZoneMinutes", + "RunVo2Max", + "TotalSwimLengths", + "HeartRateZoneDurations", + "MobilityMetrics", + }); + internal_static_google_devicesandservices_health_v4_MetricsSummary_TimeInHeartRateZones_descriptor = + internal_static_google_devicesandservices_health_v4_MetricsSummary_descriptor.getNestedType( + 0); + internal_static_google_devicesandservices_health_v4_MetricsSummary_TimeInHeartRateZones_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_MetricsSummary_TimeInHeartRateZones_descriptor, + new java.lang.String[] { + "LightTime", "ModerateTime", "VigorousTime", "PeakTime", + }); + internal_static_google_devicesandservices_health_v4_MetricsSummary_MobilityMetrics_descriptor = + internal_static_google_devicesandservices_health_v4_MetricsSummary_descriptor.getNestedType( + 1); + internal_static_google_devicesandservices_health_v4_MetricsSummary_MobilityMetrics_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_MetricsSummary_MobilityMetrics_descriptor, + new java.lang.String[] { + "AvgCadenceStepsPerMinute", + "AvgStrideLengthMillimeters", + "AvgVerticalOscillationMillimeters", + "AvgVerticalRatio", + "AvgGroundContactTimeDuration", + }); + internal_static_google_devicesandservices_health_v4_OxygenSaturation_descriptor = + getDescriptor().getMessageType(35); + internal_static_google_devicesandservices_health_v4_OxygenSaturation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_OxygenSaturation_descriptor, + new java.lang.String[] { + "SampleTime", "Percentage", + }); + internal_static_google_devicesandservices_health_v4_RestingHeartRatePersonalRangeRollupValue_descriptor = + getDescriptor().getMessageType(36); + internal_static_google_devicesandservices_health_v4_RestingHeartRatePersonalRangeRollupValue_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_RestingHeartRatePersonalRangeRollupValue_descriptor, + new java.lang.String[] { + "BeatsPerMinuteMin", "BeatsPerMinuteMax", + }); + internal_static_google_devicesandservices_health_v4_RespiratoryRateSleepSummary_descriptor = + getDescriptor().getMessageType(37); + internal_static_google_devicesandservices_health_v4_RespiratoryRateSleepSummary_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_RespiratoryRateSleepSummary_descriptor, + new java.lang.String[] { + "SampleTime", "DeepSleepStats", "LightSleepStats", "RemSleepStats", "FullSleepStats", + }); + internal_static_google_devicesandservices_health_v4_RespiratoryRateSleepSummary_RespiratoryRateSleepSummaryStatistics_descriptor = + internal_static_google_devicesandservices_health_v4_RespiratoryRateSleepSummary_descriptor + .getNestedType(0); + internal_static_google_devicesandservices_health_v4_RespiratoryRateSleepSummary_RespiratoryRateSleepSummaryStatistics_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_RespiratoryRateSleepSummary_RespiratoryRateSleepSummaryStatistics_descriptor, + new java.lang.String[] { + "BreathsPerMinute", "StandardDeviation", "SignalToNoise", + }); + internal_static_google_devicesandservices_health_v4_Sleep_descriptor = + getDescriptor().getMessageType(38); + internal_static_google_devicesandservices_health_v4_Sleep_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_Sleep_descriptor, + new java.lang.String[] { + "Interval", + "Type", + "Stages", + "OutOfBedSegments", + "Metadata", + "Summary", + "CreateTime", + "UpdateTime", + }); + internal_static_google_devicesandservices_health_v4_Sleep_SleepStage_descriptor = + internal_static_google_devicesandservices_health_v4_Sleep_descriptor.getNestedType(0); + internal_static_google_devicesandservices_health_v4_Sleep_SleepStage_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_Sleep_SleepStage_descriptor, + new java.lang.String[] { + "StartTime", + "StartUtcOffset", + "EndTime", + "EndUtcOffset", + "Type", + "CreateTime", + "UpdateTime", + }); + internal_static_google_devicesandservices_health_v4_Sleep_OutOfBedSegment_descriptor = + internal_static_google_devicesandservices_health_v4_Sleep_descriptor.getNestedType(1); + internal_static_google_devicesandservices_health_v4_Sleep_OutOfBedSegment_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_Sleep_OutOfBedSegment_descriptor, + new java.lang.String[] { + "StartTime", "StartUtcOffset", "EndTime", "EndUtcOffset", + }); + internal_static_google_devicesandservices_health_v4_Sleep_SleepMetadata_descriptor = + internal_static_google_devicesandservices_health_v4_Sleep_descriptor.getNestedType(2); + internal_static_google_devicesandservices_health_v4_Sleep_SleepMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_Sleep_SleepMetadata_descriptor, + new java.lang.String[] { + "StagesStatus", "Processed", "Nap", "ManuallyEdited", "ExternalId", + }); + internal_static_google_devicesandservices_health_v4_Sleep_SleepSummary_descriptor = + internal_static_google_devicesandservices_health_v4_Sleep_descriptor.getNestedType(3); + internal_static_google_devicesandservices_health_v4_Sleep_SleepSummary_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_Sleep_SleepSummary_descriptor, + new java.lang.String[] { + "MinutesInSleepPeriod", + "MinutesAfterWakeUp", + "MinutesToFallAsleep", + "MinutesAsleep", + "MinutesAwake", + "StagesSummary", + }); + internal_static_google_devicesandservices_health_v4_Sleep_SleepSummary_StageSummary_descriptor = + internal_static_google_devicesandservices_health_v4_Sleep_SleepSummary_descriptor + .getNestedType(0); + internal_static_google_devicesandservices_health_v4_Sleep_SleepSummary_StageSummary_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_Sleep_SleepSummary_StageSummary_descriptor, + new java.lang.String[] { + "Type", "Minutes", "Count", + }); + internal_static_google_devicesandservices_health_v4_Steps_descriptor = + getDescriptor().getMessageType(39); + internal_static_google_devicesandservices_health_v4_Steps_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_Steps_descriptor, + new java.lang.String[] { + "Interval", "Count", + }); + internal_static_google_devicesandservices_health_v4_StepsRollupValue_descriptor = + getDescriptor().getMessageType(40); + internal_static_google_devicesandservices_health_v4_StepsRollupValue_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_StepsRollupValue_descriptor, + new java.lang.String[] { + "CountSum", + }); + internal_static_google_devicesandservices_health_v4_SwimLengthsData_descriptor = + getDescriptor().getMessageType(41); + internal_static_google_devicesandservices_health_v4_SwimLengthsData_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_SwimLengthsData_descriptor, + new java.lang.String[] { + "Interval", "SwimStrokeType", "StrokeCount", + }); + internal_static_google_devicesandservices_health_v4_SwimLengthsDataRollupValue_descriptor = + getDescriptor().getMessageType(42); + internal_static_google_devicesandservices_health_v4_SwimLengthsDataRollupValue_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_SwimLengthsDataRollupValue_descriptor, + new java.lang.String[] { + "StrokeCountSum", + }); + internal_static_google_devicesandservices_health_v4_TimeInHeartRateZone_descriptor = + getDescriptor().getMessageType(43); + internal_static_google_devicesandservices_health_v4_TimeInHeartRateZone_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_TimeInHeartRateZone_descriptor, + new java.lang.String[] { + "Interval", "HeartRateZoneType", + }); + internal_static_google_devicesandservices_health_v4_TimeInHeartRateZoneRollupValue_descriptor = + getDescriptor().getMessageType(44); + internal_static_google_devicesandservices_health_v4_TimeInHeartRateZoneRollupValue_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_TimeInHeartRateZoneRollupValue_descriptor, + new java.lang.String[] { + "TimeInHeartRateZones", + }); + internal_static_google_devicesandservices_health_v4_TimeInHeartRateZoneRollupValue_TimeInHeartRateZoneValue_descriptor = + internal_static_google_devicesandservices_health_v4_TimeInHeartRateZoneRollupValue_descriptor + .getNestedType(0); + internal_static_google_devicesandservices_health_v4_TimeInHeartRateZoneRollupValue_TimeInHeartRateZoneValue_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_TimeInHeartRateZoneRollupValue_TimeInHeartRateZoneValue_descriptor, + new java.lang.String[] { + "HeartRateZone", "Duration", + }); + internal_static_google_devicesandservices_health_v4_TotalCaloriesRollupValue_descriptor = + getDescriptor().getMessageType(45); + internal_static_google_devicesandservices_health_v4_TotalCaloriesRollupValue_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_TotalCaloriesRollupValue_descriptor, + new java.lang.String[] { + "KcalSum", + }); + internal_static_google_devicesandservices_health_v4_VO2Max_descriptor = + getDescriptor().getMessageType(46); + internal_static_google_devicesandservices_health_v4_VO2Max_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_VO2Max_descriptor, + new java.lang.String[] { + "SampleTime", "Vo2Max", "MeasurementMethod", + }); + internal_static_google_devicesandservices_health_v4_Weight_descriptor = + getDescriptor().getMessageType(47); + internal_static_google_devicesandservices_health_v4_Weight_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_Weight_descriptor, + new java.lang.String[] { + "SampleTime", "WeightGrams", "Notes", + }); + internal_static_google_devicesandservices_health_v4_WeightRollupValue_descriptor = + getDescriptor().getMessageType(48); + internal_static_google_devicesandservices_health_v4_WeightRollupValue_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_WeightRollupValue_descriptor, + new java.lang.String[] { + "WeightGramsAvg", + }); + internal_static_google_devicesandservices_health_v4_SedentaryPeriod_descriptor = + getDescriptor().getMessageType(49); + internal_static_google_devicesandservices_health_v4_SedentaryPeriod_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_SedentaryPeriod_descriptor, + new java.lang.String[] { + "Interval", + }); + internal_static_google_devicesandservices_health_v4_SedentaryPeriodRollupValue_descriptor = + getDescriptor().getMessageType(50); + internal_static_google_devicesandservices_health_v4_SedentaryPeriodRollupValue_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_SedentaryPeriodRollupValue_descriptor, + new java.lang.String[] { + "DurationSum", + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.devicesandservices.health.v4.DataCoordinatesProto.getDescriptor(); + com.google.protobuf.DurationProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.type.DateProto.getDescriptor(); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DataPoint.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DataPoint.java new file mode 100644 index 000000000000..febfd0e1c297 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DataPoint.java @@ -0,0 +1,11483 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_points.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * A computed or recorded metric.
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.DataPoint} + */ +@com.google.protobuf.Generated +public final class DataPoint extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.DataPoint) + DataPointOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DataPoint"); + } + + // Use DataPoint.newBuilder() to construct. + private DataPoint(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DataPoint() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_DataPoint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_DataPoint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.DataPoint.class, + com.google.devicesandservices.health.v4.DataPoint.Builder.class); + } + + private int bitField0_; + private int dataCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object data_; + + public enum DataCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + STEPS(4), + FLOORS(5), + HEART_RATE(6), + SLEEP(8), + DAILY_RESTING_HEART_RATE(9), + DAILY_HEART_RATE_VARIABILITY(10), + EXERCISE(11), + WEIGHT(12), + ALTITUDE(13), + DISTANCE(14), + BODY_FAT(15), + ACTIVE_ZONE_MINUTES(17), + HEART_RATE_VARIABILITY(19), + DAILY_SLEEP_TEMPERATURE_DERIVATIONS(20), + SEDENTARY_PERIOD(21), + RUN_VO2_MAX(22), + OXYGEN_SATURATION(24), + DAILY_OXYGEN_SATURATION(25), + ACTIVITY_LEVEL(26), + VO2_MAX(27), + DAILY_VO2_MAX(28), + DAILY_HEART_RATE_ZONES(32), + HYDRATION_LOG(33), + TIME_IN_HEART_RATE_ZONE(35), + ACTIVE_MINUTES(36), + RESPIRATORY_RATE_SLEEP_SUMMARY(37), + DAILY_RESPIRATORY_RATE(38), + SWIM_LENGTHS_DATA(39), + HEIGHT(40), + BASAL_ENERGY_BURNED(41), + DATA_NOT_SET(0); + private final int value; + + private DataCase(int value) { + this.value = value; + } + + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DataCase valueOf(int value) { + return forNumber(value); + } + + public static DataCase forNumber(int value) { + switch (value) { + case 4: + return STEPS; + case 5: + return FLOORS; + case 6: + return HEART_RATE; + case 8: + return SLEEP; + case 9: + return DAILY_RESTING_HEART_RATE; + case 10: + return DAILY_HEART_RATE_VARIABILITY; + case 11: + return EXERCISE; + case 12: + return WEIGHT; + case 13: + return ALTITUDE; + case 14: + return DISTANCE; + case 15: + return BODY_FAT; + case 17: + return ACTIVE_ZONE_MINUTES; + case 19: + return HEART_RATE_VARIABILITY; + case 20: + return DAILY_SLEEP_TEMPERATURE_DERIVATIONS; + case 21: + return SEDENTARY_PERIOD; + case 22: + return RUN_VO2_MAX; + case 24: + return OXYGEN_SATURATION; + case 25: + return DAILY_OXYGEN_SATURATION; + case 26: + return ACTIVITY_LEVEL; + case 27: + return VO2_MAX; + case 28: + return DAILY_VO2_MAX; + case 32: + return DAILY_HEART_RATE_ZONES; + case 33: + return HYDRATION_LOG; + case 35: + return TIME_IN_HEART_RATE_ZONE; + case 36: + return ACTIVE_MINUTES; + case 37: + return RESPIRATORY_RATE_SLEEP_SUMMARY; + case 38: + return DAILY_RESPIRATORY_RATE; + case 39: + return SWIM_LENGTHS_DATA; + case 40: + return HEIGHT; + case 41: + return BASAL_ENERGY_BURNED; + case 0: + return DATA_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public DataCase getDataCase() { + return DataCase.forNumber(dataCase_); + } + + public static final int STEPS_FIELD_NUMBER = 4; + + /** + * + * + *
+   * Optional. Data for points in the `steps` interval data type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Steps steps = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the steps field is set. + */ + @java.lang.Override + public boolean hasSteps() { + return dataCase_ == 4; + } + + /** + * + * + *
+   * Optional. Data for points in the `steps` interval data type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Steps steps = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The steps. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Steps getSteps() { + if (dataCase_ == 4) { + return (com.google.devicesandservices.health.v4.Steps) data_; + } + return com.google.devicesandservices.health.v4.Steps.getDefaultInstance(); + } + + /** + * + * + *
+   * Optional. Data for points in the `steps` interval data type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Steps steps = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.StepsOrBuilder getStepsOrBuilder() { + if (dataCase_ == 4) { + return (com.google.devicesandservices.health.v4.Steps) data_; + } + return com.google.devicesandservices.health.v4.Steps.getDefaultInstance(); + } + + public static final int FLOORS_FIELD_NUMBER = 5; + + /** + * + * + *
+   * Optional. Data for points in the `floors` interval data type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Floors floors = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the floors field is set. + */ + @java.lang.Override + public boolean hasFloors() { + return dataCase_ == 5; + } + + /** + * + * + *
+   * Optional. Data for points in the `floors` interval data type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Floors floors = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The floors. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Floors getFloors() { + if (dataCase_ == 5) { + return (com.google.devicesandservices.health.v4.Floors) data_; + } + return com.google.devicesandservices.health.v4.Floors.getDefaultInstance(); + } + + /** + * + * + *
+   * Optional. Data for points in the `floors` interval data type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Floors floors = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.FloorsOrBuilder getFloorsOrBuilder() { + if (dataCase_ == 5) { + return (com.google.devicesandservices.health.v4.Floors) data_; + } + return com.google.devicesandservices.health.v4.Floors.getDefaultInstance(); + } + + public static final int HEART_RATE_FIELD_NUMBER = 6; + + /** + * + * + *
+   * Optional. Data for points in the `heart-rate` sample data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.HeartRate heart_rate = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the heartRate field is set. + */ + @java.lang.Override + public boolean hasHeartRate() { + return dataCase_ == 6; + } + + /** + * + * + *
+   * Optional. Data for points in the `heart-rate` sample data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.HeartRate heart_rate = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The heartRate. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.HeartRate getHeartRate() { + if (dataCase_ == 6) { + return (com.google.devicesandservices.health.v4.HeartRate) data_; + } + return com.google.devicesandservices.health.v4.HeartRate.getDefaultInstance(); + } + + /** + * + * + *
+   * Optional. Data for points in the `heart-rate` sample data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.HeartRate heart_rate = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.HeartRateOrBuilder getHeartRateOrBuilder() { + if (dataCase_ == 6) { + return (com.google.devicesandservices.health.v4.HeartRate) data_; + } + return com.google.devicesandservices.health.v4.HeartRate.getDefaultInstance(); + } + + public static final int SLEEP_FIELD_NUMBER = 8; + + /** + * + * + *
+   * Optional. Data for points in the `sleep` session data type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Sleep sleep = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the sleep field is set. + */ + @java.lang.Override + public boolean hasSleep() { + return dataCase_ == 8; + } + + /** + * + * + *
+   * Optional. Data for points in the `sleep` session data type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Sleep sleep = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The sleep. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Sleep getSleep() { + if (dataCase_ == 8) { + return (com.google.devicesandservices.health.v4.Sleep) data_; + } + return com.google.devicesandservices.health.v4.Sleep.getDefaultInstance(); + } + + /** + * + * + *
+   * Optional. Data for points in the `sleep` session data type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Sleep sleep = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.SleepOrBuilder getSleepOrBuilder() { + if (dataCase_ == 8) { + return (com.google.devicesandservices.health.v4.Sleep) data_; + } + return com.google.devicesandservices.health.v4.Sleep.getDefaultInstance(); + } + + public static final int DAILY_RESTING_HEART_RATE_FIELD_NUMBER = 9; + + /** + * + * + *
+   * Optional. Data for points in the `daily-resting-heart-rate` daily data
+   * type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.DailyRestingHeartRate daily_resting_heart_rate = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the dailyRestingHeartRate field is set. + */ + @java.lang.Override + public boolean hasDailyRestingHeartRate() { + return dataCase_ == 9; + } + + /** + * + * + *
+   * Optional. Data for points in the `daily-resting-heart-rate` daily data
+   * type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.DailyRestingHeartRate daily_resting_heart_rate = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The dailyRestingHeartRate. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyRestingHeartRate getDailyRestingHeartRate() { + if (dataCase_ == 9) { + return (com.google.devicesandservices.health.v4.DailyRestingHeartRate) data_; + } + return com.google.devicesandservices.health.v4.DailyRestingHeartRate.getDefaultInstance(); + } + + /** + * + * + *
+   * Optional. Data for points in the `daily-resting-heart-rate` daily data
+   * type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.DailyRestingHeartRate daily_resting_heart_rate = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyRestingHeartRateOrBuilder + getDailyRestingHeartRateOrBuilder() { + if (dataCase_ == 9) { + return (com.google.devicesandservices.health.v4.DailyRestingHeartRate) data_; + } + return com.google.devicesandservices.health.v4.DailyRestingHeartRate.getDefaultInstance(); + } + + public static final int DAILY_HEART_RATE_VARIABILITY_FIELD_NUMBER = 10; + + /** + * + * + *
+   * Optional. Data for points in the `daily-heart-rate-variability` daily
+   * data type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.DailyHeartRateVariability daily_heart_rate_variability = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the dailyHeartRateVariability field is set. + */ + @java.lang.Override + public boolean hasDailyHeartRateVariability() { + return dataCase_ == 10; + } + + /** + * + * + *
+   * Optional. Data for points in the `daily-heart-rate-variability` daily
+   * data type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.DailyHeartRateVariability daily_heart_rate_variability = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The dailyHeartRateVariability. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyHeartRateVariability + getDailyHeartRateVariability() { + if (dataCase_ == 10) { + return (com.google.devicesandservices.health.v4.DailyHeartRateVariability) data_; + } + return com.google.devicesandservices.health.v4.DailyHeartRateVariability.getDefaultInstance(); + } + + /** + * + * + *
+   * Optional. Data for points in the `daily-heart-rate-variability` daily
+   * data type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.DailyHeartRateVariability daily_heart_rate_variability = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyHeartRateVariabilityOrBuilder + getDailyHeartRateVariabilityOrBuilder() { + if (dataCase_ == 10) { + return (com.google.devicesandservices.health.v4.DailyHeartRateVariability) data_; + } + return com.google.devicesandservices.health.v4.DailyHeartRateVariability.getDefaultInstance(); + } + + public static final int EXERCISE_FIELD_NUMBER = 11; + + /** + * + * + *
+   * Optional. Data for points in the `exercise` session data type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Exercise exercise = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the exercise field is set. + */ + @java.lang.Override + public boolean hasExercise() { + return dataCase_ == 11; + } + + /** + * + * + *
+   * Optional. Data for points in the `exercise` session data type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Exercise exercise = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The exercise. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Exercise getExercise() { + if (dataCase_ == 11) { + return (com.google.devicesandservices.health.v4.Exercise) data_; + } + return com.google.devicesandservices.health.v4.Exercise.getDefaultInstance(); + } + + /** + * + * + *
+   * Optional. Data for points in the `exercise` session data type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Exercise exercise = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ExerciseOrBuilder getExerciseOrBuilder() { + if (dataCase_ == 11) { + return (com.google.devicesandservices.health.v4.Exercise) data_; + } + return com.google.devicesandservices.health.v4.Exercise.getDefaultInstance(); + } + + public static final int WEIGHT_FIELD_NUMBER = 12; + + /** + * + * + *
+   * Optional. Data for points in the `weight` sample data type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Weight weight = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the weight field is set. + */ + @java.lang.Override + public boolean hasWeight() { + return dataCase_ == 12; + } + + /** + * + * + *
+   * Optional. Data for points in the `weight` sample data type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Weight weight = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The weight. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Weight getWeight() { + if (dataCase_ == 12) { + return (com.google.devicesandservices.health.v4.Weight) data_; + } + return com.google.devicesandservices.health.v4.Weight.getDefaultInstance(); + } + + /** + * + * + *
+   * Optional. Data for points in the `weight` sample data type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Weight weight = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.WeightOrBuilder getWeightOrBuilder() { + if (dataCase_ == 12) { + return (com.google.devicesandservices.health.v4.Weight) data_; + } + return com.google.devicesandservices.health.v4.Weight.getDefaultInstance(); + } + + public static final int ALTITUDE_FIELD_NUMBER = 13; + + /** + * + * + *
+   * Optional. Data for points in the `altitude` interval data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Altitude altitude = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the altitude field is set. + */ + @java.lang.Override + public boolean hasAltitude() { + return dataCase_ == 13; + } + + /** + * + * + *
+   * Optional. Data for points in the `altitude` interval data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Altitude altitude = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The altitude. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Altitude getAltitude() { + if (dataCase_ == 13) { + return (com.google.devicesandservices.health.v4.Altitude) data_; + } + return com.google.devicesandservices.health.v4.Altitude.getDefaultInstance(); + } + + /** + * + * + *
+   * Optional. Data for points in the `altitude` interval data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Altitude altitude = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.AltitudeOrBuilder getAltitudeOrBuilder() { + if (dataCase_ == 13) { + return (com.google.devicesandservices.health.v4.Altitude) data_; + } + return com.google.devicesandservices.health.v4.Altitude.getDefaultInstance(); + } + + public static final int DISTANCE_FIELD_NUMBER = 14; + + /** + * + * + *
+   * Optional. Data for points in the `distance` interval data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Distance distance = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the distance field is set. + */ + @java.lang.Override + public boolean hasDistance() { + return dataCase_ == 14; + } + + /** + * + * + *
+   * Optional. Data for points in the `distance` interval data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Distance distance = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The distance. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Distance getDistance() { + if (dataCase_ == 14) { + return (com.google.devicesandservices.health.v4.Distance) data_; + } + return com.google.devicesandservices.health.v4.Distance.getDefaultInstance(); + } + + /** + * + * + *
+   * Optional. Data for points in the `distance` interval data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Distance distance = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DistanceOrBuilder getDistanceOrBuilder() { + if (dataCase_ == 14) { + return (com.google.devicesandservices.health.v4.Distance) data_; + } + return com.google.devicesandservices.health.v4.Distance.getDefaultInstance(); + } + + public static final int BODY_FAT_FIELD_NUMBER = 15; + + /** + * + * + *
+   * Optional. Data for points in the `body-fat` sample data type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.BodyFat body_fat = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the bodyFat field is set. + */ + @java.lang.Override + public boolean hasBodyFat() { + return dataCase_ == 15; + } + + /** + * + * + *
+   * Optional. Data for points in the `body-fat` sample data type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.BodyFat body_fat = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The bodyFat. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.BodyFat getBodyFat() { + if (dataCase_ == 15) { + return (com.google.devicesandservices.health.v4.BodyFat) data_; + } + return com.google.devicesandservices.health.v4.BodyFat.getDefaultInstance(); + } + + /** + * + * + *
+   * Optional. Data for points in the `body-fat` sample data type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.BodyFat body_fat = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.BodyFatOrBuilder getBodyFatOrBuilder() { + if (dataCase_ == 15) { + return (com.google.devicesandservices.health.v4.BodyFat) data_; + } + return com.google.devicesandservices.health.v4.BodyFat.getDefaultInstance(); + } + + public static final int ACTIVE_ZONE_MINUTES_FIELD_NUMBER = 17; + + /** + * + * + *
+   * Optional. Data for points in the `active-zone-minutes` interval data type
+   * collection, measured in minutes.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ActiveZoneMinutes active_zone_minutes = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the activeZoneMinutes field is set. + */ + @java.lang.Override + public boolean hasActiveZoneMinutes() { + return dataCase_ == 17; + } + + /** + * + * + *
+   * Optional. Data for points in the `active-zone-minutes` interval data type
+   * collection, measured in minutes.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ActiveZoneMinutes active_zone_minutes = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The activeZoneMinutes. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ActiveZoneMinutes getActiveZoneMinutes() { + if (dataCase_ == 17) { + return (com.google.devicesandservices.health.v4.ActiveZoneMinutes) data_; + } + return com.google.devicesandservices.health.v4.ActiveZoneMinutes.getDefaultInstance(); + } + + /** + * + * + *
+   * Optional. Data for points in the `active-zone-minutes` interval data type
+   * collection, measured in minutes.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ActiveZoneMinutes active_zone_minutes = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ActiveZoneMinutesOrBuilder + getActiveZoneMinutesOrBuilder() { + if (dataCase_ == 17) { + return (com.google.devicesandservices.health.v4.ActiveZoneMinutes) data_; + } + return com.google.devicesandservices.health.v4.ActiveZoneMinutes.getDefaultInstance(); + } + + public static final int HEART_RATE_VARIABILITY_FIELD_NUMBER = 19; + + /** + * + * + *
+   * Optional. Data for points in the `heart-rate-variability` sample data
+   * type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.HeartRateVariability heart_rate_variability = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the heartRateVariability field is set. + */ + @java.lang.Override + public boolean hasHeartRateVariability() { + return dataCase_ == 19; + } + + /** + * + * + *
+   * Optional. Data for points in the `heart-rate-variability` sample data
+   * type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.HeartRateVariability heart_rate_variability = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The heartRateVariability. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.HeartRateVariability getHeartRateVariability() { + if (dataCase_ == 19) { + return (com.google.devicesandservices.health.v4.HeartRateVariability) data_; + } + return com.google.devicesandservices.health.v4.HeartRateVariability.getDefaultInstance(); + } + + /** + * + * + *
+   * Optional. Data for points in the `heart-rate-variability` sample data
+   * type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.HeartRateVariability heart_rate_variability = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.HeartRateVariabilityOrBuilder + getHeartRateVariabilityOrBuilder() { + if (dataCase_ == 19) { + return (com.google.devicesandservices.health.v4.HeartRateVariability) data_; + } + return com.google.devicesandservices.health.v4.HeartRateVariability.getDefaultInstance(); + } + + public static final int DAILY_SLEEP_TEMPERATURE_DERIVATIONS_FIELD_NUMBER = 20; + + /** + * + * + *
+   * Optional. Data for points in the `daily-sleep-temperature-derivations`
+   * daily data type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.DailySleepTemperatureDerivations daily_sleep_temperature_derivations = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the dailySleepTemperatureDerivations field is set. + */ + @java.lang.Override + public boolean hasDailySleepTemperatureDerivations() { + return dataCase_ == 20; + } + + /** + * + * + *
+   * Optional. Data for points in the `daily-sleep-temperature-derivations`
+   * daily data type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.DailySleepTemperatureDerivations daily_sleep_temperature_derivations = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The dailySleepTemperatureDerivations. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations + getDailySleepTemperatureDerivations() { + if (dataCase_ == 20) { + return (com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations) data_; + } + return com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations + .getDefaultInstance(); + } + + /** + * + * + *
+   * Optional. Data for points in the `daily-sleep-temperature-derivations`
+   * daily data type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.DailySleepTemperatureDerivations daily_sleep_temperature_derivations = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DailySleepTemperatureDerivationsOrBuilder + getDailySleepTemperatureDerivationsOrBuilder() { + if (dataCase_ == 20) { + return (com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations) data_; + } + return com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations + .getDefaultInstance(); + } + + public static final int SEDENTARY_PERIOD_FIELD_NUMBER = 21; + + /** + * + * + *
+   * Optional. Data for points in the `sedentary-period` interval data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.SedentaryPeriod sedentary_period = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the sedentaryPeriod field is set. + */ + @java.lang.Override + public boolean hasSedentaryPeriod() { + return dataCase_ == 21; + } + + /** + * + * + *
+   * Optional. Data for points in the `sedentary-period` interval data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.SedentaryPeriod sedentary_period = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The sedentaryPeriod. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.SedentaryPeriod getSedentaryPeriod() { + if (dataCase_ == 21) { + return (com.google.devicesandservices.health.v4.SedentaryPeriod) data_; + } + return com.google.devicesandservices.health.v4.SedentaryPeriod.getDefaultInstance(); + } + + /** + * + * + *
+   * Optional. Data for points in the `sedentary-period` interval data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.SedentaryPeriod sedentary_period = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.SedentaryPeriodOrBuilder + getSedentaryPeriodOrBuilder() { + if (dataCase_ == 21) { + return (com.google.devicesandservices.health.v4.SedentaryPeriod) data_; + } + return com.google.devicesandservices.health.v4.SedentaryPeriod.getDefaultInstance(); + } + + public static final int RUN_VO2_MAX_FIELD_NUMBER = 22; + + /** + * + * + *
+   * Optional. Data for points in the `run-vo2-max` sample data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.RunVO2Max run_vo2_max = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the runVo2Max field is set. + */ + @java.lang.Override + public boolean hasRunVo2Max() { + return dataCase_ == 22; + } + + /** + * + * + *
+   * Optional. Data for points in the `run-vo2-max` sample data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.RunVO2Max run_vo2_max = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The runVo2Max. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.RunVO2Max getRunVo2Max() { + if (dataCase_ == 22) { + return (com.google.devicesandservices.health.v4.RunVO2Max) data_; + } + return com.google.devicesandservices.health.v4.RunVO2Max.getDefaultInstance(); + } + + /** + * + * + *
+   * Optional. Data for points in the `run-vo2-max` sample data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.RunVO2Max run_vo2_max = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.RunVO2MaxOrBuilder getRunVo2MaxOrBuilder() { + if (dataCase_ == 22) { + return (com.google.devicesandservices.health.v4.RunVO2Max) data_; + } + return com.google.devicesandservices.health.v4.RunVO2Max.getDefaultInstance(); + } + + public static final int OXYGEN_SATURATION_FIELD_NUMBER = 24; + + /** + * + * + *
+   * Optional. Data for points in the `oxygen-saturation` sample data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.OxygenSaturation oxygen_saturation = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the oxygenSaturation field is set. + */ + @java.lang.Override + public boolean hasOxygenSaturation() { + return dataCase_ == 24; + } + + /** + * + * + *
+   * Optional. Data for points in the `oxygen-saturation` sample data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.OxygenSaturation oxygen_saturation = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The oxygenSaturation. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.OxygenSaturation getOxygenSaturation() { + if (dataCase_ == 24) { + return (com.google.devicesandservices.health.v4.OxygenSaturation) data_; + } + return com.google.devicesandservices.health.v4.OxygenSaturation.getDefaultInstance(); + } + + /** + * + * + *
+   * Optional. Data for points in the `oxygen-saturation` sample data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.OxygenSaturation oxygen_saturation = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.OxygenSaturationOrBuilder + getOxygenSaturationOrBuilder() { + if (dataCase_ == 24) { + return (com.google.devicesandservices.health.v4.OxygenSaturation) data_; + } + return com.google.devicesandservices.health.v4.OxygenSaturation.getDefaultInstance(); + } + + public static final int DAILY_OXYGEN_SATURATION_FIELD_NUMBER = 25; + + /** + * + * + *
+   * Optional. Data for points in the `daily-oxygen-saturation` daily data
+   * type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.DailyOxygenSaturation daily_oxygen_saturation = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the dailyOxygenSaturation field is set. + */ + @java.lang.Override + public boolean hasDailyOxygenSaturation() { + return dataCase_ == 25; + } + + /** + * + * + *
+   * Optional. Data for points in the `daily-oxygen-saturation` daily data
+   * type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.DailyOxygenSaturation daily_oxygen_saturation = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The dailyOxygenSaturation. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyOxygenSaturation getDailyOxygenSaturation() { + if (dataCase_ == 25) { + return (com.google.devicesandservices.health.v4.DailyOxygenSaturation) data_; + } + return com.google.devicesandservices.health.v4.DailyOxygenSaturation.getDefaultInstance(); + } + + /** + * + * + *
+   * Optional. Data for points in the `daily-oxygen-saturation` daily data
+   * type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.DailyOxygenSaturation daily_oxygen_saturation = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyOxygenSaturationOrBuilder + getDailyOxygenSaturationOrBuilder() { + if (dataCase_ == 25) { + return (com.google.devicesandservices.health.v4.DailyOxygenSaturation) data_; + } + return com.google.devicesandservices.health.v4.DailyOxygenSaturation.getDefaultInstance(); + } + + public static final int ACTIVITY_LEVEL_FIELD_NUMBER = 26; + + /** + * + * + *
+   * Optional. Data for points in the `activity-level` daily data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ActivityLevel activity_level = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the activityLevel field is set. + */ + @java.lang.Override + public boolean hasActivityLevel() { + return dataCase_ == 26; + } + + /** + * + * + *
+   * Optional. Data for points in the `activity-level` daily data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ActivityLevel activity_level = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The activityLevel. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ActivityLevel getActivityLevel() { + if (dataCase_ == 26) { + return (com.google.devicesandservices.health.v4.ActivityLevel) data_; + } + return com.google.devicesandservices.health.v4.ActivityLevel.getDefaultInstance(); + } + + /** + * + * + *
+   * Optional. Data for points in the `activity-level` daily data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ActivityLevel activity_level = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ActivityLevelOrBuilder + getActivityLevelOrBuilder() { + if (dataCase_ == 26) { + return (com.google.devicesandservices.health.v4.ActivityLevel) data_; + } + return com.google.devicesandservices.health.v4.ActivityLevel.getDefaultInstance(); + } + + public static final int VO2_MAX_FIELD_NUMBER = 27; + + /** + * + * + *
+   * Optional. Data for points in the `vo2-max` sample data type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.VO2Max vo2_max = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the vo2Max field is set. + */ + @java.lang.Override + public boolean hasVo2Max() { + return dataCase_ == 27; + } + + /** + * + * + *
+   * Optional. Data for points in the `vo2-max` sample data type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.VO2Max vo2_max = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The vo2Max. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.VO2Max getVo2Max() { + if (dataCase_ == 27) { + return (com.google.devicesandservices.health.v4.VO2Max) data_; + } + return com.google.devicesandservices.health.v4.VO2Max.getDefaultInstance(); + } + + /** + * + * + *
+   * Optional. Data for points in the `vo2-max` sample data type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.VO2Max vo2_max = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.VO2MaxOrBuilder getVo2MaxOrBuilder() { + if (dataCase_ == 27) { + return (com.google.devicesandservices.health.v4.VO2Max) data_; + } + return com.google.devicesandservices.health.v4.VO2Max.getDefaultInstance(); + } + + public static final int DAILY_VO2_MAX_FIELD_NUMBER = 28; + + /** + * + * + *
+   * Optional. Data for points in the `daily-vo2-max` daily data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.DailyVO2Max daily_vo2_max = 28 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the dailyVo2Max field is set. + */ + @java.lang.Override + public boolean hasDailyVo2Max() { + return dataCase_ == 28; + } + + /** + * + * + *
+   * Optional. Data for points in the `daily-vo2-max` daily data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.DailyVO2Max daily_vo2_max = 28 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The dailyVo2Max. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyVO2Max getDailyVo2Max() { + if (dataCase_ == 28) { + return (com.google.devicesandservices.health.v4.DailyVO2Max) data_; + } + return com.google.devicesandservices.health.v4.DailyVO2Max.getDefaultInstance(); + } + + /** + * + * + *
+   * Optional. Data for points in the `daily-vo2-max` daily data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.DailyVO2Max daily_vo2_max = 28 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyVO2MaxOrBuilder getDailyVo2MaxOrBuilder() { + if (dataCase_ == 28) { + return (com.google.devicesandservices.health.v4.DailyVO2Max) data_; + } + return com.google.devicesandservices.health.v4.DailyVO2Max.getDefaultInstance(); + } + + public static final int DAILY_HEART_RATE_ZONES_FIELD_NUMBER = 32; + + /** + * + * + *
+   * Optional. Data for points in the `daily-heart-rate-zones` daily data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.DailyHeartRateZones daily_heart_rate_zones = 32 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the dailyHeartRateZones field is set. + */ + @java.lang.Override + public boolean hasDailyHeartRateZones() { + return dataCase_ == 32; + } + + /** + * + * + *
+   * Optional. Data for points in the `daily-heart-rate-zones` daily data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.DailyHeartRateZones daily_heart_rate_zones = 32 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The dailyHeartRateZones. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyHeartRateZones getDailyHeartRateZones() { + if (dataCase_ == 32) { + return (com.google.devicesandservices.health.v4.DailyHeartRateZones) data_; + } + return com.google.devicesandservices.health.v4.DailyHeartRateZones.getDefaultInstance(); + } + + /** + * + * + *
+   * Optional. Data for points in the `daily-heart-rate-zones` daily data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.DailyHeartRateZones daily_heart_rate_zones = 32 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyHeartRateZonesOrBuilder + getDailyHeartRateZonesOrBuilder() { + if (dataCase_ == 32) { + return (com.google.devicesandservices.health.v4.DailyHeartRateZones) data_; + } + return com.google.devicesandservices.health.v4.DailyHeartRateZones.getDefaultInstance(); + } + + public static final int HYDRATION_LOG_FIELD_NUMBER = 33; + + /** + * + * + *
+   * Optional. Data for points in the `hydration-log` session data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.HydrationLog hydration_log = 33 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the hydrationLog field is set. + */ + @java.lang.Override + public boolean hasHydrationLog() { + return dataCase_ == 33; + } + + /** + * + * + *
+   * Optional. Data for points in the `hydration-log` session data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.HydrationLog hydration_log = 33 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The hydrationLog. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.HydrationLog getHydrationLog() { + if (dataCase_ == 33) { + return (com.google.devicesandservices.health.v4.HydrationLog) data_; + } + return com.google.devicesandservices.health.v4.HydrationLog.getDefaultInstance(); + } + + /** + * + * + *
+   * Optional. Data for points in the `hydration-log` session data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.HydrationLog hydration_log = 33 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.HydrationLogOrBuilder getHydrationLogOrBuilder() { + if (dataCase_ == 33) { + return (com.google.devicesandservices.health.v4.HydrationLog) data_; + } + return com.google.devicesandservices.health.v4.HydrationLog.getDefaultInstance(); + } + + public static final int TIME_IN_HEART_RATE_ZONE_FIELD_NUMBER = 35; + + /** + * + * + *
+   * Optional. Data for points in the `time-in-heart-rate-zone` interval data
+   * type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.TimeInHeartRateZone time_in_heart_rate_zone = 35 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the timeInHeartRateZone field is set. + */ + @java.lang.Override + public boolean hasTimeInHeartRateZone() { + return dataCase_ == 35; + } + + /** + * + * + *
+   * Optional. Data for points in the `time-in-heart-rate-zone` interval data
+   * type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.TimeInHeartRateZone time_in_heart_rate_zone = 35 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The timeInHeartRateZone. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.TimeInHeartRateZone getTimeInHeartRateZone() { + if (dataCase_ == 35) { + return (com.google.devicesandservices.health.v4.TimeInHeartRateZone) data_; + } + return com.google.devicesandservices.health.v4.TimeInHeartRateZone.getDefaultInstance(); + } + + /** + * + * + *
+   * Optional. Data for points in the `time-in-heart-rate-zone` interval data
+   * type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.TimeInHeartRateZone time_in_heart_rate_zone = 35 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.TimeInHeartRateZoneOrBuilder + getTimeInHeartRateZoneOrBuilder() { + if (dataCase_ == 35) { + return (com.google.devicesandservices.health.v4.TimeInHeartRateZone) data_; + } + return com.google.devicesandservices.health.v4.TimeInHeartRateZone.getDefaultInstance(); + } + + public static final int ACTIVE_MINUTES_FIELD_NUMBER = 36; + + /** + * + * + *
+   * Optional. Data for points in the `active-minutes` interval data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ActiveMinutes active_minutes = 36 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the activeMinutes field is set. + */ + @java.lang.Override + public boolean hasActiveMinutes() { + return dataCase_ == 36; + } + + /** + * + * + *
+   * Optional. Data for points in the `active-minutes` interval data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ActiveMinutes active_minutes = 36 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The activeMinutes. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ActiveMinutes getActiveMinutes() { + if (dataCase_ == 36) { + return (com.google.devicesandservices.health.v4.ActiveMinutes) data_; + } + return com.google.devicesandservices.health.v4.ActiveMinutes.getDefaultInstance(); + } + + /** + * + * + *
+   * Optional. Data for points in the `active-minutes` interval data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ActiveMinutes active_minutes = 36 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ActiveMinutesOrBuilder + getActiveMinutesOrBuilder() { + if (dataCase_ == 36) { + return (com.google.devicesandservices.health.v4.ActiveMinutes) data_; + } + return com.google.devicesandservices.health.v4.ActiveMinutes.getDefaultInstance(); + } + + public static final int RESPIRATORY_RATE_SLEEP_SUMMARY_FIELD_NUMBER = 37; + + /** + * + * + *
+   * Optional. Data for points in the `respiratory-rate-sleep-summary` sample
+   * data type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary respiratory_rate_sleep_summary = 37 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the respiratoryRateSleepSummary field is set. + */ + @java.lang.Override + public boolean hasRespiratoryRateSleepSummary() { + return dataCase_ == 37; + } + + /** + * + * + *
+   * Optional. Data for points in the `respiratory-rate-sleep-summary` sample
+   * data type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary respiratory_rate_sleep_summary = 37 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The respiratoryRateSleepSummary. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + getRespiratoryRateSleepSummary() { + if (dataCase_ == 37) { + return (com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary) data_; + } + return com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary.getDefaultInstance(); + } + + /** + * + * + *
+   * Optional. Data for points in the `respiratory-rate-sleep-summary` sample
+   * data type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary respiratory_rate_sleep_summary = 37 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.RespiratoryRateSleepSummaryOrBuilder + getRespiratoryRateSleepSummaryOrBuilder() { + if (dataCase_ == 37) { + return (com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary) data_; + } + return com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary.getDefaultInstance(); + } + + public static final int DAILY_RESPIRATORY_RATE_FIELD_NUMBER = 38; + + /** + * + * + *
+   * Optional. Data for points in the `daily-respiratory-rate` daily data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.DailyRespiratoryRate daily_respiratory_rate = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the dailyRespiratoryRate field is set. + */ + @java.lang.Override + public boolean hasDailyRespiratoryRate() { + return dataCase_ == 38; + } + + /** + * + * + *
+   * Optional. Data for points in the `daily-respiratory-rate` daily data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.DailyRespiratoryRate daily_respiratory_rate = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The dailyRespiratoryRate. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyRespiratoryRate getDailyRespiratoryRate() { + if (dataCase_ == 38) { + return (com.google.devicesandservices.health.v4.DailyRespiratoryRate) data_; + } + return com.google.devicesandservices.health.v4.DailyRespiratoryRate.getDefaultInstance(); + } + + /** + * + * + *
+   * Optional. Data for points in the `daily-respiratory-rate` daily data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.DailyRespiratoryRate daily_respiratory_rate = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyRespiratoryRateOrBuilder + getDailyRespiratoryRateOrBuilder() { + if (dataCase_ == 38) { + return (com.google.devicesandservices.health.v4.DailyRespiratoryRate) data_; + } + return com.google.devicesandservices.health.v4.DailyRespiratoryRate.getDefaultInstance(); + } + + public static final int SWIM_LENGTHS_DATA_FIELD_NUMBER = 39; + + /** + * + * + *
+   * Optional. Data for points in the `swim-lengths-data` interval data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.SwimLengthsData swim_lengths_data = 39 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the swimLengthsData field is set. + */ + @java.lang.Override + public boolean hasSwimLengthsData() { + return dataCase_ == 39; + } + + /** + * + * + *
+   * Optional. Data for points in the `swim-lengths-data` interval data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.SwimLengthsData swim_lengths_data = 39 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The swimLengthsData. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.SwimLengthsData getSwimLengthsData() { + if (dataCase_ == 39) { + return (com.google.devicesandservices.health.v4.SwimLengthsData) data_; + } + return com.google.devicesandservices.health.v4.SwimLengthsData.getDefaultInstance(); + } + + /** + * + * + *
+   * Optional. Data for points in the `swim-lengths-data` interval data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.SwimLengthsData swim_lengths_data = 39 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.SwimLengthsDataOrBuilder + getSwimLengthsDataOrBuilder() { + if (dataCase_ == 39) { + return (com.google.devicesandservices.health.v4.SwimLengthsData) data_; + } + return com.google.devicesandservices.health.v4.SwimLengthsData.getDefaultInstance(); + } + + public static final int HEIGHT_FIELD_NUMBER = 40; + + /** + * + * + *
+   * Optional. Data for points in the `height` sample data type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Height height = 40 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the height field is set. + */ + @java.lang.Override + public boolean hasHeight() { + return dataCase_ == 40; + } + + /** + * + * + *
+   * Optional. Data for points in the `height` sample data type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Height height = 40 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The height. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Height getHeight() { + if (dataCase_ == 40) { + return (com.google.devicesandservices.health.v4.Height) data_; + } + return com.google.devicesandservices.health.v4.Height.getDefaultInstance(); + } + + /** + * + * + *
+   * Optional. Data for points in the `height` sample data type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Height height = 40 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.HeightOrBuilder getHeightOrBuilder() { + if (dataCase_ == 40) { + return (com.google.devicesandservices.health.v4.Height) data_; + } + return com.google.devicesandservices.health.v4.Height.getDefaultInstance(); + } + + public static final int BASAL_ENERGY_BURNED_FIELD_NUMBER = 41; + + /** + * + * + *
+   * Optional. Data for points in the `basal-energy-burned` interval data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.BasalEnergyBurned basal_energy_burned = 41 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the basalEnergyBurned field is set. + */ + @java.lang.Override + public boolean hasBasalEnergyBurned() { + return dataCase_ == 41; + } + + /** + * + * + *
+   * Optional. Data for points in the `basal-energy-burned` interval data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.BasalEnergyBurned basal_energy_burned = 41 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The basalEnergyBurned. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.BasalEnergyBurned getBasalEnergyBurned() { + if (dataCase_ == 41) { + return (com.google.devicesandservices.health.v4.BasalEnergyBurned) data_; + } + return com.google.devicesandservices.health.v4.BasalEnergyBurned.getDefaultInstance(); + } + + /** + * + * + *
+   * Optional. Data for points in the `basal-energy-burned` interval data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.BasalEnergyBurned basal_energy_burned = 41 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.BasalEnergyBurnedOrBuilder + getBasalEnergyBurnedOrBuilder() { + if (dataCase_ == 41) { + return (com.google.devicesandservices.health.v4.BasalEnergyBurned) data_; + } + return com.google.devicesandservices.health.v4.BasalEnergyBurned.getDefaultInstance(); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Identifier. Data point name, only supported for the subset of identifiable
+   * data types. For the majority of the data types, individual data points do
+   * not need to be identified and this field would be empty.
+   *
+   * Format: `users/{user}/dataTypes/{data_type}/dataPoints/{data_point}`
+   *
+   * Example:
+   * `users/abcd1234/dataTypes/sleep/dataPoints/a1b2c3d4-e5f6-7890-1234-567890abcdef`
+   *
+   * The `{user}` ID is a system-generated identifier, as described in
+   * [Identity.health_user_id][google.devicesandservices.health.v4.Identity.health_user_id].
+   *
+   * The `{data_type}` ID corresponds to the kebab-case version of the field
+   * names in the [DataPoint
+   * data][google.devicesandservices.health.v4.DataPoint] union
+   * field, e.g. `total-calories` for the `total_calories` field.
+   *
+   * The `{data_point}` ID can be client-provided or system-generated.
+   * If client-provided, it must be a string of 4-63 characters,
+   * containing only lowercase letters, numbers, and hyphens.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Identifier. Data point name, only supported for the subset of identifiable
+   * data types. For the majority of the data types, individual data points do
+   * not need to be identified and this field would be empty.
+   *
+   * Format: `users/{user}/dataTypes/{data_type}/dataPoints/{data_point}`
+   *
+   * Example:
+   * `users/abcd1234/dataTypes/sleep/dataPoints/a1b2c3d4-e5f6-7890-1234-567890abcdef`
+   *
+   * The `{user}` ID is a system-generated identifier, as described in
+   * [Identity.health_user_id][google.devicesandservices.health.v4.Identity.health_user_id].
+   *
+   * The `{data_type}` ID corresponds to the kebab-case version of the field
+   * names in the [DataPoint
+   * data][google.devicesandservices.health.v4.DataPoint] union
+   * field, e.g. `total-calories` for the `total_calories` field.
+   *
+   * The `{data_point}` ID can be client-provided or system-generated.
+   * If client-provided, it must be a string of 4-63 characters,
+   * containing only lowercase letters, numbers, and hyphens.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATA_SOURCE_FIELD_NUMBER = 3; + private com.google.devicesandservices.health.v4.DataSource dataSource_; + + /** + * + * + *
+   * Optional. Data source information for the metric
+   * 
+ * + * + * .google.devicesandservices.health.v4.DataSource data_source = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the dataSource field is set. + */ + @java.lang.Override + public boolean hasDataSource() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Optional. Data source information for the metric
+   * 
+ * + * + * .google.devicesandservices.health.v4.DataSource data_source = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The dataSource. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DataSource getDataSource() { + return dataSource_ == null + ? com.google.devicesandservices.health.v4.DataSource.getDefaultInstance() + : dataSource_; + } + + /** + * + * + *
+   * Optional. Data source information for the metric
+   * 
+ * + * + * .google.devicesandservices.health.v4.DataSource data_source = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DataSourceOrBuilder getDataSourceOrBuilder() { + return dataSource_ == null + ? com.google.devicesandservices.health.v4.DataSource.getDefaultInstance() + : dataSource_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getDataSource()); + } + if (dataCase_ == 4) { + output.writeMessage(4, (com.google.devicesandservices.health.v4.Steps) data_); + } + if (dataCase_ == 5) { + output.writeMessage(5, (com.google.devicesandservices.health.v4.Floors) data_); + } + if (dataCase_ == 6) { + output.writeMessage(6, (com.google.devicesandservices.health.v4.HeartRate) data_); + } + if (dataCase_ == 8) { + output.writeMessage(8, (com.google.devicesandservices.health.v4.Sleep) data_); + } + if (dataCase_ == 9) { + output.writeMessage(9, (com.google.devicesandservices.health.v4.DailyRestingHeartRate) data_); + } + if (dataCase_ == 10) { + output.writeMessage( + 10, (com.google.devicesandservices.health.v4.DailyHeartRateVariability) data_); + } + if (dataCase_ == 11) { + output.writeMessage(11, (com.google.devicesandservices.health.v4.Exercise) data_); + } + if (dataCase_ == 12) { + output.writeMessage(12, (com.google.devicesandservices.health.v4.Weight) data_); + } + if (dataCase_ == 13) { + output.writeMessage(13, (com.google.devicesandservices.health.v4.Altitude) data_); + } + if (dataCase_ == 14) { + output.writeMessage(14, (com.google.devicesandservices.health.v4.Distance) data_); + } + if (dataCase_ == 15) { + output.writeMessage(15, (com.google.devicesandservices.health.v4.BodyFat) data_); + } + if (dataCase_ == 17) { + output.writeMessage(17, (com.google.devicesandservices.health.v4.ActiveZoneMinutes) data_); + } + if (dataCase_ == 19) { + output.writeMessage(19, (com.google.devicesandservices.health.v4.HeartRateVariability) data_); + } + if (dataCase_ == 20) { + output.writeMessage( + 20, (com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations) data_); + } + if (dataCase_ == 21) { + output.writeMessage(21, (com.google.devicesandservices.health.v4.SedentaryPeriod) data_); + } + if (dataCase_ == 22) { + output.writeMessage(22, (com.google.devicesandservices.health.v4.RunVO2Max) data_); + } + if (dataCase_ == 24) { + output.writeMessage(24, (com.google.devicesandservices.health.v4.OxygenSaturation) data_); + } + if (dataCase_ == 25) { + output.writeMessage( + 25, (com.google.devicesandservices.health.v4.DailyOxygenSaturation) data_); + } + if (dataCase_ == 26) { + output.writeMessage(26, (com.google.devicesandservices.health.v4.ActivityLevel) data_); + } + if (dataCase_ == 27) { + output.writeMessage(27, (com.google.devicesandservices.health.v4.VO2Max) data_); + } + if (dataCase_ == 28) { + output.writeMessage(28, (com.google.devicesandservices.health.v4.DailyVO2Max) data_); + } + if (dataCase_ == 32) { + output.writeMessage(32, (com.google.devicesandservices.health.v4.DailyHeartRateZones) data_); + } + if (dataCase_ == 33) { + output.writeMessage(33, (com.google.devicesandservices.health.v4.HydrationLog) data_); + } + if (dataCase_ == 35) { + output.writeMessage(35, (com.google.devicesandservices.health.v4.TimeInHeartRateZone) data_); + } + if (dataCase_ == 36) { + output.writeMessage(36, (com.google.devicesandservices.health.v4.ActiveMinutes) data_); + } + if (dataCase_ == 37) { + output.writeMessage( + 37, (com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary) data_); + } + if (dataCase_ == 38) { + output.writeMessage(38, (com.google.devicesandservices.health.v4.DailyRespiratoryRate) data_); + } + if (dataCase_ == 39) { + output.writeMessage(39, (com.google.devicesandservices.health.v4.SwimLengthsData) data_); + } + if (dataCase_ == 40) { + output.writeMessage(40, (com.google.devicesandservices.health.v4.Height) data_); + } + if (dataCase_ == 41) { + output.writeMessage(41, (com.google.devicesandservices.health.v4.BasalEnergyBurned) data_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getDataSource()); + } + if (dataCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, (com.google.devicesandservices.health.v4.Steps) data_); + } + if (dataCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, (com.google.devicesandservices.health.v4.Floors) data_); + } + if (dataCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, (com.google.devicesandservices.health.v4.HeartRate) data_); + } + if (dataCase_ == 8) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 8, (com.google.devicesandservices.health.v4.Sleep) data_); + } + if (dataCase_ == 9) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 9, (com.google.devicesandservices.health.v4.DailyRestingHeartRate) data_); + } + if (dataCase_ == 10) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 10, (com.google.devicesandservices.health.v4.DailyHeartRateVariability) data_); + } + if (dataCase_ == 11) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 11, (com.google.devicesandservices.health.v4.Exercise) data_); + } + if (dataCase_ == 12) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 12, (com.google.devicesandservices.health.v4.Weight) data_); + } + if (dataCase_ == 13) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 13, (com.google.devicesandservices.health.v4.Altitude) data_); + } + if (dataCase_ == 14) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 14, (com.google.devicesandservices.health.v4.Distance) data_); + } + if (dataCase_ == 15) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 15, (com.google.devicesandservices.health.v4.BodyFat) data_); + } + if (dataCase_ == 17) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 17, (com.google.devicesandservices.health.v4.ActiveZoneMinutes) data_); + } + if (dataCase_ == 19) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 19, (com.google.devicesandservices.health.v4.HeartRateVariability) data_); + } + if (dataCase_ == 20) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 20, (com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations) data_); + } + if (dataCase_ == 21) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 21, (com.google.devicesandservices.health.v4.SedentaryPeriod) data_); + } + if (dataCase_ == 22) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 22, (com.google.devicesandservices.health.v4.RunVO2Max) data_); + } + if (dataCase_ == 24) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 24, (com.google.devicesandservices.health.v4.OxygenSaturation) data_); + } + if (dataCase_ == 25) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 25, (com.google.devicesandservices.health.v4.DailyOxygenSaturation) data_); + } + if (dataCase_ == 26) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 26, (com.google.devicesandservices.health.v4.ActivityLevel) data_); + } + if (dataCase_ == 27) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 27, (com.google.devicesandservices.health.v4.VO2Max) data_); + } + if (dataCase_ == 28) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 28, (com.google.devicesandservices.health.v4.DailyVO2Max) data_); + } + if (dataCase_ == 32) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 32, (com.google.devicesandservices.health.v4.DailyHeartRateZones) data_); + } + if (dataCase_ == 33) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 33, (com.google.devicesandservices.health.v4.HydrationLog) data_); + } + if (dataCase_ == 35) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 35, (com.google.devicesandservices.health.v4.TimeInHeartRateZone) data_); + } + if (dataCase_ == 36) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 36, (com.google.devicesandservices.health.v4.ActiveMinutes) data_); + } + if (dataCase_ == 37) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 37, (com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary) data_); + } + if (dataCase_ == 38) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 38, (com.google.devicesandservices.health.v4.DailyRespiratoryRate) data_); + } + if (dataCase_ == 39) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 39, (com.google.devicesandservices.health.v4.SwimLengthsData) data_); + } + if (dataCase_ == 40) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 40, (com.google.devicesandservices.health.v4.Height) data_); + } + if (dataCase_ == 41) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 41, (com.google.devicesandservices.health.v4.BasalEnergyBurned) data_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.DataPoint)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.DataPoint other = + (com.google.devicesandservices.health.v4.DataPoint) obj; + + if (!getName().equals(other.getName())) return false; + if (hasDataSource() != other.hasDataSource()) return false; + if (hasDataSource()) { + if (!getDataSource().equals(other.getDataSource())) return false; + } + if (!getDataCase().equals(other.getDataCase())) return false; + switch (dataCase_) { + case 4: + if (!getSteps().equals(other.getSteps())) return false; + break; + case 5: + if (!getFloors().equals(other.getFloors())) return false; + break; + case 6: + if (!getHeartRate().equals(other.getHeartRate())) return false; + break; + case 8: + if (!getSleep().equals(other.getSleep())) return false; + break; + case 9: + if (!getDailyRestingHeartRate().equals(other.getDailyRestingHeartRate())) return false; + break; + case 10: + if (!getDailyHeartRateVariability().equals(other.getDailyHeartRateVariability())) + return false; + break; + case 11: + if (!getExercise().equals(other.getExercise())) return false; + break; + case 12: + if (!getWeight().equals(other.getWeight())) return false; + break; + case 13: + if (!getAltitude().equals(other.getAltitude())) return false; + break; + case 14: + if (!getDistance().equals(other.getDistance())) return false; + break; + case 15: + if (!getBodyFat().equals(other.getBodyFat())) return false; + break; + case 17: + if (!getActiveZoneMinutes().equals(other.getActiveZoneMinutes())) return false; + break; + case 19: + if (!getHeartRateVariability().equals(other.getHeartRateVariability())) return false; + break; + case 20: + if (!getDailySleepTemperatureDerivations() + .equals(other.getDailySleepTemperatureDerivations())) return false; + break; + case 21: + if (!getSedentaryPeriod().equals(other.getSedentaryPeriod())) return false; + break; + case 22: + if (!getRunVo2Max().equals(other.getRunVo2Max())) return false; + break; + case 24: + if (!getOxygenSaturation().equals(other.getOxygenSaturation())) return false; + break; + case 25: + if (!getDailyOxygenSaturation().equals(other.getDailyOxygenSaturation())) return false; + break; + case 26: + if (!getActivityLevel().equals(other.getActivityLevel())) return false; + break; + case 27: + if (!getVo2Max().equals(other.getVo2Max())) return false; + break; + case 28: + if (!getDailyVo2Max().equals(other.getDailyVo2Max())) return false; + break; + case 32: + if (!getDailyHeartRateZones().equals(other.getDailyHeartRateZones())) return false; + break; + case 33: + if (!getHydrationLog().equals(other.getHydrationLog())) return false; + break; + case 35: + if (!getTimeInHeartRateZone().equals(other.getTimeInHeartRateZone())) return false; + break; + case 36: + if (!getActiveMinutes().equals(other.getActiveMinutes())) return false; + break; + case 37: + if (!getRespiratoryRateSleepSummary().equals(other.getRespiratoryRateSleepSummary())) + return false; + break; + case 38: + if (!getDailyRespiratoryRate().equals(other.getDailyRespiratoryRate())) return false; + break; + case 39: + if (!getSwimLengthsData().equals(other.getSwimLengthsData())) return false; + break; + case 40: + if (!getHeight().equals(other.getHeight())) return false; + break; + case 41: + if (!getBasalEnergyBurned().equals(other.getBasalEnergyBurned())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasDataSource()) { + hash = (37 * hash) + DATA_SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getDataSource().hashCode(); + } + switch (dataCase_) { + case 4: + hash = (37 * hash) + STEPS_FIELD_NUMBER; + hash = (53 * hash) + getSteps().hashCode(); + break; + case 5: + hash = (37 * hash) + FLOORS_FIELD_NUMBER; + hash = (53 * hash) + getFloors().hashCode(); + break; + case 6: + hash = (37 * hash) + HEART_RATE_FIELD_NUMBER; + hash = (53 * hash) + getHeartRate().hashCode(); + break; + case 8: + hash = (37 * hash) + SLEEP_FIELD_NUMBER; + hash = (53 * hash) + getSleep().hashCode(); + break; + case 9: + hash = (37 * hash) + DAILY_RESTING_HEART_RATE_FIELD_NUMBER; + hash = (53 * hash) + getDailyRestingHeartRate().hashCode(); + break; + case 10: + hash = (37 * hash) + DAILY_HEART_RATE_VARIABILITY_FIELD_NUMBER; + hash = (53 * hash) + getDailyHeartRateVariability().hashCode(); + break; + case 11: + hash = (37 * hash) + EXERCISE_FIELD_NUMBER; + hash = (53 * hash) + getExercise().hashCode(); + break; + case 12: + hash = (37 * hash) + WEIGHT_FIELD_NUMBER; + hash = (53 * hash) + getWeight().hashCode(); + break; + case 13: + hash = (37 * hash) + ALTITUDE_FIELD_NUMBER; + hash = (53 * hash) + getAltitude().hashCode(); + break; + case 14: + hash = (37 * hash) + DISTANCE_FIELD_NUMBER; + hash = (53 * hash) + getDistance().hashCode(); + break; + case 15: + hash = (37 * hash) + BODY_FAT_FIELD_NUMBER; + hash = (53 * hash) + getBodyFat().hashCode(); + break; + case 17: + hash = (37 * hash) + ACTIVE_ZONE_MINUTES_FIELD_NUMBER; + hash = (53 * hash) + getActiveZoneMinutes().hashCode(); + break; + case 19: + hash = (37 * hash) + HEART_RATE_VARIABILITY_FIELD_NUMBER; + hash = (53 * hash) + getHeartRateVariability().hashCode(); + break; + case 20: + hash = (37 * hash) + DAILY_SLEEP_TEMPERATURE_DERIVATIONS_FIELD_NUMBER; + hash = (53 * hash) + getDailySleepTemperatureDerivations().hashCode(); + break; + case 21: + hash = (37 * hash) + SEDENTARY_PERIOD_FIELD_NUMBER; + hash = (53 * hash) + getSedentaryPeriod().hashCode(); + break; + case 22: + hash = (37 * hash) + RUN_VO2_MAX_FIELD_NUMBER; + hash = (53 * hash) + getRunVo2Max().hashCode(); + break; + case 24: + hash = (37 * hash) + OXYGEN_SATURATION_FIELD_NUMBER; + hash = (53 * hash) + getOxygenSaturation().hashCode(); + break; + case 25: + hash = (37 * hash) + DAILY_OXYGEN_SATURATION_FIELD_NUMBER; + hash = (53 * hash) + getDailyOxygenSaturation().hashCode(); + break; + case 26: + hash = (37 * hash) + ACTIVITY_LEVEL_FIELD_NUMBER; + hash = (53 * hash) + getActivityLevel().hashCode(); + break; + case 27: + hash = (37 * hash) + VO2_MAX_FIELD_NUMBER; + hash = (53 * hash) + getVo2Max().hashCode(); + break; + case 28: + hash = (37 * hash) + DAILY_VO2_MAX_FIELD_NUMBER; + hash = (53 * hash) + getDailyVo2Max().hashCode(); + break; + case 32: + hash = (37 * hash) + DAILY_HEART_RATE_ZONES_FIELD_NUMBER; + hash = (53 * hash) + getDailyHeartRateZones().hashCode(); + break; + case 33: + hash = (37 * hash) + HYDRATION_LOG_FIELD_NUMBER; + hash = (53 * hash) + getHydrationLog().hashCode(); + break; + case 35: + hash = (37 * hash) + TIME_IN_HEART_RATE_ZONE_FIELD_NUMBER; + hash = (53 * hash) + getTimeInHeartRateZone().hashCode(); + break; + case 36: + hash = (37 * hash) + ACTIVE_MINUTES_FIELD_NUMBER; + hash = (53 * hash) + getActiveMinutes().hashCode(); + break; + case 37: + hash = (37 * hash) + RESPIRATORY_RATE_SLEEP_SUMMARY_FIELD_NUMBER; + hash = (53 * hash) + getRespiratoryRateSleepSummary().hashCode(); + break; + case 38: + hash = (37 * hash) + DAILY_RESPIRATORY_RATE_FIELD_NUMBER; + hash = (53 * hash) + getDailyRespiratoryRate().hashCode(); + break; + case 39: + hash = (37 * hash) + SWIM_LENGTHS_DATA_FIELD_NUMBER; + hash = (53 * hash) + getSwimLengthsData().hashCode(); + break; + case 40: + hash = (37 * hash) + HEIGHT_FIELD_NUMBER; + hash = (53 * hash) + getHeight().hashCode(); + break; + case 41: + hash = (37 * hash) + BASAL_ENERGY_BURNED_FIELD_NUMBER; + hash = (53 * hash) + getBasalEnergyBurned().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.DataPoint parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.DataPoint parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DataPoint parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.DataPoint parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DataPoint parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.DataPoint parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DataPoint parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.DataPoint parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DataPoint parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.DataPoint parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DataPoint parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.DataPoint parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.devicesandservices.health.v4.DataPoint prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A computed or recorded metric.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.DataPoint} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.DataPoint) + com.google.devicesandservices.health.v4.DataPointOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_DataPoint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_DataPoint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.DataPoint.class, + com.google.devicesandservices.health.v4.DataPoint.Builder.class); + } + + // Construct using com.google.devicesandservices.health.v4.DataPoint.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetDataSourceFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (stepsBuilder_ != null) { + stepsBuilder_.clear(); + } + if (floorsBuilder_ != null) { + floorsBuilder_.clear(); + } + if (heartRateBuilder_ != null) { + heartRateBuilder_.clear(); + } + if (sleepBuilder_ != null) { + sleepBuilder_.clear(); + } + if (dailyRestingHeartRateBuilder_ != null) { + dailyRestingHeartRateBuilder_.clear(); + } + if (dailyHeartRateVariabilityBuilder_ != null) { + dailyHeartRateVariabilityBuilder_.clear(); + } + if (exerciseBuilder_ != null) { + exerciseBuilder_.clear(); + } + if (weightBuilder_ != null) { + weightBuilder_.clear(); + } + if (altitudeBuilder_ != null) { + altitudeBuilder_.clear(); + } + if (distanceBuilder_ != null) { + distanceBuilder_.clear(); + } + if (bodyFatBuilder_ != null) { + bodyFatBuilder_.clear(); + } + if (activeZoneMinutesBuilder_ != null) { + activeZoneMinutesBuilder_.clear(); + } + if (heartRateVariabilityBuilder_ != null) { + heartRateVariabilityBuilder_.clear(); + } + if (dailySleepTemperatureDerivationsBuilder_ != null) { + dailySleepTemperatureDerivationsBuilder_.clear(); + } + if (sedentaryPeriodBuilder_ != null) { + sedentaryPeriodBuilder_.clear(); + } + if (runVo2MaxBuilder_ != null) { + runVo2MaxBuilder_.clear(); + } + if (oxygenSaturationBuilder_ != null) { + oxygenSaturationBuilder_.clear(); + } + if (dailyOxygenSaturationBuilder_ != null) { + dailyOxygenSaturationBuilder_.clear(); + } + if (activityLevelBuilder_ != null) { + activityLevelBuilder_.clear(); + } + if (vo2MaxBuilder_ != null) { + vo2MaxBuilder_.clear(); + } + if (dailyVo2MaxBuilder_ != null) { + dailyVo2MaxBuilder_.clear(); + } + if (dailyHeartRateZonesBuilder_ != null) { + dailyHeartRateZonesBuilder_.clear(); + } + if (hydrationLogBuilder_ != null) { + hydrationLogBuilder_.clear(); + } + if (timeInHeartRateZoneBuilder_ != null) { + timeInHeartRateZoneBuilder_.clear(); + } + if (activeMinutesBuilder_ != null) { + activeMinutesBuilder_.clear(); + } + if (respiratoryRateSleepSummaryBuilder_ != null) { + respiratoryRateSleepSummaryBuilder_.clear(); + } + if (dailyRespiratoryRateBuilder_ != null) { + dailyRespiratoryRateBuilder_.clear(); + } + if (swimLengthsDataBuilder_ != null) { + swimLengthsDataBuilder_.clear(); + } + if (heightBuilder_ != null) { + heightBuilder_.clear(); + } + if (basalEnergyBurnedBuilder_ != null) { + basalEnergyBurnedBuilder_.clear(); + } + name_ = ""; + dataSource_ = null; + if (dataSourceBuilder_ != null) { + dataSourceBuilder_.dispose(); + dataSourceBuilder_ = null; + } + dataCase_ = 0; + data_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_DataPoint_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.DataPoint getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.DataPoint.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.DataPoint build() { + com.google.devicesandservices.health.v4.DataPoint result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.DataPoint buildPartial() { + com.google.devicesandservices.health.v4.DataPoint result = + new com.google.devicesandservices.health.v4.DataPoint(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.devicesandservices.health.v4.DataPoint result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x40000000) != 0)) { + result.name_ = name_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x80000000) != 0)) { + result.dataSource_ = dataSourceBuilder_ == null ? dataSource_ : dataSourceBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartialOneofs(com.google.devicesandservices.health.v4.DataPoint result) { + result.dataCase_ = dataCase_; + result.data_ = this.data_; + if (dataCase_ == 4 && stepsBuilder_ != null) { + result.data_ = stepsBuilder_.build(); + } + if (dataCase_ == 5 && floorsBuilder_ != null) { + result.data_ = floorsBuilder_.build(); + } + if (dataCase_ == 6 && heartRateBuilder_ != null) { + result.data_ = heartRateBuilder_.build(); + } + if (dataCase_ == 8 && sleepBuilder_ != null) { + result.data_ = sleepBuilder_.build(); + } + if (dataCase_ == 9 && dailyRestingHeartRateBuilder_ != null) { + result.data_ = dailyRestingHeartRateBuilder_.build(); + } + if (dataCase_ == 10 && dailyHeartRateVariabilityBuilder_ != null) { + result.data_ = dailyHeartRateVariabilityBuilder_.build(); + } + if (dataCase_ == 11 && exerciseBuilder_ != null) { + result.data_ = exerciseBuilder_.build(); + } + if (dataCase_ == 12 && weightBuilder_ != null) { + result.data_ = weightBuilder_.build(); + } + if (dataCase_ == 13 && altitudeBuilder_ != null) { + result.data_ = altitudeBuilder_.build(); + } + if (dataCase_ == 14 && distanceBuilder_ != null) { + result.data_ = distanceBuilder_.build(); + } + if (dataCase_ == 15 && bodyFatBuilder_ != null) { + result.data_ = bodyFatBuilder_.build(); + } + if (dataCase_ == 17 && activeZoneMinutesBuilder_ != null) { + result.data_ = activeZoneMinutesBuilder_.build(); + } + if (dataCase_ == 19 && heartRateVariabilityBuilder_ != null) { + result.data_ = heartRateVariabilityBuilder_.build(); + } + if (dataCase_ == 20 && dailySleepTemperatureDerivationsBuilder_ != null) { + result.data_ = dailySleepTemperatureDerivationsBuilder_.build(); + } + if (dataCase_ == 21 && sedentaryPeriodBuilder_ != null) { + result.data_ = sedentaryPeriodBuilder_.build(); + } + if (dataCase_ == 22 && runVo2MaxBuilder_ != null) { + result.data_ = runVo2MaxBuilder_.build(); + } + if (dataCase_ == 24 && oxygenSaturationBuilder_ != null) { + result.data_ = oxygenSaturationBuilder_.build(); + } + if (dataCase_ == 25 && dailyOxygenSaturationBuilder_ != null) { + result.data_ = dailyOxygenSaturationBuilder_.build(); + } + if (dataCase_ == 26 && activityLevelBuilder_ != null) { + result.data_ = activityLevelBuilder_.build(); + } + if (dataCase_ == 27 && vo2MaxBuilder_ != null) { + result.data_ = vo2MaxBuilder_.build(); + } + if (dataCase_ == 28 && dailyVo2MaxBuilder_ != null) { + result.data_ = dailyVo2MaxBuilder_.build(); + } + if (dataCase_ == 32 && dailyHeartRateZonesBuilder_ != null) { + result.data_ = dailyHeartRateZonesBuilder_.build(); + } + if (dataCase_ == 33 && hydrationLogBuilder_ != null) { + result.data_ = hydrationLogBuilder_.build(); + } + if (dataCase_ == 35 && timeInHeartRateZoneBuilder_ != null) { + result.data_ = timeInHeartRateZoneBuilder_.build(); + } + if (dataCase_ == 36 && activeMinutesBuilder_ != null) { + result.data_ = activeMinutesBuilder_.build(); + } + if (dataCase_ == 37 && respiratoryRateSleepSummaryBuilder_ != null) { + result.data_ = respiratoryRateSleepSummaryBuilder_.build(); + } + if (dataCase_ == 38 && dailyRespiratoryRateBuilder_ != null) { + result.data_ = dailyRespiratoryRateBuilder_.build(); + } + if (dataCase_ == 39 && swimLengthsDataBuilder_ != null) { + result.data_ = swimLengthsDataBuilder_.build(); + } + if (dataCase_ == 40 && heightBuilder_ != null) { + result.data_ = heightBuilder_.build(); + } + if (dataCase_ == 41 && basalEnergyBurnedBuilder_ != null) { + result.data_ = basalEnergyBurnedBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.DataPoint) { + return mergeFrom((com.google.devicesandservices.health.v4.DataPoint) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.devicesandservices.health.v4.DataPoint other) { + if (other == com.google.devicesandservices.health.v4.DataPoint.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x40000000; + onChanged(); + } + if (other.hasDataSource()) { + mergeDataSource(other.getDataSource()); + } + switch (other.getDataCase()) { + case STEPS: + { + mergeSteps(other.getSteps()); + break; + } + case FLOORS: + { + mergeFloors(other.getFloors()); + break; + } + case HEART_RATE: + { + mergeHeartRate(other.getHeartRate()); + break; + } + case SLEEP: + { + mergeSleep(other.getSleep()); + break; + } + case DAILY_RESTING_HEART_RATE: + { + mergeDailyRestingHeartRate(other.getDailyRestingHeartRate()); + break; + } + case DAILY_HEART_RATE_VARIABILITY: + { + mergeDailyHeartRateVariability(other.getDailyHeartRateVariability()); + break; + } + case EXERCISE: + { + mergeExercise(other.getExercise()); + break; + } + case WEIGHT: + { + mergeWeight(other.getWeight()); + break; + } + case ALTITUDE: + { + mergeAltitude(other.getAltitude()); + break; + } + case DISTANCE: + { + mergeDistance(other.getDistance()); + break; + } + case BODY_FAT: + { + mergeBodyFat(other.getBodyFat()); + break; + } + case ACTIVE_ZONE_MINUTES: + { + mergeActiveZoneMinutes(other.getActiveZoneMinutes()); + break; + } + case HEART_RATE_VARIABILITY: + { + mergeHeartRateVariability(other.getHeartRateVariability()); + break; + } + case DAILY_SLEEP_TEMPERATURE_DERIVATIONS: + { + mergeDailySleepTemperatureDerivations(other.getDailySleepTemperatureDerivations()); + break; + } + case SEDENTARY_PERIOD: + { + mergeSedentaryPeriod(other.getSedentaryPeriod()); + break; + } + case RUN_VO2_MAX: + { + mergeRunVo2Max(other.getRunVo2Max()); + break; + } + case OXYGEN_SATURATION: + { + mergeOxygenSaturation(other.getOxygenSaturation()); + break; + } + case DAILY_OXYGEN_SATURATION: + { + mergeDailyOxygenSaturation(other.getDailyOxygenSaturation()); + break; + } + case ACTIVITY_LEVEL: + { + mergeActivityLevel(other.getActivityLevel()); + break; + } + case VO2_MAX: + { + mergeVo2Max(other.getVo2Max()); + break; + } + case DAILY_VO2_MAX: + { + mergeDailyVo2Max(other.getDailyVo2Max()); + break; + } + case DAILY_HEART_RATE_ZONES: + { + mergeDailyHeartRateZones(other.getDailyHeartRateZones()); + break; + } + case HYDRATION_LOG: + { + mergeHydrationLog(other.getHydrationLog()); + break; + } + case TIME_IN_HEART_RATE_ZONE: + { + mergeTimeInHeartRateZone(other.getTimeInHeartRateZone()); + break; + } + case ACTIVE_MINUTES: + { + mergeActiveMinutes(other.getActiveMinutes()); + break; + } + case RESPIRATORY_RATE_SLEEP_SUMMARY: + { + mergeRespiratoryRateSleepSummary(other.getRespiratoryRateSleepSummary()); + break; + } + case DAILY_RESPIRATORY_RATE: + { + mergeDailyRespiratoryRate(other.getDailyRespiratoryRate()); + break; + } + case SWIM_LENGTHS_DATA: + { + mergeSwimLengthsData(other.getSwimLengthsData()); + break; + } + case HEIGHT: + { + mergeHeight(other.getHeight()); + break; + } + case BASAL_ENERGY_BURNED: + { + mergeBasalEnergyBurned(other.getBasalEnergyBurned()); + break; + } + case DATA_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x40000000; + break; + } // case 10 + case 26: + { + input.readMessage( + internalGetDataSourceFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x80000000; + break; + } // case 26 + case 34: + { + input.readMessage(internalGetStepsFieldBuilder().getBuilder(), extensionRegistry); + dataCase_ = 4; + break; + } // case 34 + case 42: + { + input.readMessage(internalGetFloorsFieldBuilder().getBuilder(), extensionRegistry); + dataCase_ = 5; + break; + } // case 42 + case 50: + { + input.readMessage( + internalGetHeartRateFieldBuilder().getBuilder(), extensionRegistry); + dataCase_ = 6; + break; + } // case 50 + case 66: + { + input.readMessage(internalGetSleepFieldBuilder().getBuilder(), extensionRegistry); + dataCase_ = 8; + break; + } // case 66 + case 74: + { + input.readMessage( + internalGetDailyRestingHeartRateFieldBuilder().getBuilder(), extensionRegistry); + dataCase_ = 9; + break; + } // case 74 + case 82: + { + input.readMessage( + internalGetDailyHeartRateVariabilityFieldBuilder().getBuilder(), + extensionRegistry); + dataCase_ = 10; + break; + } // case 82 + case 90: + { + input.readMessage( + internalGetExerciseFieldBuilder().getBuilder(), extensionRegistry); + dataCase_ = 11; + break; + } // case 90 + case 98: + { + input.readMessage(internalGetWeightFieldBuilder().getBuilder(), extensionRegistry); + dataCase_ = 12; + break; + } // case 98 + case 106: + { + input.readMessage( + internalGetAltitudeFieldBuilder().getBuilder(), extensionRegistry); + dataCase_ = 13; + break; + } // case 106 + case 114: + { + input.readMessage( + internalGetDistanceFieldBuilder().getBuilder(), extensionRegistry); + dataCase_ = 14; + break; + } // case 114 + case 122: + { + input.readMessage(internalGetBodyFatFieldBuilder().getBuilder(), extensionRegistry); + dataCase_ = 15; + break; + } // case 122 + case 138: + { + input.readMessage( + internalGetActiveZoneMinutesFieldBuilder().getBuilder(), extensionRegistry); + dataCase_ = 17; + break; + } // case 138 + case 154: + { + input.readMessage( + internalGetHeartRateVariabilityFieldBuilder().getBuilder(), extensionRegistry); + dataCase_ = 19; + break; + } // case 154 + case 162: + { + input.readMessage( + internalGetDailySleepTemperatureDerivationsFieldBuilder().getBuilder(), + extensionRegistry); + dataCase_ = 20; + break; + } // case 162 + case 170: + { + input.readMessage( + internalGetSedentaryPeriodFieldBuilder().getBuilder(), extensionRegistry); + dataCase_ = 21; + break; + } // case 170 + case 178: + { + input.readMessage( + internalGetRunVo2MaxFieldBuilder().getBuilder(), extensionRegistry); + dataCase_ = 22; + break; + } // case 178 + case 194: + { + input.readMessage( + internalGetOxygenSaturationFieldBuilder().getBuilder(), extensionRegistry); + dataCase_ = 24; + break; + } // case 194 + case 202: + { + input.readMessage( + internalGetDailyOxygenSaturationFieldBuilder().getBuilder(), extensionRegistry); + dataCase_ = 25; + break; + } // case 202 + case 210: + { + input.readMessage( + internalGetActivityLevelFieldBuilder().getBuilder(), extensionRegistry); + dataCase_ = 26; + break; + } // case 210 + case 218: + { + input.readMessage(internalGetVo2MaxFieldBuilder().getBuilder(), extensionRegistry); + dataCase_ = 27; + break; + } // case 218 + case 226: + { + input.readMessage( + internalGetDailyVo2MaxFieldBuilder().getBuilder(), extensionRegistry); + dataCase_ = 28; + break; + } // case 226 + case 258: + { + input.readMessage( + internalGetDailyHeartRateZonesFieldBuilder().getBuilder(), extensionRegistry); + dataCase_ = 32; + break; + } // case 258 + case 266: + { + input.readMessage( + internalGetHydrationLogFieldBuilder().getBuilder(), extensionRegistry); + dataCase_ = 33; + break; + } // case 266 + case 282: + { + input.readMessage( + internalGetTimeInHeartRateZoneFieldBuilder().getBuilder(), extensionRegistry); + dataCase_ = 35; + break; + } // case 282 + case 290: + { + input.readMessage( + internalGetActiveMinutesFieldBuilder().getBuilder(), extensionRegistry); + dataCase_ = 36; + break; + } // case 290 + case 298: + { + input.readMessage( + internalGetRespiratoryRateSleepSummaryFieldBuilder().getBuilder(), + extensionRegistry); + dataCase_ = 37; + break; + } // case 298 + case 306: + { + input.readMessage( + internalGetDailyRespiratoryRateFieldBuilder().getBuilder(), extensionRegistry); + dataCase_ = 38; + break; + } // case 306 + case 314: + { + input.readMessage( + internalGetSwimLengthsDataFieldBuilder().getBuilder(), extensionRegistry); + dataCase_ = 39; + break; + } // case 314 + case 322: + { + input.readMessage(internalGetHeightFieldBuilder().getBuilder(), extensionRegistry); + dataCase_ = 40; + break; + } // case 322 + case 330: + { + input.readMessage( + internalGetBasalEnergyBurnedFieldBuilder().getBuilder(), extensionRegistry); + dataCase_ = 41; + break; + } // case 330 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int dataCase_ = 0; + private java.lang.Object data_; + + public DataCase getDataCase() { + return DataCase.forNumber(dataCase_); + } + + public Builder clearData() { + dataCase_ = 0; + data_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.Steps, + com.google.devicesandservices.health.v4.Steps.Builder, + com.google.devicesandservices.health.v4.StepsOrBuilder> + stepsBuilder_; + + /** + * + * + *
+     * Optional. Data for points in the `steps` interval data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Steps steps = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the steps field is set. + */ + @java.lang.Override + public boolean hasSteps() { + return dataCase_ == 4; + } + + /** + * + * + *
+     * Optional. Data for points in the `steps` interval data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Steps steps = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The steps. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Steps getSteps() { + if (stepsBuilder_ == null) { + if (dataCase_ == 4) { + return (com.google.devicesandservices.health.v4.Steps) data_; + } + return com.google.devicesandservices.health.v4.Steps.getDefaultInstance(); + } else { + if (dataCase_ == 4) { + return stepsBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.Steps.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Data for points in the `steps` interval data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Steps steps = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setSteps(com.google.devicesandservices.health.v4.Steps value) { + if (stepsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + onChanged(); + } else { + stepsBuilder_.setMessage(value); + } + dataCase_ = 4; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `steps` interval data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Steps steps = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setSteps(com.google.devicesandservices.health.v4.Steps.Builder builderForValue) { + if (stepsBuilder_ == null) { + data_ = builderForValue.build(); + onChanged(); + } else { + stepsBuilder_.setMessage(builderForValue.build()); + } + dataCase_ = 4; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `steps` interval data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Steps steps = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeSteps(com.google.devicesandservices.health.v4.Steps value) { + if (stepsBuilder_ == null) { + if (dataCase_ == 4 + && data_ != com.google.devicesandservices.health.v4.Steps.getDefaultInstance()) { + data_ = + com.google.devicesandservices.health.v4.Steps.newBuilder( + (com.google.devicesandservices.health.v4.Steps) data_) + .mergeFrom(value) + .buildPartial(); + } else { + data_ = value; + } + onChanged(); + } else { + if (dataCase_ == 4) { + stepsBuilder_.mergeFrom(value); + } else { + stepsBuilder_.setMessage(value); + } + } + dataCase_ = 4; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `steps` interval data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Steps steps = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearSteps() { + if (stepsBuilder_ == null) { + if (dataCase_ == 4) { + dataCase_ = 0; + data_ = null; + onChanged(); + } + } else { + if (dataCase_ == 4) { + dataCase_ = 0; + data_ = null; + } + stepsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `steps` interval data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Steps steps = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.devicesandservices.health.v4.Steps.Builder getStepsBuilder() { + return internalGetStepsFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Data for points in the `steps` interval data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Steps steps = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.StepsOrBuilder getStepsOrBuilder() { + if ((dataCase_ == 4) && (stepsBuilder_ != null)) { + return stepsBuilder_.getMessageOrBuilder(); + } else { + if (dataCase_ == 4) { + return (com.google.devicesandservices.health.v4.Steps) data_; + } + return com.google.devicesandservices.health.v4.Steps.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Data for points in the `steps` interval data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Steps steps = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.Steps, + com.google.devicesandservices.health.v4.Steps.Builder, + com.google.devicesandservices.health.v4.StepsOrBuilder> + internalGetStepsFieldBuilder() { + if (stepsBuilder_ == null) { + if (!(dataCase_ == 4)) { + data_ = com.google.devicesandservices.health.v4.Steps.getDefaultInstance(); + } + stepsBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.Steps, + com.google.devicesandservices.health.v4.Steps.Builder, + com.google.devicesandservices.health.v4.StepsOrBuilder>( + (com.google.devicesandservices.health.v4.Steps) data_, + getParentForChildren(), + isClean()); + data_ = null; + } + dataCase_ = 4; + onChanged(); + return stepsBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.Floors, + com.google.devicesandservices.health.v4.Floors.Builder, + com.google.devicesandservices.health.v4.FloorsOrBuilder> + floorsBuilder_; + + /** + * + * + *
+     * Optional. Data for points in the `floors` interval data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Floors floors = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the floors field is set. + */ + @java.lang.Override + public boolean hasFloors() { + return dataCase_ == 5; + } + + /** + * + * + *
+     * Optional. Data for points in the `floors` interval data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Floors floors = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The floors. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Floors getFloors() { + if (floorsBuilder_ == null) { + if (dataCase_ == 5) { + return (com.google.devicesandservices.health.v4.Floors) data_; + } + return com.google.devicesandservices.health.v4.Floors.getDefaultInstance(); + } else { + if (dataCase_ == 5) { + return floorsBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.Floors.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Data for points in the `floors` interval data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Floors floors = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setFloors(com.google.devicesandservices.health.v4.Floors value) { + if (floorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + onChanged(); + } else { + floorsBuilder_.setMessage(value); + } + dataCase_ = 5; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `floors` interval data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Floors floors = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setFloors( + com.google.devicesandservices.health.v4.Floors.Builder builderForValue) { + if (floorsBuilder_ == null) { + data_ = builderForValue.build(); + onChanged(); + } else { + floorsBuilder_.setMessage(builderForValue.build()); + } + dataCase_ = 5; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `floors` interval data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Floors floors = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeFloors(com.google.devicesandservices.health.v4.Floors value) { + if (floorsBuilder_ == null) { + if (dataCase_ == 5 + && data_ != com.google.devicesandservices.health.v4.Floors.getDefaultInstance()) { + data_ = + com.google.devicesandservices.health.v4.Floors.newBuilder( + (com.google.devicesandservices.health.v4.Floors) data_) + .mergeFrom(value) + .buildPartial(); + } else { + data_ = value; + } + onChanged(); + } else { + if (dataCase_ == 5) { + floorsBuilder_.mergeFrom(value); + } else { + floorsBuilder_.setMessage(value); + } + } + dataCase_ = 5; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `floors` interval data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Floors floors = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearFloors() { + if (floorsBuilder_ == null) { + if (dataCase_ == 5) { + dataCase_ = 0; + data_ = null; + onChanged(); + } + } else { + if (dataCase_ == 5) { + dataCase_ = 0; + data_ = null; + } + floorsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `floors` interval data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Floors floors = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.devicesandservices.health.v4.Floors.Builder getFloorsBuilder() { + return internalGetFloorsFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Data for points in the `floors` interval data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Floors floors = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.FloorsOrBuilder getFloorsOrBuilder() { + if ((dataCase_ == 5) && (floorsBuilder_ != null)) { + return floorsBuilder_.getMessageOrBuilder(); + } else { + if (dataCase_ == 5) { + return (com.google.devicesandservices.health.v4.Floors) data_; + } + return com.google.devicesandservices.health.v4.Floors.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Data for points in the `floors` interval data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Floors floors = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.Floors, + com.google.devicesandservices.health.v4.Floors.Builder, + com.google.devicesandservices.health.v4.FloorsOrBuilder> + internalGetFloorsFieldBuilder() { + if (floorsBuilder_ == null) { + if (!(dataCase_ == 5)) { + data_ = com.google.devicesandservices.health.v4.Floors.getDefaultInstance(); + } + floorsBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.Floors, + com.google.devicesandservices.health.v4.Floors.Builder, + com.google.devicesandservices.health.v4.FloorsOrBuilder>( + (com.google.devicesandservices.health.v4.Floors) data_, + getParentForChildren(), + isClean()); + data_ = null; + } + dataCase_ = 5; + onChanged(); + return floorsBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.HeartRate, + com.google.devicesandservices.health.v4.HeartRate.Builder, + com.google.devicesandservices.health.v4.HeartRateOrBuilder> + heartRateBuilder_; + + /** + * + * + *
+     * Optional. Data for points in the `heart-rate` sample data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.HeartRate heart_rate = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the heartRate field is set. + */ + @java.lang.Override + public boolean hasHeartRate() { + return dataCase_ == 6; + } + + /** + * + * + *
+     * Optional. Data for points in the `heart-rate` sample data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.HeartRate heart_rate = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The heartRate. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.HeartRate getHeartRate() { + if (heartRateBuilder_ == null) { + if (dataCase_ == 6) { + return (com.google.devicesandservices.health.v4.HeartRate) data_; + } + return com.google.devicesandservices.health.v4.HeartRate.getDefaultInstance(); + } else { + if (dataCase_ == 6) { + return heartRateBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.HeartRate.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Data for points in the `heart-rate` sample data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.HeartRate heart_rate = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setHeartRate(com.google.devicesandservices.health.v4.HeartRate value) { + if (heartRateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + onChanged(); + } else { + heartRateBuilder_.setMessage(value); + } + dataCase_ = 6; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `heart-rate` sample data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.HeartRate heart_rate = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setHeartRate( + com.google.devicesandservices.health.v4.HeartRate.Builder builderForValue) { + if (heartRateBuilder_ == null) { + data_ = builderForValue.build(); + onChanged(); + } else { + heartRateBuilder_.setMessage(builderForValue.build()); + } + dataCase_ = 6; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `heart-rate` sample data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.HeartRate heart_rate = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeHeartRate(com.google.devicesandservices.health.v4.HeartRate value) { + if (heartRateBuilder_ == null) { + if (dataCase_ == 6 + && data_ != com.google.devicesandservices.health.v4.HeartRate.getDefaultInstance()) { + data_ = + com.google.devicesandservices.health.v4.HeartRate.newBuilder( + (com.google.devicesandservices.health.v4.HeartRate) data_) + .mergeFrom(value) + .buildPartial(); + } else { + data_ = value; + } + onChanged(); + } else { + if (dataCase_ == 6) { + heartRateBuilder_.mergeFrom(value); + } else { + heartRateBuilder_.setMessage(value); + } + } + dataCase_ = 6; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `heart-rate` sample data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.HeartRate heart_rate = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearHeartRate() { + if (heartRateBuilder_ == null) { + if (dataCase_ == 6) { + dataCase_ = 0; + data_ = null; + onChanged(); + } + } else { + if (dataCase_ == 6) { + dataCase_ = 0; + data_ = null; + } + heartRateBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `heart-rate` sample data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.HeartRate heart_rate = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.devicesandservices.health.v4.HeartRate.Builder getHeartRateBuilder() { + return internalGetHeartRateFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Data for points in the `heart-rate` sample data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.HeartRate heart_rate = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.HeartRateOrBuilder getHeartRateOrBuilder() { + if ((dataCase_ == 6) && (heartRateBuilder_ != null)) { + return heartRateBuilder_.getMessageOrBuilder(); + } else { + if (dataCase_ == 6) { + return (com.google.devicesandservices.health.v4.HeartRate) data_; + } + return com.google.devicesandservices.health.v4.HeartRate.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Data for points in the `heart-rate` sample data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.HeartRate heart_rate = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.HeartRate, + com.google.devicesandservices.health.v4.HeartRate.Builder, + com.google.devicesandservices.health.v4.HeartRateOrBuilder> + internalGetHeartRateFieldBuilder() { + if (heartRateBuilder_ == null) { + if (!(dataCase_ == 6)) { + data_ = com.google.devicesandservices.health.v4.HeartRate.getDefaultInstance(); + } + heartRateBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.HeartRate, + com.google.devicesandservices.health.v4.HeartRate.Builder, + com.google.devicesandservices.health.v4.HeartRateOrBuilder>( + (com.google.devicesandservices.health.v4.HeartRate) data_, + getParentForChildren(), + isClean()); + data_ = null; + } + dataCase_ = 6; + onChanged(); + return heartRateBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.Sleep, + com.google.devicesandservices.health.v4.Sleep.Builder, + com.google.devicesandservices.health.v4.SleepOrBuilder> + sleepBuilder_; + + /** + * + * + *
+     * Optional. Data for points in the `sleep` session data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Sleep sleep = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the sleep field is set. + */ + @java.lang.Override + public boolean hasSleep() { + return dataCase_ == 8; + } + + /** + * + * + *
+     * Optional. Data for points in the `sleep` session data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Sleep sleep = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The sleep. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Sleep getSleep() { + if (sleepBuilder_ == null) { + if (dataCase_ == 8) { + return (com.google.devicesandservices.health.v4.Sleep) data_; + } + return com.google.devicesandservices.health.v4.Sleep.getDefaultInstance(); + } else { + if (dataCase_ == 8) { + return sleepBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.Sleep.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Data for points in the `sleep` session data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Sleep sleep = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setSleep(com.google.devicesandservices.health.v4.Sleep value) { + if (sleepBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + onChanged(); + } else { + sleepBuilder_.setMessage(value); + } + dataCase_ = 8; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `sleep` session data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Sleep sleep = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setSleep(com.google.devicesandservices.health.v4.Sleep.Builder builderForValue) { + if (sleepBuilder_ == null) { + data_ = builderForValue.build(); + onChanged(); + } else { + sleepBuilder_.setMessage(builderForValue.build()); + } + dataCase_ = 8; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `sleep` session data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Sleep sleep = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeSleep(com.google.devicesandservices.health.v4.Sleep value) { + if (sleepBuilder_ == null) { + if (dataCase_ == 8 + && data_ != com.google.devicesandservices.health.v4.Sleep.getDefaultInstance()) { + data_ = + com.google.devicesandservices.health.v4.Sleep.newBuilder( + (com.google.devicesandservices.health.v4.Sleep) data_) + .mergeFrom(value) + .buildPartial(); + } else { + data_ = value; + } + onChanged(); + } else { + if (dataCase_ == 8) { + sleepBuilder_.mergeFrom(value); + } else { + sleepBuilder_.setMessage(value); + } + } + dataCase_ = 8; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `sleep` session data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Sleep sleep = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearSleep() { + if (sleepBuilder_ == null) { + if (dataCase_ == 8) { + dataCase_ = 0; + data_ = null; + onChanged(); + } + } else { + if (dataCase_ == 8) { + dataCase_ = 0; + data_ = null; + } + sleepBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `sleep` session data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Sleep sleep = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.devicesandservices.health.v4.Sleep.Builder getSleepBuilder() { + return internalGetSleepFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Data for points in the `sleep` session data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Sleep sleep = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.SleepOrBuilder getSleepOrBuilder() { + if ((dataCase_ == 8) && (sleepBuilder_ != null)) { + return sleepBuilder_.getMessageOrBuilder(); + } else { + if (dataCase_ == 8) { + return (com.google.devicesandservices.health.v4.Sleep) data_; + } + return com.google.devicesandservices.health.v4.Sleep.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Data for points in the `sleep` session data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Sleep sleep = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.Sleep, + com.google.devicesandservices.health.v4.Sleep.Builder, + com.google.devicesandservices.health.v4.SleepOrBuilder> + internalGetSleepFieldBuilder() { + if (sleepBuilder_ == null) { + if (!(dataCase_ == 8)) { + data_ = com.google.devicesandservices.health.v4.Sleep.getDefaultInstance(); + } + sleepBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.Sleep, + com.google.devicesandservices.health.v4.Sleep.Builder, + com.google.devicesandservices.health.v4.SleepOrBuilder>( + (com.google.devicesandservices.health.v4.Sleep) data_, + getParentForChildren(), + isClean()); + data_ = null; + } + dataCase_ = 8; + onChanged(); + return sleepBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.DailyRestingHeartRate, + com.google.devicesandservices.health.v4.DailyRestingHeartRate.Builder, + com.google.devicesandservices.health.v4.DailyRestingHeartRateOrBuilder> + dailyRestingHeartRateBuilder_; + + /** + * + * + *
+     * Optional. Data for points in the `daily-resting-heart-rate` daily data
+     * type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyRestingHeartRate daily_resting_heart_rate = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the dailyRestingHeartRate field is set. + */ + @java.lang.Override + public boolean hasDailyRestingHeartRate() { + return dataCase_ == 9; + } + + /** + * + * + *
+     * Optional. Data for points in the `daily-resting-heart-rate` daily data
+     * type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyRestingHeartRate daily_resting_heart_rate = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The dailyRestingHeartRate. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyRestingHeartRate + getDailyRestingHeartRate() { + if (dailyRestingHeartRateBuilder_ == null) { + if (dataCase_ == 9) { + return (com.google.devicesandservices.health.v4.DailyRestingHeartRate) data_; + } + return com.google.devicesandservices.health.v4.DailyRestingHeartRate.getDefaultInstance(); + } else { + if (dataCase_ == 9) { + return dailyRestingHeartRateBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.DailyRestingHeartRate.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Data for points in the `daily-resting-heart-rate` daily data
+     * type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyRestingHeartRate daily_resting_heart_rate = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDailyRestingHeartRate( + com.google.devicesandservices.health.v4.DailyRestingHeartRate value) { + if (dailyRestingHeartRateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + onChanged(); + } else { + dailyRestingHeartRateBuilder_.setMessage(value); + } + dataCase_ = 9; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `daily-resting-heart-rate` daily data
+     * type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyRestingHeartRate daily_resting_heart_rate = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDailyRestingHeartRate( + com.google.devicesandservices.health.v4.DailyRestingHeartRate.Builder builderForValue) { + if (dailyRestingHeartRateBuilder_ == null) { + data_ = builderForValue.build(); + onChanged(); + } else { + dailyRestingHeartRateBuilder_.setMessage(builderForValue.build()); + } + dataCase_ = 9; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `daily-resting-heart-rate` daily data
+     * type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyRestingHeartRate daily_resting_heart_rate = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeDailyRestingHeartRate( + com.google.devicesandservices.health.v4.DailyRestingHeartRate value) { + if (dailyRestingHeartRateBuilder_ == null) { + if (dataCase_ == 9 + && data_ + != com.google.devicesandservices.health.v4.DailyRestingHeartRate + .getDefaultInstance()) { + data_ = + com.google.devicesandservices.health.v4.DailyRestingHeartRate.newBuilder( + (com.google.devicesandservices.health.v4.DailyRestingHeartRate) data_) + .mergeFrom(value) + .buildPartial(); + } else { + data_ = value; + } + onChanged(); + } else { + if (dataCase_ == 9) { + dailyRestingHeartRateBuilder_.mergeFrom(value); + } else { + dailyRestingHeartRateBuilder_.setMessage(value); + } + } + dataCase_ = 9; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `daily-resting-heart-rate` daily data
+     * type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyRestingHeartRate daily_resting_heart_rate = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearDailyRestingHeartRate() { + if (dailyRestingHeartRateBuilder_ == null) { + if (dataCase_ == 9) { + dataCase_ = 0; + data_ = null; + onChanged(); + } + } else { + if (dataCase_ == 9) { + dataCase_ = 0; + data_ = null; + } + dailyRestingHeartRateBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `daily-resting-heart-rate` daily data
+     * type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyRestingHeartRate daily_resting_heart_rate = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.devicesandservices.health.v4.DailyRestingHeartRate.Builder + getDailyRestingHeartRateBuilder() { + return internalGetDailyRestingHeartRateFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Data for points in the `daily-resting-heart-rate` daily data
+     * type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyRestingHeartRate daily_resting_heart_rate = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyRestingHeartRateOrBuilder + getDailyRestingHeartRateOrBuilder() { + if ((dataCase_ == 9) && (dailyRestingHeartRateBuilder_ != null)) { + return dailyRestingHeartRateBuilder_.getMessageOrBuilder(); + } else { + if (dataCase_ == 9) { + return (com.google.devicesandservices.health.v4.DailyRestingHeartRate) data_; + } + return com.google.devicesandservices.health.v4.DailyRestingHeartRate.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Data for points in the `daily-resting-heart-rate` daily data
+     * type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyRestingHeartRate daily_resting_heart_rate = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.DailyRestingHeartRate, + com.google.devicesandservices.health.v4.DailyRestingHeartRate.Builder, + com.google.devicesandservices.health.v4.DailyRestingHeartRateOrBuilder> + internalGetDailyRestingHeartRateFieldBuilder() { + if (dailyRestingHeartRateBuilder_ == null) { + if (!(dataCase_ == 9)) { + data_ = + com.google.devicesandservices.health.v4.DailyRestingHeartRate.getDefaultInstance(); + } + dailyRestingHeartRateBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.DailyRestingHeartRate, + com.google.devicesandservices.health.v4.DailyRestingHeartRate.Builder, + com.google.devicesandservices.health.v4.DailyRestingHeartRateOrBuilder>( + (com.google.devicesandservices.health.v4.DailyRestingHeartRate) data_, + getParentForChildren(), + isClean()); + data_ = null; + } + dataCase_ = 9; + onChanged(); + return dailyRestingHeartRateBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.DailyHeartRateVariability, + com.google.devicesandservices.health.v4.DailyHeartRateVariability.Builder, + com.google.devicesandservices.health.v4.DailyHeartRateVariabilityOrBuilder> + dailyHeartRateVariabilityBuilder_; + + /** + * + * + *
+     * Optional. Data for points in the `daily-heart-rate-variability` daily
+     * data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyHeartRateVariability daily_heart_rate_variability = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the dailyHeartRateVariability field is set. + */ + @java.lang.Override + public boolean hasDailyHeartRateVariability() { + return dataCase_ == 10; + } + + /** + * + * + *
+     * Optional. Data for points in the `daily-heart-rate-variability` daily
+     * data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyHeartRateVariability daily_heart_rate_variability = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The dailyHeartRateVariability. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyHeartRateVariability + getDailyHeartRateVariability() { + if (dailyHeartRateVariabilityBuilder_ == null) { + if (dataCase_ == 10) { + return (com.google.devicesandservices.health.v4.DailyHeartRateVariability) data_; + } + return com.google.devicesandservices.health.v4.DailyHeartRateVariability + .getDefaultInstance(); + } else { + if (dataCase_ == 10) { + return dailyHeartRateVariabilityBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.DailyHeartRateVariability + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Data for points in the `daily-heart-rate-variability` daily
+     * data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyHeartRateVariability daily_heart_rate_variability = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDailyHeartRateVariability( + com.google.devicesandservices.health.v4.DailyHeartRateVariability value) { + if (dailyHeartRateVariabilityBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + onChanged(); + } else { + dailyHeartRateVariabilityBuilder_.setMessage(value); + } + dataCase_ = 10; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `daily-heart-rate-variability` daily
+     * data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyHeartRateVariability daily_heart_rate_variability = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDailyHeartRateVariability( + com.google.devicesandservices.health.v4.DailyHeartRateVariability.Builder builderForValue) { + if (dailyHeartRateVariabilityBuilder_ == null) { + data_ = builderForValue.build(); + onChanged(); + } else { + dailyHeartRateVariabilityBuilder_.setMessage(builderForValue.build()); + } + dataCase_ = 10; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `daily-heart-rate-variability` daily
+     * data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyHeartRateVariability daily_heart_rate_variability = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeDailyHeartRateVariability( + com.google.devicesandservices.health.v4.DailyHeartRateVariability value) { + if (dailyHeartRateVariabilityBuilder_ == null) { + if (dataCase_ == 10 + && data_ + != com.google.devicesandservices.health.v4.DailyHeartRateVariability + .getDefaultInstance()) { + data_ = + com.google.devicesandservices.health.v4.DailyHeartRateVariability.newBuilder( + (com.google.devicesandservices.health.v4.DailyHeartRateVariability) data_) + .mergeFrom(value) + .buildPartial(); + } else { + data_ = value; + } + onChanged(); + } else { + if (dataCase_ == 10) { + dailyHeartRateVariabilityBuilder_.mergeFrom(value); + } else { + dailyHeartRateVariabilityBuilder_.setMessage(value); + } + } + dataCase_ = 10; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `daily-heart-rate-variability` daily
+     * data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyHeartRateVariability daily_heart_rate_variability = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearDailyHeartRateVariability() { + if (dailyHeartRateVariabilityBuilder_ == null) { + if (dataCase_ == 10) { + dataCase_ = 0; + data_ = null; + onChanged(); + } + } else { + if (dataCase_ == 10) { + dataCase_ = 0; + data_ = null; + } + dailyHeartRateVariabilityBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `daily-heart-rate-variability` daily
+     * data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyHeartRateVariability daily_heart_rate_variability = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.devicesandservices.health.v4.DailyHeartRateVariability.Builder + getDailyHeartRateVariabilityBuilder() { + return internalGetDailyHeartRateVariabilityFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Data for points in the `daily-heart-rate-variability` daily
+     * data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyHeartRateVariability daily_heart_rate_variability = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyHeartRateVariabilityOrBuilder + getDailyHeartRateVariabilityOrBuilder() { + if ((dataCase_ == 10) && (dailyHeartRateVariabilityBuilder_ != null)) { + return dailyHeartRateVariabilityBuilder_.getMessageOrBuilder(); + } else { + if (dataCase_ == 10) { + return (com.google.devicesandservices.health.v4.DailyHeartRateVariability) data_; + } + return com.google.devicesandservices.health.v4.DailyHeartRateVariability + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Data for points in the `daily-heart-rate-variability` daily
+     * data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyHeartRateVariability daily_heart_rate_variability = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.DailyHeartRateVariability, + com.google.devicesandservices.health.v4.DailyHeartRateVariability.Builder, + com.google.devicesandservices.health.v4.DailyHeartRateVariabilityOrBuilder> + internalGetDailyHeartRateVariabilityFieldBuilder() { + if (dailyHeartRateVariabilityBuilder_ == null) { + if (!(dataCase_ == 10)) { + data_ = + com.google.devicesandservices.health.v4.DailyHeartRateVariability + .getDefaultInstance(); + } + dailyHeartRateVariabilityBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.DailyHeartRateVariability, + com.google.devicesandservices.health.v4.DailyHeartRateVariability.Builder, + com.google.devicesandservices.health.v4.DailyHeartRateVariabilityOrBuilder>( + (com.google.devicesandservices.health.v4.DailyHeartRateVariability) data_, + getParentForChildren(), + isClean()); + data_ = null; + } + dataCase_ = 10; + onChanged(); + return dailyHeartRateVariabilityBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.Exercise, + com.google.devicesandservices.health.v4.Exercise.Builder, + com.google.devicesandservices.health.v4.ExerciseOrBuilder> + exerciseBuilder_; + + /** + * + * + *
+     * Optional. Data for points in the `exercise` session data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Exercise exercise = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the exercise field is set. + */ + @java.lang.Override + public boolean hasExercise() { + return dataCase_ == 11; + } + + /** + * + * + *
+     * Optional. Data for points in the `exercise` session data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Exercise exercise = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The exercise. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Exercise getExercise() { + if (exerciseBuilder_ == null) { + if (dataCase_ == 11) { + return (com.google.devicesandservices.health.v4.Exercise) data_; + } + return com.google.devicesandservices.health.v4.Exercise.getDefaultInstance(); + } else { + if (dataCase_ == 11) { + return exerciseBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.Exercise.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Data for points in the `exercise` session data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Exercise exercise = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setExercise(com.google.devicesandservices.health.v4.Exercise value) { + if (exerciseBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + onChanged(); + } else { + exerciseBuilder_.setMessage(value); + } + dataCase_ = 11; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `exercise` session data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Exercise exercise = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setExercise( + com.google.devicesandservices.health.v4.Exercise.Builder builderForValue) { + if (exerciseBuilder_ == null) { + data_ = builderForValue.build(); + onChanged(); + } else { + exerciseBuilder_.setMessage(builderForValue.build()); + } + dataCase_ = 11; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `exercise` session data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Exercise exercise = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeExercise(com.google.devicesandservices.health.v4.Exercise value) { + if (exerciseBuilder_ == null) { + if (dataCase_ == 11 + && data_ != com.google.devicesandservices.health.v4.Exercise.getDefaultInstance()) { + data_ = + com.google.devicesandservices.health.v4.Exercise.newBuilder( + (com.google.devicesandservices.health.v4.Exercise) data_) + .mergeFrom(value) + .buildPartial(); + } else { + data_ = value; + } + onChanged(); + } else { + if (dataCase_ == 11) { + exerciseBuilder_.mergeFrom(value); + } else { + exerciseBuilder_.setMessage(value); + } + } + dataCase_ = 11; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `exercise` session data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Exercise exercise = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearExercise() { + if (exerciseBuilder_ == null) { + if (dataCase_ == 11) { + dataCase_ = 0; + data_ = null; + onChanged(); + } + } else { + if (dataCase_ == 11) { + dataCase_ = 0; + data_ = null; + } + exerciseBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `exercise` session data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Exercise exercise = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.devicesandservices.health.v4.Exercise.Builder getExerciseBuilder() { + return internalGetExerciseFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Data for points in the `exercise` session data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Exercise exercise = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ExerciseOrBuilder getExerciseOrBuilder() { + if ((dataCase_ == 11) && (exerciseBuilder_ != null)) { + return exerciseBuilder_.getMessageOrBuilder(); + } else { + if (dataCase_ == 11) { + return (com.google.devicesandservices.health.v4.Exercise) data_; + } + return com.google.devicesandservices.health.v4.Exercise.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Data for points in the `exercise` session data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Exercise exercise = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.Exercise, + com.google.devicesandservices.health.v4.Exercise.Builder, + com.google.devicesandservices.health.v4.ExerciseOrBuilder> + internalGetExerciseFieldBuilder() { + if (exerciseBuilder_ == null) { + if (!(dataCase_ == 11)) { + data_ = com.google.devicesandservices.health.v4.Exercise.getDefaultInstance(); + } + exerciseBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.Exercise, + com.google.devicesandservices.health.v4.Exercise.Builder, + com.google.devicesandservices.health.v4.ExerciseOrBuilder>( + (com.google.devicesandservices.health.v4.Exercise) data_, + getParentForChildren(), + isClean()); + data_ = null; + } + dataCase_ = 11; + onChanged(); + return exerciseBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.Weight, + com.google.devicesandservices.health.v4.Weight.Builder, + com.google.devicesandservices.health.v4.WeightOrBuilder> + weightBuilder_; + + /** + * + * + *
+     * Optional. Data for points in the `weight` sample data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Weight weight = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the weight field is set. + */ + @java.lang.Override + public boolean hasWeight() { + return dataCase_ == 12; + } + + /** + * + * + *
+     * Optional. Data for points in the `weight` sample data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Weight weight = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The weight. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Weight getWeight() { + if (weightBuilder_ == null) { + if (dataCase_ == 12) { + return (com.google.devicesandservices.health.v4.Weight) data_; + } + return com.google.devicesandservices.health.v4.Weight.getDefaultInstance(); + } else { + if (dataCase_ == 12) { + return weightBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.Weight.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Data for points in the `weight` sample data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Weight weight = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setWeight(com.google.devicesandservices.health.v4.Weight value) { + if (weightBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + onChanged(); + } else { + weightBuilder_.setMessage(value); + } + dataCase_ = 12; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `weight` sample data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Weight weight = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setWeight( + com.google.devicesandservices.health.v4.Weight.Builder builderForValue) { + if (weightBuilder_ == null) { + data_ = builderForValue.build(); + onChanged(); + } else { + weightBuilder_.setMessage(builderForValue.build()); + } + dataCase_ = 12; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `weight` sample data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Weight weight = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeWeight(com.google.devicesandservices.health.v4.Weight value) { + if (weightBuilder_ == null) { + if (dataCase_ == 12 + && data_ != com.google.devicesandservices.health.v4.Weight.getDefaultInstance()) { + data_ = + com.google.devicesandservices.health.v4.Weight.newBuilder( + (com.google.devicesandservices.health.v4.Weight) data_) + .mergeFrom(value) + .buildPartial(); + } else { + data_ = value; + } + onChanged(); + } else { + if (dataCase_ == 12) { + weightBuilder_.mergeFrom(value); + } else { + weightBuilder_.setMessage(value); + } + } + dataCase_ = 12; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `weight` sample data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Weight weight = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearWeight() { + if (weightBuilder_ == null) { + if (dataCase_ == 12) { + dataCase_ = 0; + data_ = null; + onChanged(); + } + } else { + if (dataCase_ == 12) { + dataCase_ = 0; + data_ = null; + } + weightBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `weight` sample data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Weight weight = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.devicesandservices.health.v4.Weight.Builder getWeightBuilder() { + return internalGetWeightFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Data for points in the `weight` sample data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Weight weight = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.WeightOrBuilder getWeightOrBuilder() { + if ((dataCase_ == 12) && (weightBuilder_ != null)) { + return weightBuilder_.getMessageOrBuilder(); + } else { + if (dataCase_ == 12) { + return (com.google.devicesandservices.health.v4.Weight) data_; + } + return com.google.devicesandservices.health.v4.Weight.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Data for points in the `weight` sample data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Weight weight = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.Weight, + com.google.devicesandservices.health.v4.Weight.Builder, + com.google.devicesandservices.health.v4.WeightOrBuilder> + internalGetWeightFieldBuilder() { + if (weightBuilder_ == null) { + if (!(dataCase_ == 12)) { + data_ = com.google.devicesandservices.health.v4.Weight.getDefaultInstance(); + } + weightBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.Weight, + com.google.devicesandservices.health.v4.Weight.Builder, + com.google.devicesandservices.health.v4.WeightOrBuilder>( + (com.google.devicesandservices.health.v4.Weight) data_, + getParentForChildren(), + isClean()); + data_ = null; + } + dataCase_ = 12; + onChanged(); + return weightBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.Altitude, + com.google.devicesandservices.health.v4.Altitude.Builder, + com.google.devicesandservices.health.v4.AltitudeOrBuilder> + altitudeBuilder_; + + /** + * + * + *
+     * Optional. Data for points in the `altitude` interval data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Altitude altitude = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the altitude field is set. + */ + @java.lang.Override + public boolean hasAltitude() { + return dataCase_ == 13; + } + + /** + * + * + *
+     * Optional. Data for points in the `altitude` interval data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Altitude altitude = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The altitude. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Altitude getAltitude() { + if (altitudeBuilder_ == null) { + if (dataCase_ == 13) { + return (com.google.devicesandservices.health.v4.Altitude) data_; + } + return com.google.devicesandservices.health.v4.Altitude.getDefaultInstance(); + } else { + if (dataCase_ == 13) { + return altitudeBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.Altitude.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Data for points in the `altitude` interval data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Altitude altitude = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAltitude(com.google.devicesandservices.health.v4.Altitude value) { + if (altitudeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + onChanged(); + } else { + altitudeBuilder_.setMessage(value); + } + dataCase_ = 13; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `altitude` interval data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Altitude altitude = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAltitude( + com.google.devicesandservices.health.v4.Altitude.Builder builderForValue) { + if (altitudeBuilder_ == null) { + data_ = builderForValue.build(); + onChanged(); + } else { + altitudeBuilder_.setMessage(builderForValue.build()); + } + dataCase_ = 13; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `altitude` interval data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Altitude altitude = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeAltitude(com.google.devicesandservices.health.v4.Altitude value) { + if (altitudeBuilder_ == null) { + if (dataCase_ == 13 + && data_ != com.google.devicesandservices.health.v4.Altitude.getDefaultInstance()) { + data_ = + com.google.devicesandservices.health.v4.Altitude.newBuilder( + (com.google.devicesandservices.health.v4.Altitude) data_) + .mergeFrom(value) + .buildPartial(); + } else { + data_ = value; + } + onChanged(); + } else { + if (dataCase_ == 13) { + altitudeBuilder_.mergeFrom(value); + } else { + altitudeBuilder_.setMessage(value); + } + } + dataCase_ = 13; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `altitude` interval data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Altitude altitude = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearAltitude() { + if (altitudeBuilder_ == null) { + if (dataCase_ == 13) { + dataCase_ = 0; + data_ = null; + onChanged(); + } + } else { + if (dataCase_ == 13) { + dataCase_ = 0; + data_ = null; + } + altitudeBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `altitude` interval data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Altitude altitude = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.devicesandservices.health.v4.Altitude.Builder getAltitudeBuilder() { + return internalGetAltitudeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Data for points in the `altitude` interval data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Altitude altitude = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.AltitudeOrBuilder getAltitudeOrBuilder() { + if ((dataCase_ == 13) && (altitudeBuilder_ != null)) { + return altitudeBuilder_.getMessageOrBuilder(); + } else { + if (dataCase_ == 13) { + return (com.google.devicesandservices.health.v4.Altitude) data_; + } + return com.google.devicesandservices.health.v4.Altitude.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Data for points in the `altitude` interval data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Altitude altitude = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.Altitude, + com.google.devicesandservices.health.v4.Altitude.Builder, + com.google.devicesandservices.health.v4.AltitudeOrBuilder> + internalGetAltitudeFieldBuilder() { + if (altitudeBuilder_ == null) { + if (!(dataCase_ == 13)) { + data_ = com.google.devicesandservices.health.v4.Altitude.getDefaultInstance(); + } + altitudeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.Altitude, + com.google.devicesandservices.health.v4.Altitude.Builder, + com.google.devicesandservices.health.v4.AltitudeOrBuilder>( + (com.google.devicesandservices.health.v4.Altitude) data_, + getParentForChildren(), + isClean()); + data_ = null; + } + dataCase_ = 13; + onChanged(); + return altitudeBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.Distance, + com.google.devicesandservices.health.v4.Distance.Builder, + com.google.devicesandservices.health.v4.DistanceOrBuilder> + distanceBuilder_; + + /** + * + * + *
+     * Optional. Data for points in the `distance` interval data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Distance distance = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the distance field is set. + */ + @java.lang.Override + public boolean hasDistance() { + return dataCase_ == 14; + } + + /** + * + * + *
+     * Optional. Data for points in the `distance` interval data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Distance distance = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The distance. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Distance getDistance() { + if (distanceBuilder_ == null) { + if (dataCase_ == 14) { + return (com.google.devicesandservices.health.v4.Distance) data_; + } + return com.google.devicesandservices.health.v4.Distance.getDefaultInstance(); + } else { + if (dataCase_ == 14) { + return distanceBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.Distance.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Data for points in the `distance` interval data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Distance distance = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDistance(com.google.devicesandservices.health.v4.Distance value) { + if (distanceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + onChanged(); + } else { + distanceBuilder_.setMessage(value); + } + dataCase_ = 14; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `distance` interval data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Distance distance = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDistance( + com.google.devicesandservices.health.v4.Distance.Builder builderForValue) { + if (distanceBuilder_ == null) { + data_ = builderForValue.build(); + onChanged(); + } else { + distanceBuilder_.setMessage(builderForValue.build()); + } + dataCase_ = 14; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `distance` interval data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Distance distance = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeDistance(com.google.devicesandservices.health.v4.Distance value) { + if (distanceBuilder_ == null) { + if (dataCase_ == 14 + && data_ != com.google.devicesandservices.health.v4.Distance.getDefaultInstance()) { + data_ = + com.google.devicesandservices.health.v4.Distance.newBuilder( + (com.google.devicesandservices.health.v4.Distance) data_) + .mergeFrom(value) + .buildPartial(); + } else { + data_ = value; + } + onChanged(); + } else { + if (dataCase_ == 14) { + distanceBuilder_.mergeFrom(value); + } else { + distanceBuilder_.setMessage(value); + } + } + dataCase_ = 14; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `distance` interval data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Distance distance = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearDistance() { + if (distanceBuilder_ == null) { + if (dataCase_ == 14) { + dataCase_ = 0; + data_ = null; + onChanged(); + } + } else { + if (dataCase_ == 14) { + dataCase_ = 0; + data_ = null; + } + distanceBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `distance` interval data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Distance distance = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.devicesandservices.health.v4.Distance.Builder getDistanceBuilder() { + return internalGetDistanceFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Data for points in the `distance` interval data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Distance distance = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DistanceOrBuilder getDistanceOrBuilder() { + if ((dataCase_ == 14) && (distanceBuilder_ != null)) { + return distanceBuilder_.getMessageOrBuilder(); + } else { + if (dataCase_ == 14) { + return (com.google.devicesandservices.health.v4.Distance) data_; + } + return com.google.devicesandservices.health.v4.Distance.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Data for points in the `distance` interval data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Distance distance = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.Distance, + com.google.devicesandservices.health.v4.Distance.Builder, + com.google.devicesandservices.health.v4.DistanceOrBuilder> + internalGetDistanceFieldBuilder() { + if (distanceBuilder_ == null) { + if (!(dataCase_ == 14)) { + data_ = com.google.devicesandservices.health.v4.Distance.getDefaultInstance(); + } + distanceBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.Distance, + com.google.devicesandservices.health.v4.Distance.Builder, + com.google.devicesandservices.health.v4.DistanceOrBuilder>( + (com.google.devicesandservices.health.v4.Distance) data_, + getParentForChildren(), + isClean()); + data_ = null; + } + dataCase_ = 14; + onChanged(); + return distanceBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.BodyFat, + com.google.devicesandservices.health.v4.BodyFat.Builder, + com.google.devicesandservices.health.v4.BodyFatOrBuilder> + bodyFatBuilder_; + + /** + * + * + *
+     * Optional. Data for points in the `body-fat` sample data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.BodyFat body_fat = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the bodyFat field is set. + */ + @java.lang.Override + public boolean hasBodyFat() { + return dataCase_ == 15; + } + + /** + * + * + *
+     * Optional. Data for points in the `body-fat` sample data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.BodyFat body_fat = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The bodyFat. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.BodyFat getBodyFat() { + if (bodyFatBuilder_ == null) { + if (dataCase_ == 15) { + return (com.google.devicesandservices.health.v4.BodyFat) data_; + } + return com.google.devicesandservices.health.v4.BodyFat.getDefaultInstance(); + } else { + if (dataCase_ == 15) { + return bodyFatBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.BodyFat.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Data for points in the `body-fat` sample data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.BodyFat body_fat = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setBodyFat(com.google.devicesandservices.health.v4.BodyFat value) { + if (bodyFatBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + onChanged(); + } else { + bodyFatBuilder_.setMessage(value); + } + dataCase_ = 15; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `body-fat` sample data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.BodyFat body_fat = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setBodyFat( + com.google.devicesandservices.health.v4.BodyFat.Builder builderForValue) { + if (bodyFatBuilder_ == null) { + data_ = builderForValue.build(); + onChanged(); + } else { + bodyFatBuilder_.setMessage(builderForValue.build()); + } + dataCase_ = 15; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `body-fat` sample data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.BodyFat body_fat = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeBodyFat(com.google.devicesandservices.health.v4.BodyFat value) { + if (bodyFatBuilder_ == null) { + if (dataCase_ == 15 + && data_ != com.google.devicesandservices.health.v4.BodyFat.getDefaultInstance()) { + data_ = + com.google.devicesandservices.health.v4.BodyFat.newBuilder( + (com.google.devicesandservices.health.v4.BodyFat) data_) + .mergeFrom(value) + .buildPartial(); + } else { + data_ = value; + } + onChanged(); + } else { + if (dataCase_ == 15) { + bodyFatBuilder_.mergeFrom(value); + } else { + bodyFatBuilder_.setMessage(value); + } + } + dataCase_ = 15; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `body-fat` sample data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.BodyFat body_fat = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearBodyFat() { + if (bodyFatBuilder_ == null) { + if (dataCase_ == 15) { + dataCase_ = 0; + data_ = null; + onChanged(); + } + } else { + if (dataCase_ == 15) { + dataCase_ = 0; + data_ = null; + } + bodyFatBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `body-fat` sample data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.BodyFat body_fat = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.devicesandservices.health.v4.BodyFat.Builder getBodyFatBuilder() { + return internalGetBodyFatFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Data for points in the `body-fat` sample data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.BodyFat body_fat = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.BodyFatOrBuilder getBodyFatOrBuilder() { + if ((dataCase_ == 15) && (bodyFatBuilder_ != null)) { + return bodyFatBuilder_.getMessageOrBuilder(); + } else { + if (dataCase_ == 15) { + return (com.google.devicesandservices.health.v4.BodyFat) data_; + } + return com.google.devicesandservices.health.v4.BodyFat.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Data for points in the `body-fat` sample data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.BodyFat body_fat = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.BodyFat, + com.google.devicesandservices.health.v4.BodyFat.Builder, + com.google.devicesandservices.health.v4.BodyFatOrBuilder> + internalGetBodyFatFieldBuilder() { + if (bodyFatBuilder_ == null) { + if (!(dataCase_ == 15)) { + data_ = com.google.devicesandservices.health.v4.BodyFat.getDefaultInstance(); + } + bodyFatBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.BodyFat, + com.google.devicesandservices.health.v4.BodyFat.Builder, + com.google.devicesandservices.health.v4.BodyFatOrBuilder>( + (com.google.devicesandservices.health.v4.BodyFat) data_, + getParentForChildren(), + isClean()); + data_ = null; + } + dataCase_ = 15; + onChanged(); + return bodyFatBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ActiveZoneMinutes, + com.google.devicesandservices.health.v4.ActiveZoneMinutes.Builder, + com.google.devicesandservices.health.v4.ActiveZoneMinutesOrBuilder> + activeZoneMinutesBuilder_; + + /** + * + * + *
+     * Optional. Data for points in the `active-zone-minutes` interval data type
+     * collection, measured in minutes.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ActiveZoneMinutes active_zone_minutes = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the activeZoneMinutes field is set. + */ + @java.lang.Override + public boolean hasActiveZoneMinutes() { + return dataCase_ == 17; + } + + /** + * + * + *
+     * Optional. Data for points in the `active-zone-minutes` interval data type
+     * collection, measured in minutes.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ActiveZoneMinutes active_zone_minutes = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The activeZoneMinutes. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ActiveZoneMinutes getActiveZoneMinutes() { + if (activeZoneMinutesBuilder_ == null) { + if (dataCase_ == 17) { + return (com.google.devicesandservices.health.v4.ActiveZoneMinutes) data_; + } + return com.google.devicesandservices.health.v4.ActiveZoneMinutes.getDefaultInstance(); + } else { + if (dataCase_ == 17) { + return activeZoneMinutesBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.ActiveZoneMinutes.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Data for points in the `active-zone-minutes` interval data type
+     * collection, measured in minutes.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ActiveZoneMinutes active_zone_minutes = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setActiveZoneMinutes( + com.google.devicesandservices.health.v4.ActiveZoneMinutes value) { + if (activeZoneMinutesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + onChanged(); + } else { + activeZoneMinutesBuilder_.setMessage(value); + } + dataCase_ = 17; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `active-zone-minutes` interval data type
+     * collection, measured in minutes.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ActiveZoneMinutes active_zone_minutes = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setActiveZoneMinutes( + com.google.devicesandservices.health.v4.ActiveZoneMinutes.Builder builderForValue) { + if (activeZoneMinutesBuilder_ == null) { + data_ = builderForValue.build(); + onChanged(); + } else { + activeZoneMinutesBuilder_.setMessage(builderForValue.build()); + } + dataCase_ = 17; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `active-zone-minutes` interval data type
+     * collection, measured in minutes.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ActiveZoneMinutes active_zone_minutes = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeActiveZoneMinutes( + com.google.devicesandservices.health.v4.ActiveZoneMinutes value) { + if (activeZoneMinutesBuilder_ == null) { + if (dataCase_ == 17 + && data_ + != com.google.devicesandservices.health.v4.ActiveZoneMinutes.getDefaultInstance()) { + data_ = + com.google.devicesandservices.health.v4.ActiveZoneMinutes.newBuilder( + (com.google.devicesandservices.health.v4.ActiveZoneMinutes) data_) + .mergeFrom(value) + .buildPartial(); + } else { + data_ = value; + } + onChanged(); + } else { + if (dataCase_ == 17) { + activeZoneMinutesBuilder_.mergeFrom(value); + } else { + activeZoneMinutesBuilder_.setMessage(value); + } + } + dataCase_ = 17; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `active-zone-minutes` interval data type
+     * collection, measured in minutes.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ActiveZoneMinutes active_zone_minutes = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearActiveZoneMinutes() { + if (activeZoneMinutesBuilder_ == null) { + if (dataCase_ == 17) { + dataCase_ = 0; + data_ = null; + onChanged(); + } + } else { + if (dataCase_ == 17) { + dataCase_ = 0; + data_ = null; + } + activeZoneMinutesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `active-zone-minutes` interval data type
+     * collection, measured in minutes.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ActiveZoneMinutes active_zone_minutes = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.devicesandservices.health.v4.ActiveZoneMinutes.Builder + getActiveZoneMinutesBuilder() { + return internalGetActiveZoneMinutesFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Data for points in the `active-zone-minutes` interval data type
+     * collection, measured in minutes.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ActiveZoneMinutes active_zone_minutes = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ActiveZoneMinutesOrBuilder + getActiveZoneMinutesOrBuilder() { + if ((dataCase_ == 17) && (activeZoneMinutesBuilder_ != null)) { + return activeZoneMinutesBuilder_.getMessageOrBuilder(); + } else { + if (dataCase_ == 17) { + return (com.google.devicesandservices.health.v4.ActiveZoneMinutes) data_; + } + return com.google.devicesandservices.health.v4.ActiveZoneMinutes.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Data for points in the `active-zone-minutes` interval data type
+     * collection, measured in minutes.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ActiveZoneMinutes active_zone_minutes = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ActiveZoneMinutes, + com.google.devicesandservices.health.v4.ActiveZoneMinutes.Builder, + com.google.devicesandservices.health.v4.ActiveZoneMinutesOrBuilder> + internalGetActiveZoneMinutesFieldBuilder() { + if (activeZoneMinutesBuilder_ == null) { + if (!(dataCase_ == 17)) { + data_ = com.google.devicesandservices.health.v4.ActiveZoneMinutes.getDefaultInstance(); + } + activeZoneMinutesBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ActiveZoneMinutes, + com.google.devicesandservices.health.v4.ActiveZoneMinutes.Builder, + com.google.devicesandservices.health.v4.ActiveZoneMinutesOrBuilder>( + (com.google.devicesandservices.health.v4.ActiveZoneMinutes) data_, + getParentForChildren(), + isClean()); + data_ = null; + } + dataCase_ = 17; + onChanged(); + return activeZoneMinutesBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.HeartRateVariability, + com.google.devicesandservices.health.v4.HeartRateVariability.Builder, + com.google.devicesandservices.health.v4.HeartRateVariabilityOrBuilder> + heartRateVariabilityBuilder_; + + /** + * + * + *
+     * Optional. Data for points in the `heart-rate-variability` sample data
+     * type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.HeartRateVariability heart_rate_variability = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the heartRateVariability field is set. + */ + @java.lang.Override + public boolean hasHeartRateVariability() { + return dataCase_ == 19; + } + + /** + * + * + *
+     * Optional. Data for points in the `heart-rate-variability` sample data
+     * type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.HeartRateVariability heart_rate_variability = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The heartRateVariability. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.HeartRateVariability getHeartRateVariability() { + if (heartRateVariabilityBuilder_ == null) { + if (dataCase_ == 19) { + return (com.google.devicesandservices.health.v4.HeartRateVariability) data_; + } + return com.google.devicesandservices.health.v4.HeartRateVariability.getDefaultInstance(); + } else { + if (dataCase_ == 19) { + return heartRateVariabilityBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.HeartRateVariability.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Data for points in the `heart-rate-variability` sample data
+     * type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.HeartRateVariability heart_rate_variability = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setHeartRateVariability( + com.google.devicesandservices.health.v4.HeartRateVariability value) { + if (heartRateVariabilityBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + onChanged(); + } else { + heartRateVariabilityBuilder_.setMessage(value); + } + dataCase_ = 19; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `heart-rate-variability` sample data
+     * type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.HeartRateVariability heart_rate_variability = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setHeartRateVariability( + com.google.devicesandservices.health.v4.HeartRateVariability.Builder builderForValue) { + if (heartRateVariabilityBuilder_ == null) { + data_ = builderForValue.build(); + onChanged(); + } else { + heartRateVariabilityBuilder_.setMessage(builderForValue.build()); + } + dataCase_ = 19; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `heart-rate-variability` sample data
+     * type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.HeartRateVariability heart_rate_variability = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeHeartRateVariability( + com.google.devicesandservices.health.v4.HeartRateVariability value) { + if (heartRateVariabilityBuilder_ == null) { + if (dataCase_ == 19 + && data_ + != com.google.devicesandservices.health.v4.HeartRateVariability + .getDefaultInstance()) { + data_ = + com.google.devicesandservices.health.v4.HeartRateVariability.newBuilder( + (com.google.devicesandservices.health.v4.HeartRateVariability) data_) + .mergeFrom(value) + .buildPartial(); + } else { + data_ = value; + } + onChanged(); + } else { + if (dataCase_ == 19) { + heartRateVariabilityBuilder_.mergeFrom(value); + } else { + heartRateVariabilityBuilder_.setMessage(value); + } + } + dataCase_ = 19; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `heart-rate-variability` sample data
+     * type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.HeartRateVariability heart_rate_variability = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearHeartRateVariability() { + if (heartRateVariabilityBuilder_ == null) { + if (dataCase_ == 19) { + dataCase_ = 0; + data_ = null; + onChanged(); + } + } else { + if (dataCase_ == 19) { + dataCase_ = 0; + data_ = null; + } + heartRateVariabilityBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `heart-rate-variability` sample data
+     * type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.HeartRateVariability heart_rate_variability = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.devicesandservices.health.v4.HeartRateVariability.Builder + getHeartRateVariabilityBuilder() { + return internalGetHeartRateVariabilityFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Data for points in the `heart-rate-variability` sample data
+     * type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.HeartRateVariability heart_rate_variability = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.HeartRateVariabilityOrBuilder + getHeartRateVariabilityOrBuilder() { + if ((dataCase_ == 19) && (heartRateVariabilityBuilder_ != null)) { + return heartRateVariabilityBuilder_.getMessageOrBuilder(); + } else { + if (dataCase_ == 19) { + return (com.google.devicesandservices.health.v4.HeartRateVariability) data_; + } + return com.google.devicesandservices.health.v4.HeartRateVariability.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Data for points in the `heart-rate-variability` sample data
+     * type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.HeartRateVariability heart_rate_variability = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.HeartRateVariability, + com.google.devicesandservices.health.v4.HeartRateVariability.Builder, + com.google.devicesandservices.health.v4.HeartRateVariabilityOrBuilder> + internalGetHeartRateVariabilityFieldBuilder() { + if (heartRateVariabilityBuilder_ == null) { + if (!(dataCase_ == 19)) { + data_ = com.google.devicesandservices.health.v4.HeartRateVariability.getDefaultInstance(); + } + heartRateVariabilityBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.HeartRateVariability, + com.google.devicesandservices.health.v4.HeartRateVariability.Builder, + com.google.devicesandservices.health.v4.HeartRateVariabilityOrBuilder>( + (com.google.devicesandservices.health.v4.HeartRateVariability) data_, + getParentForChildren(), + isClean()); + data_ = null; + } + dataCase_ = 19; + onChanged(); + return heartRateVariabilityBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations, + com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations.Builder, + com.google.devicesandservices.health.v4.DailySleepTemperatureDerivationsOrBuilder> + dailySleepTemperatureDerivationsBuilder_; + + /** + * + * + *
+     * Optional. Data for points in the `daily-sleep-temperature-derivations`
+     * daily data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailySleepTemperatureDerivations daily_sleep_temperature_derivations = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the dailySleepTemperatureDerivations field is set. + */ + @java.lang.Override + public boolean hasDailySleepTemperatureDerivations() { + return dataCase_ == 20; + } + + /** + * + * + *
+     * Optional. Data for points in the `daily-sleep-temperature-derivations`
+     * daily data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailySleepTemperatureDerivations daily_sleep_temperature_derivations = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The dailySleepTemperatureDerivations. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations + getDailySleepTemperatureDerivations() { + if (dailySleepTemperatureDerivationsBuilder_ == null) { + if (dataCase_ == 20) { + return (com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations) data_; + } + return com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations + .getDefaultInstance(); + } else { + if (dataCase_ == 20) { + return dailySleepTemperatureDerivationsBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Data for points in the `daily-sleep-temperature-derivations`
+     * daily data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailySleepTemperatureDerivations daily_sleep_temperature_derivations = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDailySleepTemperatureDerivations( + com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations value) { + if (dailySleepTemperatureDerivationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + onChanged(); + } else { + dailySleepTemperatureDerivationsBuilder_.setMessage(value); + } + dataCase_ = 20; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `daily-sleep-temperature-derivations`
+     * daily data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailySleepTemperatureDerivations daily_sleep_temperature_derivations = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDailySleepTemperatureDerivations( + com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations.Builder + builderForValue) { + if (dailySleepTemperatureDerivationsBuilder_ == null) { + data_ = builderForValue.build(); + onChanged(); + } else { + dailySleepTemperatureDerivationsBuilder_.setMessage(builderForValue.build()); + } + dataCase_ = 20; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `daily-sleep-temperature-derivations`
+     * daily data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailySleepTemperatureDerivations daily_sleep_temperature_derivations = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeDailySleepTemperatureDerivations( + com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations value) { + if (dailySleepTemperatureDerivationsBuilder_ == null) { + if (dataCase_ == 20 + && data_ + != com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations + .getDefaultInstance()) { + data_ = + com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations.newBuilder( + (com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations) + data_) + .mergeFrom(value) + .buildPartial(); + } else { + data_ = value; + } + onChanged(); + } else { + if (dataCase_ == 20) { + dailySleepTemperatureDerivationsBuilder_.mergeFrom(value); + } else { + dailySleepTemperatureDerivationsBuilder_.setMessage(value); + } + } + dataCase_ = 20; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `daily-sleep-temperature-derivations`
+     * daily data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailySleepTemperatureDerivations daily_sleep_temperature_derivations = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearDailySleepTemperatureDerivations() { + if (dailySleepTemperatureDerivationsBuilder_ == null) { + if (dataCase_ == 20) { + dataCase_ = 0; + data_ = null; + onChanged(); + } + } else { + if (dataCase_ == 20) { + dataCase_ = 0; + data_ = null; + } + dailySleepTemperatureDerivationsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `daily-sleep-temperature-derivations`
+     * daily data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailySleepTemperatureDerivations daily_sleep_temperature_derivations = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations.Builder + getDailySleepTemperatureDerivationsBuilder() { + return internalGetDailySleepTemperatureDerivationsFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Data for points in the `daily-sleep-temperature-derivations`
+     * daily data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailySleepTemperatureDerivations daily_sleep_temperature_derivations = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DailySleepTemperatureDerivationsOrBuilder + getDailySleepTemperatureDerivationsOrBuilder() { + if ((dataCase_ == 20) && (dailySleepTemperatureDerivationsBuilder_ != null)) { + return dailySleepTemperatureDerivationsBuilder_.getMessageOrBuilder(); + } else { + if (dataCase_ == 20) { + return (com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations) data_; + } + return com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Data for points in the `daily-sleep-temperature-derivations`
+     * daily data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailySleepTemperatureDerivations daily_sleep_temperature_derivations = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations, + com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations.Builder, + com.google.devicesandservices.health.v4.DailySleepTemperatureDerivationsOrBuilder> + internalGetDailySleepTemperatureDerivationsFieldBuilder() { + if (dailySleepTemperatureDerivationsBuilder_ == null) { + if (!(dataCase_ == 20)) { + data_ = + com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations + .getDefaultInstance(); + } + dailySleepTemperatureDerivationsBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations, + com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations.Builder, + com.google.devicesandservices.health.v4.DailySleepTemperatureDerivationsOrBuilder>( + (com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations) data_, + getParentForChildren(), + isClean()); + data_ = null; + } + dataCase_ = 20; + onChanged(); + return dailySleepTemperatureDerivationsBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.SedentaryPeriod, + com.google.devicesandservices.health.v4.SedentaryPeriod.Builder, + com.google.devicesandservices.health.v4.SedentaryPeriodOrBuilder> + sedentaryPeriodBuilder_; + + /** + * + * + *
+     * Optional. Data for points in the `sedentary-period` interval data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.SedentaryPeriod sedentary_period = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the sedentaryPeriod field is set. + */ + @java.lang.Override + public boolean hasSedentaryPeriod() { + return dataCase_ == 21; + } + + /** + * + * + *
+     * Optional. Data for points in the `sedentary-period` interval data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.SedentaryPeriod sedentary_period = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The sedentaryPeriod. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.SedentaryPeriod getSedentaryPeriod() { + if (sedentaryPeriodBuilder_ == null) { + if (dataCase_ == 21) { + return (com.google.devicesandservices.health.v4.SedentaryPeriod) data_; + } + return com.google.devicesandservices.health.v4.SedentaryPeriod.getDefaultInstance(); + } else { + if (dataCase_ == 21) { + return sedentaryPeriodBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.SedentaryPeriod.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Data for points in the `sedentary-period` interval data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.SedentaryPeriod sedentary_period = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setSedentaryPeriod( + com.google.devicesandservices.health.v4.SedentaryPeriod value) { + if (sedentaryPeriodBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + onChanged(); + } else { + sedentaryPeriodBuilder_.setMessage(value); + } + dataCase_ = 21; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `sedentary-period` interval data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.SedentaryPeriod sedentary_period = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setSedentaryPeriod( + com.google.devicesandservices.health.v4.SedentaryPeriod.Builder builderForValue) { + if (sedentaryPeriodBuilder_ == null) { + data_ = builderForValue.build(); + onChanged(); + } else { + sedentaryPeriodBuilder_.setMessage(builderForValue.build()); + } + dataCase_ = 21; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `sedentary-period` interval data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.SedentaryPeriod sedentary_period = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeSedentaryPeriod( + com.google.devicesandservices.health.v4.SedentaryPeriod value) { + if (sedentaryPeriodBuilder_ == null) { + if (dataCase_ == 21 + && data_ + != com.google.devicesandservices.health.v4.SedentaryPeriod.getDefaultInstance()) { + data_ = + com.google.devicesandservices.health.v4.SedentaryPeriod.newBuilder( + (com.google.devicesandservices.health.v4.SedentaryPeriod) data_) + .mergeFrom(value) + .buildPartial(); + } else { + data_ = value; + } + onChanged(); + } else { + if (dataCase_ == 21) { + sedentaryPeriodBuilder_.mergeFrom(value); + } else { + sedentaryPeriodBuilder_.setMessage(value); + } + } + dataCase_ = 21; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `sedentary-period` interval data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.SedentaryPeriod sedentary_period = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearSedentaryPeriod() { + if (sedentaryPeriodBuilder_ == null) { + if (dataCase_ == 21) { + dataCase_ = 0; + data_ = null; + onChanged(); + } + } else { + if (dataCase_ == 21) { + dataCase_ = 0; + data_ = null; + } + sedentaryPeriodBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `sedentary-period` interval data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.SedentaryPeriod sedentary_period = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.devicesandservices.health.v4.SedentaryPeriod.Builder + getSedentaryPeriodBuilder() { + return internalGetSedentaryPeriodFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Data for points in the `sedentary-period` interval data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.SedentaryPeriod sedentary_period = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.SedentaryPeriodOrBuilder + getSedentaryPeriodOrBuilder() { + if ((dataCase_ == 21) && (sedentaryPeriodBuilder_ != null)) { + return sedentaryPeriodBuilder_.getMessageOrBuilder(); + } else { + if (dataCase_ == 21) { + return (com.google.devicesandservices.health.v4.SedentaryPeriod) data_; + } + return com.google.devicesandservices.health.v4.SedentaryPeriod.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Data for points in the `sedentary-period` interval data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.SedentaryPeriod sedentary_period = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.SedentaryPeriod, + com.google.devicesandservices.health.v4.SedentaryPeriod.Builder, + com.google.devicesandservices.health.v4.SedentaryPeriodOrBuilder> + internalGetSedentaryPeriodFieldBuilder() { + if (sedentaryPeriodBuilder_ == null) { + if (!(dataCase_ == 21)) { + data_ = com.google.devicesandservices.health.v4.SedentaryPeriod.getDefaultInstance(); + } + sedentaryPeriodBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.SedentaryPeriod, + com.google.devicesandservices.health.v4.SedentaryPeriod.Builder, + com.google.devicesandservices.health.v4.SedentaryPeriodOrBuilder>( + (com.google.devicesandservices.health.v4.SedentaryPeriod) data_, + getParentForChildren(), + isClean()); + data_ = null; + } + dataCase_ = 21; + onChanged(); + return sedentaryPeriodBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.RunVO2Max, + com.google.devicesandservices.health.v4.RunVO2Max.Builder, + com.google.devicesandservices.health.v4.RunVO2MaxOrBuilder> + runVo2MaxBuilder_; + + /** + * + * + *
+     * Optional. Data for points in the `run-vo2-max` sample data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.RunVO2Max run_vo2_max = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the runVo2Max field is set. + */ + @java.lang.Override + public boolean hasRunVo2Max() { + return dataCase_ == 22; + } + + /** + * + * + *
+     * Optional. Data for points in the `run-vo2-max` sample data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.RunVO2Max run_vo2_max = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The runVo2Max. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.RunVO2Max getRunVo2Max() { + if (runVo2MaxBuilder_ == null) { + if (dataCase_ == 22) { + return (com.google.devicesandservices.health.v4.RunVO2Max) data_; + } + return com.google.devicesandservices.health.v4.RunVO2Max.getDefaultInstance(); + } else { + if (dataCase_ == 22) { + return runVo2MaxBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.RunVO2Max.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Data for points in the `run-vo2-max` sample data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.RunVO2Max run_vo2_max = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRunVo2Max(com.google.devicesandservices.health.v4.RunVO2Max value) { + if (runVo2MaxBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + onChanged(); + } else { + runVo2MaxBuilder_.setMessage(value); + } + dataCase_ = 22; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `run-vo2-max` sample data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.RunVO2Max run_vo2_max = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRunVo2Max( + com.google.devicesandservices.health.v4.RunVO2Max.Builder builderForValue) { + if (runVo2MaxBuilder_ == null) { + data_ = builderForValue.build(); + onChanged(); + } else { + runVo2MaxBuilder_.setMessage(builderForValue.build()); + } + dataCase_ = 22; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `run-vo2-max` sample data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.RunVO2Max run_vo2_max = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeRunVo2Max(com.google.devicesandservices.health.v4.RunVO2Max value) { + if (runVo2MaxBuilder_ == null) { + if (dataCase_ == 22 + && data_ != com.google.devicesandservices.health.v4.RunVO2Max.getDefaultInstance()) { + data_ = + com.google.devicesandservices.health.v4.RunVO2Max.newBuilder( + (com.google.devicesandservices.health.v4.RunVO2Max) data_) + .mergeFrom(value) + .buildPartial(); + } else { + data_ = value; + } + onChanged(); + } else { + if (dataCase_ == 22) { + runVo2MaxBuilder_.mergeFrom(value); + } else { + runVo2MaxBuilder_.setMessage(value); + } + } + dataCase_ = 22; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `run-vo2-max` sample data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.RunVO2Max run_vo2_max = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearRunVo2Max() { + if (runVo2MaxBuilder_ == null) { + if (dataCase_ == 22) { + dataCase_ = 0; + data_ = null; + onChanged(); + } + } else { + if (dataCase_ == 22) { + dataCase_ = 0; + data_ = null; + } + runVo2MaxBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `run-vo2-max` sample data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.RunVO2Max run_vo2_max = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.devicesandservices.health.v4.RunVO2Max.Builder getRunVo2MaxBuilder() { + return internalGetRunVo2MaxFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Data for points in the `run-vo2-max` sample data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.RunVO2Max run_vo2_max = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.RunVO2MaxOrBuilder getRunVo2MaxOrBuilder() { + if ((dataCase_ == 22) && (runVo2MaxBuilder_ != null)) { + return runVo2MaxBuilder_.getMessageOrBuilder(); + } else { + if (dataCase_ == 22) { + return (com.google.devicesandservices.health.v4.RunVO2Max) data_; + } + return com.google.devicesandservices.health.v4.RunVO2Max.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Data for points in the `run-vo2-max` sample data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.RunVO2Max run_vo2_max = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.RunVO2Max, + com.google.devicesandservices.health.v4.RunVO2Max.Builder, + com.google.devicesandservices.health.v4.RunVO2MaxOrBuilder> + internalGetRunVo2MaxFieldBuilder() { + if (runVo2MaxBuilder_ == null) { + if (!(dataCase_ == 22)) { + data_ = com.google.devicesandservices.health.v4.RunVO2Max.getDefaultInstance(); + } + runVo2MaxBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.RunVO2Max, + com.google.devicesandservices.health.v4.RunVO2Max.Builder, + com.google.devicesandservices.health.v4.RunVO2MaxOrBuilder>( + (com.google.devicesandservices.health.v4.RunVO2Max) data_, + getParentForChildren(), + isClean()); + data_ = null; + } + dataCase_ = 22; + onChanged(); + return runVo2MaxBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.OxygenSaturation, + com.google.devicesandservices.health.v4.OxygenSaturation.Builder, + com.google.devicesandservices.health.v4.OxygenSaturationOrBuilder> + oxygenSaturationBuilder_; + + /** + * + * + *
+     * Optional. Data for points in the `oxygen-saturation` sample data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.OxygenSaturation oxygen_saturation = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the oxygenSaturation field is set. + */ + @java.lang.Override + public boolean hasOxygenSaturation() { + return dataCase_ == 24; + } + + /** + * + * + *
+     * Optional. Data for points in the `oxygen-saturation` sample data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.OxygenSaturation oxygen_saturation = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The oxygenSaturation. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.OxygenSaturation getOxygenSaturation() { + if (oxygenSaturationBuilder_ == null) { + if (dataCase_ == 24) { + return (com.google.devicesandservices.health.v4.OxygenSaturation) data_; + } + return com.google.devicesandservices.health.v4.OxygenSaturation.getDefaultInstance(); + } else { + if (dataCase_ == 24) { + return oxygenSaturationBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.OxygenSaturation.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Data for points in the `oxygen-saturation` sample data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.OxygenSaturation oxygen_saturation = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setOxygenSaturation( + com.google.devicesandservices.health.v4.OxygenSaturation value) { + if (oxygenSaturationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + onChanged(); + } else { + oxygenSaturationBuilder_.setMessage(value); + } + dataCase_ = 24; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `oxygen-saturation` sample data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.OxygenSaturation oxygen_saturation = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setOxygenSaturation( + com.google.devicesandservices.health.v4.OxygenSaturation.Builder builderForValue) { + if (oxygenSaturationBuilder_ == null) { + data_ = builderForValue.build(); + onChanged(); + } else { + oxygenSaturationBuilder_.setMessage(builderForValue.build()); + } + dataCase_ = 24; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `oxygen-saturation` sample data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.OxygenSaturation oxygen_saturation = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeOxygenSaturation( + com.google.devicesandservices.health.v4.OxygenSaturation value) { + if (oxygenSaturationBuilder_ == null) { + if (dataCase_ == 24 + && data_ + != com.google.devicesandservices.health.v4.OxygenSaturation.getDefaultInstance()) { + data_ = + com.google.devicesandservices.health.v4.OxygenSaturation.newBuilder( + (com.google.devicesandservices.health.v4.OxygenSaturation) data_) + .mergeFrom(value) + .buildPartial(); + } else { + data_ = value; + } + onChanged(); + } else { + if (dataCase_ == 24) { + oxygenSaturationBuilder_.mergeFrom(value); + } else { + oxygenSaturationBuilder_.setMessage(value); + } + } + dataCase_ = 24; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `oxygen-saturation` sample data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.OxygenSaturation oxygen_saturation = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearOxygenSaturation() { + if (oxygenSaturationBuilder_ == null) { + if (dataCase_ == 24) { + dataCase_ = 0; + data_ = null; + onChanged(); + } + } else { + if (dataCase_ == 24) { + dataCase_ = 0; + data_ = null; + } + oxygenSaturationBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `oxygen-saturation` sample data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.OxygenSaturation oxygen_saturation = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.devicesandservices.health.v4.OxygenSaturation.Builder + getOxygenSaturationBuilder() { + return internalGetOxygenSaturationFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Data for points in the `oxygen-saturation` sample data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.OxygenSaturation oxygen_saturation = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.OxygenSaturationOrBuilder + getOxygenSaturationOrBuilder() { + if ((dataCase_ == 24) && (oxygenSaturationBuilder_ != null)) { + return oxygenSaturationBuilder_.getMessageOrBuilder(); + } else { + if (dataCase_ == 24) { + return (com.google.devicesandservices.health.v4.OxygenSaturation) data_; + } + return com.google.devicesandservices.health.v4.OxygenSaturation.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Data for points in the `oxygen-saturation` sample data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.OxygenSaturation oxygen_saturation = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.OxygenSaturation, + com.google.devicesandservices.health.v4.OxygenSaturation.Builder, + com.google.devicesandservices.health.v4.OxygenSaturationOrBuilder> + internalGetOxygenSaturationFieldBuilder() { + if (oxygenSaturationBuilder_ == null) { + if (!(dataCase_ == 24)) { + data_ = com.google.devicesandservices.health.v4.OxygenSaturation.getDefaultInstance(); + } + oxygenSaturationBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.OxygenSaturation, + com.google.devicesandservices.health.v4.OxygenSaturation.Builder, + com.google.devicesandservices.health.v4.OxygenSaturationOrBuilder>( + (com.google.devicesandservices.health.v4.OxygenSaturation) data_, + getParentForChildren(), + isClean()); + data_ = null; + } + dataCase_ = 24; + onChanged(); + return oxygenSaturationBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.DailyOxygenSaturation, + com.google.devicesandservices.health.v4.DailyOxygenSaturation.Builder, + com.google.devicesandservices.health.v4.DailyOxygenSaturationOrBuilder> + dailyOxygenSaturationBuilder_; + + /** + * + * + *
+     * Optional. Data for points in the `daily-oxygen-saturation` daily data
+     * type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyOxygenSaturation daily_oxygen_saturation = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the dailyOxygenSaturation field is set. + */ + @java.lang.Override + public boolean hasDailyOxygenSaturation() { + return dataCase_ == 25; + } + + /** + * + * + *
+     * Optional. Data for points in the `daily-oxygen-saturation` daily data
+     * type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyOxygenSaturation daily_oxygen_saturation = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The dailyOxygenSaturation. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyOxygenSaturation + getDailyOxygenSaturation() { + if (dailyOxygenSaturationBuilder_ == null) { + if (dataCase_ == 25) { + return (com.google.devicesandservices.health.v4.DailyOxygenSaturation) data_; + } + return com.google.devicesandservices.health.v4.DailyOxygenSaturation.getDefaultInstance(); + } else { + if (dataCase_ == 25) { + return dailyOxygenSaturationBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.DailyOxygenSaturation.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Data for points in the `daily-oxygen-saturation` daily data
+     * type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyOxygenSaturation daily_oxygen_saturation = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDailyOxygenSaturation( + com.google.devicesandservices.health.v4.DailyOxygenSaturation value) { + if (dailyOxygenSaturationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + onChanged(); + } else { + dailyOxygenSaturationBuilder_.setMessage(value); + } + dataCase_ = 25; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `daily-oxygen-saturation` daily data
+     * type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyOxygenSaturation daily_oxygen_saturation = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDailyOxygenSaturation( + com.google.devicesandservices.health.v4.DailyOxygenSaturation.Builder builderForValue) { + if (dailyOxygenSaturationBuilder_ == null) { + data_ = builderForValue.build(); + onChanged(); + } else { + dailyOxygenSaturationBuilder_.setMessage(builderForValue.build()); + } + dataCase_ = 25; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `daily-oxygen-saturation` daily data
+     * type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyOxygenSaturation daily_oxygen_saturation = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeDailyOxygenSaturation( + com.google.devicesandservices.health.v4.DailyOxygenSaturation value) { + if (dailyOxygenSaturationBuilder_ == null) { + if (dataCase_ == 25 + && data_ + != com.google.devicesandservices.health.v4.DailyOxygenSaturation + .getDefaultInstance()) { + data_ = + com.google.devicesandservices.health.v4.DailyOxygenSaturation.newBuilder( + (com.google.devicesandservices.health.v4.DailyOxygenSaturation) data_) + .mergeFrom(value) + .buildPartial(); + } else { + data_ = value; + } + onChanged(); + } else { + if (dataCase_ == 25) { + dailyOxygenSaturationBuilder_.mergeFrom(value); + } else { + dailyOxygenSaturationBuilder_.setMessage(value); + } + } + dataCase_ = 25; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `daily-oxygen-saturation` daily data
+     * type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyOxygenSaturation daily_oxygen_saturation = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearDailyOxygenSaturation() { + if (dailyOxygenSaturationBuilder_ == null) { + if (dataCase_ == 25) { + dataCase_ = 0; + data_ = null; + onChanged(); + } + } else { + if (dataCase_ == 25) { + dataCase_ = 0; + data_ = null; + } + dailyOxygenSaturationBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `daily-oxygen-saturation` daily data
+     * type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyOxygenSaturation daily_oxygen_saturation = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.devicesandservices.health.v4.DailyOxygenSaturation.Builder + getDailyOxygenSaturationBuilder() { + return internalGetDailyOxygenSaturationFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Data for points in the `daily-oxygen-saturation` daily data
+     * type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyOxygenSaturation daily_oxygen_saturation = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyOxygenSaturationOrBuilder + getDailyOxygenSaturationOrBuilder() { + if ((dataCase_ == 25) && (dailyOxygenSaturationBuilder_ != null)) { + return dailyOxygenSaturationBuilder_.getMessageOrBuilder(); + } else { + if (dataCase_ == 25) { + return (com.google.devicesandservices.health.v4.DailyOxygenSaturation) data_; + } + return com.google.devicesandservices.health.v4.DailyOxygenSaturation.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Data for points in the `daily-oxygen-saturation` daily data
+     * type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyOxygenSaturation daily_oxygen_saturation = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.DailyOxygenSaturation, + com.google.devicesandservices.health.v4.DailyOxygenSaturation.Builder, + com.google.devicesandservices.health.v4.DailyOxygenSaturationOrBuilder> + internalGetDailyOxygenSaturationFieldBuilder() { + if (dailyOxygenSaturationBuilder_ == null) { + if (!(dataCase_ == 25)) { + data_ = + com.google.devicesandservices.health.v4.DailyOxygenSaturation.getDefaultInstance(); + } + dailyOxygenSaturationBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.DailyOxygenSaturation, + com.google.devicesandservices.health.v4.DailyOxygenSaturation.Builder, + com.google.devicesandservices.health.v4.DailyOxygenSaturationOrBuilder>( + (com.google.devicesandservices.health.v4.DailyOxygenSaturation) data_, + getParentForChildren(), + isClean()); + data_ = null; + } + dataCase_ = 25; + onChanged(); + return dailyOxygenSaturationBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ActivityLevel, + com.google.devicesandservices.health.v4.ActivityLevel.Builder, + com.google.devicesandservices.health.v4.ActivityLevelOrBuilder> + activityLevelBuilder_; + + /** + * + * + *
+     * Optional. Data for points in the `activity-level` daily data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ActivityLevel activity_level = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the activityLevel field is set. + */ + @java.lang.Override + public boolean hasActivityLevel() { + return dataCase_ == 26; + } + + /** + * + * + *
+     * Optional. Data for points in the `activity-level` daily data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ActivityLevel activity_level = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The activityLevel. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ActivityLevel getActivityLevel() { + if (activityLevelBuilder_ == null) { + if (dataCase_ == 26) { + return (com.google.devicesandservices.health.v4.ActivityLevel) data_; + } + return com.google.devicesandservices.health.v4.ActivityLevel.getDefaultInstance(); + } else { + if (dataCase_ == 26) { + return activityLevelBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.ActivityLevel.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Data for points in the `activity-level` daily data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ActivityLevel activity_level = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setActivityLevel(com.google.devicesandservices.health.v4.ActivityLevel value) { + if (activityLevelBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + onChanged(); + } else { + activityLevelBuilder_.setMessage(value); + } + dataCase_ = 26; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `activity-level` daily data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ActivityLevel activity_level = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setActivityLevel( + com.google.devicesandservices.health.v4.ActivityLevel.Builder builderForValue) { + if (activityLevelBuilder_ == null) { + data_ = builderForValue.build(); + onChanged(); + } else { + activityLevelBuilder_.setMessage(builderForValue.build()); + } + dataCase_ = 26; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `activity-level` daily data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ActivityLevel activity_level = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeActivityLevel(com.google.devicesandservices.health.v4.ActivityLevel value) { + if (activityLevelBuilder_ == null) { + if (dataCase_ == 26 + && data_ + != com.google.devicesandservices.health.v4.ActivityLevel.getDefaultInstance()) { + data_ = + com.google.devicesandservices.health.v4.ActivityLevel.newBuilder( + (com.google.devicesandservices.health.v4.ActivityLevel) data_) + .mergeFrom(value) + .buildPartial(); + } else { + data_ = value; + } + onChanged(); + } else { + if (dataCase_ == 26) { + activityLevelBuilder_.mergeFrom(value); + } else { + activityLevelBuilder_.setMessage(value); + } + } + dataCase_ = 26; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `activity-level` daily data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ActivityLevel activity_level = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearActivityLevel() { + if (activityLevelBuilder_ == null) { + if (dataCase_ == 26) { + dataCase_ = 0; + data_ = null; + onChanged(); + } + } else { + if (dataCase_ == 26) { + dataCase_ = 0; + data_ = null; + } + activityLevelBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `activity-level` daily data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ActivityLevel activity_level = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.devicesandservices.health.v4.ActivityLevel.Builder getActivityLevelBuilder() { + return internalGetActivityLevelFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Data for points in the `activity-level` daily data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ActivityLevel activity_level = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ActivityLevelOrBuilder + getActivityLevelOrBuilder() { + if ((dataCase_ == 26) && (activityLevelBuilder_ != null)) { + return activityLevelBuilder_.getMessageOrBuilder(); + } else { + if (dataCase_ == 26) { + return (com.google.devicesandservices.health.v4.ActivityLevel) data_; + } + return com.google.devicesandservices.health.v4.ActivityLevel.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Data for points in the `activity-level` daily data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ActivityLevel activity_level = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ActivityLevel, + com.google.devicesandservices.health.v4.ActivityLevel.Builder, + com.google.devicesandservices.health.v4.ActivityLevelOrBuilder> + internalGetActivityLevelFieldBuilder() { + if (activityLevelBuilder_ == null) { + if (!(dataCase_ == 26)) { + data_ = com.google.devicesandservices.health.v4.ActivityLevel.getDefaultInstance(); + } + activityLevelBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ActivityLevel, + com.google.devicesandservices.health.v4.ActivityLevel.Builder, + com.google.devicesandservices.health.v4.ActivityLevelOrBuilder>( + (com.google.devicesandservices.health.v4.ActivityLevel) data_, + getParentForChildren(), + isClean()); + data_ = null; + } + dataCase_ = 26; + onChanged(); + return activityLevelBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.VO2Max, + com.google.devicesandservices.health.v4.VO2Max.Builder, + com.google.devicesandservices.health.v4.VO2MaxOrBuilder> + vo2MaxBuilder_; + + /** + * + * + *
+     * Optional. Data for points in the `vo2-max` sample data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.VO2Max vo2_max = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the vo2Max field is set. + */ + @java.lang.Override + public boolean hasVo2Max() { + return dataCase_ == 27; + } + + /** + * + * + *
+     * Optional. Data for points in the `vo2-max` sample data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.VO2Max vo2_max = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The vo2Max. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.VO2Max getVo2Max() { + if (vo2MaxBuilder_ == null) { + if (dataCase_ == 27) { + return (com.google.devicesandservices.health.v4.VO2Max) data_; + } + return com.google.devicesandservices.health.v4.VO2Max.getDefaultInstance(); + } else { + if (dataCase_ == 27) { + return vo2MaxBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.VO2Max.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Data for points in the `vo2-max` sample data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.VO2Max vo2_max = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setVo2Max(com.google.devicesandservices.health.v4.VO2Max value) { + if (vo2MaxBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + onChanged(); + } else { + vo2MaxBuilder_.setMessage(value); + } + dataCase_ = 27; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `vo2-max` sample data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.VO2Max vo2_max = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setVo2Max( + com.google.devicesandservices.health.v4.VO2Max.Builder builderForValue) { + if (vo2MaxBuilder_ == null) { + data_ = builderForValue.build(); + onChanged(); + } else { + vo2MaxBuilder_.setMessage(builderForValue.build()); + } + dataCase_ = 27; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `vo2-max` sample data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.VO2Max vo2_max = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeVo2Max(com.google.devicesandservices.health.v4.VO2Max value) { + if (vo2MaxBuilder_ == null) { + if (dataCase_ == 27 + && data_ != com.google.devicesandservices.health.v4.VO2Max.getDefaultInstance()) { + data_ = + com.google.devicesandservices.health.v4.VO2Max.newBuilder( + (com.google.devicesandservices.health.v4.VO2Max) data_) + .mergeFrom(value) + .buildPartial(); + } else { + data_ = value; + } + onChanged(); + } else { + if (dataCase_ == 27) { + vo2MaxBuilder_.mergeFrom(value); + } else { + vo2MaxBuilder_.setMessage(value); + } + } + dataCase_ = 27; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `vo2-max` sample data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.VO2Max vo2_max = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearVo2Max() { + if (vo2MaxBuilder_ == null) { + if (dataCase_ == 27) { + dataCase_ = 0; + data_ = null; + onChanged(); + } + } else { + if (dataCase_ == 27) { + dataCase_ = 0; + data_ = null; + } + vo2MaxBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `vo2-max` sample data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.VO2Max vo2_max = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.devicesandservices.health.v4.VO2Max.Builder getVo2MaxBuilder() { + return internalGetVo2MaxFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Data for points in the `vo2-max` sample data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.VO2Max vo2_max = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.VO2MaxOrBuilder getVo2MaxOrBuilder() { + if ((dataCase_ == 27) && (vo2MaxBuilder_ != null)) { + return vo2MaxBuilder_.getMessageOrBuilder(); + } else { + if (dataCase_ == 27) { + return (com.google.devicesandservices.health.v4.VO2Max) data_; + } + return com.google.devicesandservices.health.v4.VO2Max.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Data for points in the `vo2-max` sample data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.VO2Max vo2_max = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.VO2Max, + com.google.devicesandservices.health.v4.VO2Max.Builder, + com.google.devicesandservices.health.v4.VO2MaxOrBuilder> + internalGetVo2MaxFieldBuilder() { + if (vo2MaxBuilder_ == null) { + if (!(dataCase_ == 27)) { + data_ = com.google.devicesandservices.health.v4.VO2Max.getDefaultInstance(); + } + vo2MaxBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.VO2Max, + com.google.devicesandservices.health.v4.VO2Max.Builder, + com.google.devicesandservices.health.v4.VO2MaxOrBuilder>( + (com.google.devicesandservices.health.v4.VO2Max) data_, + getParentForChildren(), + isClean()); + data_ = null; + } + dataCase_ = 27; + onChanged(); + return vo2MaxBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.DailyVO2Max, + com.google.devicesandservices.health.v4.DailyVO2Max.Builder, + com.google.devicesandservices.health.v4.DailyVO2MaxOrBuilder> + dailyVo2MaxBuilder_; + + /** + * + * + *
+     * Optional. Data for points in the `daily-vo2-max` daily data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyVO2Max daily_vo2_max = 28 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the dailyVo2Max field is set. + */ + @java.lang.Override + public boolean hasDailyVo2Max() { + return dataCase_ == 28; + } + + /** + * + * + *
+     * Optional. Data for points in the `daily-vo2-max` daily data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyVO2Max daily_vo2_max = 28 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The dailyVo2Max. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyVO2Max getDailyVo2Max() { + if (dailyVo2MaxBuilder_ == null) { + if (dataCase_ == 28) { + return (com.google.devicesandservices.health.v4.DailyVO2Max) data_; + } + return com.google.devicesandservices.health.v4.DailyVO2Max.getDefaultInstance(); + } else { + if (dataCase_ == 28) { + return dailyVo2MaxBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.DailyVO2Max.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Data for points in the `daily-vo2-max` daily data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyVO2Max daily_vo2_max = 28 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDailyVo2Max(com.google.devicesandservices.health.v4.DailyVO2Max value) { + if (dailyVo2MaxBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + onChanged(); + } else { + dailyVo2MaxBuilder_.setMessage(value); + } + dataCase_ = 28; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `daily-vo2-max` daily data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyVO2Max daily_vo2_max = 28 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDailyVo2Max( + com.google.devicesandservices.health.v4.DailyVO2Max.Builder builderForValue) { + if (dailyVo2MaxBuilder_ == null) { + data_ = builderForValue.build(); + onChanged(); + } else { + dailyVo2MaxBuilder_.setMessage(builderForValue.build()); + } + dataCase_ = 28; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `daily-vo2-max` daily data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyVO2Max daily_vo2_max = 28 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeDailyVo2Max(com.google.devicesandservices.health.v4.DailyVO2Max value) { + if (dailyVo2MaxBuilder_ == null) { + if (dataCase_ == 28 + && data_ != com.google.devicesandservices.health.v4.DailyVO2Max.getDefaultInstance()) { + data_ = + com.google.devicesandservices.health.v4.DailyVO2Max.newBuilder( + (com.google.devicesandservices.health.v4.DailyVO2Max) data_) + .mergeFrom(value) + .buildPartial(); + } else { + data_ = value; + } + onChanged(); + } else { + if (dataCase_ == 28) { + dailyVo2MaxBuilder_.mergeFrom(value); + } else { + dailyVo2MaxBuilder_.setMessage(value); + } + } + dataCase_ = 28; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `daily-vo2-max` daily data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyVO2Max daily_vo2_max = 28 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearDailyVo2Max() { + if (dailyVo2MaxBuilder_ == null) { + if (dataCase_ == 28) { + dataCase_ = 0; + data_ = null; + onChanged(); + } + } else { + if (dataCase_ == 28) { + dataCase_ = 0; + data_ = null; + } + dailyVo2MaxBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `daily-vo2-max` daily data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyVO2Max daily_vo2_max = 28 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.devicesandservices.health.v4.DailyVO2Max.Builder getDailyVo2MaxBuilder() { + return internalGetDailyVo2MaxFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Data for points in the `daily-vo2-max` daily data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyVO2Max daily_vo2_max = 28 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyVO2MaxOrBuilder getDailyVo2MaxOrBuilder() { + if ((dataCase_ == 28) && (dailyVo2MaxBuilder_ != null)) { + return dailyVo2MaxBuilder_.getMessageOrBuilder(); + } else { + if (dataCase_ == 28) { + return (com.google.devicesandservices.health.v4.DailyVO2Max) data_; + } + return com.google.devicesandservices.health.v4.DailyVO2Max.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Data for points in the `daily-vo2-max` daily data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyVO2Max daily_vo2_max = 28 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.DailyVO2Max, + com.google.devicesandservices.health.v4.DailyVO2Max.Builder, + com.google.devicesandservices.health.v4.DailyVO2MaxOrBuilder> + internalGetDailyVo2MaxFieldBuilder() { + if (dailyVo2MaxBuilder_ == null) { + if (!(dataCase_ == 28)) { + data_ = com.google.devicesandservices.health.v4.DailyVO2Max.getDefaultInstance(); + } + dailyVo2MaxBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.DailyVO2Max, + com.google.devicesandservices.health.v4.DailyVO2Max.Builder, + com.google.devicesandservices.health.v4.DailyVO2MaxOrBuilder>( + (com.google.devicesandservices.health.v4.DailyVO2Max) data_, + getParentForChildren(), + isClean()); + data_ = null; + } + dataCase_ = 28; + onChanged(); + return dailyVo2MaxBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.DailyHeartRateZones, + com.google.devicesandservices.health.v4.DailyHeartRateZones.Builder, + com.google.devicesandservices.health.v4.DailyHeartRateZonesOrBuilder> + dailyHeartRateZonesBuilder_; + + /** + * + * + *
+     * Optional. Data for points in the `daily-heart-rate-zones` daily data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyHeartRateZones daily_heart_rate_zones = 32 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the dailyHeartRateZones field is set. + */ + @java.lang.Override + public boolean hasDailyHeartRateZones() { + return dataCase_ == 32; + } + + /** + * + * + *
+     * Optional. Data for points in the `daily-heart-rate-zones` daily data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyHeartRateZones daily_heart_rate_zones = 32 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The dailyHeartRateZones. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyHeartRateZones getDailyHeartRateZones() { + if (dailyHeartRateZonesBuilder_ == null) { + if (dataCase_ == 32) { + return (com.google.devicesandservices.health.v4.DailyHeartRateZones) data_; + } + return com.google.devicesandservices.health.v4.DailyHeartRateZones.getDefaultInstance(); + } else { + if (dataCase_ == 32) { + return dailyHeartRateZonesBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.DailyHeartRateZones.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Data for points in the `daily-heart-rate-zones` daily data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyHeartRateZones daily_heart_rate_zones = 32 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDailyHeartRateZones( + com.google.devicesandservices.health.v4.DailyHeartRateZones value) { + if (dailyHeartRateZonesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + onChanged(); + } else { + dailyHeartRateZonesBuilder_.setMessage(value); + } + dataCase_ = 32; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `daily-heart-rate-zones` daily data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyHeartRateZones daily_heart_rate_zones = 32 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDailyHeartRateZones( + com.google.devicesandservices.health.v4.DailyHeartRateZones.Builder builderForValue) { + if (dailyHeartRateZonesBuilder_ == null) { + data_ = builderForValue.build(); + onChanged(); + } else { + dailyHeartRateZonesBuilder_.setMessage(builderForValue.build()); + } + dataCase_ = 32; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `daily-heart-rate-zones` daily data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyHeartRateZones daily_heart_rate_zones = 32 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeDailyHeartRateZones( + com.google.devicesandservices.health.v4.DailyHeartRateZones value) { + if (dailyHeartRateZonesBuilder_ == null) { + if (dataCase_ == 32 + && data_ + != com.google.devicesandservices.health.v4.DailyHeartRateZones + .getDefaultInstance()) { + data_ = + com.google.devicesandservices.health.v4.DailyHeartRateZones.newBuilder( + (com.google.devicesandservices.health.v4.DailyHeartRateZones) data_) + .mergeFrom(value) + .buildPartial(); + } else { + data_ = value; + } + onChanged(); + } else { + if (dataCase_ == 32) { + dailyHeartRateZonesBuilder_.mergeFrom(value); + } else { + dailyHeartRateZonesBuilder_.setMessage(value); + } + } + dataCase_ = 32; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `daily-heart-rate-zones` daily data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyHeartRateZones daily_heart_rate_zones = 32 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearDailyHeartRateZones() { + if (dailyHeartRateZonesBuilder_ == null) { + if (dataCase_ == 32) { + dataCase_ = 0; + data_ = null; + onChanged(); + } + } else { + if (dataCase_ == 32) { + dataCase_ = 0; + data_ = null; + } + dailyHeartRateZonesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `daily-heart-rate-zones` daily data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyHeartRateZones daily_heart_rate_zones = 32 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.devicesandservices.health.v4.DailyHeartRateZones.Builder + getDailyHeartRateZonesBuilder() { + return internalGetDailyHeartRateZonesFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Data for points in the `daily-heart-rate-zones` daily data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyHeartRateZones daily_heart_rate_zones = 32 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyHeartRateZonesOrBuilder + getDailyHeartRateZonesOrBuilder() { + if ((dataCase_ == 32) && (dailyHeartRateZonesBuilder_ != null)) { + return dailyHeartRateZonesBuilder_.getMessageOrBuilder(); + } else { + if (dataCase_ == 32) { + return (com.google.devicesandservices.health.v4.DailyHeartRateZones) data_; + } + return com.google.devicesandservices.health.v4.DailyHeartRateZones.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Data for points in the `daily-heart-rate-zones` daily data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyHeartRateZones daily_heart_rate_zones = 32 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.DailyHeartRateZones, + com.google.devicesandservices.health.v4.DailyHeartRateZones.Builder, + com.google.devicesandservices.health.v4.DailyHeartRateZonesOrBuilder> + internalGetDailyHeartRateZonesFieldBuilder() { + if (dailyHeartRateZonesBuilder_ == null) { + if (!(dataCase_ == 32)) { + data_ = com.google.devicesandservices.health.v4.DailyHeartRateZones.getDefaultInstance(); + } + dailyHeartRateZonesBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.DailyHeartRateZones, + com.google.devicesandservices.health.v4.DailyHeartRateZones.Builder, + com.google.devicesandservices.health.v4.DailyHeartRateZonesOrBuilder>( + (com.google.devicesandservices.health.v4.DailyHeartRateZones) data_, + getParentForChildren(), + isClean()); + data_ = null; + } + dataCase_ = 32; + onChanged(); + return dailyHeartRateZonesBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.HydrationLog, + com.google.devicesandservices.health.v4.HydrationLog.Builder, + com.google.devicesandservices.health.v4.HydrationLogOrBuilder> + hydrationLogBuilder_; + + /** + * + * + *
+     * Optional. Data for points in the `hydration-log` session data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.HydrationLog hydration_log = 33 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the hydrationLog field is set. + */ + @java.lang.Override + public boolean hasHydrationLog() { + return dataCase_ == 33; + } + + /** + * + * + *
+     * Optional. Data for points in the `hydration-log` session data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.HydrationLog hydration_log = 33 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The hydrationLog. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.HydrationLog getHydrationLog() { + if (hydrationLogBuilder_ == null) { + if (dataCase_ == 33) { + return (com.google.devicesandservices.health.v4.HydrationLog) data_; + } + return com.google.devicesandservices.health.v4.HydrationLog.getDefaultInstance(); + } else { + if (dataCase_ == 33) { + return hydrationLogBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.HydrationLog.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Data for points in the `hydration-log` session data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.HydrationLog hydration_log = 33 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setHydrationLog(com.google.devicesandservices.health.v4.HydrationLog value) { + if (hydrationLogBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + onChanged(); + } else { + hydrationLogBuilder_.setMessage(value); + } + dataCase_ = 33; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `hydration-log` session data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.HydrationLog hydration_log = 33 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setHydrationLog( + com.google.devicesandservices.health.v4.HydrationLog.Builder builderForValue) { + if (hydrationLogBuilder_ == null) { + data_ = builderForValue.build(); + onChanged(); + } else { + hydrationLogBuilder_.setMessage(builderForValue.build()); + } + dataCase_ = 33; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `hydration-log` session data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.HydrationLog hydration_log = 33 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeHydrationLog(com.google.devicesandservices.health.v4.HydrationLog value) { + if (hydrationLogBuilder_ == null) { + if (dataCase_ == 33 + && data_ != com.google.devicesandservices.health.v4.HydrationLog.getDefaultInstance()) { + data_ = + com.google.devicesandservices.health.v4.HydrationLog.newBuilder( + (com.google.devicesandservices.health.v4.HydrationLog) data_) + .mergeFrom(value) + .buildPartial(); + } else { + data_ = value; + } + onChanged(); + } else { + if (dataCase_ == 33) { + hydrationLogBuilder_.mergeFrom(value); + } else { + hydrationLogBuilder_.setMessage(value); + } + } + dataCase_ = 33; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `hydration-log` session data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.HydrationLog hydration_log = 33 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearHydrationLog() { + if (hydrationLogBuilder_ == null) { + if (dataCase_ == 33) { + dataCase_ = 0; + data_ = null; + onChanged(); + } + } else { + if (dataCase_ == 33) { + dataCase_ = 0; + data_ = null; + } + hydrationLogBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `hydration-log` session data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.HydrationLog hydration_log = 33 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.devicesandservices.health.v4.HydrationLog.Builder getHydrationLogBuilder() { + return internalGetHydrationLogFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Data for points in the `hydration-log` session data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.HydrationLog hydration_log = 33 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.HydrationLogOrBuilder + getHydrationLogOrBuilder() { + if ((dataCase_ == 33) && (hydrationLogBuilder_ != null)) { + return hydrationLogBuilder_.getMessageOrBuilder(); + } else { + if (dataCase_ == 33) { + return (com.google.devicesandservices.health.v4.HydrationLog) data_; + } + return com.google.devicesandservices.health.v4.HydrationLog.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Data for points in the `hydration-log` session data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.HydrationLog hydration_log = 33 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.HydrationLog, + com.google.devicesandservices.health.v4.HydrationLog.Builder, + com.google.devicesandservices.health.v4.HydrationLogOrBuilder> + internalGetHydrationLogFieldBuilder() { + if (hydrationLogBuilder_ == null) { + if (!(dataCase_ == 33)) { + data_ = com.google.devicesandservices.health.v4.HydrationLog.getDefaultInstance(); + } + hydrationLogBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.HydrationLog, + com.google.devicesandservices.health.v4.HydrationLog.Builder, + com.google.devicesandservices.health.v4.HydrationLogOrBuilder>( + (com.google.devicesandservices.health.v4.HydrationLog) data_, + getParentForChildren(), + isClean()); + data_ = null; + } + dataCase_ = 33; + onChanged(); + return hydrationLogBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.TimeInHeartRateZone, + com.google.devicesandservices.health.v4.TimeInHeartRateZone.Builder, + com.google.devicesandservices.health.v4.TimeInHeartRateZoneOrBuilder> + timeInHeartRateZoneBuilder_; + + /** + * + * + *
+     * Optional. Data for points in the `time-in-heart-rate-zone` interval data
+     * type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.TimeInHeartRateZone time_in_heart_rate_zone = 35 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the timeInHeartRateZone field is set. + */ + @java.lang.Override + public boolean hasTimeInHeartRateZone() { + return dataCase_ == 35; + } + + /** + * + * + *
+     * Optional. Data for points in the `time-in-heart-rate-zone` interval data
+     * type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.TimeInHeartRateZone time_in_heart_rate_zone = 35 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The timeInHeartRateZone. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.TimeInHeartRateZone getTimeInHeartRateZone() { + if (timeInHeartRateZoneBuilder_ == null) { + if (dataCase_ == 35) { + return (com.google.devicesandservices.health.v4.TimeInHeartRateZone) data_; + } + return com.google.devicesandservices.health.v4.TimeInHeartRateZone.getDefaultInstance(); + } else { + if (dataCase_ == 35) { + return timeInHeartRateZoneBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.TimeInHeartRateZone.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Data for points in the `time-in-heart-rate-zone` interval data
+     * type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.TimeInHeartRateZone time_in_heart_rate_zone = 35 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setTimeInHeartRateZone( + com.google.devicesandservices.health.v4.TimeInHeartRateZone value) { + if (timeInHeartRateZoneBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + onChanged(); + } else { + timeInHeartRateZoneBuilder_.setMessage(value); + } + dataCase_ = 35; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `time-in-heart-rate-zone` interval data
+     * type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.TimeInHeartRateZone time_in_heart_rate_zone = 35 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setTimeInHeartRateZone( + com.google.devicesandservices.health.v4.TimeInHeartRateZone.Builder builderForValue) { + if (timeInHeartRateZoneBuilder_ == null) { + data_ = builderForValue.build(); + onChanged(); + } else { + timeInHeartRateZoneBuilder_.setMessage(builderForValue.build()); + } + dataCase_ = 35; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `time-in-heart-rate-zone` interval data
+     * type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.TimeInHeartRateZone time_in_heart_rate_zone = 35 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeTimeInHeartRateZone( + com.google.devicesandservices.health.v4.TimeInHeartRateZone value) { + if (timeInHeartRateZoneBuilder_ == null) { + if (dataCase_ == 35 + && data_ + != com.google.devicesandservices.health.v4.TimeInHeartRateZone + .getDefaultInstance()) { + data_ = + com.google.devicesandservices.health.v4.TimeInHeartRateZone.newBuilder( + (com.google.devicesandservices.health.v4.TimeInHeartRateZone) data_) + .mergeFrom(value) + .buildPartial(); + } else { + data_ = value; + } + onChanged(); + } else { + if (dataCase_ == 35) { + timeInHeartRateZoneBuilder_.mergeFrom(value); + } else { + timeInHeartRateZoneBuilder_.setMessage(value); + } + } + dataCase_ = 35; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `time-in-heart-rate-zone` interval data
+     * type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.TimeInHeartRateZone time_in_heart_rate_zone = 35 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearTimeInHeartRateZone() { + if (timeInHeartRateZoneBuilder_ == null) { + if (dataCase_ == 35) { + dataCase_ = 0; + data_ = null; + onChanged(); + } + } else { + if (dataCase_ == 35) { + dataCase_ = 0; + data_ = null; + } + timeInHeartRateZoneBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `time-in-heart-rate-zone` interval data
+     * type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.TimeInHeartRateZone time_in_heart_rate_zone = 35 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.devicesandservices.health.v4.TimeInHeartRateZone.Builder + getTimeInHeartRateZoneBuilder() { + return internalGetTimeInHeartRateZoneFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Data for points in the `time-in-heart-rate-zone` interval data
+     * type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.TimeInHeartRateZone time_in_heart_rate_zone = 35 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.TimeInHeartRateZoneOrBuilder + getTimeInHeartRateZoneOrBuilder() { + if ((dataCase_ == 35) && (timeInHeartRateZoneBuilder_ != null)) { + return timeInHeartRateZoneBuilder_.getMessageOrBuilder(); + } else { + if (dataCase_ == 35) { + return (com.google.devicesandservices.health.v4.TimeInHeartRateZone) data_; + } + return com.google.devicesandservices.health.v4.TimeInHeartRateZone.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Data for points in the `time-in-heart-rate-zone` interval data
+     * type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.TimeInHeartRateZone time_in_heart_rate_zone = 35 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.TimeInHeartRateZone, + com.google.devicesandservices.health.v4.TimeInHeartRateZone.Builder, + com.google.devicesandservices.health.v4.TimeInHeartRateZoneOrBuilder> + internalGetTimeInHeartRateZoneFieldBuilder() { + if (timeInHeartRateZoneBuilder_ == null) { + if (!(dataCase_ == 35)) { + data_ = com.google.devicesandservices.health.v4.TimeInHeartRateZone.getDefaultInstance(); + } + timeInHeartRateZoneBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.TimeInHeartRateZone, + com.google.devicesandservices.health.v4.TimeInHeartRateZone.Builder, + com.google.devicesandservices.health.v4.TimeInHeartRateZoneOrBuilder>( + (com.google.devicesandservices.health.v4.TimeInHeartRateZone) data_, + getParentForChildren(), + isClean()); + data_ = null; + } + dataCase_ = 35; + onChanged(); + return timeInHeartRateZoneBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ActiveMinutes, + com.google.devicesandservices.health.v4.ActiveMinutes.Builder, + com.google.devicesandservices.health.v4.ActiveMinutesOrBuilder> + activeMinutesBuilder_; + + /** + * + * + *
+     * Optional. Data for points in the `active-minutes` interval data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ActiveMinutes active_minutes = 36 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the activeMinutes field is set. + */ + @java.lang.Override + public boolean hasActiveMinutes() { + return dataCase_ == 36; + } + + /** + * + * + *
+     * Optional. Data for points in the `active-minutes` interval data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ActiveMinutes active_minutes = 36 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The activeMinutes. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ActiveMinutes getActiveMinutes() { + if (activeMinutesBuilder_ == null) { + if (dataCase_ == 36) { + return (com.google.devicesandservices.health.v4.ActiveMinutes) data_; + } + return com.google.devicesandservices.health.v4.ActiveMinutes.getDefaultInstance(); + } else { + if (dataCase_ == 36) { + return activeMinutesBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.ActiveMinutes.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Data for points in the `active-minutes` interval data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ActiveMinutes active_minutes = 36 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setActiveMinutes(com.google.devicesandservices.health.v4.ActiveMinutes value) { + if (activeMinutesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + onChanged(); + } else { + activeMinutesBuilder_.setMessage(value); + } + dataCase_ = 36; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `active-minutes` interval data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ActiveMinutes active_minutes = 36 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setActiveMinutes( + com.google.devicesandservices.health.v4.ActiveMinutes.Builder builderForValue) { + if (activeMinutesBuilder_ == null) { + data_ = builderForValue.build(); + onChanged(); + } else { + activeMinutesBuilder_.setMessage(builderForValue.build()); + } + dataCase_ = 36; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `active-minutes` interval data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ActiveMinutes active_minutes = 36 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeActiveMinutes(com.google.devicesandservices.health.v4.ActiveMinutes value) { + if (activeMinutesBuilder_ == null) { + if (dataCase_ == 36 + && data_ + != com.google.devicesandservices.health.v4.ActiveMinutes.getDefaultInstance()) { + data_ = + com.google.devicesandservices.health.v4.ActiveMinutes.newBuilder( + (com.google.devicesandservices.health.v4.ActiveMinutes) data_) + .mergeFrom(value) + .buildPartial(); + } else { + data_ = value; + } + onChanged(); + } else { + if (dataCase_ == 36) { + activeMinutesBuilder_.mergeFrom(value); + } else { + activeMinutesBuilder_.setMessage(value); + } + } + dataCase_ = 36; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `active-minutes` interval data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ActiveMinutes active_minutes = 36 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearActiveMinutes() { + if (activeMinutesBuilder_ == null) { + if (dataCase_ == 36) { + dataCase_ = 0; + data_ = null; + onChanged(); + } + } else { + if (dataCase_ == 36) { + dataCase_ = 0; + data_ = null; + } + activeMinutesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `active-minutes` interval data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ActiveMinutes active_minutes = 36 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.devicesandservices.health.v4.ActiveMinutes.Builder getActiveMinutesBuilder() { + return internalGetActiveMinutesFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Data for points in the `active-minutes` interval data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ActiveMinutes active_minutes = 36 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ActiveMinutesOrBuilder + getActiveMinutesOrBuilder() { + if ((dataCase_ == 36) && (activeMinutesBuilder_ != null)) { + return activeMinutesBuilder_.getMessageOrBuilder(); + } else { + if (dataCase_ == 36) { + return (com.google.devicesandservices.health.v4.ActiveMinutes) data_; + } + return com.google.devicesandservices.health.v4.ActiveMinutes.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Data for points in the `active-minutes` interval data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ActiveMinutes active_minutes = 36 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ActiveMinutes, + com.google.devicesandservices.health.v4.ActiveMinutes.Builder, + com.google.devicesandservices.health.v4.ActiveMinutesOrBuilder> + internalGetActiveMinutesFieldBuilder() { + if (activeMinutesBuilder_ == null) { + if (!(dataCase_ == 36)) { + data_ = com.google.devicesandservices.health.v4.ActiveMinutes.getDefaultInstance(); + } + activeMinutesBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ActiveMinutes, + com.google.devicesandservices.health.v4.ActiveMinutes.Builder, + com.google.devicesandservices.health.v4.ActiveMinutesOrBuilder>( + (com.google.devicesandservices.health.v4.ActiveMinutes) data_, + getParentForChildren(), + isClean()); + data_ = null; + } + dataCase_ = 36; + onChanged(); + return activeMinutesBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary, + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary.Builder, + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummaryOrBuilder> + respiratoryRateSleepSummaryBuilder_; + + /** + * + * + *
+     * Optional. Data for points in the `respiratory-rate-sleep-summary` sample
+     * data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary respiratory_rate_sleep_summary = 37 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the respiratoryRateSleepSummary field is set. + */ + @java.lang.Override + public boolean hasRespiratoryRateSleepSummary() { + return dataCase_ == 37; + } + + /** + * + * + *
+     * Optional. Data for points in the `respiratory-rate-sleep-summary` sample
+     * data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary respiratory_rate_sleep_summary = 37 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The respiratoryRateSleepSummary. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + getRespiratoryRateSleepSummary() { + if (respiratoryRateSleepSummaryBuilder_ == null) { + if (dataCase_ == 37) { + return (com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary) data_; + } + return com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .getDefaultInstance(); + } else { + if (dataCase_ == 37) { + return respiratoryRateSleepSummaryBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Data for points in the `respiratory-rate-sleep-summary` sample
+     * data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary respiratory_rate_sleep_summary = 37 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRespiratoryRateSleepSummary( + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary value) { + if (respiratoryRateSleepSummaryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + onChanged(); + } else { + respiratoryRateSleepSummaryBuilder_.setMessage(value); + } + dataCase_ = 37; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `respiratory-rate-sleep-summary` sample
+     * data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary respiratory_rate_sleep_summary = 37 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRespiratoryRateSleepSummary( + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary.Builder + builderForValue) { + if (respiratoryRateSleepSummaryBuilder_ == null) { + data_ = builderForValue.build(); + onChanged(); + } else { + respiratoryRateSleepSummaryBuilder_.setMessage(builderForValue.build()); + } + dataCase_ = 37; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `respiratory-rate-sleep-summary` sample
+     * data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary respiratory_rate_sleep_summary = 37 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeRespiratoryRateSleepSummary( + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary value) { + if (respiratoryRateSleepSummaryBuilder_ == null) { + if (dataCase_ == 37 + && data_ + != com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .getDefaultInstance()) { + data_ = + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary.newBuilder( + (com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary) data_) + .mergeFrom(value) + .buildPartial(); + } else { + data_ = value; + } + onChanged(); + } else { + if (dataCase_ == 37) { + respiratoryRateSleepSummaryBuilder_.mergeFrom(value); + } else { + respiratoryRateSleepSummaryBuilder_.setMessage(value); + } + } + dataCase_ = 37; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `respiratory-rate-sleep-summary` sample
+     * data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary respiratory_rate_sleep_summary = 37 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearRespiratoryRateSleepSummary() { + if (respiratoryRateSleepSummaryBuilder_ == null) { + if (dataCase_ == 37) { + dataCase_ = 0; + data_ = null; + onChanged(); + } + } else { + if (dataCase_ == 37) { + dataCase_ = 0; + data_ = null; + } + respiratoryRateSleepSummaryBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `respiratory-rate-sleep-summary` sample
+     * data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary respiratory_rate_sleep_summary = 37 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary.Builder + getRespiratoryRateSleepSummaryBuilder() { + return internalGetRespiratoryRateSleepSummaryFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Data for points in the `respiratory-rate-sleep-summary` sample
+     * data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary respiratory_rate_sleep_summary = 37 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.RespiratoryRateSleepSummaryOrBuilder + getRespiratoryRateSleepSummaryOrBuilder() { + if ((dataCase_ == 37) && (respiratoryRateSleepSummaryBuilder_ != null)) { + return respiratoryRateSleepSummaryBuilder_.getMessageOrBuilder(); + } else { + if (dataCase_ == 37) { + return (com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary) data_; + } + return com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Data for points in the `respiratory-rate-sleep-summary` sample
+     * data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary respiratory_rate_sleep_summary = 37 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary, + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary.Builder, + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummaryOrBuilder> + internalGetRespiratoryRateSleepSummaryFieldBuilder() { + if (respiratoryRateSleepSummaryBuilder_ == null) { + if (!(dataCase_ == 37)) { + data_ = + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .getDefaultInstance(); + } + respiratoryRateSleepSummaryBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary, + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary.Builder, + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummaryOrBuilder>( + (com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary) data_, + getParentForChildren(), + isClean()); + data_ = null; + } + dataCase_ = 37; + onChanged(); + return respiratoryRateSleepSummaryBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.DailyRespiratoryRate, + com.google.devicesandservices.health.v4.DailyRespiratoryRate.Builder, + com.google.devicesandservices.health.v4.DailyRespiratoryRateOrBuilder> + dailyRespiratoryRateBuilder_; + + /** + * + * + *
+     * Optional. Data for points in the `daily-respiratory-rate` daily data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyRespiratoryRate daily_respiratory_rate = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the dailyRespiratoryRate field is set. + */ + @java.lang.Override + public boolean hasDailyRespiratoryRate() { + return dataCase_ == 38; + } + + /** + * + * + *
+     * Optional. Data for points in the `daily-respiratory-rate` daily data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyRespiratoryRate daily_respiratory_rate = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The dailyRespiratoryRate. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyRespiratoryRate getDailyRespiratoryRate() { + if (dailyRespiratoryRateBuilder_ == null) { + if (dataCase_ == 38) { + return (com.google.devicesandservices.health.v4.DailyRespiratoryRate) data_; + } + return com.google.devicesandservices.health.v4.DailyRespiratoryRate.getDefaultInstance(); + } else { + if (dataCase_ == 38) { + return dailyRespiratoryRateBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.DailyRespiratoryRate.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Data for points in the `daily-respiratory-rate` daily data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyRespiratoryRate daily_respiratory_rate = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDailyRespiratoryRate( + com.google.devicesandservices.health.v4.DailyRespiratoryRate value) { + if (dailyRespiratoryRateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + onChanged(); + } else { + dailyRespiratoryRateBuilder_.setMessage(value); + } + dataCase_ = 38; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `daily-respiratory-rate` daily data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyRespiratoryRate daily_respiratory_rate = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDailyRespiratoryRate( + com.google.devicesandservices.health.v4.DailyRespiratoryRate.Builder builderForValue) { + if (dailyRespiratoryRateBuilder_ == null) { + data_ = builderForValue.build(); + onChanged(); + } else { + dailyRespiratoryRateBuilder_.setMessage(builderForValue.build()); + } + dataCase_ = 38; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `daily-respiratory-rate` daily data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyRespiratoryRate daily_respiratory_rate = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeDailyRespiratoryRate( + com.google.devicesandservices.health.v4.DailyRespiratoryRate value) { + if (dailyRespiratoryRateBuilder_ == null) { + if (dataCase_ == 38 + && data_ + != com.google.devicesandservices.health.v4.DailyRespiratoryRate + .getDefaultInstance()) { + data_ = + com.google.devicesandservices.health.v4.DailyRespiratoryRate.newBuilder( + (com.google.devicesandservices.health.v4.DailyRespiratoryRate) data_) + .mergeFrom(value) + .buildPartial(); + } else { + data_ = value; + } + onChanged(); + } else { + if (dataCase_ == 38) { + dailyRespiratoryRateBuilder_.mergeFrom(value); + } else { + dailyRespiratoryRateBuilder_.setMessage(value); + } + } + dataCase_ = 38; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `daily-respiratory-rate` daily data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyRespiratoryRate daily_respiratory_rate = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearDailyRespiratoryRate() { + if (dailyRespiratoryRateBuilder_ == null) { + if (dataCase_ == 38) { + dataCase_ = 0; + data_ = null; + onChanged(); + } + } else { + if (dataCase_ == 38) { + dataCase_ = 0; + data_ = null; + } + dailyRespiratoryRateBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `daily-respiratory-rate` daily data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyRespiratoryRate daily_respiratory_rate = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.devicesandservices.health.v4.DailyRespiratoryRate.Builder + getDailyRespiratoryRateBuilder() { + return internalGetDailyRespiratoryRateFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Data for points in the `daily-respiratory-rate` daily data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyRespiratoryRate daily_respiratory_rate = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyRespiratoryRateOrBuilder + getDailyRespiratoryRateOrBuilder() { + if ((dataCase_ == 38) && (dailyRespiratoryRateBuilder_ != null)) { + return dailyRespiratoryRateBuilder_.getMessageOrBuilder(); + } else { + if (dataCase_ == 38) { + return (com.google.devicesandservices.health.v4.DailyRespiratoryRate) data_; + } + return com.google.devicesandservices.health.v4.DailyRespiratoryRate.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Data for points in the `daily-respiratory-rate` daily data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyRespiratoryRate daily_respiratory_rate = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.DailyRespiratoryRate, + com.google.devicesandservices.health.v4.DailyRespiratoryRate.Builder, + com.google.devicesandservices.health.v4.DailyRespiratoryRateOrBuilder> + internalGetDailyRespiratoryRateFieldBuilder() { + if (dailyRespiratoryRateBuilder_ == null) { + if (!(dataCase_ == 38)) { + data_ = com.google.devicesandservices.health.v4.DailyRespiratoryRate.getDefaultInstance(); + } + dailyRespiratoryRateBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.DailyRespiratoryRate, + com.google.devicesandservices.health.v4.DailyRespiratoryRate.Builder, + com.google.devicesandservices.health.v4.DailyRespiratoryRateOrBuilder>( + (com.google.devicesandservices.health.v4.DailyRespiratoryRate) data_, + getParentForChildren(), + isClean()); + data_ = null; + } + dataCase_ = 38; + onChanged(); + return dailyRespiratoryRateBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.SwimLengthsData, + com.google.devicesandservices.health.v4.SwimLengthsData.Builder, + com.google.devicesandservices.health.v4.SwimLengthsDataOrBuilder> + swimLengthsDataBuilder_; + + /** + * + * + *
+     * Optional. Data for points in the `swim-lengths-data` interval data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.SwimLengthsData swim_lengths_data = 39 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the swimLengthsData field is set. + */ + @java.lang.Override + public boolean hasSwimLengthsData() { + return dataCase_ == 39; + } + + /** + * + * + *
+     * Optional. Data for points in the `swim-lengths-data` interval data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.SwimLengthsData swim_lengths_data = 39 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The swimLengthsData. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.SwimLengthsData getSwimLengthsData() { + if (swimLengthsDataBuilder_ == null) { + if (dataCase_ == 39) { + return (com.google.devicesandservices.health.v4.SwimLengthsData) data_; + } + return com.google.devicesandservices.health.v4.SwimLengthsData.getDefaultInstance(); + } else { + if (dataCase_ == 39) { + return swimLengthsDataBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.SwimLengthsData.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Data for points in the `swim-lengths-data` interval data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.SwimLengthsData swim_lengths_data = 39 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setSwimLengthsData( + com.google.devicesandservices.health.v4.SwimLengthsData value) { + if (swimLengthsDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + onChanged(); + } else { + swimLengthsDataBuilder_.setMessage(value); + } + dataCase_ = 39; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `swim-lengths-data` interval data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.SwimLengthsData swim_lengths_data = 39 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setSwimLengthsData( + com.google.devicesandservices.health.v4.SwimLengthsData.Builder builderForValue) { + if (swimLengthsDataBuilder_ == null) { + data_ = builderForValue.build(); + onChanged(); + } else { + swimLengthsDataBuilder_.setMessage(builderForValue.build()); + } + dataCase_ = 39; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `swim-lengths-data` interval data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.SwimLengthsData swim_lengths_data = 39 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeSwimLengthsData( + com.google.devicesandservices.health.v4.SwimLengthsData value) { + if (swimLengthsDataBuilder_ == null) { + if (dataCase_ == 39 + && data_ + != com.google.devicesandservices.health.v4.SwimLengthsData.getDefaultInstance()) { + data_ = + com.google.devicesandservices.health.v4.SwimLengthsData.newBuilder( + (com.google.devicesandservices.health.v4.SwimLengthsData) data_) + .mergeFrom(value) + .buildPartial(); + } else { + data_ = value; + } + onChanged(); + } else { + if (dataCase_ == 39) { + swimLengthsDataBuilder_.mergeFrom(value); + } else { + swimLengthsDataBuilder_.setMessage(value); + } + } + dataCase_ = 39; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `swim-lengths-data` interval data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.SwimLengthsData swim_lengths_data = 39 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearSwimLengthsData() { + if (swimLengthsDataBuilder_ == null) { + if (dataCase_ == 39) { + dataCase_ = 0; + data_ = null; + onChanged(); + } + } else { + if (dataCase_ == 39) { + dataCase_ = 0; + data_ = null; + } + swimLengthsDataBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `swim-lengths-data` interval data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.SwimLengthsData swim_lengths_data = 39 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.devicesandservices.health.v4.SwimLengthsData.Builder + getSwimLengthsDataBuilder() { + return internalGetSwimLengthsDataFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Data for points in the `swim-lengths-data` interval data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.SwimLengthsData swim_lengths_data = 39 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.SwimLengthsDataOrBuilder + getSwimLengthsDataOrBuilder() { + if ((dataCase_ == 39) && (swimLengthsDataBuilder_ != null)) { + return swimLengthsDataBuilder_.getMessageOrBuilder(); + } else { + if (dataCase_ == 39) { + return (com.google.devicesandservices.health.v4.SwimLengthsData) data_; + } + return com.google.devicesandservices.health.v4.SwimLengthsData.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Data for points in the `swim-lengths-data` interval data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.SwimLengthsData swim_lengths_data = 39 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.SwimLengthsData, + com.google.devicesandservices.health.v4.SwimLengthsData.Builder, + com.google.devicesandservices.health.v4.SwimLengthsDataOrBuilder> + internalGetSwimLengthsDataFieldBuilder() { + if (swimLengthsDataBuilder_ == null) { + if (!(dataCase_ == 39)) { + data_ = com.google.devicesandservices.health.v4.SwimLengthsData.getDefaultInstance(); + } + swimLengthsDataBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.SwimLengthsData, + com.google.devicesandservices.health.v4.SwimLengthsData.Builder, + com.google.devicesandservices.health.v4.SwimLengthsDataOrBuilder>( + (com.google.devicesandservices.health.v4.SwimLengthsData) data_, + getParentForChildren(), + isClean()); + data_ = null; + } + dataCase_ = 39; + onChanged(); + return swimLengthsDataBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.Height, + com.google.devicesandservices.health.v4.Height.Builder, + com.google.devicesandservices.health.v4.HeightOrBuilder> + heightBuilder_; + + /** + * + * + *
+     * Optional. Data for points in the `height` sample data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Height height = 40 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the height field is set. + */ + @java.lang.Override + public boolean hasHeight() { + return dataCase_ == 40; + } + + /** + * + * + *
+     * Optional. Data for points in the `height` sample data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Height height = 40 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The height. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Height getHeight() { + if (heightBuilder_ == null) { + if (dataCase_ == 40) { + return (com.google.devicesandservices.health.v4.Height) data_; + } + return com.google.devicesandservices.health.v4.Height.getDefaultInstance(); + } else { + if (dataCase_ == 40) { + return heightBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.Height.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Data for points in the `height` sample data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Height height = 40 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setHeight(com.google.devicesandservices.health.v4.Height value) { + if (heightBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + onChanged(); + } else { + heightBuilder_.setMessage(value); + } + dataCase_ = 40; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `height` sample data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Height height = 40 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setHeight( + com.google.devicesandservices.health.v4.Height.Builder builderForValue) { + if (heightBuilder_ == null) { + data_ = builderForValue.build(); + onChanged(); + } else { + heightBuilder_.setMessage(builderForValue.build()); + } + dataCase_ = 40; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `height` sample data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Height height = 40 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeHeight(com.google.devicesandservices.health.v4.Height value) { + if (heightBuilder_ == null) { + if (dataCase_ == 40 + && data_ != com.google.devicesandservices.health.v4.Height.getDefaultInstance()) { + data_ = + com.google.devicesandservices.health.v4.Height.newBuilder( + (com.google.devicesandservices.health.v4.Height) data_) + .mergeFrom(value) + .buildPartial(); + } else { + data_ = value; + } + onChanged(); + } else { + if (dataCase_ == 40) { + heightBuilder_.mergeFrom(value); + } else { + heightBuilder_.setMessage(value); + } + } + dataCase_ = 40; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `height` sample data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Height height = 40 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearHeight() { + if (heightBuilder_ == null) { + if (dataCase_ == 40) { + dataCase_ = 0; + data_ = null; + onChanged(); + } + } else { + if (dataCase_ == 40) { + dataCase_ = 0; + data_ = null; + } + heightBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `height` sample data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Height height = 40 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.devicesandservices.health.v4.Height.Builder getHeightBuilder() { + return internalGetHeightFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Data for points in the `height` sample data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Height height = 40 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.HeightOrBuilder getHeightOrBuilder() { + if ((dataCase_ == 40) && (heightBuilder_ != null)) { + return heightBuilder_.getMessageOrBuilder(); + } else { + if (dataCase_ == 40) { + return (com.google.devicesandservices.health.v4.Height) data_; + } + return com.google.devicesandservices.health.v4.Height.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Data for points in the `height` sample data type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Height height = 40 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.Height, + com.google.devicesandservices.health.v4.Height.Builder, + com.google.devicesandservices.health.v4.HeightOrBuilder> + internalGetHeightFieldBuilder() { + if (heightBuilder_ == null) { + if (!(dataCase_ == 40)) { + data_ = com.google.devicesandservices.health.v4.Height.getDefaultInstance(); + } + heightBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.Height, + com.google.devicesandservices.health.v4.Height.Builder, + com.google.devicesandservices.health.v4.HeightOrBuilder>( + (com.google.devicesandservices.health.v4.Height) data_, + getParentForChildren(), + isClean()); + data_ = null; + } + dataCase_ = 40; + onChanged(); + return heightBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.BasalEnergyBurned, + com.google.devicesandservices.health.v4.BasalEnergyBurned.Builder, + com.google.devicesandservices.health.v4.BasalEnergyBurnedOrBuilder> + basalEnergyBurnedBuilder_; + + /** + * + * + *
+     * Optional. Data for points in the `basal-energy-burned` interval data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.BasalEnergyBurned basal_energy_burned = 41 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the basalEnergyBurned field is set. + */ + @java.lang.Override + public boolean hasBasalEnergyBurned() { + return dataCase_ == 41; + } + + /** + * + * + *
+     * Optional. Data for points in the `basal-energy-burned` interval data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.BasalEnergyBurned basal_energy_burned = 41 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The basalEnergyBurned. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.BasalEnergyBurned getBasalEnergyBurned() { + if (basalEnergyBurnedBuilder_ == null) { + if (dataCase_ == 41) { + return (com.google.devicesandservices.health.v4.BasalEnergyBurned) data_; + } + return com.google.devicesandservices.health.v4.BasalEnergyBurned.getDefaultInstance(); + } else { + if (dataCase_ == 41) { + return basalEnergyBurnedBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.BasalEnergyBurned.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Data for points in the `basal-energy-burned` interval data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.BasalEnergyBurned basal_energy_burned = 41 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setBasalEnergyBurned( + com.google.devicesandservices.health.v4.BasalEnergyBurned value) { + if (basalEnergyBurnedBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + onChanged(); + } else { + basalEnergyBurnedBuilder_.setMessage(value); + } + dataCase_ = 41; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `basal-energy-burned` interval data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.BasalEnergyBurned basal_energy_burned = 41 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setBasalEnergyBurned( + com.google.devicesandservices.health.v4.BasalEnergyBurned.Builder builderForValue) { + if (basalEnergyBurnedBuilder_ == null) { + data_ = builderForValue.build(); + onChanged(); + } else { + basalEnergyBurnedBuilder_.setMessage(builderForValue.build()); + } + dataCase_ = 41; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `basal-energy-burned` interval data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.BasalEnergyBurned basal_energy_burned = 41 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeBasalEnergyBurned( + com.google.devicesandservices.health.v4.BasalEnergyBurned value) { + if (basalEnergyBurnedBuilder_ == null) { + if (dataCase_ == 41 + && data_ + != com.google.devicesandservices.health.v4.BasalEnergyBurned.getDefaultInstance()) { + data_ = + com.google.devicesandservices.health.v4.BasalEnergyBurned.newBuilder( + (com.google.devicesandservices.health.v4.BasalEnergyBurned) data_) + .mergeFrom(value) + .buildPartial(); + } else { + data_ = value; + } + onChanged(); + } else { + if (dataCase_ == 41) { + basalEnergyBurnedBuilder_.mergeFrom(value); + } else { + basalEnergyBurnedBuilder_.setMessage(value); + } + } + dataCase_ = 41; + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `basal-energy-burned` interval data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.BasalEnergyBurned basal_energy_burned = 41 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearBasalEnergyBurned() { + if (basalEnergyBurnedBuilder_ == null) { + if (dataCase_ == 41) { + dataCase_ = 0; + data_ = null; + onChanged(); + } + } else { + if (dataCase_ == 41) { + dataCase_ = 0; + data_ = null; + } + basalEnergyBurnedBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. Data for points in the `basal-energy-burned` interval data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.BasalEnergyBurned basal_energy_burned = 41 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.devicesandservices.health.v4.BasalEnergyBurned.Builder + getBasalEnergyBurnedBuilder() { + return internalGetBasalEnergyBurnedFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Data for points in the `basal-energy-burned` interval data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.BasalEnergyBurned basal_energy_burned = 41 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.BasalEnergyBurnedOrBuilder + getBasalEnergyBurnedOrBuilder() { + if ((dataCase_ == 41) && (basalEnergyBurnedBuilder_ != null)) { + return basalEnergyBurnedBuilder_.getMessageOrBuilder(); + } else { + if (dataCase_ == 41) { + return (com.google.devicesandservices.health.v4.BasalEnergyBurned) data_; + } + return com.google.devicesandservices.health.v4.BasalEnergyBurned.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Data for points in the `basal-energy-burned` interval data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.BasalEnergyBurned basal_energy_burned = 41 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.BasalEnergyBurned, + com.google.devicesandservices.health.v4.BasalEnergyBurned.Builder, + com.google.devicesandservices.health.v4.BasalEnergyBurnedOrBuilder> + internalGetBasalEnergyBurnedFieldBuilder() { + if (basalEnergyBurnedBuilder_ == null) { + if (!(dataCase_ == 41)) { + data_ = com.google.devicesandservices.health.v4.BasalEnergyBurned.getDefaultInstance(); + } + basalEnergyBurnedBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.BasalEnergyBurned, + com.google.devicesandservices.health.v4.BasalEnergyBurned.Builder, + com.google.devicesandservices.health.v4.BasalEnergyBurnedOrBuilder>( + (com.google.devicesandservices.health.v4.BasalEnergyBurned) data_, + getParentForChildren(), + isClean()); + data_ = null; + } + dataCase_ = 41; + onChanged(); + return basalEnergyBurnedBuilder_; + } + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Identifier. Data point name, only supported for the subset of identifiable
+     * data types. For the majority of the data types, individual data points do
+     * not need to be identified and this field would be empty.
+     *
+     * Format: `users/{user}/dataTypes/{data_type}/dataPoints/{data_point}`
+     *
+     * Example:
+     * `users/abcd1234/dataTypes/sleep/dataPoints/a1b2c3d4-e5f6-7890-1234-567890abcdef`
+     *
+     * The `{user}` ID is a system-generated identifier, as described in
+     * [Identity.health_user_id][google.devicesandservices.health.v4.Identity.health_user_id].
+     *
+     * The `{data_type}` ID corresponds to the kebab-case version of the field
+     * names in the [DataPoint
+     * data][google.devicesandservices.health.v4.DataPoint] union
+     * field, e.g. `total-calories` for the `total_calories` field.
+     *
+     * The `{data_point}` ID can be client-provided or system-generated.
+     * If client-provided, it must be a string of 4-63 characters,
+     * containing only lowercase letters, numbers, and hyphens.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Identifier. Data point name, only supported for the subset of identifiable
+     * data types. For the majority of the data types, individual data points do
+     * not need to be identified and this field would be empty.
+     *
+     * Format: `users/{user}/dataTypes/{data_type}/dataPoints/{data_point}`
+     *
+     * Example:
+     * `users/abcd1234/dataTypes/sleep/dataPoints/a1b2c3d4-e5f6-7890-1234-567890abcdef`
+     *
+     * The `{user}` ID is a system-generated identifier, as described in
+     * [Identity.health_user_id][google.devicesandservices.health.v4.Identity.health_user_id].
+     *
+     * The `{data_type}` ID corresponds to the kebab-case version of the field
+     * names in the [DataPoint
+     * data][google.devicesandservices.health.v4.DataPoint] union
+     * field, e.g. `total-calories` for the `total_calories` field.
+     *
+     * The `{data_point}` ID can be client-provided or system-generated.
+     * If client-provided, it must be a string of 4-63 characters,
+     * containing only lowercase letters, numbers, and hyphens.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Identifier. Data point name, only supported for the subset of identifiable
+     * data types. For the majority of the data types, individual data points do
+     * not need to be identified and this field would be empty.
+     *
+     * Format: `users/{user}/dataTypes/{data_type}/dataPoints/{data_point}`
+     *
+     * Example:
+     * `users/abcd1234/dataTypes/sleep/dataPoints/a1b2c3d4-e5f6-7890-1234-567890abcdef`
+     *
+     * The `{user}` ID is a system-generated identifier, as described in
+     * [Identity.health_user_id][google.devicesandservices.health.v4.Identity.health_user_id].
+     *
+     * The `{data_type}` ID corresponds to the kebab-case version of the field
+     * names in the [DataPoint
+     * data][google.devicesandservices.health.v4.DataPoint] union
+     * field, e.g. `total-calories` for the `total_calories` field.
+     *
+     * The `{data_point}` ID can be client-provided or system-generated.
+     * If client-provided, it must be a string of 4-63 characters,
+     * containing only lowercase letters, numbers, and hyphens.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x40000000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. Data point name, only supported for the subset of identifiable
+     * data types. For the majority of the data types, individual data points do
+     * not need to be identified and this field would be empty.
+     *
+     * Format: `users/{user}/dataTypes/{data_type}/dataPoints/{data_point}`
+     *
+     * Example:
+     * `users/abcd1234/dataTypes/sleep/dataPoints/a1b2c3d4-e5f6-7890-1234-567890abcdef`
+     *
+     * The `{user}` ID is a system-generated identifier, as described in
+     * [Identity.health_user_id][google.devicesandservices.health.v4.Identity.health_user_id].
+     *
+     * The `{data_type}` ID corresponds to the kebab-case version of the field
+     * names in the [DataPoint
+     * data][google.devicesandservices.health.v4.DataPoint] union
+     * field, e.g. `total-calories` for the `total_calories` field.
+     *
+     * The `{data_point}` ID can be client-provided or system-generated.
+     * If client-provided, it must be a string of 4-63 characters,
+     * containing only lowercase letters, numbers, and hyphens.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x40000000); + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. Data point name, only supported for the subset of identifiable
+     * data types. For the majority of the data types, individual data points do
+     * not need to be identified and this field would be empty.
+     *
+     * Format: `users/{user}/dataTypes/{data_type}/dataPoints/{data_point}`
+     *
+     * Example:
+     * `users/abcd1234/dataTypes/sleep/dataPoints/a1b2c3d4-e5f6-7890-1234-567890abcdef`
+     *
+     * The `{user}` ID is a system-generated identifier, as described in
+     * [Identity.health_user_id][google.devicesandservices.health.v4.Identity.health_user_id].
+     *
+     * The `{data_type}` ID corresponds to the kebab-case version of the field
+     * names in the [DataPoint
+     * data][google.devicesandservices.health.v4.DataPoint] union
+     * field, e.g. `total-calories` for the `total_calories` field.
+     *
+     * The `{data_point}` ID can be client-provided or system-generated.
+     * If client-provided, it must be a string of 4-63 characters,
+     * containing only lowercase letters, numbers, and hyphens.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x40000000; + onChanged(); + return this; + } + + private com.google.devicesandservices.health.v4.DataSource dataSource_; + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.DataSource, + com.google.devicesandservices.health.v4.DataSource.Builder, + com.google.devicesandservices.health.v4.DataSourceOrBuilder> + dataSourceBuilder_; + + /** + * + * + *
+     * Optional. Data source information for the metric
+     * 
+ * + * + * .google.devicesandservices.health.v4.DataSource data_source = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the dataSource field is set. + */ + public boolean hasDataSource() { + return ((bitField0_ & 0x80000000) != 0); + } + + /** + * + * + *
+     * Optional. Data source information for the metric
+     * 
+ * + * + * .google.devicesandservices.health.v4.DataSource data_source = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The dataSource. + */ + public com.google.devicesandservices.health.v4.DataSource getDataSource() { + if (dataSourceBuilder_ == null) { + return dataSource_ == null + ? com.google.devicesandservices.health.v4.DataSource.getDefaultInstance() + : dataSource_; + } else { + return dataSourceBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. Data source information for the metric
+     * 
+ * + * + * .google.devicesandservices.health.v4.DataSource data_source = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDataSource(com.google.devicesandservices.health.v4.DataSource value) { + if (dataSourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dataSource_ = value; + } else { + dataSourceBuilder_.setMessage(value); + } + bitField0_ |= 0x80000000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Data source information for the metric
+     * 
+ * + * + * .google.devicesandservices.health.v4.DataSource data_source = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDataSource( + com.google.devicesandservices.health.v4.DataSource.Builder builderForValue) { + if (dataSourceBuilder_ == null) { + dataSource_ = builderForValue.build(); + } else { + dataSourceBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x80000000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Data source information for the metric
+     * 
+ * + * + * .google.devicesandservices.health.v4.DataSource data_source = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeDataSource(com.google.devicesandservices.health.v4.DataSource value) { + if (dataSourceBuilder_ == null) { + if (((bitField0_ & 0x80000000) != 0) + && dataSource_ != null + && dataSource_ + != com.google.devicesandservices.health.v4.DataSource.getDefaultInstance()) { + getDataSourceBuilder().mergeFrom(value); + } else { + dataSource_ = value; + } + } else { + dataSourceBuilder_.mergeFrom(value); + } + if (dataSource_ != null) { + bitField0_ |= 0x80000000; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. Data source information for the metric
+     * 
+ * + * + * .google.devicesandservices.health.v4.DataSource data_source = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearDataSource() { + bitField0_ = (bitField0_ & ~0x80000000); + dataSource_ = null; + if (dataSourceBuilder_ != null) { + dataSourceBuilder_.dispose(); + dataSourceBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Data source information for the metric
+     * 
+ * + * + * .google.devicesandservices.health.v4.DataSource data_source = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.devicesandservices.health.v4.DataSource.Builder getDataSourceBuilder() { + bitField0_ |= 0x80000000; + onChanged(); + return internalGetDataSourceFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Data source information for the metric
+     * 
+ * + * + * .google.devicesandservices.health.v4.DataSource data_source = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.devicesandservices.health.v4.DataSourceOrBuilder getDataSourceOrBuilder() { + if (dataSourceBuilder_ != null) { + return dataSourceBuilder_.getMessageOrBuilder(); + } else { + return dataSource_ == null + ? com.google.devicesandservices.health.v4.DataSource.getDefaultInstance() + : dataSource_; + } + } + + /** + * + * + *
+     * Optional. Data source information for the metric
+     * 
+ * + * + * .google.devicesandservices.health.v4.DataSource data_source = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.DataSource, + com.google.devicesandservices.health.v4.DataSource.Builder, + com.google.devicesandservices.health.v4.DataSourceOrBuilder> + internalGetDataSourceFieldBuilder() { + if (dataSourceBuilder_ == null) { + dataSourceBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.DataSource, + com.google.devicesandservices.health.v4.DataSource.Builder, + com.google.devicesandservices.health.v4.DataSourceOrBuilder>( + getDataSource(), getParentForChildren(), isClean()); + dataSource_ = null; + } + return dataSourceBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.DataPoint) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.DataPoint) + private static final com.google.devicesandservices.health.v4.DataPoint DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.DataPoint(); + } + + public static com.google.devicesandservices.health.v4.DataPoint getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DataPoint parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.DataPoint getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DataPointName.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DataPointName.java new file mode 100644 index 000000000000..199c00f2bb78 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DataPointName.java @@ -0,0 +1,223 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class DataPointName implements ResourceName { + private static final PathTemplate USER_DATA_TYPE_DATA_POINT = + PathTemplate.createWithoutUrlEncoding( + "users/{user}/dataTypes/{data_type}/dataPoints/{data_point}"); + private volatile Map fieldValuesMap; + private final String user; + private final String dataType; + private final String dataPoint; + + @Deprecated + protected DataPointName() { + user = null; + dataType = null; + dataPoint = null; + } + + private DataPointName(Builder builder) { + user = Preconditions.checkNotNull(builder.getUser()); + dataType = Preconditions.checkNotNull(builder.getDataType()); + dataPoint = Preconditions.checkNotNull(builder.getDataPoint()); + } + + public String getUser() { + return user; + } + + public String getDataType() { + return dataType; + } + + public String getDataPoint() { + return dataPoint; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static DataPointName of(String user, String dataType, String dataPoint) { + return newBuilder().setUser(user).setDataType(dataType).setDataPoint(dataPoint).build(); + } + + public static String format(String user, String dataType, String dataPoint) { + return newBuilder() + .setUser(user) + .setDataType(dataType) + .setDataPoint(dataPoint) + .build() + .toString(); + } + + public static DataPointName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + USER_DATA_TYPE_DATA_POINT.validatedMatch( + formattedString, "DataPointName.parse: formattedString not in valid format"); + return of(matchMap.get("user"), matchMap.get("data_type"), matchMap.get("data_point")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (DataPointName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return USER_DATA_TYPE_DATA_POINT.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (user != null) { + fieldMapBuilder.put("user", user); + } + if (dataType != null) { + fieldMapBuilder.put("data_type", dataType); + } + if (dataPoint != null) { + fieldMapBuilder.put("data_point", dataPoint); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return USER_DATA_TYPE_DATA_POINT.instantiate( + "user", user, "data_type", dataType, "data_point", dataPoint); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + DataPointName that = ((DataPointName) o); + return Objects.equals(this.user, that.user) + && Objects.equals(this.dataType, that.dataType) + && Objects.equals(this.dataPoint, that.dataPoint); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(user); + h *= 1000003; + h ^= Objects.hashCode(dataType); + h *= 1000003; + h ^= Objects.hashCode(dataPoint); + return h; + } + + /** Builder for users/{user}/dataTypes/{data_type}/dataPoints/{data_point}. */ + public static class Builder { + private String user; + private String dataType; + private String dataPoint; + + protected Builder() {} + + public String getUser() { + return user; + } + + public String getDataType() { + return dataType; + } + + public String getDataPoint() { + return dataPoint; + } + + public Builder setUser(String user) { + this.user = user; + return this; + } + + public Builder setDataType(String dataType) { + this.dataType = dataType; + return this; + } + + public Builder setDataPoint(String dataPoint) { + this.dataPoint = dataPoint; + return this; + } + + private Builder(DataPointName dataPointName) { + this.user = dataPointName.user; + this.dataType = dataPointName.dataType; + this.dataPoint = dataPointName.dataPoint; + } + + public DataPointName build() { + return new DataPointName(this); + } + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DataPointOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DataPointOrBuilder.java new file mode 100644 index 000000000000..aba2131ab138 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DataPointOrBuilder.java @@ -0,0 +1,1506 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_points.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface DataPointOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.DataPoint) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Data for points in the `steps` interval data type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Steps steps = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the steps field is set. + */ + boolean hasSteps(); + + /** + * + * + *
+   * Optional. Data for points in the `steps` interval data type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Steps steps = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The steps. + */ + com.google.devicesandservices.health.v4.Steps getSteps(); + + /** + * + * + *
+   * Optional. Data for points in the `steps` interval data type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Steps steps = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.devicesandservices.health.v4.StepsOrBuilder getStepsOrBuilder(); + + /** + * + * + *
+   * Optional. Data for points in the `floors` interval data type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Floors floors = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the floors field is set. + */ + boolean hasFloors(); + + /** + * + * + *
+   * Optional. Data for points in the `floors` interval data type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Floors floors = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The floors. + */ + com.google.devicesandservices.health.v4.Floors getFloors(); + + /** + * + * + *
+   * Optional. Data for points in the `floors` interval data type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Floors floors = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.devicesandservices.health.v4.FloorsOrBuilder getFloorsOrBuilder(); + + /** + * + * + *
+   * Optional. Data for points in the `heart-rate` sample data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.HeartRate heart_rate = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the heartRate field is set. + */ + boolean hasHeartRate(); + + /** + * + * + *
+   * Optional. Data for points in the `heart-rate` sample data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.HeartRate heart_rate = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The heartRate. + */ + com.google.devicesandservices.health.v4.HeartRate getHeartRate(); + + /** + * + * + *
+   * Optional. Data for points in the `heart-rate` sample data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.HeartRate heart_rate = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.devicesandservices.health.v4.HeartRateOrBuilder getHeartRateOrBuilder(); + + /** + * + * + *
+   * Optional. Data for points in the `sleep` session data type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Sleep sleep = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the sleep field is set. + */ + boolean hasSleep(); + + /** + * + * + *
+   * Optional. Data for points in the `sleep` session data type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Sleep sleep = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The sleep. + */ + com.google.devicesandservices.health.v4.Sleep getSleep(); + + /** + * + * + *
+   * Optional. Data for points in the `sleep` session data type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Sleep sleep = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.devicesandservices.health.v4.SleepOrBuilder getSleepOrBuilder(); + + /** + * + * + *
+   * Optional. Data for points in the `daily-resting-heart-rate` daily data
+   * type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.DailyRestingHeartRate daily_resting_heart_rate = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the dailyRestingHeartRate field is set. + */ + boolean hasDailyRestingHeartRate(); + + /** + * + * + *
+   * Optional. Data for points in the `daily-resting-heart-rate` daily data
+   * type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.DailyRestingHeartRate daily_resting_heart_rate = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The dailyRestingHeartRate. + */ + com.google.devicesandservices.health.v4.DailyRestingHeartRate getDailyRestingHeartRate(); + + /** + * + * + *
+   * Optional. Data for points in the `daily-resting-heart-rate` daily data
+   * type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.DailyRestingHeartRate daily_resting_heart_rate = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.devicesandservices.health.v4.DailyRestingHeartRateOrBuilder + getDailyRestingHeartRateOrBuilder(); + + /** + * + * + *
+   * Optional. Data for points in the `daily-heart-rate-variability` daily
+   * data type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.DailyHeartRateVariability daily_heart_rate_variability = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the dailyHeartRateVariability field is set. + */ + boolean hasDailyHeartRateVariability(); + + /** + * + * + *
+   * Optional. Data for points in the `daily-heart-rate-variability` daily
+   * data type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.DailyHeartRateVariability daily_heart_rate_variability = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The dailyHeartRateVariability. + */ + com.google.devicesandservices.health.v4.DailyHeartRateVariability getDailyHeartRateVariability(); + + /** + * + * + *
+   * Optional. Data for points in the `daily-heart-rate-variability` daily
+   * data type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.DailyHeartRateVariability daily_heart_rate_variability = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.devicesandservices.health.v4.DailyHeartRateVariabilityOrBuilder + getDailyHeartRateVariabilityOrBuilder(); + + /** + * + * + *
+   * Optional. Data for points in the `exercise` session data type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Exercise exercise = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the exercise field is set. + */ + boolean hasExercise(); + + /** + * + * + *
+   * Optional. Data for points in the `exercise` session data type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Exercise exercise = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The exercise. + */ + com.google.devicesandservices.health.v4.Exercise getExercise(); + + /** + * + * + *
+   * Optional. Data for points in the `exercise` session data type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Exercise exercise = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.devicesandservices.health.v4.ExerciseOrBuilder getExerciseOrBuilder(); + + /** + * + * + *
+   * Optional. Data for points in the `weight` sample data type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Weight weight = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the weight field is set. + */ + boolean hasWeight(); + + /** + * + * + *
+   * Optional. Data for points in the `weight` sample data type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Weight weight = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The weight. + */ + com.google.devicesandservices.health.v4.Weight getWeight(); + + /** + * + * + *
+   * Optional. Data for points in the `weight` sample data type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Weight weight = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.devicesandservices.health.v4.WeightOrBuilder getWeightOrBuilder(); + + /** + * + * + *
+   * Optional. Data for points in the `altitude` interval data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Altitude altitude = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the altitude field is set. + */ + boolean hasAltitude(); + + /** + * + * + *
+   * Optional. Data for points in the `altitude` interval data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Altitude altitude = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The altitude. + */ + com.google.devicesandservices.health.v4.Altitude getAltitude(); + + /** + * + * + *
+   * Optional. Data for points in the `altitude` interval data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Altitude altitude = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.devicesandservices.health.v4.AltitudeOrBuilder getAltitudeOrBuilder(); + + /** + * + * + *
+   * Optional. Data for points in the `distance` interval data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Distance distance = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the distance field is set. + */ + boolean hasDistance(); + + /** + * + * + *
+   * Optional. Data for points in the `distance` interval data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Distance distance = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The distance. + */ + com.google.devicesandservices.health.v4.Distance getDistance(); + + /** + * + * + *
+   * Optional. Data for points in the `distance` interval data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Distance distance = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.devicesandservices.health.v4.DistanceOrBuilder getDistanceOrBuilder(); + + /** + * + * + *
+   * Optional. Data for points in the `body-fat` sample data type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.BodyFat body_fat = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the bodyFat field is set. + */ + boolean hasBodyFat(); + + /** + * + * + *
+   * Optional. Data for points in the `body-fat` sample data type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.BodyFat body_fat = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The bodyFat. + */ + com.google.devicesandservices.health.v4.BodyFat getBodyFat(); + + /** + * + * + *
+   * Optional. Data for points in the `body-fat` sample data type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.BodyFat body_fat = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.devicesandservices.health.v4.BodyFatOrBuilder getBodyFatOrBuilder(); + + /** + * + * + *
+   * Optional. Data for points in the `active-zone-minutes` interval data type
+   * collection, measured in minutes.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ActiveZoneMinutes active_zone_minutes = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the activeZoneMinutes field is set. + */ + boolean hasActiveZoneMinutes(); + + /** + * + * + *
+   * Optional. Data for points in the `active-zone-minutes` interval data type
+   * collection, measured in minutes.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ActiveZoneMinutes active_zone_minutes = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The activeZoneMinutes. + */ + com.google.devicesandservices.health.v4.ActiveZoneMinutes getActiveZoneMinutes(); + + /** + * + * + *
+   * Optional. Data for points in the `active-zone-minutes` interval data type
+   * collection, measured in minutes.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ActiveZoneMinutes active_zone_minutes = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.devicesandservices.health.v4.ActiveZoneMinutesOrBuilder + getActiveZoneMinutesOrBuilder(); + + /** + * + * + *
+   * Optional. Data for points in the `heart-rate-variability` sample data
+   * type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.HeartRateVariability heart_rate_variability = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the heartRateVariability field is set. + */ + boolean hasHeartRateVariability(); + + /** + * + * + *
+   * Optional. Data for points in the `heart-rate-variability` sample data
+   * type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.HeartRateVariability heart_rate_variability = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The heartRateVariability. + */ + com.google.devicesandservices.health.v4.HeartRateVariability getHeartRateVariability(); + + /** + * + * + *
+   * Optional. Data for points in the `heart-rate-variability` sample data
+   * type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.HeartRateVariability heart_rate_variability = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.devicesandservices.health.v4.HeartRateVariabilityOrBuilder + getHeartRateVariabilityOrBuilder(); + + /** + * + * + *
+   * Optional. Data for points in the `daily-sleep-temperature-derivations`
+   * daily data type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.DailySleepTemperatureDerivations daily_sleep_temperature_derivations = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the dailySleepTemperatureDerivations field is set. + */ + boolean hasDailySleepTemperatureDerivations(); + + /** + * + * + *
+   * Optional. Data for points in the `daily-sleep-temperature-derivations`
+   * daily data type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.DailySleepTemperatureDerivations daily_sleep_temperature_derivations = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The dailySleepTemperatureDerivations. + */ + com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations + getDailySleepTemperatureDerivations(); + + /** + * + * + *
+   * Optional. Data for points in the `daily-sleep-temperature-derivations`
+   * daily data type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.DailySleepTemperatureDerivations daily_sleep_temperature_derivations = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.devicesandservices.health.v4.DailySleepTemperatureDerivationsOrBuilder + getDailySleepTemperatureDerivationsOrBuilder(); + + /** + * + * + *
+   * Optional. Data for points in the `sedentary-period` interval data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.SedentaryPeriod sedentary_period = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the sedentaryPeriod field is set. + */ + boolean hasSedentaryPeriod(); + + /** + * + * + *
+   * Optional. Data for points in the `sedentary-period` interval data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.SedentaryPeriod sedentary_period = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The sedentaryPeriod. + */ + com.google.devicesandservices.health.v4.SedentaryPeriod getSedentaryPeriod(); + + /** + * + * + *
+   * Optional. Data for points in the `sedentary-period` interval data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.SedentaryPeriod sedentary_period = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.devicesandservices.health.v4.SedentaryPeriodOrBuilder getSedentaryPeriodOrBuilder(); + + /** + * + * + *
+   * Optional. Data for points in the `run-vo2-max` sample data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.RunVO2Max run_vo2_max = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the runVo2Max field is set. + */ + boolean hasRunVo2Max(); + + /** + * + * + *
+   * Optional. Data for points in the `run-vo2-max` sample data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.RunVO2Max run_vo2_max = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The runVo2Max. + */ + com.google.devicesandservices.health.v4.RunVO2Max getRunVo2Max(); + + /** + * + * + *
+   * Optional. Data for points in the `run-vo2-max` sample data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.RunVO2Max run_vo2_max = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.devicesandservices.health.v4.RunVO2MaxOrBuilder getRunVo2MaxOrBuilder(); + + /** + * + * + *
+   * Optional. Data for points in the `oxygen-saturation` sample data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.OxygenSaturation oxygen_saturation = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the oxygenSaturation field is set. + */ + boolean hasOxygenSaturation(); + + /** + * + * + *
+   * Optional. Data for points in the `oxygen-saturation` sample data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.OxygenSaturation oxygen_saturation = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The oxygenSaturation. + */ + com.google.devicesandservices.health.v4.OxygenSaturation getOxygenSaturation(); + + /** + * + * + *
+   * Optional. Data for points in the `oxygen-saturation` sample data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.OxygenSaturation oxygen_saturation = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.devicesandservices.health.v4.OxygenSaturationOrBuilder getOxygenSaturationOrBuilder(); + + /** + * + * + *
+   * Optional. Data for points in the `daily-oxygen-saturation` daily data
+   * type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.DailyOxygenSaturation daily_oxygen_saturation = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the dailyOxygenSaturation field is set. + */ + boolean hasDailyOxygenSaturation(); + + /** + * + * + *
+   * Optional. Data for points in the `daily-oxygen-saturation` daily data
+   * type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.DailyOxygenSaturation daily_oxygen_saturation = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The dailyOxygenSaturation. + */ + com.google.devicesandservices.health.v4.DailyOxygenSaturation getDailyOxygenSaturation(); + + /** + * + * + *
+   * Optional. Data for points in the `daily-oxygen-saturation` daily data
+   * type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.DailyOxygenSaturation daily_oxygen_saturation = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.devicesandservices.health.v4.DailyOxygenSaturationOrBuilder + getDailyOxygenSaturationOrBuilder(); + + /** + * + * + *
+   * Optional. Data for points in the `activity-level` daily data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ActivityLevel activity_level = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the activityLevel field is set. + */ + boolean hasActivityLevel(); + + /** + * + * + *
+   * Optional. Data for points in the `activity-level` daily data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ActivityLevel activity_level = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The activityLevel. + */ + com.google.devicesandservices.health.v4.ActivityLevel getActivityLevel(); + + /** + * + * + *
+   * Optional. Data for points in the `activity-level` daily data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ActivityLevel activity_level = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.devicesandservices.health.v4.ActivityLevelOrBuilder getActivityLevelOrBuilder(); + + /** + * + * + *
+   * Optional. Data for points in the `vo2-max` sample data type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.VO2Max vo2_max = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the vo2Max field is set. + */ + boolean hasVo2Max(); + + /** + * + * + *
+   * Optional. Data for points in the `vo2-max` sample data type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.VO2Max vo2_max = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The vo2Max. + */ + com.google.devicesandservices.health.v4.VO2Max getVo2Max(); + + /** + * + * + *
+   * Optional. Data for points in the `vo2-max` sample data type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.VO2Max vo2_max = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.devicesandservices.health.v4.VO2MaxOrBuilder getVo2MaxOrBuilder(); + + /** + * + * + *
+   * Optional. Data for points in the `daily-vo2-max` daily data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.DailyVO2Max daily_vo2_max = 28 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the dailyVo2Max field is set. + */ + boolean hasDailyVo2Max(); + + /** + * + * + *
+   * Optional. Data for points in the `daily-vo2-max` daily data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.DailyVO2Max daily_vo2_max = 28 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The dailyVo2Max. + */ + com.google.devicesandservices.health.v4.DailyVO2Max getDailyVo2Max(); + + /** + * + * + *
+   * Optional. Data for points in the `daily-vo2-max` daily data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.DailyVO2Max daily_vo2_max = 28 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.devicesandservices.health.v4.DailyVO2MaxOrBuilder getDailyVo2MaxOrBuilder(); + + /** + * + * + *
+   * Optional. Data for points in the `daily-heart-rate-zones` daily data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.DailyHeartRateZones daily_heart_rate_zones = 32 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the dailyHeartRateZones field is set. + */ + boolean hasDailyHeartRateZones(); + + /** + * + * + *
+   * Optional. Data for points in the `daily-heart-rate-zones` daily data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.DailyHeartRateZones daily_heart_rate_zones = 32 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The dailyHeartRateZones. + */ + com.google.devicesandservices.health.v4.DailyHeartRateZones getDailyHeartRateZones(); + + /** + * + * + *
+   * Optional. Data for points in the `daily-heart-rate-zones` daily data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.DailyHeartRateZones daily_heart_rate_zones = 32 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.devicesandservices.health.v4.DailyHeartRateZonesOrBuilder + getDailyHeartRateZonesOrBuilder(); + + /** + * + * + *
+   * Optional. Data for points in the `hydration-log` session data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.HydrationLog hydration_log = 33 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the hydrationLog field is set. + */ + boolean hasHydrationLog(); + + /** + * + * + *
+   * Optional. Data for points in the `hydration-log` session data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.HydrationLog hydration_log = 33 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The hydrationLog. + */ + com.google.devicesandservices.health.v4.HydrationLog getHydrationLog(); + + /** + * + * + *
+   * Optional. Data for points in the `hydration-log` session data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.HydrationLog hydration_log = 33 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.devicesandservices.health.v4.HydrationLogOrBuilder getHydrationLogOrBuilder(); + + /** + * + * + *
+   * Optional. Data for points in the `time-in-heart-rate-zone` interval data
+   * type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.TimeInHeartRateZone time_in_heart_rate_zone = 35 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the timeInHeartRateZone field is set. + */ + boolean hasTimeInHeartRateZone(); + + /** + * + * + *
+   * Optional. Data for points in the `time-in-heart-rate-zone` interval data
+   * type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.TimeInHeartRateZone time_in_heart_rate_zone = 35 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The timeInHeartRateZone. + */ + com.google.devicesandservices.health.v4.TimeInHeartRateZone getTimeInHeartRateZone(); + + /** + * + * + *
+   * Optional. Data for points in the `time-in-heart-rate-zone` interval data
+   * type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.TimeInHeartRateZone time_in_heart_rate_zone = 35 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.devicesandservices.health.v4.TimeInHeartRateZoneOrBuilder + getTimeInHeartRateZoneOrBuilder(); + + /** + * + * + *
+   * Optional. Data for points in the `active-minutes` interval data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ActiveMinutes active_minutes = 36 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the activeMinutes field is set. + */ + boolean hasActiveMinutes(); + + /** + * + * + *
+   * Optional. Data for points in the `active-minutes` interval data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ActiveMinutes active_minutes = 36 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The activeMinutes. + */ + com.google.devicesandservices.health.v4.ActiveMinutes getActiveMinutes(); + + /** + * + * + *
+   * Optional. Data for points in the `active-minutes` interval data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ActiveMinutes active_minutes = 36 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.devicesandservices.health.v4.ActiveMinutesOrBuilder getActiveMinutesOrBuilder(); + + /** + * + * + *
+   * Optional. Data for points in the `respiratory-rate-sleep-summary` sample
+   * data type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary respiratory_rate_sleep_summary = 37 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the respiratoryRateSleepSummary field is set. + */ + boolean hasRespiratoryRateSleepSummary(); + + /** + * + * + *
+   * Optional. Data for points in the `respiratory-rate-sleep-summary` sample
+   * data type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary respiratory_rate_sleep_summary = 37 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The respiratoryRateSleepSummary. + */ + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + getRespiratoryRateSleepSummary(); + + /** + * + * + *
+   * Optional. Data for points in the `respiratory-rate-sleep-summary` sample
+   * data type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary respiratory_rate_sleep_summary = 37 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummaryOrBuilder + getRespiratoryRateSleepSummaryOrBuilder(); + + /** + * + * + *
+   * Optional. Data for points in the `daily-respiratory-rate` daily data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.DailyRespiratoryRate daily_respiratory_rate = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the dailyRespiratoryRate field is set. + */ + boolean hasDailyRespiratoryRate(); + + /** + * + * + *
+   * Optional. Data for points in the `daily-respiratory-rate` daily data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.DailyRespiratoryRate daily_respiratory_rate = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The dailyRespiratoryRate. + */ + com.google.devicesandservices.health.v4.DailyRespiratoryRate getDailyRespiratoryRate(); + + /** + * + * + *
+   * Optional. Data for points in the `daily-respiratory-rate` daily data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.DailyRespiratoryRate daily_respiratory_rate = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.devicesandservices.health.v4.DailyRespiratoryRateOrBuilder + getDailyRespiratoryRateOrBuilder(); + + /** + * + * + *
+   * Optional. Data for points in the `swim-lengths-data` interval data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.SwimLengthsData swim_lengths_data = 39 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the swimLengthsData field is set. + */ + boolean hasSwimLengthsData(); + + /** + * + * + *
+   * Optional. Data for points in the `swim-lengths-data` interval data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.SwimLengthsData swim_lengths_data = 39 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The swimLengthsData. + */ + com.google.devicesandservices.health.v4.SwimLengthsData getSwimLengthsData(); + + /** + * + * + *
+   * Optional. Data for points in the `swim-lengths-data` interval data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.SwimLengthsData swim_lengths_data = 39 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.devicesandservices.health.v4.SwimLengthsDataOrBuilder getSwimLengthsDataOrBuilder(); + + /** + * + * + *
+   * Optional. Data for points in the `height` sample data type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Height height = 40 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the height field is set. + */ + boolean hasHeight(); + + /** + * + * + *
+   * Optional. Data for points in the `height` sample data type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Height height = 40 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The height. + */ + com.google.devicesandservices.health.v4.Height getHeight(); + + /** + * + * + *
+   * Optional. Data for points in the `height` sample data type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Height height = 40 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.devicesandservices.health.v4.HeightOrBuilder getHeightOrBuilder(); + + /** + * + * + *
+   * Optional. Data for points in the `basal-energy-burned` interval data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.BasalEnergyBurned basal_energy_burned = 41 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the basalEnergyBurned field is set. + */ + boolean hasBasalEnergyBurned(); + + /** + * + * + *
+   * Optional. Data for points in the `basal-energy-burned` interval data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.BasalEnergyBurned basal_energy_burned = 41 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The basalEnergyBurned. + */ + com.google.devicesandservices.health.v4.BasalEnergyBurned getBasalEnergyBurned(); + + /** + * + * + *
+   * Optional. Data for points in the `basal-energy-burned` interval data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.BasalEnergyBurned basal_energy_burned = 41 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.devicesandservices.health.v4.BasalEnergyBurnedOrBuilder + getBasalEnergyBurnedOrBuilder(); + + /** + * + * + *
+   * Identifier. Data point name, only supported for the subset of identifiable
+   * data types. For the majority of the data types, individual data points do
+   * not need to be identified and this field would be empty.
+   *
+   * Format: `users/{user}/dataTypes/{data_type}/dataPoints/{data_point}`
+   *
+   * Example:
+   * `users/abcd1234/dataTypes/sleep/dataPoints/a1b2c3d4-e5f6-7890-1234-567890abcdef`
+   *
+   * The `{user}` ID is a system-generated identifier, as described in
+   * [Identity.health_user_id][google.devicesandservices.health.v4.Identity.health_user_id].
+   *
+   * The `{data_type}` ID corresponds to the kebab-case version of the field
+   * names in the [DataPoint
+   * data][google.devicesandservices.health.v4.DataPoint] union
+   * field, e.g. `total-calories` for the `total_calories` field.
+   *
+   * The `{data_point}` ID can be client-provided or system-generated.
+   * If client-provided, it must be a string of 4-63 characters,
+   * containing only lowercase letters, numbers, and hyphens.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Identifier. Data point name, only supported for the subset of identifiable
+   * data types. For the majority of the data types, individual data points do
+   * not need to be identified and this field would be empty.
+   *
+   * Format: `users/{user}/dataTypes/{data_type}/dataPoints/{data_point}`
+   *
+   * Example:
+   * `users/abcd1234/dataTypes/sleep/dataPoints/a1b2c3d4-e5f6-7890-1234-567890abcdef`
+   *
+   * The `{user}` ID is a system-generated identifier, as described in
+   * [Identity.health_user_id][google.devicesandservices.health.v4.Identity.health_user_id].
+   *
+   * The `{data_type}` ID corresponds to the kebab-case version of the field
+   * names in the [DataPoint
+   * data][google.devicesandservices.health.v4.DataPoint] union
+   * field, e.g. `total-calories` for the `total_calories` field.
+   *
+   * The `{data_point}` ID can be client-provided or system-generated.
+   * If client-provided, it must be a string of 4-63 characters,
+   * containing only lowercase letters, numbers, and hyphens.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. Data source information for the metric
+   * 
+ * + * + * .google.devicesandservices.health.v4.DataSource data_source = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the dataSource field is set. + */ + boolean hasDataSource(); + + /** + * + * + *
+   * Optional. Data source information for the metric
+   * 
+ * + * + * .google.devicesandservices.health.v4.DataSource data_source = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The dataSource. + */ + com.google.devicesandservices.health.v4.DataSource getDataSource(); + + /** + * + * + *
+   * Optional. Data source information for the metric
+   * 
+ * + * + * .google.devicesandservices.health.v4.DataSource data_source = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.devicesandservices.health.v4.DataSourceOrBuilder getDataSourceOrBuilder(); + + com.google.devicesandservices.health.v4.DataPoint.DataCase getDataCase(); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DataPointsProto.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DataPointsProto.java new file mode 100644 index 000000000000..0256b44e5714 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DataPointsProto.java @@ -0,0 +1,839 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_points.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public final class DataPointsProto extends com.google.protobuf.GeneratedFile { + private DataPointsProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DataPointsProto"); + } + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_DataPoint_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_DataPoint_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_ReconciledDataPoint_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_ReconciledDataPoint_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_RollupDataPoint_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_RollupDataPoint_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_DailyRollupDataPoint_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_DailyRollupDataPoint_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_GetDataPointRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_GetDataPointRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_ListDataPointsRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_ListDataPointsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_ListDataPointsResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_ListDataPointsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_CreateDataPointRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_CreateDataPointRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_CreateDataPointOperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_CreateDataPointOperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_UpdateDataPointRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_UpdateDataPointRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_UpdateDataPointOperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_UpdateDataPointOperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_BatchDeleteDataPointsRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_BatchDeleteDataPointsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_BatchDeleteDataPointsResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_BatchDeleteDataPointsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_BatchDeleteDataPointsOperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_BatchDeleteDataPointsOperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_BatchDeleteDataPointsOperationMetadata_FailedRequestsEntry_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_BatchDeleteDataPointsOperationMetadata_FailedRequestsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_ReconcileDataPointsRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_ReconcileDataPointsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_ReconcileDataPointsResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_ReconcileDataPointsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_RollUpDataPointsRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_RollUpDataPointsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_RollUpDataPointsResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_RollUpDataPointsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_DailyRollUpDataPointsRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_DailyRollUpDataPointsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_DailyRollUpDataPointsResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_DailyRollUpDataPointsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_DataType_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_DataType_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_ExportExerciseTcxRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_ExportExerciseTcxRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_ExportExerciseTcxResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_ExportExerciseTcxResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n" + + "5google/devicesandservices/health/v4/data_points.proto\022#google.devicesandservic" + + "es.health.v4\032\034google/api/annotations.pro" + + "to\032\027google/api/client.proto\032\037google/api/" + + "field_behavior.proto\032\031google/api/resourc" + + "e.proto\032:google/devicesandservices/health/v4/data_coordinates.proto\0324google/devi" + + "cesandservices/health/v4/data_model.proto\0325google/devicesandservices/health/v4/d" + + "ata_source.proto\032#google/longrunning/ope" + + "rations.proto\032\036google/protobuf/duration." + + "proto\032\037google/protobuf/timestamp.proto\032\027" + + "google/rpc/status.proto\032\032google/type/interval.proto\"\345\025\n" + + "\tDataPoint\022@\n" + + "\005steps\030\004 \001(\013" + + "2*.google.devicesandservices.health.v4.StepsB\003\340A\001H\000\022B\n" + + "\006floors\030\005 \001(\0132+.google.dev" + + "icesandservices.health.v4.FloorsB\003\340A\001H\000\022I\n\n" + + "heart_rate\030\006" + + " \001(\0132..google.devicesandservices.health.v4.HeartRateB\003\340A\001H\000\022@\n" + + "\005sleep\030\010" + + " \001(\0132*.google.devicesandservices.health.v4.SleepB\003\340A\001H\000\022c\n" + + "\030daily_resting_heart_rate\030\t \001(\0132:.google.devicesandservic" + + "es.health.v4.DailyRestingHeartRateB\003\340A\001H\000\022k\n" + + "\034daily_heart_rate_variability\030\n" + + " \001(\0132" + + ">.google.devicesandservices.health.v4.DailyHeartRateVariabilityB\003\340A\001H\000\022F\n" + + "\010exercise\030\013" + + " \001(\0132-.google.devicesandservices.health.v4.ExerciseB\003\340A\001H\000\022B\n" + + "\006weight\030\014 \001(\0132+" + + ".google.devicesandservices.health.v4.WeightB\003\340A\001H\000\022F\n" + + "\010altitude\030\r" + + " \001(\0132-.google.devicesandservices.health.v4.AltitudeB\003\340A\001H\000\022F\n" + + "\010distance\030\016" + + " \001(\0132-.google.devicesandservices.health.v4.DistanceB\003\340A\001H\000\022E\n" + + "\010body_fat\030\017" + + " \001(\0132,.google.devicesandservices.health.v4.BodyFatB\003\340A\001H\000\022Z\n" + + "\023active_zone_minutes\030\021" + + " \001(\01326.google.devicesandservices.health.v4.ActiveZoneMinutesB\003\340A\001H\000\022`\n" + + "\026heart_rate_variability\030\023 \001(\01329.google.d" + + "evicesandservices.health.v4.HeartRateVariabilityB\003\340A\001H\000\022y\n" + + "#daily_sleep_temperature_derivations\030\024 \001(\0132E.google.devicesand" + + "services.health.v4.DailySleepTemperatureDerivationsB\003\340A\001H\000\022U\n" + + "\020sedentary_period\030\025" + + " \001(\01324.google.devicesandservices.health.v4.SedentaryPeriodB\003\340A\001H\000\022J\n" + + "\013run_vo2_max\030\026" + + " \001(\0132..google.devicesandservices.health.v4.RunVO2MaxB\003\340A\001H\000\022W\n" + + "\021oxygen_saturation\030\030" + + " \001(\01325.google.devicesandservices.health.v4.OxygenSaturationB\003\340A\001H\000\022b\n" + + "\027daily_oxygen_saturation\030\031 \001(\0132:.google.devices" + + "andservices.health.v4.DailyOxygenSaturationB\003\340A\001H\000\022Q\n" + + "\016activity_level\030\032 \001(\01322.goo" + + "gle.devicesandservices.health.v4.ActivityLevelB\003\340A\001H\000\022C\n" + + "\007vo2_max\030\033 \001(\0132+.google." + + "devicesandservices.health.v4.VO2MaxB\003\340A\001H\000\022N\n\r" + + "daily_vo2_max\030\034 \001(\01320.google.devic" + + "esandservices.health.v4.DailyVO2MaxB\003\340A\001H\000\022_\n" + + "\026daily_heart_rate_zones\030 \001(\01328.goo" + + "gle.devicesandservices.health.v4.DailyHeartRateZonesB\003\340A\001H\000\022O\n\r" + + "hydration_log\030! \001" + + "(\01321.google.devicesandservices.health.v4.HydrationLogB\003\340A\001H\000\022`\n" + + "\027time_in_heart_rate_zone\030# \001(\01328.google.devicesandservice" + + "s.health.v4.TimeInHeartRateZoneB\003\340A\001H\000\022Q\n" + + "\016active_minutes\030$ \001(\01322.google.devicesa" + + "ndservices.health.v4.ActiveMinutesB\003\340A\001H\000\022o\n" + + "\036respiratory_rate_sleep_summary\030% \001(" + + "\0132@.google.devicesandservices.health.v4.RespiratoryRateSleepSummaryB\003\340A\001H\000\022`\n" + + "\026daily_respiratory_rate\030& \001(\01329.google.devi" + + "cesandservices.health.v4.DailyRespiratoryRateB\003\340A\001H\000\022V\n" + + "\021swim_lengths_data\030\' \001(\0132" + + "4.google.devicesandservices.health.v4.SwimLengthsDataB\003\340A\001H\000\022B\n" + + "\006height\030( \001(\0132+.g" + + "oogle.devicesandservices.health.v4.HeightB\003\340A\001H\000\022Z\n" + + "\023basal_energy_burned\030) \001(\01326." + + "google.devicesandservices.health.v4.BasalEnergyBurnedB\003\340A\001H\000\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\010\022I\n" + + "\013data_source\030\003" + + " \001(\0132/.google.devicesandservices.health.v4.DataSourceB\003\340A\001:w\352At\n" + + "\037health.googleapis.com/DataPoint\022:users/" + + "{user}/dataTypes/{data_type}/dataPoints/{data_point}*\n" + + "dataPoints2\tdataPointB\006\n" + + "\004data\"\240\023\n" + + "\023ReconciledDataPoint\022;\n" + + "\005steps\030\004 \001(\0132*.google.devicesandservices.health.v4.StepsH\000\022=\n" + + "\006floors\030\005" + + " \001(\0132+.google.devicesandservices.health.v4.FloorsH\000\022D\n\n" + + "heart_rate\030\006" + + " \001(\0132..google.devicesandservices.health.v4.HeartRateH\000\022;\n" + + "\005sleep\030\010 \001(\0132*.google.devicesandservices.health.v4.SleepH\000\022^\n" + + "\030daily_resting_heart_rate\030\t \001(\0132:.g" + + "oogle.devicesandservices.health.v4.DailyRestingHeartRateH\000\022f\n" + + "\034daily_heart_rate_variability\030\n" + + " \001(\0132>.google.devicesandservices.health.v4.DailyHeartRateVariabilityH\000\022A\n" + + "\010exercise\030\013" + + " \001(\0132-.google.devicesandservices.health.v4.ExerciseH\000\022=\n" + + "\006weight\030\014 \001(\0132+.google.devicesandservices.health.v4.WeightH\000\022A\n" + + "\010altitude\030\r" + + " \001(\0132-.google.devicesandservices.health.v4.AltitudeH\000\022A\n" + + "\010distance\030\016" + + " \001(\0132-.google.devicesandservices.health.v4.DistanceH\000\022@\n" + + "\010body_fat\030\017" + + " \001(\0132,.google.devicesandservices.health.v4.BodyFatH\000\022U\n" + + "\023active_zone_minutes\030\021 \001(" + + "\01326.google.devicesandservices.health.v4.ActiveZoneMinutesH\000\022[\n" + + "\026heart_rate_variability\030\023" + + " \001(\01329.google.devicesandservices.health.v4.HeartRateVariabilityH\000\022t\n" + + "#daily_sleep_temperature_derivations\030\024 \001(\0132E." + + "google.devicesandservices.health.v4.DailySleepTemperatureDerivationsH\000\022P\n" + + "\020sedentary_period\030\025" + + " \001(\01324.google.devicesandservices.health.v4.SedentaryPeriodH\000\022E\n" + + "\013run_vo2_max\030\026" + + " \001(\0132..google.devicesandservices.health.v4.RunVO2MaxH\000\022R\n" + + "\021oxygen_saturation\030\030" + + " \001(\01325.google.devicesandservices.health.v4.OxygenSaturationH\000\022]\n" + + "\027daily_oxygen_saturation\030\031 \001(\0132:.google.devicesand" + + "services.health.v4.DailyOxygenSaturationH\000\022L\n" + + "\016activity_level\030\032 \001(\01322.google.devi" + + "cesandservices.health.v4.ActivityLevelH\000\022>\n" + + "\007vo2_max\030\033" + + " \001(\0132+.google.devicesandservices.health.v4.VO2MaxH\000\022I\n\r" + + "daily_vo2_max\030\034" + + " \001(\01320.google.devicesandservices.health.v4.DailyVO2MaxH\000\022Z\n" + + "\026daily_heart_rate_zones\030 " + + " \001(\01328.google.devicesandservices.health.v4.DailyHeartRateZonesH\000\022J\n\r" + + "hydration_log\030!" + + " \001(\01321.google.devicesandservices.health.v4.HydrationLogH\000\022[\n" + + "\027time_in_heart_rate_zone\030# \001(\01328.google.devicesand" + + "services.health.v4.TimeInHeartRateZoneH\000\022L\n" + + "\016active_minutes\030$ \001(\01322.google.device" + + "sandservices.health.v4.ActiveMinutesH\000\022j\n" + + "\036respiratory_rate_sleep_summary\030% \001(\0132@" + + ".google.devicesandservices.health.v4.RespiratoryRateSleepSummaryH\000\022[\n" + + "\026daily_respiratory_rate\030& \001(\01329.google.devicesandse" + + "rvices.health.v4.DailyRespiratoryRateH\000\022Q\n" + + "\021swim_lengths_data\030\' \001(\01324.google.devi" + + "cesandservices.health.v4.SwimLengthsDataH\000\022=\n" + + "\006height\030( \001(\0132+.google.devicesandservices.health.v4.HeightH\000\022U\n" + + "\023basal_energy_burned\030)" + + " \001(\01326.google.devicesandservices.health.v4.BasalEnergyBurnedH\000\022\034\n" + + "\017data_point_name\030\001 \001(\tB\003\340A\010B\006\n" + + "\004data\"\267\014\n" + + "\017RollupDataPoint\022F\n" + + "\005steps\030\005 \001(\01325.google.devic" + + "esandservices.health.v4.StepsRollupValueH\000\022H\n" + + "\006floors\030\006" + + " \001(\01326.google.devicesandservices.health.v4.FloorsRollupValueH\000\022O\n\n" + + "heart_rate\030\007" + + " \001(\01329.google.devicesandservices.health.v4.HeartRateRollupValueH\000\022H\n" + + "\006weight\030\010" + + " \001(\01326.google.devicesandservices.health.v4.WeightRollupValueH\000\022L\n" + + "\010altitude\030\t" + + " \001(\01328.google.devicesandservices.health.v4.AltitudeRollupValueH\000\022L\n" + + "\010distance\030\n" + + " \001(\01328.google.devicesandservices.health.v4.DistanceRollupValueH\000\022K\n" + + "\010body_fat\030\013" + + " \001(\01327.google.devicesandservices.health.v4.BodyFatRollupValueH\000\022W\n" + + "\016total_calories\030\014" + + " \001(\0132=.google.devicesandservices.health.v4.TotalCaloriesRollupValueH\000\022`\n" + + "\023active_zone_minutes\030\r" + + " \001(\0132A.google.devicesa" + + "ndservices.health.v4.ActiveZoneMinutesRollupValueH\000\022[\n" + + "\020sedentary_period\030\017 \001(\0132?." + + "google.devicesandservices.health.v4.SedentaryPeriodRollupValueH\000\022P\n" + + "\013run_vo2_max\030\020" + + " \001(\01329.google.devicesandservices.health.v4.RunVO2MaxRollupValueH\000\022n\n" + + "\033calories_in_heart_rate_zone\030\021 \001(\0132G.google.devices" + + "andservices.health.v4.CaloriesInHeartRateZoneRollupValueH\000\022W\n" + + "\016activity_level\030\022 \001" + + "(\0132=.google.devicesandservices.health.v4.ActivityLevelRollupValueH\000\022U\n\r" + + "hydration_log\030\024" + + " \001(\0132<.google.devicesandservices.health.v4.HydrationLogRollupValueH\000\022f\n" + + "\027time_in_heart_rate_zone\030\025 \001(\0132C.google.dev" + + "icesandservices.health.v4.TimeInHeartRateZoneRollupValueH\000\022W\n" + + "\016active_minutes\030\026 \001" + + "(\0132=.google.devicesandservices.health.v4.ActiveMinutesRollupValueH\000\022\\\n" + + "\021swim_lengths_data\030\027 \001(\0132?.google.devicesandservic" + + "es.health.v4.SwimLengthsDataRollupValueH\000\022.\n\n" + + "start_time\030\001 \001(\0132\032.google.protobuf.Timestamp\022,\n" + + "\010end_time\030\002 \001(\0132\032.google.protobuf.TimestampB\007\n" + + "\005value\"\371\016\n" + + "\024DailyRollupDataPoint\022F\n" + + "\005steps\030\005 \001(\01325.google.device" + + "sandservices.health.v4.StepsRollupValueH\000\022H\n" + + "\006floors\030\006" + + " \001(\01326.google.devicesandservices.health.v4.FloorsRollupValueH\000\022O\n\n" + + "heart_rate\030\007" + + " \001(\01329.google.devicesandservices.health.v4.HeartRateRollupValueH\000\022z\n" + + "!resting_heart_rate_personal_range\030\010 \001(\0132" + + "M.google.devicesandservices.health.v4.Re" + + "stingHeartRatePersonalRangeRollupValueH\000\022\202\001\n" + + "%heart_rate_variability_personal_range\030\t \001(\0132Q.google.devicesandservices.hea" + + "lth.v4.HeartRateVariabilityPersonalRangeRollupValueH\000\022H\n" + + "\006weight\030\n" + + " \001(\01326.google.devicesandservices.health.v4.WeightRollupValueH\000\022L\n" + + "\010altitude\030\013 \001(\01328.google.devic" + + "esandservices.health.v4.AltitudeRollupValueH\000\022L\n" + + "\010distance\030\014 \001(\01328.google.devices" + + "andservices.health.v4.DistanceRollupValueH\000\022K\n" + + "\010body_fat\030\r" + + " \001(\01327.google.devicesandservices.health.v4.BodyFatRollupValueH\000\022W\n" + + "\016total_calories\030\016 \001(\0132=.google.device" + + "sandservices.health.v4.TotalCaloriesRollupValueH\000\022`\n" + + "\023active_zone_minutes\030\017 \001(\0132A" + + ".google.devicesandservices.health.v4.ActiveZoneMinutesRollupValueH\000\022[\n" + + "\020sedentary_period\030\021 \001(\0132?.google.devicesandservice" + + "s.health.v4.SedentaryPeriodRollupValueH\000\022P\n" + + "\013run_vo2_max\030\022 \001(\01329.google.devicesan" + + "dservices.health.v4.RunVO2MaxRollupValueH\000\022n\n" + + "\033calories_in_heart_rate_zone\030\023 \001(\0132" + + "G.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValueH\000\022W\n" + + "\016activity_level\030\024 \001(\0132=.google.devicesandse" + + "rvices.health.v4.ActivityLevelRollupValueH\000\022U\n\r" + + "hydration_log\030\026 \001(\0132<.google.devi" + + "cesandservices.health.v4.HydrationLogRollupValueH\000\022f\n" + + "\027time_in_heart_rate_zone\030\027 " + + "\001(\0132C.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValueH\000\022W\n" + + "\016active_minutes\030\030 \001(\0132=.google.devicesandse" + + "rvices.health.v4.ActiveMinutesRollupValueH\000\022\\\n" + + "\021swim_lengths_data\030\031 \001(\0132?.google." + + "devicesandservices.health.v4.SwimLengthsDataRollupValueH\000\022L\n" + + "\020civil_start_time\030\001 " + + "\001(\01322.google.devicesandservices.health.v4.CivilDateTime\022J\n" + + "\016civil_end_time\030\002 \001(\0132" + + "2.google.devicesandservices.health.v4.CivilDateTimeB\007\n" + + "\005value\"L\n" + + "\023GetDataPointRequest\0225\n" + + "\004name\030\001 \001(\tB\'\340A\002\372A!\n" + + "\037health.googleapis.com/DataPoint\"\225\001\n" + + "\025ListDataPointsRequest\0226\n" + + "\006parent\030\001 \001(\tB&\340A\002\372A \n" + + "\036health.googleapis.com/DataType\022\026\n" + + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\003 \001(\tB\003\340A\001\022\023\n" + + "\006filter\030\004 \001(\tB\003\340A\001\"v\n" + + "\026ListDataPointsResponse\022C\n" + + "\013data_points\030\001" + + " \003(\0132..google.devicesandservices.health.v4.DataPoint\022\027\n" + + "\017next_page_token\030\002 \001(\t\"\232\001\n" + + "\026CreateDataPointRequest\0227\n" + + "\006parent\030\001 \001(" + + "\tB\'\340A\002\372A!\022\037health.googleapis.com/DataPoint\022G\n\n" + + "data_point\030\002 \001(\0132..goo" + + "gle.devicesandservices.health.v4.DataPointB\003\340A\002\"\"\n" + + " CreateDataPointOperationMetadata\"a\n" + + "\026UpdateDataPointRequest\022G\n\n" + + "data_point\030\001" + + " \001(\0132..google.devicesandservices.health.v4.DataPointB\003\340A\002\"\"\n" + + " UpdateDataPointOperationMetadata\"\216\001\n" + + "\034BatchDeleteDataPointsRequest\0226\n" + + "\006parent\030\001 \001(\tB&\340A\001\372A \n" + + "\036health.googleapis.com/DataType\0226\n" + + "\005names\030\002 \003(\tB\'\340A\002\372A!\n" + + "\037health.googleapis.com/DataPoint\"d\n" + + "\035BatchDeleteDataPointsResponse\022C\n" + + "\013data_points\030\001" + + " \003(\0132..google.devicesandservices.health.v4.DataPoint\"\355\001\n" + + "&BatchDeleteDataPointsOperationMetadata\022x\n" + + "\017failed_requests\030\001 \003(\0132_.google.devicesandservice" + + "s.health.v4.BatchDeleteDataPointsOperationMetadata.FailedRequestsEntry\032I\n" + + "\023FailedRequestsEntry\022\013\n" + + "\003key\030\001 \001(\005\022!\n" + + "\005value\030\002 \001(\0132\022.google.rpc.Status:\0028\001\"\230\001\n" + + "\032ReconcileDataPointsRequest\022\023\n" + + "\006parent\030\001 \001(\tB\003\340A\002\022\026\n" + + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\003 \001(\tB\003\340A\001\022\023\n" + + "\006filter\030\004 \001(\tB\003\340A\001\022\037\n" + + "\022data_source_family\030\005 \001(\tB\003\340A\001\"\205\001\n" + + "\033ReconcileDataPointsResponse\022M\n" + + "\013data_points\030\001 \003(\01328.goog" + + "le.devicesandservices.health.v4.ReconciledDataPoint\022\027\n" + + "\017next_page_token\030\002 \001(\t\"\203\002\n" + + "\027RollUpDataPointsRequest\0226\n" + + "\006parent\030\001 \001(\tB&\340A\002\372A \n" + + "\036health.googleapis.com/DataType\022)\n" + + "\005range\030\002 \001(\0132\025.google.type.IntervalB\003\340A\002\0223\n" + + "\013window_size\030\003" + + " \001(\0132\031.google.protobuf.DurationB\003\340A\002\022\026\n" + + "\tpage_size\030\004 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\005 \001(\tB\003\340A\001\022\037\n" + + "\022data_source_family\030\007 \001(\tB\003\340A\001\"\205\001\n" + + "\030RollUpDataPointsResponse\022P\n" + + "\022rollup_data_points\030\001 \003(\01324.go" + + "ogle.devicesandservices.health.v4.RollupDataPoint\022\027\n" + + "\017next_page_token\030\002 \001(\t\"\223\002\n" + + "\034DailyRollUpDataPointsRequest\0226\n" + + "\006parent\030\001 \001(\tB&\340A\002\372A \n" + + "\036health.googleapis.com/DataType\022J\n" + + "\005range\030\002 \001(\01326.google.devicesandse" + + "rvices.health.v4.CivilTimeIntervalB\003\340A\002\022\035\n" + + "\020window_size_days\030\003 \001(\005B\003\340A\001\022\026\n" + + "\tpage_size\030\004 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\005 \001(\tB\003\340A\001\022\037\n" + + "\022data_source_family\030\007 \001(\tB\003\340A\001\"v\n" + + "\035DailyRollUpDataPointsResponse\022U\n" + + "\022rollup_data_points\030\001" + + " \003(\01329.google.devicesandservices.health.v4.DailyRollupDataPoint\"{\n" + + "\010DataType\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\010:\\\352AY\n" + + "\036health.googleapis.com/DataType\022\"users/{user}/dataTypes/{data_type}*" + + "\tdataTypes2\010dataType\"l\n" + + "\030ExportExerciseTcxRequest\0225\n" + + "\004name\030\001 \001(\tB\'\340A\002\372A!\n" + + "\037health.googleapis.com/DataPoint\022\031\n" + + "\014partial_data\030\002 \001(\010B\003\340A\001\"-\n" + + "\031ExportExerciseTcxResponse\022\020\n" + + "\010tcx_data\030\002 \001(\t2\274\022\n" + + "\021DataPointsService\022\264\001\n" + + "\014GetDataPoint\0228.google.devicesandservices.health.v4.GetDataP" + + "ointRequest\032..google.devicesandservices." + + "health.v4.DataPoint\":\332A\004name\202\323\344\223\002-\022+/v4/" + + "{name=users/*/dataTypes/*/dataPoints/*}\022\307\001\n" + + "\016ListDataPoints\022:.google.devicesandservices.health.v4.ListDataPointsRequest\032;" + + ".google.devicesandservices.health.v4.Lis" + + "tDataPointsResponse\"<\332A\006parent\202\323\344\223\002-\022+/v" + + "4/{parent=users/*/dataTypes/*}/dataPoints\022\363\001\n" + + "\017CreateDataPoint\022;.google.devicesan" + + "dservices.health.v4.CreateDataPointRequest\032\035.google.longrunning.Operation\"\203\001\312A-\n" + + "\tDataPoint\022 CreateDataPointOperationMeta" + + "data\332A\021parent,data_point\202\323\344\223\0029\"+/v4/{parent=users/*/dataTypes/*}/dataPoints:\n" + + "data_point\022\367\001\n" + + "\017UpdateDataPoint\022;.google.devicesandservices.health.v4.UpdateDataPoin" + + "tRequest\032\035.google.longrunning.Operation\"\207\001\312A-\n" + + "\tDataPoint\022 UpdateDataPointOperationMetadata\332A\n" + + "data_point\202\323\344\223\002D26/v4/{data" + + "_point.name=users/*/dataTypes/*/dataPoints/*}:\n" + + "data_point\022\210\002\n" + + "\025BatchDeleteDataPoints\022A.google.devicesandservices.health.v" + + "4.BatchDeleteDataPointsRequest\032\035.google.longrunning.Operation\"\214\001\312AG\n" + + "\035BatchDeleteDataPointsResponse\022&BatchDeleteDataPoint" + + "sOperationMetadata\202\323\344\223\002<\"7/v4/{parent=us" + + "ers/*/dataTypes/*}/dataPoints:batchDelete:\001*\022\327\001\n" + + "\023ReconcileDataPoints\022?.google.devicesandservices.health.v4.ReconcileData" + + "PointsRequest\032@.google.devicesandservices.health.v4.ReconcileDataPointsResponse\"" + + "=\202\323\344\223\0027\0225/v4/{parent=users/*/dataTypes/*}/dataPoints:reconcile\022\316\001\n" + + "\020RollUpDataPoints\022<.google.devicesandservices.health.v" + + "4.RollUpDataPointsRequest\032=.google.devicesandservices.health.v4.RollUpDataPoints" + + "Response\"=\202\323\344\223\0027\"2/v4/{parent=users/*/dataTypes/*}/dataPoints:rollUp:\001*\022\342\001\n" + + "\025DailyRollUpDataPoints\022A.google.devicesandser" + + "vices.health.v4.DailyRollUpDataPointsRequest\032B.google.devicesandservices.health." + + "v4.DailyRollUpDataPointsResponse\"B\202\323\344\223\002<" + + "\"7/v4/{parent=users/*/dataTypes/*}/dataPoints:dailyRollUp:\001*\022\340\001\n" + + "\021ExportExerciseTcx\022=.google.devicesandservices.health.v4" + + ".ExportExerciseTcxRequest\032>.google.devicesandservices.health.v4.ExportExerciseTc" + + "xResponse\"L\332A\004name\202\323\344\223\002?\022=/v4/{name=user" + + "s/*/dataTypes/*/dataPoints/*}:exportExer" + + "ciseTcx\032\267\002\312A\025health.googleapis.com\322A\233\002ht" + + "tps://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly,https:/" + + "/www.googleapis.com/auth/googlehealth.health_metrics_and_measurements.readonly,h" + + "ttps://www.googleapis.com/auth/googlehealth.location.readonly,https://www.google" + + "apis.com/auth/googlehealth.sleep.readonlyB\205\002\n" + + "\'com.google.devicesandservices.health.v4B\017DataPointsProtoP\001ZRgoogle.golang." + + "org/genproto/googleapis/devicesandservices/health/apiv4main;healthpb\252\002#Google.De" + + "vicesAndServices.Health.V4\312\002#Google\\Devi" + + "cesAndServices\\Health\\V4\352\002&Google::DevicesAndServices::Health::V4b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.devicesandservices.health.v4.DataCoordinatesProto.getDescriptor(), + com.google.devicesandservices.health.v4.DataModelProto.getDescriptor(), + com.google.devicesandservices.health.v4.DataSourceProto.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.DurationProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.rpc.StatusProto.getDescriptor(), + com.google.type.IntervalProto.getDescriptor(), + }); + internal_static_google_devicesandservices_health_v4_DataPoint_descriptor = + getDescriptor().getMessageType(0); + internal_static_google_devicesandservices_health_v4_DataPoint_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_DataPoint_descriptor, + new java.lang.String[] { + "Steps", + "Floors", + "HeartRate", + "Sleep", + "DailyRestingHeartRate", + "DailyHeartRateVariability", + "Exercise", + "Weight", + "Altitude", + "Distance", + "BodyFat", + "ActiveZoneMinutes", + "HeartRateVariability", + "DailySleepTemperatureDerivations", + "SedentaryPeriod", + "RunVo2Max", + "OxygenSaturation", + "DailyOxygenSaturation", + "ActivityLevel", + "Vo2Max", + "DailyVo2Max", + "DailyHeartRateZones", + "HydrationLog", + "TimeInHeartRateZone", + "ActiveMinutes", + "RespiratoryRateSleepSummary", + "DailyRespiratoryRate", + "SwimLengthsData", + "Height", + "BasalEnergyBurned", + "Name", + "DataSource", + "Data", + }); + internal_static_google_devicesandservices_health_v4_ReconciledDataPoint_descriptor = + getDescriptor().getMessageType(1); + internal_static_google_devicesandservices_health_v4_ReconciledDataPoint_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_ReconciledDataPoint_descriptor, + new java.lang.String[] { + "Steps", + "Floors", + "HeartRate", + "Sleep", + "DailyRestingHeartRate", + "DailyHeartRateVariability", + "Exercise", + "Weight", + "Altitude", + "Distance", + "BodyFat", + "ActiveZoneMinutes", + "HeartRateVariability", + "DailySleepTemperatureDerivations", + "SedentaryPeriod", + "RunVo2Max", + "OxygenSaturation", + "DailyOxygenSaturation", + "ActivityLevel", + "Vo2Max", + "DailyVo2Max", + "DailyHeartRateZones", + "HydrationLog", + "TimeInHeartRateZone", + "ActiveMinutes", + "RespiratoryRateSleepSummary", + "DailyRespiratoryRate", + "SwimLengthsData", + "Height", + "BasalEnergyBurned", + "DataPointName", + "Data", + }); + internal_static_google_devicesandservices_health_v4_RollupDataPoint_descriptor = + getDescriptor().getMessageType(2); + internal_static_google_devicesandservices_health_v4_RollupDataPoint_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_RollupDataPoint_descriptor, + new java.lang.String[] { + "Steps", + "Floors", + "HeartRate", + "Weight", + "Altitude", + "Distance", + "BodyFat", + "TotalCalories", + "ActiveZoneMinutes", + "SedentaryPeriod", + "RunVo2Max", + "CaloriesInHeartRateZone", + "ActivityLevel", + "HydrationLog", + "TimeInHeartRateZone", + "ActiveMinutes", + "SwimLengthsData", + "StartTime", + "EndTime", + "Value", + }); + internal_static_google_devicesandservices_health_v4_DailyRollupDataPoint_descriptor = + getDescriptor().getMessageType(3); + internal_static_google_devicesandservices_health_v4_DailyRollupDataPoint_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_DailyRollupDataPoint_descriptor, + new java.lang.String[] { + "Steps", + "Floors", + "HeartRate", + "RestingHeartRatePersonalRange", + "HeartRateVariabilityPersonalRange", + "Weight", + "Altitude", + "Distance", + "BodyFat", + "TotalCalories", + "ActiveZoneMinutes", + "SedentaryPeriod", + "RunVo2Max", + "CaloriesInHeartRateZone", + "ActivityLevel", + "HydrationLog", + "TimeInHeartRateZone", + "ActiveMinutes", + "SwimLengthsData", + "CivilStartTime", + "CivilEndTime", + "Value", + }); + internal_static_google_devicesandservices_health_v4_GetDataPointRequest_descriptor = + getDescriptor().getMessageType(4); + internal_static_google_devicesandservices_health_v4_GetDataPointRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_GetDataPointRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_devicesandservices_health_v4_ListDataPointsRequest_descriptor = + getDescriptor().getMessageType(5); + internal_static_google_devicesandservices_health_v4_ListDataPointsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_ListDataPointsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", + }); + internal_static_google_devicesandservices_health_v4_ListDataPointsResponse_descriptor = + getDescriptor().getMessageType(6); + internal_static_google_devicesandservices_health_v4_ListDataPointsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_ListDataPointsResponse_descriptor, + new java.lang.String[] { + "DataPoints", "NextPageToken", + }); + internal_static_google_devicesandservices_health_v4_CreateDataPointRequest_descriptor = + getDescriptor().getMessageType(7); + internal_static_google_devicesandservices_health_v4_CreateDataPointRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_CreateDataPointRequest_descriptor, + new java.lang.String[] { + "Parent", "DataPoint", + }); + internal_static_google_devicesandservices_health_v4_CreateDataPointOperationMetadata_descriptor = + getDescriptor().getMessageType(8); + internal_static_google_devicesandservices_health_v4_CreateDataPointOperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_CreateDataPointOperationMetadata_descriptor, + new java.lang.String[] {}); + internal_static_google_devicesandservices_health_v4_UpdateDataPointRequest_descriptor = + getDescriptor().getMessageType(9); + internal_static_google_devicesandservices_health_v4_UpdateDataPointRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_UpdateDataPointRequest_descriptor, + new java.lang.String[] { + "DataPoint", + }); + internal_static_google_devicesandservices_health_v4_UpdateDataPointOperationMetadata_descriptor = + getDescriptor().getMessageType(10); + internal_static_google_devicesandservices_health_v4_UpdateDataPointOperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_UpdateDataPointOperationMetadata_descriptor, + new java.lang.String[] {}); + internal_static_google_devicesandservices_health_v4_BatchDeleteDataPointsRequest_descriptor = + getDescriptor().getMessageType(11); + internal_static_google_devicesandservices_health_v4_BatchDeleteDataPointsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_BatchDeleteDataPointsRequest_descriptor, + new java.lang.String[] { + "Parent", "Names", + }); + internal_static_google_devicesandservices_health_v4_BatchDeleteDataPointsResponse_descriptor = + getDescriptor().getMessageType(12); + internal_static_google_devicesandservices_health_v4_BatchDeleteDataPointsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_BatchDeleteDataPointsResponse_descriptor, + new java.lang.String[] { + "DataPoints", + }); + internal_static_google_devicesandservices_health_v4_BatchDeleteDataPointsOperationMetadata_descriptor = + getDescriptor().getMessageType(13); + internal_static_google_devicesandservices_health_v4_BatchDeleteDataPointsOperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_BatchDeleteDataPointsOperationMetadata_descriptor, + new java.lang.String[] { + "FailedRequests", + }); + internal_static_google_devicesandservices_health_v4_BatchDeleteDataPointsOperationMetadata_FailedRequestsEntry_descriptor = + internal_static_google_devicesandservices_health_v4_BatchDeleteDataPointsOperationMetadata_descriptor + .getNestedType(0); + internal_static_google_devicesandservices_health_v4_BatchDeleteDataPointsOperationMetadata_FailedRequestsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_BatchDeleteDataPointsOperationMetadata_FailedRequestsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_devicesandservices_health_v4_ReconcileDataPointsRequest_descriptor = + getDescriptor().getMessageType(14); + internal_static_google_devicesandservices_health_v4_ReconcileDataPointsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_ReconcileDataPointsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", "DataSourceFamily", + }); + internal_static_google_devicesandservices_health_v4_ReconcileDataPointsResponse_descriptor = + getDescriptor().getMessageType(15); + internal_static_google_devicesandservices_health_v4_ReconcileDataPointsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_ReconcileDataPointsResponse_descriptor, + new java.lang.String[] { + "DataPoints", "NextPageToken", + }); + internal_static_google_devicesandservices_health_v4_RollUpDataPointsRequest_descriptor = + getDescriptor().getMessageType(16); + internal_static_google_devicesandservices_health_v4_RollUpDataPointsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_RollUpDataPointsRequest_descriptor, + new java.lang.String[] { + "Parent", "Range", "WindowSize", "PageSize", "PageToken", "DataSourceFamily", + }); + internal_static_google_devicesandservices_health_v4_RollUpDataPointsResponse_descriptor = + getDescriptor().getMessageType(17); + internal_static_google_devicesandservices_health_v4_RollUpDataPointsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_RollUpDataPointsResponse_descriptor, + new java.lang.String[] { + "RollupDataPoints", "NextPageToken", + }); + internal_static_google_devicesandservices_health_v4_DailyRollUpDataPointsRequest_descriptor = + getDescriptor().getMessageType(18); + internal_static_google_devicesandservices_health_v4_DailyRollUpDataPointsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_DailyRollUpDataPointsRequest_descriptor, + new java.lang.String[] { + "Parent", "Range", "WindowSizeDays", "PageSize", "PageToken", "DataSourceFamily", + }); + internal_static_google_devicesandservices_health_v4_DailyRollUpDataPointsResponse_descriptor = + getDescriptor().getMessageType(19); + internal_static_google_devicesandservices_health_v4_DailyRollUpDataPointsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_DailyRollUpDataPointsResponse_descriptor, + new java.lang.String[] { + "RollupDataPoints", + }); + internal_static_google_devicesandservices_health_v4_DataType_descriptor = + getDescriptor().getMessageType(20); + internal_static_google_devicesandservices_health_v4_DataType_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_DataType_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_devicesandservices_health_v4_ExportExerciseTcxRequest_descriptor = + getDescriptor().getMessageType(21); + internal_static_google_devicesandservices_health_v4_ExportExerciseTcxRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_ExportExerciseTcxRequest_descriptor, + new java.lang.String[] { + "Name", "PartialData", + }); + internal_static_google_devicesandservices_health_v4_ExportExerciseTcxResponse_descriptor = + getDescriptor().getMessageType(22); + internal_static_google_devicesandservices_health_v4_ExportExerciseTcxResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_ExportExerciseTcxResponse_descriptor, + new java.lang.String[] { + "TcxData", + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.devicesandservices.health.v4.DataCoordinatesProto.getDescriptor(); + com.google.devicesandservices.health.v4.DataModelProto.getDescriptor(); + com.google.devicesandservices.health.v4.DataSourceProto.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.DurationProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.rpc.StatusProto.getDescriptor(); + com.google.type.IntervalProto.getDescriptor(); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceReference); + registry.add(com.google.longrunning.OperationsProto.operationInfo); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DataSource.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DataSource.java new file mode 100644 index 000000000000..56f2df7b7a25 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DataSource.java @@ -0,0 +1,4560 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_source.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * 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 {@code google.devicesandservices.health.v4.DataSource} + */ +@com.google.protobuf.Generated +public final class DataSource extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.DataSource) + DataSourceOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DataSource"); + } + + // Use DataSource.newBuilder() to construct. + private DataSource(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DataSource() { + recordingMethod_ = 0; + platform_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataSourceProto + .internal_static_google_devicesandservices_health_v4_DataSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataSourceProto + .internal_static_google_devicesandservices_health_v4_DataSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.DataSource.class, + com.google.devicesandservices.health.v4.DataSource.Builder.class); + } + + /** + * + * + *
+   * The method by which the data was recorded.
+   * 
+ * + * Protobuf enum {@code google.devicesandservices.health.v4.DataSource.RecordingMethod} + */ + public enum RecordingMethod implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The recording method is unspecified.
+     * 
+ * + * RECORDING_METHOD_UNSPECIFIED = 0; + */ + RECORDING_METHOD_UNSPECIFIED(0), + /** + * + * + *
+     * The data was manually entered by the user.
+     * 
+ * + * MANUAL = 1; + */ + MANUAL(1), + /** + * + * + *
+     * The data was passively measured by a device.
+     * 
+ * + * PASSIVELY_MEASURED = 2; + */ + PASSIVELY_MEASURED(2), + /** + * + * + *
+     * The data was derived from other data, e.g., by an algorithm in the
+     * backend.
+     * 
+ * + * DERIVED = 3; + */ + DERIVED(3), + /** + * + * + *
+     * The data was actively measured by a device.
+     * 
+ * + * ACTIVELY_MEASURED = 4; + */ + ACTIVELY_MEASURED(4), + /** + * + * + *
+     * The recording method is unknown. This is set when the data is uploaded
+     * from a third party app that does not provide this information.
+     * 
+ * + * UNKNOWN = 5; + */ + UNKNOWN(5), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "RecordingMethod"); + } + + /** + * + * + *
+     * The recording method is unspecified.
+     * 
+ * + * RECORDING_METHOD_UNSPECIFIED = 0; + */ + public static final int RECORDING_METHOD_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * The data was manually entered by the user.
+     * 
+ * + * MANUAL = 1; + */ + public static final int MANUAL_VALUE = 1; + + /** + * + * + *
+     * The data was passively measured by a device.
+     * 
+ * + * PASSIVELY_MEASURED = 2; + */ + public static final int PASSIVELY_MEASURED_VALUE = 2; + + /** + * + * + *
+     * The data was derived from other data, e.g., by an algorithm in the
+     * backend.
+     * 
+ * + * DERIVED = 3; + */ + public static final int DERIVED_VALUE = 3; + + /** + * + * + *
+     * The data was actively measured by a device.
+     * 
+ * + * ACTIVELY_MEASURED = 4; + */ + public static final int ACTIVELY_MEASURED_VALUE = 4; + + /** + * + * + *
+     * The recording method is unknown. This is set when the data is uploaded
+     * from a third party app that does not provide this information.
+     * 
+ * + * UNKNOWN = 5; + */ + public static final int UNKNOWN_VALUE = 5; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static RecordingMethod valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static RecordingMethod forNumber(int value) { + switch (value) { + case 0: + return RECORDING_METHOD_UNSPECIFIED; + case 1: + return MANUAL; + case 2: + return PASSIVELY_MEASURED; + case 3: + return DERIVED; + case 4: + return ACTIVELY_MEASURED; + case 5: + return UNKNOWN; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public RecordingMethod findValueByNumber(int number) { + return RecordingMethod.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataSource.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final RecordingMethod[] VALUES = values(); + + public static RecordingMethod valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private RecordingMethod(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.devicesandservices.health.v4.DataSource.RecordingMethod) + } + + /** + * + * + *
+   * The platform that uploaded the data.
+   * Additional values may be added in the future. Clients should be prepared to
+   * handle unknown values gracefully.
+   * 
+ * + * Protobuf enum {@code google.devicesandservices.health.v4.DataSource.Platform} + */ + public enum Platform implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The platform is unspecified.
+     * 
+ * + * PLATFORM_UNSPECIFIED = 0; + */ + PLATFORM_UNSPECIFIED(0), + /** + * + * + *
+     * The data was uploaded from Fitbit.
+     * 
+ * + * FITBIT = 1; + */ + FITBIT(1), + /** + * + * + *
+     * The data was uploaded from Health Connect.
+     * 
+ * + * HEALTH_CONNECT = 2; + */ + HEALTH_CONNECT(2), + /** + * + * + *
+     * The data was uploaded from Health Kit.
+     * 
+ * + * HEALTH_KIT = 3; + */ + HEALTH_KIT(3), + /** + * + * + *
+     * The data was uploaded from Google Fit.
+     * 
+ * + * FIT = 4; + */ + FIT(4), + /** + * + * + *
+     * The data was uploaded from Fitbit legacy Web API.
+     * 
+ * + * FITBIT_WEB_API = 5; + */ + FITBIT_WEB_API(5), + /** + * + * + *
+     * The data was uploaded from Nest devices.
+     * 
+ * + * NEST = 6; + */ + NEST(6), + /** + * + * + *
+     * The data was uploaded from Google Health API.
+     * 
+ * + * GOOGLE_WEB_API = 7; + */ + GOOGLE_WEB_API(7), + /** + * + * + *
+     * The data was uploaded from Google Partner Integrations.
+     * 
+ * + * GOOGLE_PARTNER_INTEGRATION = 8; + */ + GOOGLE_PARTNER_INTEGRATION(8), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Platform"); + } + + /** + * + * + *
+     * The platform is unspecified.
+     * 
+ * + * PLATFORM_UNSPECIFIED = 0; + */ + public static final int PLATFORM_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * The data was uploaded from Fitbit.
+     * 
+ * + * FITBIT = 1; + */ + public static final int FITBIT_VALUE = 1; + + /** + * + * + *
+     * The data was uploaded from Health Connect.
+     * 
+ * + * HEALTH_CONNECT = 2; + */ + public static final int HEALTH_CONNECT_VALUE = 2; + + /** + * + * + *
+     * The data was uploaded from Health Kit.
+     * 
+ * + * HEALTH_KIT = 3; + */ + public static final int HEALTH_KIT_VALUE = 3; + + /** + * + * + *
+     * The data was uploaded from Google Fit.
+     * 
+ * + * FIT = 4; + */ + public static final int FIT_VALUE = 4; + + /** + * + * + *
+     * The data was uploaded from Fitbit legacy Web API.
+     * 
+ * + * FITBIT_WEB_API = 5; + */ + public static final int FITBIT_WEB_API_VALUE = 5; + + /** + * + * + *
+     * The data was uploaded from Nest devices.
+     * 
+ * + * NEST = 6; + */ + public static final int NEST_VALUE = 6; + + /** + * + * + *
+     * The data was uploaded from Google Health API.
+     * 
+ * + * GOOGLE_WEB_API = 7; + */ + public static final int GOOGLE_WEB_API_VALUE = 7; + + /** + * + * + *
+     * The data was uploaded from Google Partner Integrations.
+     * 
+ * + * GOOGLE_PARTNER_INTEGRATION = 8; + */ + public static final int GOOGLE_PARTNER_INTEGRATION_VALUE = 8; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Platform valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Platform forNumber(int value) { + switch (value) { + case 0: + return PLATFORM_UNSPECIFIED; + case 1: + return FITBIT; + case 2: + return HEALTH_CONNECT; + case 3: + return HEALTH_KIT; + case 4: + return FIT; + case 5: + return FITBIT_WEB_API; + case 6: + return NEST; + case 7: + return GOOGLE_WEB_API; + case 8: + return GOOGLE_PARTNER_INTEGRATION; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Platform findValueByNumber(int number) { + return Platform.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataSource.getDescriptor() + .getEnumTypes() + .get(1); + } + + private static final Platform[] VALUES = values(); + + public static Platform valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Platform(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.devicesandservices.health.v4.DataSource.Platform) + } + + public interface DeviceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.DataSource.Device) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Optional. Captures the form factor of the device.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DataSource.Device.FormFactor form_factor = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for formFactor. + */ + int getFormFactorValue(); + + /** + * + * + *
+     * Optional. Captures the form factor of the device.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DataSource.Device.FormFactor form_factor = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The formFactor. + */ + com.google.devicesandservices.health.v4.DataSource.Device.FormFactor getFormFactor(); + + /** + * + * + *
+     * Optional. An optional manufacturer of the device.
+     * 
+ * + * string manufacturer = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The manufacturer. + */ + java.lang.String getManufacturer(); + + /** + * + * + *
+     * Optional. An optional manufacturer of the device.
+     * 
+ * + * string manufacturer = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for manufacturer. + */ + com.google.protobuf.ByteString getManufacturerBytes(); + + /** + * + * + *
+     * Optional. An optional name for the device.
+     * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + + /** + * + * + *
+     * Optional. An optional name for the device.
+     * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + } + + /** + * + * + *
+   * Captures metadata about the device that recorded the measurement.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.DataSource.Device} + */ + public static final class Device extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.DataSource.Device) + DeviceOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Device"); + } + + // Use Device.newBuilder() to construct. + private Device(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Device() { + formFactor_ = 0; + manufacturer_ = ""; + displayName_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataSourceProto + .internal_static_google_devicesandservices_health_v4_DataSource_Device_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataSourceProto + .internal_static_google_devicesandservices_health_v4_DataSource_Device_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.DataSource.Device.class, + com.google.devicesandservices.health.v4.DataSource.Device.Builder.class); + } + + /** + * + * + *
+     * Form factor of the device, e.g. phone, watch, band, etc.
+     * 
+ * + * Protobuf enum {@code google.devicesandservices.health.v4.DataSource.Device.FormFactor} + */ + public enum FormFactor implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * The form factor is unspecified.
+       * 
+ * + * FORM_FACTOR_UNSPECIFIED = 0; + */ + FORM_FACTOR_UNSPECIFIED(0), + /** + * + * + *
+       * The device is a fitness band.
+       * 
+ * + * FITNESS_BAND = 1; + */ + FITNESS_BAND(1), + /** + * + * + *
+       * The device is a watch.
+       * 
+ * + * WATCH = 2; + */ + WATCH(2), + /** + * + * + *
+       * The device is a phone.
+       * 
+ * + * PHONE = 3; + */ + PHONE(3), + /** + * + * + *
+       * The device is a ring.
+       * 
+ * + * RING = 4; + */ + RING(4), + /** + * + * + *
+       * The device is a chest strap.
+       * 
+ * + * CHEST_STRAP = 5; + */ + CHEST_STRAP(5), + /** + * + * + *
+       * The device is a scale.
+       * 
+ * + * SCALE = 6; + */ + SCALE(6), + /** + * + * + *
+       * The device is a tablet.
+       * 
+ * + * TABLET = 7; + */ + TABLET(7), + /** + * + * + *
+       * The device is a head mounted device.
+       * 
+ * + * HEAD_MOUNTED = 8; + */ + HEAD_MOUNTED(8), + /** + * + * + *
+       * The device is a smart display.
+       * 
+ * + * SMART_DISPLAY = 9; + */ + SMART_DISPLAY(9), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "FormFactor"); + } + + /** + * + * + *
+       * The form factor is unspecified.
+       * 
+ * + * FORM_FACTOR_UNSPECIFIED = 0; + */ + public static final int FORM_FACTOR_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+       * The device is a fitness band.
+       * 
+ * + * FITNESS_BAND = 1; + */ + public static final int FITNESS_BAND_VALUE = 1; + + /** + * + * + *
+       * The device is a watch.
+       * 
+ * + * WATCH = 2; + */ + public static final int WATCH_VALUE = 2; + + /** + * + * + *
+       * The device is a phone.
+       * 
+ * + * PHONE = 3; + */ + public static final int PHONE_VALUE = 3; + + /** + * + * + *
+       * The device is a ring.
+       * 
+ * + * RING = 4; + */ + public static final int RING_VALUE = 4; + + /** + * + * + *
+       * The device is a chest strap.
+       * 
+ * + * CHEST_STRAP = 5; + */ + public static final int CHEST_STRAP_VALUE = 5; + + /** + * + * + *
+       * The device is a scale.
+       * 
+ * + * SCALE = 6; + */ + public static final int SCALE_VALUE = 6; + + /** + * + * + *
+       * The device is a tablet.
+       * 
+ * + * TABLET = 7; + */ + public static final int TABLET_VALUE = 7; + + /** + * + * + *
+       * The device is a head mounted device.
+       * 
+ * + * HEAD_MOUNTED = 8; + */ + public static final int HEAD_MOUNTED_VALUE = 8; + + /** + * + * + *
+       * The device is a smart display.
+       * 
+ * + * SMART_DISPLAY = 9; + */ + public static final int SMART_DISPLAY_VALUE = 9; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static FormFactor valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static FormFactor forNumber(int value) { + switch (value) { + case 0: + return FORM_FACTOR_UNSPECIFIED; + case 1: + return FITNESS_BAND; + case 2: + return WATCH; + case 3: + return PHONE; + case 4: + return RING; + case 5: + return CHEST_STRAP; + case 6: + return SCALE; + case 7: + return TABLET; + case 8: + return HEAD_MOUNTED; + case 9: + return SMART_DISPLAY; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public FormFactor findValueByNumber(int number) { + return FormFactor.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataSource.Device.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final FormFactor[] VALUES = values(); + + public static FormFactor valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private FormFactor(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.devicesandservices.health.v4.DataSource.Device.FormFactor) + } + + public static final int FORM_FACTOR_FIELD_NUMBER = 1; + private int formFactor_ = 0; + + /** + * + * + *
+     * Optional. Captures the form factor of the device.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DataSource.Device.FormFactor form_factor = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for formFactor. + */ + @java.lang.Override + public int getFormFactorValue() { + return formFactor_; + } + + /** + * + * + *
+     * Optional. Captures the form factor of the device.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DataSource.Device.FormFactor form_factor = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The formFactor. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DataSource.Device.FormFactor getFormFactor() { + com.google.devicesandservices.health.v4.DataSource.Device.FormFactor result = + com.google.devicesandservices.health.v4.DataSource.Device.FormFactor.forNumber( + formFactor_); + return result == null + ? com.google.devicesandservices.health.v4.DataSource.Device.FormFactor.UNRECOGNIZED + : result; + } + + public static final int MANUFACTURER_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object manufacturer_ = ""; + + /** + * + * + *
+     * Optional. An optional manufacturer of the device.
+     * 
+ * + * string manufacturer = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The manufacturer. + */ + @java.lang.Override + public java.lang.String getManufacturer() { + java.lang.Object ref = manufacturer_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + manufacturer_ = s; + return s; + } + } + + /** + * + * + *
+     * Optional. An optional manufacturer of the device.
+     * 
+ * + * string manufacturer = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for manufacturer. + */ + @java.lang.Override + public com.google.protobuf.ByteString getManufacturerBytes() { + java.lang.Object ref = manufacturer_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + manufacturer_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + + /** + * + * + *
+     * Optional. An optional name for the device.
+     * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + + /** + * + * + *
+     * Optional. An optional name for the device.
+     * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (formFactor_ + != com.google.devicesandservices.health.v4.DataSource.Device.FormFactor + .FORM_FACTOR_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, formFactor_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(manufacturer_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, manufacturer_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, displayName_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (formFactor_ + != com.google.devicesandservices.health.v4.DataSource.Device.FormFactor + .FORM_FACTOR_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, formFactor_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(manufacturer_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, manufacturer_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, displayName_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.DataSource.Device)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.DataSource.Device other = + (com.google.devicesandservices.health.v4.DataSource.Device) obj; + + if (formFactor_ != other.formFactor_) return false; + if (!getManufacturer().equals(other.getManufacturer())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + FORM_FACTOR_FIELD_NUMBER; + hash = (53 * hash) + formFactor_; + hash = (37 * hash) + MANUFACTURER_FIELD_NUMBER; + hash = (53 * hash) + getManufacturer().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.DataSource.Device parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.DataSource.Device parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DataSource.Device parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.DataSource.Device parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DataSource.Device parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.DataSource.Device parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DataSource.Device parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.DataSource.Device parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DataSource.Device parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.DataSource.Device parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DataSource.Device parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.DataSource.Device parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.DataSource.Device prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+     * Captures metadata about the device that recorded the measurement.
+     * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.DataSource.Device} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.DataSource.Device) + com.google.devicesandservices.health.v4.DataSource.DeviceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataSourceProto + .internal_static_google_devicesandservices_health_v4_DataSource_Device_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataSourceProto + .internal_static_google_devicesandservices_health_v4_DataSource_Device_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.DataSource.Device.class, + com.google.devicesandservices.health.v4.DataSource.Device.Builder.class); + } + + // Construct using com.google.devicesandservices.health.v4.DataSource.Device.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + formFactor_ = 0; + manufacturer_ = ""; + displayName_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataSourceProto + .internal_static_google_devicesandservices_health_v4_DataSource_Device_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.DataSource.Device getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.DataSource.Device.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.DataSource.Device build() { + com.google.devicesandservices.health.v4.DataSource.Device result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.DataSource.Device buildPartial() { + com.google.devicesandservices.health.v4.DataSource.Device result = + new com.google.devicesandservices.health.v4.DataSource.Device(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.devicesandservices.health.v4.DataSource.Device result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.formFactor_ = formFactor_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.manufacturer_ = manufacturer_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.displayName_ = displayName_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.DataSource.Device) { + return mergeFrom((com.google.devicesandservices.health.v4.DataSource.Device) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.devicesandservices.health.v4.DataSource.Device other) { + if (other == com.google.devicesandservices.health.v4.DataSource.Device.getDefaultInstance()) + return this; + if (other.formFactor_ != 0) { + setFormFactorValue(other.getFormFactorValue()); + } + if (!other.getManufacturer().isEmpty()) { + manufacturer_ = other.manufacturer_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + formFactor_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + manufacturer_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int formFactor_ = 0; + + /** + * + * + *
+       * Optional. Captures the form factor of the device.
+       * 
+ * + * + * .google.devicesandservices.health.v4.DataSource.Device.FormFactor form_factor = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for formFactor. + */ + @java.lang.Override + public int getFormFactorValue() { + return formFactor_; + } + + /** + * + * + *
+       * Optional. Captures the form factor of the device.
+       * 
+ * + * + * .google.devicesandservices.health.v4.DataSource.Device.FormFactor form_factor = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for formFactor to set. + * @return This builder for chaining. + */ + public Builder setFormFactorValue(int value) { + formFactor_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. Captures the form factor of the device.
+       * 
+ * + * + * .google.devicesandservices.health.v4.DataSource.Device.FormFactor form_factor = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The formFactor. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DataSource.Device.FormFactor getFormFactor() { + com.google.devicesandservices.health.v4.DataSource.Device.FormFactor result = + com.google.devicesandservices.health.v4.DataSource.Device.FormFactor.forNumber( + formFactor_); + return result == null + ? com.google.devicesandservices.health.v4.DataSource.Device.FormFactor.UNRECOGNIZED + : result; + } + + /** + * + * + *
+       * Optional. Captures the form factor of the device.
+       * 
+ * + * + * .google.devicesandservices.health.v4.DataSource.Device.FormFactor form_factor = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The formFactor to set. + * @return This builder for chaining. + */ + public Builder setFormFactor( + com.google.devicesandservices.health.v4.DataSource.Device.FormFactor value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + formFactor_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. Captures the form factor of the device.
+       * 
+ * + * + * .google.devicesandservices.health.v4.DataSource.Device.FormFactor form_factor = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearFormFactor() { + bitField0_ = (bitField0_ & ~0x00000001); + formFactor_ = 0; + onChanged(); + return this; + } + + private java.lang.Object manufacturer_ = ""; + + /** + * + * + *
+       * Optional. An optional manufacturer of the device.
+       * 
+ * + * string manufacturer = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The manufacturer. + */ + public java.lang.String getManufacturer() { + java.lang.Object ref = manufacturer_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + manufacturer_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * Optional. An optional manufacturer of the device.
+       * 
+ * + * string manufacturer = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for manufacturer. + */ + public com.google.protobuf.ByteString getManufacturerBytes() { + java.lang.Object ref = manufacturer_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + manufacturer_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * Optional. An optional manufacturer of the device.
+       * 
+ * + * string manufacturer = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The manufacturer to set. + * @return This builder for chaining. + */ + public Builder setManufacturer(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + manufacturer_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. An optional manufacturer of the device.
+       * 
+ * + * string manufacturer = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearManufacturer() { + manufacturer_ = getDefaultInstance().getManufacturer(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. An optional manufacturer of the device.
+       * 
+ * + * string manufacturer = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for manufacturer to set. + * @return This builder for chaining. + */ + public Builder setManufacturerBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + manufacturer_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + + /** + * + * + *
+       * Optional. An optional name for the device.
+       * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * Optional. An optional name for the device.
+       * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * Optional. An optional name for the device.
+       * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. An optional name for the device.
+       * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. An optional name for the device.
+       * 
+ * + * string display_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.DataSource.Device) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.DataSource.Device) + private static final com.google.devicesandservices.health.v4.DataSource.Device DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.DataSource.Device(); + } + + public static com.google.devicesandservices.health.v4.DataSource.Device getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Device parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.DataSource.Device getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ApplicationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.DataSource.Application) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Output only. A unique identifier for the mobile application
+     * that was the source of the data.
+     *
+     * This is typically the application's package name on Android (e.g.,
+     * `com.google.fitbit`) or the bundle ID on iOS. This field is informational
+     * and helps trace data origin. This field is system-populated when the data
+     * is uploaded from the Fitbit mobile application, Health Connect or Health
+     * Kit.
+     * 
+ * + * string package_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The packageName. + */ + java.lang.String getPackageName(); + + /** + * + * + *
+     * Output only. A unique identifier for the mobile application
+     * that was the source of the data.
+     *
+     * This is typically the application's package name on Android (e.g.,
+     * `com.google.fitbit`) or the bundle ID on iOS. This field is informational
+     * and helps trace data origin. This field is system-populated when the data
+     * is uploaded from the Fitbit mobile application, Health Connect or Health
+     * Kit.
+     * 
+ * + * string package_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for packageName. + */ + com.google.protobuf.ByteString getPackageNameBytes(); + + /** + * + * + *
+     * Output only. The client ID of the application that recorded the data.
+     *
+     * This ID is a legacy Fitbit API client ID, which is different from a
+     * Google OAuth client ID. Example format: `ABC123`.
+     * This field is system-populated and used for tracing data from
+     * legacy Fitbit API integrations. This field is system-populated when
+     * the data is uploaded from a legacy Fitbit API integration.
+     * 
+ * + * string web_client_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The webClientId. + */ + java.lang.String getWebClientId(); + + /** + * + * + *
+     * Output only. The client ID of the application that recorded the data.
+     *
+     * This ID is a legacy Fitbit API client ID, which is different from a
+     * Google OAuth client ID. Example format: `ABC123`.
+     * This field is system-populated and used for tracing data from
+     * legacy Fitbit API integrations. This field is system-populated when
+     * the data is uploaded from a legacy Fitbit API integration.
+     * 
+ * + * string web_client_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for webClientId. + */ + com.google.protobuf.ByteString getWebClientIdBytes(); + + /** + * + * + *
+     * Output only. The Google OAuth 2.0 client ID of the web application or
+     * service that recorded the data.
+     *
+     * This is the client ID used during the Google OAuth
+     * flow to obtain user credentials. This field is system-populated when
+     * the data is uploaded from Google Web API.
+     * 
+ * + * string google_web_client_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The googleWebClientId. + */ + java.lang.String getGoogleWebClientId(); + + /** + * + * + *
+     * Output only. The Google OAuth 2.0 client ID of the web application or
+     * service that recorded the data.
+     *
+     * This is the client ID used during the Google OAuth
+     * flow to obtain user credentials. This field is system-populated when
+     * the data is uploaded from Google Web API.
+     * 
+ * + * string google_web_client_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for googleWebClientId. + */ + com.google.protobuf.ByteString getGoogleWebClientIdBytes(); + } + + /** + * + * + *
+   * Optional metadata for the application that provided this data.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.DataSource.Application} + */ + public static final class Application extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.DataSource.Application) + ApplicationOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Application"); + } + + // Use Application.newBuilder() to construct. + private Application(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Application() { + packageName_ = ""; + webClientId_ = ""; + googleWebClientId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataSourceProto + .internal_static_google_devicesandservices_health_v4_DataSource_Application_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataSourceProto + .internal_static_google_devicesandservices_health_v4_DataSource_Application_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.DataSource.Application.class, + com.google.devicesandservices.health.v4.DataSource.Application.Builder.class); + } + + public static final int PACKAGE_NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object packageName_ = ""; + + /** + * + * + *
+     * Output only. A unique identifier for the mobile application
+     * that was the source of the data.
+     *
+     * This is typically the application's package name on Android (e.g.,
+     * `com.google.fitbit`) or the bundle ID on iOS. This field is informational
+     * and helps trace data origin. This field is system-populated when the data
+     * is uploaded from the Fitbit mobile application, Health Connect or Health
+     * Kit.
+     * 
+ * + * string package_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The packageName. + */ + @java.lang.Override + public java.lang.String getPackageName() { + java.lang.Object ref = packageName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + packageName_ = s; + return s; + } + } + + /** + * + * + *
+     * Output only. A unique identifier for the mobile application
+     * that was the source of the data.
+     *
+     * This is typically the application's package name on Android (e.g.,
+     * `com.google.fitbit`) or the bundle ID on iOS. This field is informational
+     * and helps trace data origin. This field is system-populated when the data
+     * is uploaded from the Fitbit mobile application, Health Connect or Health
+     * Kit.
+     * 
+ * + * string package_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for packageName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPackageNameBytes() { + java.lang.Object ref = packageName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + packageName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int WEB_CLIENT_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object webClientId_ = ""; + + /** + * + * + *
+     * Output only. The client ID of the application that recorded the data.
+     *
+     * This ID is a legacy Fitbit API client ID, which is different from a
+     * Google OAuth client ID. Example format: `ABC123`.
+     * This field is system-populated and used for tracing data from
+     * legacy Fitbit API integrations. This field is system-populated when
+     * the data is uploaded from a legacy Fitbit API integration.
+     * 
+ * + * string web_client_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The webClientId. + */ + @java.lang.Override + public java.lang.String getWebClientId() { + java.lang.Object ref = webClientId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + webClientId_ = s; + return s; + } + } + + /** + * + * + *
+     * Output only. The client ID of the application that recorded the data.
+     *
+     * This ID is a legacy Fitbit API client ID, which is different from a
+     * Google OAuth client ID. Example format: `ABC123`.
+     * This field is system-populated and used for tracing data from
+     * legacy Fitbit API integrations. This field is system-populated when
+     * the data is uploaded from a legacy Fitbit API integration.
+     * 
+ * + * string web_client_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for webClientId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getWebClientIdBytes() { + java.lang.Object ref = webClientId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + webClientId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GOOGLE_WEB_CLIENT_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object googleWebClientId_ = ""; + + /** + * + * + *
+     * Output only. The Google OAuth 2.0 client ID of the web application or
+     * service that recorded the data.
+     *
+     * This is the client ID used during the Google OAuth
+     * flow to obtain user credentials. This field is system-populated when
+     * the data is uploaded from Google Web API.
+     * 
+ * + * string google_web_client_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The googleWebClientId. + */ + @java.lang.Override + public java.lang.String getGoogleWebClientId() { + java.lang.Object ref = googleWebClientId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + googleWebClientId_ = s; + return s; + } + } + + /** + * + * + *
+     * Output only. The Google OAuth 2.0 client ID of the web application or
+     * service that recorded the data.
+     *
+     * This is the client ID used during the Google OAuth
+     * flow to obtain user credentials. This field is system-populated when
+     * the data is uploaded from Google Web API.
+     * 
+ * + * string google_web_client_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for googleWebClientId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getGoogleWebClientIdBytes() { + java.lang.Object ref = googleWebClientId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + googleWebClientId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(packageName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, packageName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(webClientId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, webClientId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(googleWebClientId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, googleWebClientId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(packageName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, packageName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(webClientId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, webClientId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(googleWebClientId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, googleWebClientId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.DataSource.Application)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.DataSource.Application other = + (com.google.devicesandservices.health.v4.DataSource.Application) obj; + + if (!getPackageName().equals(other.getPackageName())) return false; + if (!getWebClientId().equals(other.getWebClientId())) return false; + if (!getGoogleWebClientId().equals(other.getGoogleWebClientId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PACKAGE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getPackageName().hashCode(); + hash = (37 * hash) + WEB_CLIENT_ID_FIELD_NUMBER; + hash = (53 * hash) + getWebClientId().hashCode(); + hash = (37 * hash) + GOOGLE_WEB_CLIENT_ID_FIELD_NUMBER; + hash = (53 * hash) + getGoogleWebClientId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.DataSource.Application parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.DataSource.Application parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DataSource.Application parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.DataSource.Application parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DataSource.Application parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.DataSource.Application parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DataSource.Application parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.DataSource.Application parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DataSource.Application parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.DataSource.Application parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DataSource.Application parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.DataSource.Application parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.DataSource.Application prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+     * Optional metadata for the application that provided this data.
+     * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.DataSource.Application} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.DataSource.Application) + com.google.devicesandservices.health.v4.DataSource.ApplicationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataSourceProto + .internal_static_google_devicesandservices_health_v4_DataSource_Application_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataSourceProto + .internal_static_google_devicesandservices_health_v4_DataSource_Application_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.DataSource.Application.class, + com.google.devicesandservices.health.v4.DataSource.Application.Builder.class); + } + + // Construct using com.google.devicesandservices.health.v4.DataSource.Application.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + packageName_ = ""; + webClientId_ = ""; + googleWebClientId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataSourceProto + .internal_static_google_devicesandservices_health_v4_DataSource_Application_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.DataSource.Application + getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.DataSource.Application.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.DataSource.Application build() { + com.google.devicesandservices.health.v4.DataSource.Application result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.DataSource.Application buildPartial() { + com.google.devicesandservices.health.v4.DataSource.Application result = + new com.google.devicesandservices.health.v4.DataSource.Application(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.devicesandservices.health.v4.DataSource.Application result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.packageName_ = packageName_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.webClientId_ = webClientId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.googleWebClientId_ = googleWebClientId_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.DataSource.Application) { + return mergeFrom((com.google.devicesandservices.health.v4.DataSource.Application) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.devicesandservices.health.v4.DataSource.Application other) { + if (other + == com.google.devicesandservices.health.v4.DataSource.Application.getDefaultInstance()) + return this; + if (!other.getPackageName().isEmpty()) { + packageName_ = other.packageName_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getWebClientId().isEmpty()) { + webClientId_ = other.webClientId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getGoogleWebClientId().isEmpty()) { + googleWebClientId_ = other.googleWebClientId_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + packageName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + webClientId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + googleWebClientId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object packageName_ = ""; + + /** + * + * + *
+       * Output only. A unique identifier for the mobile application
+       * that was the source of the data.
+       *
+       * This is typically the application's package name on Android (e.g.,
+       * `com.google.fitbit`) or the bundle ID on iOS. This field is informational
+       * and helps trace data origin. This field is system-populated when the data
+       * is uploaded from the Fitbit mobile application, Health Connect or Health
+       * Kit.
+       * 
+ * + * string package_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The packageName. + */ + public java.lang.String getPackageName() { + java.lang.Object ref = packageName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + packageName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * Output only. A unique identifier for the mobile application
+       * that was the source of the data.
+       *
+       * This is typically the application's package name on Android (e.g.,
+       * `com.google.fitbit`) or the bundle ID on iOS. This field is informational
+       * and helps trace data origin. This field is system-populated when the data
+       * is uploaded from the Fitbit mobile application, Health Connect or Health
+       * Kit.
+       * 
+ * + * string package_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for packageName. + */ + public com.google.protobuf.ByteString getPackageNameBytes() { + java.lang.Object ref = packageName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + packageName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * Output only. A unique identifier for the mobile application
+       * that was the source of the data.
+       *
+       * This is typically the application's package name on Android (e.g.,
+       * `com.google.fitbit`) or the bundle ID on iOS. This field is informational
+       * and helps trace data origin. This field is system-populated when the data
+       * is uploaded from the Fitbit mobile application, Health Connect or Health
+       * Kit.
+       * 
+ * + * string package_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The packageName to set. + * @return This builder for chaining. + */ + public Builder setPackageName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + packageName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. A unique identifier for the mobile application
+       * that was the source of the data.
+       *
+       * This is typically the application's package name on Android (e.g.,
+       * `com.google.fitbit`) or the bundle ID on iOS. This field is informational
+       * and helps trace data origin. This field is system-populated when the data
+       * is uploaded from the Fitbit mobile application, Health Connect or Health
+       * Kit.
+       * 
+ * + * string package_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearPackageName() { + packageName_ = getDefaultInstance().getPackageName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. A unique identifier for the mobile application
+       * that was the source of the data.
+       *
+       * This is typically the application's package name on Android (e.g.,
+       * `com.google.fitbit`) or the bundle ID on iOS. This field is informational
+       * and helps trace data origin. This field is system-populated when the data
+       * is uploaded from the Fitbit mobile application, Health Connect or Health
+       * Kit.
+       * 
+ * + * string package_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for packageName to set. + * @return This builder for chaining. + */ + public Builder setPackageNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + packageName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object webClientId_ = ""; + + /** + * + * + *
+       * Output only. The client ID of the application that recorded the data.
+       *
+       * This ID is a legacy Fitbit API client ID, which is different from a
+       * Google OAuth client ID. Example format: `ABC123`.
+       * This field is system-populated and used for tracing data from
+       * legacy Fitbit API integrations. This field is system-populated when
+       * the data is uploaded from a legacy Fitbit API integration.
+       * 
+ * + * string web_client_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The webClientId. + */ + public java.lang.String getWebClientId() { + java.lang.Object ref = webClientId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + webClientId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * Output only. The client ID of the application that recorded the data.
+       *
+       * This ID is a legacy Fitbit API client ID, which is different from a
+       * Google OAuth client ID. Example format: `ABC123`.
+       * This field is system-populated and used for tracing data from
+       * legacy Fitbit API integrations. This field is system-populated when
+       * the data is uploaded from a legacy Fitbit API integration.
+       * 
+ * + * string web_client_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for webClientId. + */ + public com.google.protobuf.ByteString getWebClientIdBytes() { + java.lang.Object ref = webClientId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + webClientId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * Output only. The client ID of the application that recorded the data.
+       *
+       * This ID is a legacy Fitbit API client ID, which is different from a
+       * Google OAuth client ID. Example format: `ABC123`.
+       * This field is system-populated and used for tracing data from
+       * legacy Fitbit API integrations. This field is system-populated when
+       * the data is uploaded from a legacy Fitbit API integration.
+       * 
+ * + * string web_client_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The webClientId to set. + * @return This builder for chaining. + */ + public Builder setWebClientId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + webClientId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. The client ID of the application that recorded the data.
+       *
+       * This ID is a legacy Fitbit API client ID, which is different from a
+       * Google OAuth client ID. Example format: `ABC123`.
+       * This field is system-populated and used for tracing data from
+       * legacy Fitbit API integrations. This field is system-populated when
+       * the data is uploaded from a legacy Fitbit API integration.
+       * 
+ * + * string web_client_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearWebClientId() { + webClientId_ = getDefaultInstance().getWebClientId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. The client ID of the application that recorded the data.
+       *
+       * This ID is a legacy Fitbit API client ID, which is different from a
+       * Google OAuth client ID. Example format: `ABC123`.
+       * This field is system-populated and used for tracing data from
+       * legacy Fitbit API integrations. This field is system-populated when
+       * the data is uploaded from a legacy Fitbit API integration.
+       * 
+ * + * string web_client_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for webClientId to set. + * @return This builder for chaining. + */ + public Builder setWebClientIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + webClientId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object googleWebClientId_ = ""; + + /** + * + * + *
+       * Output only. The Google OAuth 2.0 client ID of the web application or
+       * service that recorded the data.
+       *
+       * This is the client ID used during the Google OAuth
+       * flow to obtain user credentials. This field is system-populated when
+       * the data is uploaded from Google Web API.
+       * 
+ * + * string google_web_client_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The googleWebClientId. + */ + public java.lang.String getGoogleWebClientId() { + java.lang.Object ref = googleWebClientId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + googleWebClientId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * Output only. The Google OAuth 2.0 client ID of the web application or
+       * service that recorded the data.
+       *
+       * This is the client ID used during the Google OAuth
+       * flow to obtain user credentials. This field is system-populated when
+       * the data is uploaded from Google Web API.
+       * 
+ * + * string google_web_client_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for googleWebClientId. + */ + public com.google.protobuf.ByteString getGoogleWebClientIdBytes() { + java.lang.Object ref = googleWebClientId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + googleWebClientId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * Output only. The Google OAuth 2.0 client ID of the web application or
+       * service that recorded the data.
+       *
+       * This is the client ID used during the Google OAuth
+       * flow to obtain user credentials. This field is system-populated when
+       * the data is uploaded from Google Web API.
+       * 
+ * + * string google_web_client_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The googleWebClientId to set. + * @return This builder for chaining. + */ + public Builder setGoogleWebClientId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + googleWebClientId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. The Google OAuth 2.0 client ID of the web application or
+       * service that recorded the data.
+       *
+       * This is the client ID used during the Google OAuth
+       * flow to obtain user credentials. This field is system-populated when
+       * the data is uploaded from Google Web API.
+       * 
+ * + * string google_web_client_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearGoogleWebClientId() { + googleWebClientId_ = getDefaultInstance().getGoogleWebClientId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. The Google OAuth 2.0 client ID of the web application or
+       * service that recorded the data.
+       *
+       * This is the client ID used during the Google OAuth
+       * flow to obtain user credentials. This field is system-populated when
+       * the data is uploaded from Google Web API.
+       * 
+ * + * string google_web_client_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for googleWebClientId to set. + * @return This builder for chaining. + */ + public Builder setGoogleWebClientIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + googleWebClientId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.DataSource.Application) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.DataSource.Application) + private static final com.google.devicesandservices.health.v4.DataSource.Application + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.DataSource.Application(); + } + + public static com.google.devicesandservices.health.v4.DataSource.Application + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Application parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.DataSource.Application + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int RECORDING_METHOD_FIELD_NUMBER = 1; + private int recordingMethod_ = 0; + + /** + * + * + *
+   * Optional. Captures how the data was recorded.
+   * 
+ * + * + * .google.devicesandservices.health.v4.DataSource.RecordingMethod recording_method = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for recordingMethod. + */ + @java.lang.Override + public int getRecordingMethodValue() { + return recordingMethod_; + } + + /** + * + * + *
+   * Optional. Captures how the data was recorded.
+   * 
+ * + * + * .google.devicesandservices.health.v4.DataSource.RecordingMethod recording_method = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The recordingMethod. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DataSource.RecordingMethod getRecordingMethod() { + com.google.devicesandservices.health.v4.DataSource.RecordingMethod result = + com.google.devicesandservices.health.v4.DataSource.RecordingMethod.forNumber( + recordingMethod_); + return result == null + ? com.google.devicesandservices.health.v4.DataSource.RecordingMethod.UNRECOGNIZED + : result; + } + + public static final int DEVICE_FIELD_NUMBER = 2; + private com.google.devicesandservices.health.v4.DataSource.Device device_; + + /** + * + * + *
+   * 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]; + * + * + * @return Whether the device field is set. + */ + @java.lang.Override + public boolean hasDevice() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * 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]; + * + * + * @return The device. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DataSource.Device getDevice() { + return device_ == null + ? com.google.devicesandservices.health.v4.DataSource.Device.getDefaultInstance() + : device_; + } + + /** + * + * + *
+   * 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]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DataSource.DeviceOrBuilder getDeviceOrBuilder() { + return device_ == null + ? com.google.devicesandservices.health.v4.DataSource.Device.getDefaultInstance() + : device_; + } + + public static final int APPLICATION_FIELD_NUMBER = 3; + private com.google.devicesandservices.health.v4.DataSource.Application application_; + + /** + * + * + *
+   * 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]; + * + * + * @return Whether the application field is set. + */ + @java.lang.Override + public boolean hasApplication() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * 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]; + * + * + * @return The application. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DataSource.Application getApplication() { + return application_ == null + ? com.google.devicesandservices.health.v4.DataSource.Application.getDefaultInstance() + : application_; + } + + /** + * + * + *
+   * 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]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DataSource.ApplicationOrBuilder + getApplicationOrBuilder() { + return application_ == null + ? com.google.devicesandservices.health.v4.DataSource.Application.getDefaultInstance() + : application_; + } + + public static final int PLATFORM_FIELD_NUMBER = 4; + private int platform_ = 0; + + /** + * + * + *
+   * Output only. Captures the platform that uploaded the data.
+   * 
+ * + * + * .google.devicesandservices.health.v4.DataSource.Platform platform = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for platform. + */ + @java.lang.Override + public int getPlatformValue() { + return platform_; + } + + /** + * + * + *
+   * Output only. Captures the platform that uploaded the data.
+   * 
+ * + * + * .google.devicesandservices.health.v4.DataSource.Platform platform = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The platform. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DataSource.Platform getPlatform() { + com.google.devicesandservices.health.v4.DataSource.Platform result = + com.google.devicesandservices.health.v4.DataSource.Platform.forNumber(platform_); + return result == null + ? com.google.devicesandservices.health.v4.DataSource.Platform.UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (recordingMethod_ + != com.google.devicesandservices.health.v4.DataSource.RecordingMethod + .RECORDING_METHOD_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, recordingMethod_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getDevice()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getApplication()); + } + if (platform_ + != com.google.devicesandservices.health.v4.DataSource.Platform.PLATFORM_UNSPECIFIED + .getNumber()) { + output.writeEnum(4, platform_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (recordingMethod_ + != com.google.devicesandservices.health.v4.DataSource.RecordingMethod + .RECORDING_METHOD_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, recordingMethod_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDevice()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getApplication()); + } + if (platform_ + != com.google.devicesandservices.health.v4.DataSource.Platform.PLATFORM_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, platform_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.DataSource)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.DataSource other = + (com.google.devicesandservices.health.v4.DataSource) obj; + + if (recordingMethod_ != other.recordingMethod_) return false; + if (hasDevice() != other.hasDevice()) return false; + if (hasDevice()) { + if (!getDevice().equals(other.getDevice())) return false; + } + if (hasApplication() != other.hasApplication()) return false; + if (hasApplication()) { + if (!getApplication().equals(other.getApplication())) return false; + } + if (platform_ != other.platform_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + RECORDING_METHOD_FIELD_NUMBER; + hash = (53 * hash) + recordingMethod_; + if (hasDevice()) { + hash = (37 * hash) + DEVICE_FIELD_NUMBER; + hash = (53 * hash) + getDevice().hashCode(); + } + if (hasApplication()) { + hash = (37 * hash) + APPLICATION_FIELD_NUMBER; + hash = (53 * hash) + getApplication().hashCode(); + } + hash = (37 * hash) + PLATFORM_FIELD_NUMBER; + hash = (53 * hash) + platform_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.DataSource parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.DataSource parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DataSource parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.DataSource parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DataSource parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.DataSource parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DataSource parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.DataSource parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DataSource parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.DataSource parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DataSource parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.DataSource parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.devicesandservices.health.v4.DataSource prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * 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 {@code google.devicesandservices.health.v4.DataSource} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.DataSource) + com.google.devicesandservices.health.v4.DataSourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataSourceProto + .internal_static_google_devicesandservices_health_v4_DataSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataSourceProto + .internal_static_google_devicesandservices_health_v4_DataSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.DataSource.class, + com.google.devicesandservices.health.v4.DataSource.Builder.class); + } + + // Construct using com.google.devicesandservices.health.v4.DataSource.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetDeviceFieldBuilder(); + internalGetApplicationFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + recordingMethod_ = 0; + device_ = null; + if (deviceBuilder_ != null) { + deviceBuilder_.dispose(); + deviceBuilder_ = null; + } + application_ = null; + if (applicationBuilder_ != null) { + applicationBuilder_.dispose(); + applicationBuilder_ = null; + } + platform_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataSourceProto + .internal_static_google_devicesandservices_health_v4_DataSource_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.DataSource getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.DataSource.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.DataSource build() { + com.google.devicesandservices.health.v4.DataSource result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.DataSource buildPartial() { + com.google.devicesandservices.health.v4.DataSource result = + new com.google.devicesandservices.health.v4.DataSource(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.devicesandservices.health.v4.DataSource result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.recordingMethod_ = recordingMethod_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.device_ = deviceBuilder_ == null ? device_ : deviceBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.application_ = + applicationBuilder_ == null ? application_ : applicationBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.platform_ = platform_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.DataSource) { + return mergeFrom((com.google.devicesandservices.health.v4.DataSource) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.devicesandservices.health.v4.DataSource other) { + if (other == com.google.devicesandservices.health.v4.DataSource.getDefaultInstance()) + return this; + if (other.recordingMethod_ != 0) { + setRecordingMethodValue(other.getRecordingMethodValue()); + } + if (other.hasDevice()) { + mergeDevice(other.getDevice()); + } + if (other.hasApplication()) { + mergeApplication(other.getApplication()); + } + if (other.platform_ != 0) { + setPlatformValue(other.getPlatformValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + recordingMethod_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + input.readMessage(internalGetDeviceFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetApplicationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + platform_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int recordingMethod_ = 0; + + /** + * + * + *
+     * Optional. Captures how the data was recorded.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DataSource.RecordingMethod recording_method = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for recordingMethod. + */ + @java.lang.Override + public int getRecordingMethodValue() { + return recordingMethod_; + } + + /** + * + * + *
+     * Optional. Captures how the data was recorded.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DataSource.RecordingMethod recording_method = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for recordingMethod to set. + * @return This builder for chaining. + */ + public Builder setRecordingMethodValue(int value) { + recordingMethod_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Captures how the data was recorded.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DataSource.RecordingMethod recording_method = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The recordingMethod. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DataSource.RecordingMethod getRecordingMethod() { + com.google.devicesandservices.health.v4.DataSource.RecordingMethod result = + com.google.devicesandservices.health.v4.DataSource.RecordingMethod.forNumber( + recordingMethod_); + return result == null + ? com.google.devicesandservices.health.v4.DataSource.RecordingMethod.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Optional. Captures how the data was recorded.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DataSource.RecordingMethod recording_method = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The recordingMethod to set. + * @return This builder for chaining. + */ + public Builder setRecordingMethod( + com.google.devicesandservices.health.v4.DataSource.RecordingMethod value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + recordingMethod_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Captures how the data was recorded.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DataSource.RecordingMethod recording_method = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearRecordingMethod() { + bitField0_ = (bitField0_ & ~0x00000001); + recordingMethod_ = 0; + onChanged(); + return this; + } + + private com.google.devicesandservices.health.v4.DataSource.Device device_; + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.DataSource.Device, + com.google.devicesandservices.health.v4.DataSource.Device.Builder, + com.google.devicesandservices.health.v4.DataSource.DeviceOrBuilder> + deviceBuilder_; + + /** + * + * + *
+     * 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]; + * + * + * @return Whether the device field is set. + */ + public boolean hasDevice() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * 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]; + * + * + * @return The device. + */ + public com.google.devicesandservices.health.v4.DataSource.Device getDevice() { + if (deviceBuilder_ == null) { + return device_ == null + ? com.google.devicesandservices.health.v4.DataSource.Device.getDefaultInstance() + : device_; + } else { + return deviceBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * 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]; + * + */ + public Builder setDevice(com.google.devicesandservices.health.v4.DataSource.Device value) { + if (deviceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + device_ = value; + } else { + deviceBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * 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]; + * + */ + public Builder setDevice( + com.google.devicesandservices.health.v4.DataSource.Device.Builder builderForValue) { + if (deviceBuilder_ == null) { + device_ = builderForValue.build(); + } else { + deviceBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * 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]; + * + */ + public Builder mergeDevice(com.google.devicesandservices.health.v4.DataSource.Device value) { + if (deviceBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && device_ != null + && device_ + != com.google.devicesandservices.health.v4.DataSource.Device.getDefaultInstance()) { + getDeviceBuilder().mergeFrom(value); + } else { + device_ = value; + } + } else { + deviceBuilder_.mergeFrom(value); + } + if (device_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * 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]; + * + */ + public Builder clearDevice() { + bitField0_ = (bitField0_ & ~0x00000002); + device_ = null; + if (deviceBuilder_ != null) { + deviceBuilder_.dispose(); + deviceBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * 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]; + * + */ + public com.google.devicesandservices.health.v4.DataSource.Device.Builder getDeviceBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetDeviceFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * 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]; + * + */ + public com.google.devicesandservices.health.v4.DataSource.DeviceOrBuilder getDeviceOrBuilder() { + if (deviceBuilder_ != null) { + return deviceBuilder_.getMessageOrBuilder(); + } else { + return device_ == null + ? com.google.devicesandservices.health.v4.DataSource.Device.getDefaultInstance() + : device_; + } + } + + /** + * + * + *
+     * 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]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.DataSource.Device, + com.google.devicesandservices.health.v4.DataSource.Device.Builder, + com.google.devicesandservices.health.v4.DataSource.DeviceOrBuilder> + internalGetDeviceFieldBuilder() { + if (deviceBuilder_ == null) { + deviceBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.DataSource.Device, + com.google.devicesandservices.health.v4.DataSource.Device.Builder, + com.google.devicesandservices.health.v4.DataSource.DeviceOrBuilder>( + getDevice(), getParentForChildren(), isClean()); + device_ = null; + } + return deviceBuilder_; + } + + private com.google.devicesandservices.health.v4.DataSource.Application application_; + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.DataSource.Application, + com.google.devicesandservices.health.v4.DataSource.Application.Builder, + com.google.devicesandservices.health.v4.DataSource.ApplicationOrBuilder> + applicationBuilder_; + + /** + * + * + *
+     * 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]; + * + * + * @return Whether the application field is set. + */ + public boolean hasApplication() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * 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]; + * + * + * @return The application. + */ + public com.google.devicesandservices.health.v4.DataSource.Application getApplication() { + if (applicationBuilder_ == null) { + return application_ == null + ? com.google.devicesandservices.health.v4.DataSource.Application.getDefaultInstance() + : application_; + } else { + return applicationBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * 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]; + * + */ + public Builder setApplication( + com.google.devicesandservices.health.v4.DataSource.Application value) { + if (applicationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + application_ = value; + } else { + applicationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * 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]; + * + */ + public Builder setApplication( + com.google.devicesandservices.health.v4.DataSource.Application.Builder builderForValue) { + if (applicationBuilder_ == null) { + application_ = builderForValue.build(); + } else { + applicationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * 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]; + * + */ + public Builder mergeApplication( + com.google.devicesandservices.health.v4.DataSource.Application value) { + if (applicationBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && application_ != null + && application_ + != com.google.devicesandservices.health.v4.DataSource.Application + .getDefaultInstance()) { + getApplicationBuilder().mergeFrom(value); + } else { + application_ = value; + } + } else { + applicationBuilder_.mergeFrom(value); + } + if (application_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * 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]; + * + */ + public Builder clearApplication() { + bitField0_ = (bitField0_ & ~0x00000004); + application_ = null; + if (applicationBuilder_ != null) { + applicationBuilder_.dispose(); + applicationBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * 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]; + * + */ + public com.google.devicesandservices.health.v4.DataSource.Application.Builder + getApplicationBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetApplicationFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * 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]; + * + */ + public com.google.devicesandservices.health.v4.DataSource.ApplicationOrBuilder + getApplicationOrBuilder() { + if (applicationBuilder_ != null) { + return applicationBuilder_.getMessageOrBuilder(); + } else { + return application_ == null + ? com.google.devicesandservices.health.v4.DataSource.Application.getDefaultInstance() + : application_; + } + } + + /** + * + * + *
+     * 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]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.DataSource.Application, + com.google.devicesandservices.health.v4.DataSource.Application.Builder, + com.google.devicesandservices.health.v4.DataSource.ApplicationOrBuilder> + internalGetApplicationFieldBuilder() { + if (applicationBuilder_ == null) { + applicationBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.DataSource.Application, + com.google.devicesandservices.health.v4.DataSource.Application.Builder, + com.google.devicesandservices.health.v4.DataSource.ApplicationOrBuilder>( + getApplication(), getParentForChildren(), isClean()); + application_ = null; + } + return applicationBuilder_; + } + + private int platform_ = 0; + + /** + * + * + *
+     * Output only. Captures the platform that uploaded the data.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DataSource.Platform platform = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for platform. + */ + @java.lang.Override + public int getPlatformValue() { + return platform_; + } + + /** + * + * + *
+     * Output only. Captures the platform that uploaded the data.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DataSource.Platform platform = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for platform to set. + * @return This builder for chaining. + */ + public Builder setPlatformValue(int value) { + platform_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Captures the platform that uploaded the data.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DataSource.Platform platform = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The platform. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DataSource.Platform getPlatform() { + com.google.devicesandservices.health.v4.DataSource.Platform result = + com.google.devicesandservices.health.v4.DataSource.Platform.forNumber(platform_); + return result == null + ? com.google.devicesandservices.health.v4.DataSource.Platform.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Output only. Captures the platform that uploaded the data.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DataSource.Platform platform = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The platform to set. + * @return This builder for chaining. + */ + public Builder setPlatform(com.google.devicesandservices.health.v4.DataSource.Platform value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + platform_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Captures the platform that uploaded the data.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DataSource.Platform platform = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearPlatform() { + bitField0_ = (bitField0_ & ~0x00000008); + platform_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.DataSource) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.DataSource) + private static final com.google.devicesandservices.health.v4.DataSource DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.DataSource(); + } + + public static com.google.devicesandservices.health.v4.DataSource getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DataSource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.DataSource getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DataSourceOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DataSourceOrBuilder.java new file mode 100644 index 000000000000..73eed9898095 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DataSourceOrBuilder.java @@ -0,0 +1,180 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_source.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface DataSourceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.DataSource) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Captures how the data was recorded.
+   * 
+ * + * + * .google.devicesandservices.health.v4.DataSource.RecordingMethod recording_method = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for recordingMethod. + */ + int getRecordingMethodValue(); + + /** + * + * + *
+   * Optional. Captures how the data was recorded.
+   * 
+ * + * + * .google.devicesandservices.health.v4.DataSource.RecordingMethod recording_method = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The recordingMethod. + */ + com.google.devicesandservices.health.v4.DataSource.RecordingMethod getRecordingMethod(); + + /** + * + * + *
+   * 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]; + * + * + * @return Whether the device field is set. + */ + 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]; + * + * + * @return The device. + */ + com.google.devicesandservices.health.v4.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]; + * + */ + com.google.devicesandservices.health.v4.DataSource.DeviceOrBuilder getDeviceOrBuilder(); + + /** + * + * + *
+   * 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]; + * + * + * @return Whether the application field is set. + */ + 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]; + * + * + * @return The application. + */ + com.google.devicesandservices.health.v4.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]; + * + */ + com.google.devicesandservices.health.v4.DataSource.ApplicationOrBuilder getApplicationOrBuilder(); + + /** + * + * + *
+   * Output only. Captures the platform that uploaded the data.
+   * 
+ * + * + * .google.devicesandservices.health.v4.DataSource.Platform platform = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for platform. + */ + 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]; + * + * + * @return The platform. + */ + com.google.devicesandservices.health.v4.DataSource.Platform getPlatform(); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DataSourceProto.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DataSourceProto.java new file mode 100644 index 000000000000..d53b409fa34d --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DataSourceProto.java @@ -0,0 +1,159 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_source.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public final class DataSourceProto extends com.google.protobuf.GeneratedFile { + private DataSourceProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DataSourceProto"); + } + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_DataSource_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_DataSource_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_DataSource_Device_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_DataSource_Device_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_DataSource_Application_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_DataSource_Application_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n" + + "5google/devicesandservices/health/v4/data_source.proto\022#google.devicesandservic" + + "es.health.v4\032\037google/api/field_behavior.proto\"\320\010\n\n" + + "DataSource\022^\n" + + "\020recording_method\030\001" + + " \001(\0162?.google.devicesandservices.health.v4.DataSource.RecordingMethodB\003\340A\001\022K\n" + + "\006device\030\002" + + " \001(\01326.google.devicesandservices.health.v4.DataSource.DeviceB\003\340A\001\022U\n" + + "\013application\030\003 \001(\0132;.google.devicesandservic" + + "es.health.v4.DataSource.ApplicationB\003\340A\003\022O\n" + + "\010platform\030\004 \001(\01628.google.devicesandse" + + "rvices.health.v4.DataSource.PlatformB\003\340A\003\032\306\002\n" + + "\006Device\022[\n" + + "\013form_factor\030\001 \001(\0162A.goog" + + "le.devicesandservices.health.v4.DataSource.Device.FormFactorB\003\340A\001\022\031\n" + + "\014manufacturer\030\002 \001(\tB\003\340A\001\022\031\n" + + "\014display_name\030\003 \001(\tB\003\340A\001\"\250\001\n\n" + + "FormFactor\022\033\n" + + "\027FORM_FACTOR_UNSPECIFIED\020\000\022\020\n" + + "\014FITNESS_BAND\020\001\022\t\n" + + "\005WATCH\020\002\022\t\n" + + "\005PHONE\020\003\022\010\n" + + "\004RING\020\004\022\017\n" + + "\013CHEST_STRAP\020\005\022\t\n" + + "\005SCALE\020\006\022\n\n" + + "\006TABLET\020\007\022\020\n" + + "\014HEAD_MOUNTED\020\010\022\021\n\r" + + "SMART_DISPLAY\020\t\032g\n" + + "\013Application\022\031\n" + + "\014package_name\030\001 \001(\tB\003\340A\003\022\032\n\r" + + "web_client_id\030\002 \001(\tB\003\340A\003\022!\n" + + "\024google_web_client_id\030\003 \001(\tB\003\340A\003\"\210\001\n" + + "\017RecordingMethod\022 \n" + + "\034RECORDING_METHOD_UNSPECIFIED\020\000\022\n\n" + + "\006MANUAL\020\001\022\026\n" + + "\022PASSIVELY_MEASURED\020\002\022\013\n" + + "\007DERIVED\020\003\022\025\n" + + "\021ACTIVELY_MEASURED\020\004\022\013\n" + + "\007UNKNOWN\020\005\"\257\001\n" + + "\010Platform\022\030\n" + + "\024PLATFORM_UNSPECIFIED\020\000\022\n\n" + + "\006FITBIT\020\001\022\022\n" + + "\016HEALTH_CONNECT\020\002\022\016\n\n" + + "HEALTH_KIT\020\003\022\007\n" + + "\003FIT\020\004\022\022\n" + + "\016FITBIT_WEB_API\020\005\022\010\n" + + "\004NEST\020\006\022\022\n" + + "\016GOOGLE_WEB_API\020\007\022\036\n" + + "\032GOOGLE_PARTNER_INTEGRATION\020\010B\205\002\n" + + "\'com.google.devicesandservices.health.v4B\017Da" + + "taSourceProtoP\001ZRgoogle.golang.org/genproto/googleapis/devicesandservices/health" + + "/apiv4main;healthpb\252\002#Google.DevicesAndS" + + "ervices.Health.V4\312\002#Google\\DevicesAndSer" + + "vices\\Health\\V4\352\002&Google::DevicesAndServices::Health::V4b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + }); + internal_static_google_devicesandservices_health_v4_DataSource_descriptor = + getDescriptor().getMessageType(0); + internal_static_google_devicesandservices_health_v4_DataSource_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_DataSource_descriptor, + new java.lang.String[] { + "RecordingMethod", "Device", "Application", "Platform", + }); + internal_static_google_devicesandservices_health_v4_DataSource_Device_descriptor = + internal_static_google_devicesandservices_health_v4_DataSource_descriptor.getNestedType(0); + internal_static_google_devicesandservices_health_v4_DataSource_Device_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_DataSource_Device_descriptor, + new java.lang.String[] { + "FormFactor", "Manufacturer", "DisplayName", + }); + internal_static_google_devicesandservices_health_v4_DataSource_Application_descriptor = + internal_static_google_devicesandservices_health_v4_DataSource_descriptor.getNestedType(1); + internal_static_google_devicesandservices_health_v4_DataSource_Application_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_DataSource_Application_descriptor, + new java.lang.String[] { + "PackageName", "WebClientId", "GoogleWebClientId", + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DataType.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DataType.java new file mode 100644 index 000000000000..76ff75dca1ec --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DataType.java @@ -0,0 +1,646 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_points.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * Represents a type of health data a user can have data points recorded for.
+ * It matches the parent resource of collection containing data points of the
+ * given type.
+ *
+ * Clients currently do not need to interact with this resource directly.
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.DataType} + */ +@com.google.protobuf.Generated +public final class DataType extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.DataType) + DataTypeOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DataType"); + } + + // Use DataType.newBuilder() to construct. + private DataType(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DataType() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_DataType_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_DataType_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.DataType.class, + com.google.devicesandservices.health.v4.DataType.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Identifier. The resource name of the data type.
+   *
+   * Format: `users/{user}/dataTypes/{data_type}`
+   *
+   * See
+   * [DataPoint.name][google.devicesandservices.health.v4.DataPoint.name]
+   * for examples and possible values.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Identifier. The resource name of the data type.
+   *
+   * Format: `users/{user}/dataTypes/{data_type}`
+   *
+   * See
+   * [DataPoint.name][google.devicesandservices.health.v4.DataPoint.name]
+   * for examples and possible values.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.DataType)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.DataType other = + (com.google.devicesandservices.health.v4.DataType) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.DataType parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.DataType parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DataType parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.DataType parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DataType parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.DataType parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DataType parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.DataType parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DataType parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.DataType parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DataType parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.DataType parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.devicesandservices.health.v4.DataType prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Represents a type of health data a user can have data points recorded for.
+   * It matches the parent resource of collection containing data points of the
+   * given type.
+   *
+   * Clients currently do not need to interact with this resource directly.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.DataType} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.DataType) + com.google.devicesandservices.health.v4.DataTypeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_DataType_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_DataType_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.DataType.class, + com.google.devicesandservices.health.v4.DataType.Builder.class); + } + + // Construct using com.google.devicesandservices.health.v4.DataType.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_DataType_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.DataType getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.DataType.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.DataType build() { + com.google.devicesandservices.health.v4.DataType result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.DataType buildPartial() { + com.google.devicesandservices.health.v4.DataType result = + new com.google.devicesandservices.health.v4.DataType(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.devicesandservices.health.v4.DataType result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.DataType) { + return mergeFrom((com.google.devicesandservices.health.v4.DataType) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.devicesandservices.health.v4.DataType other) { + if (other == com.google.devicesandservices.health.v4.DataType.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Identifier. The resource name of the data type.
+     *
+     * Format: `users/{user}/dataTypes/{data_type}`
+     *
+     * See
+     * [DataPoint.name][google.devicesandservices.health.v4.DataPoint.name]
+     * for examples and possible values.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Identifier. The resource name of the data type.
+     *
+     * Format: `users/{user}/dataTypes/{data_type}`
+     *
+     * See
+     * [DataPoint.name][google.devicesandservices.health.v4.DataPoint.name]
+     * for examples and possible values.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Identifier. The resource name of the data type.
+     *
+     * Format: `users/{user}/dataTypes/{data_type}`
+     *
+     * See
+     * [DataPoint.name][google.devicesandservices.health.v4.DataPoint.name]
+     * for examples and possible values.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. The resource name of the data type.
+     *
+     * Format: `users/{user}/dataTypes/{data_type}`
+     *
+     * See
+     * [DataPoint.name][google.devicesandservices.health.v4.DataPoint.name]
+     * for examples and possible values.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. The resource name of the data type.
+     *
+     * Format: `users/{user}/dataTypes/{data_type}`
+     *
+     * See
+     * [DataPoint.name][google.devicesandservices.health.v4.DataPoint.name]
+     * for examples and possible values.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.DataType) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.DataType) + private static final com.google.devicesandservices.health.v4.DataType DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.DataType(); + } + + public static com.google.devicesandservices.health.v4.DataType getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DataType parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.DataType getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DataTypeName.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DataTypeName.java new file mode 100644 index 000000000000..5e697042d91a --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DataTypeName.java @@ -0,0 +1,191 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class DataTypeName implements ResourceName { + private static final PathTemplate USER_DATA_TYPE = + PathTemplate.createWithoutUrlEncoding("users/{user}/dataTypes/{data_type}"); + private volatile Map fieldValuesMap; + private final String user; + private final String dataType; + + @Deprecated + protected DataTypeName() { + user = null; + dataType = null; + } + + private DataTypeName(Builder builder) { + user = Preconditions.checkNotNull(builder.getUser()); + dataType = Preconditions.checkNotNull(builder.getDataType()); + } + + public String getUser() { + return user; + } + + public String getDataType() { + return dataType; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static DataTypeName of(String user, String dataType) { + return newBuilder().setUser(user).setDataType(dataType).build(); + } + + public static String format(String user, String dataType) { + return newBuilder().setUser(user).setDataType(dataType).build().toString(); + } + + public static DataTypeName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + USER_DATA_TYPE.validatedMatch( + formattedString, "DataTypeName.parse: formattedString not in valid format"); + return of(matchMap.get("user"), matchMap.get("data_type")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (DataTypeName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return USER_DATA_TYPE.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (user != null) { + fieldMapBuilder.put("user", user); + } + if (dataType != null) { + fieldMapBuilder.put("data_type", dataType); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return USER_DATA_TYPE.instantiate("user", user, "data_type", dataType); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + DataTypeName that = ((DataTypeName) o); + return Objects.equals(this.user, that.user) && Objects.equals(this.dataType, that.dataType); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(user); + h *= 1000003; + h ^= Objects.hashCode(dataType); + return h; + } + + /** Builder for users/{user}/dataTypes/{data_type}. */ + public static class Builder { + private String user; + private String dataType; + + protected Builder() {} + + public String getUser() { + return user; + } + + public String getDataType() { + return dataType; + } + + public Builder setUser(String user) { + this.user = user; + return this; + } + + public Builder setDataType(String dataType) { + this.dataType = dataType; + return this; + } + + private Builder(DataTypeName dataTypeName) { + this.user = dataTypeName.user; + this.dataType = dataTypeName.dataType; + } + + public DataTypeName build() { + return new DataTypeName(this); + } + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DataTypeOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DataTypeOrBuilder.java new file mode 100644 index 000000000000..66bdd2f20129 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DataTypeOrBuilder.java @@ -0,0 +1,66 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_points.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface DataTypeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.DataType) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Identifier. The resource name of the data type.
+   *
+   * Format: `users/{user}/dataTypes/{data_type}`
+   *
+   * See
+   * [DataPoint.name][google.devicesandservices.health.v4.DataPoint.name]
+   * for examples and possible values.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Identifier. The resource name of the data type.
+   *
+   * Format: `users/{user}/dataTypes/{data_type}`
+   *
+   * See
+   * [DataPoint.name][google.devicesandservices.health.v4.DataPoint.name]
+   * for examples and possible values.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/Distance.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/Distance.java new file mode 100644 index 000000000000..5f61be1ec26f --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/Distance.java @@ -0,0 +1,827 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * Distance traveled over an interval of time.
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.Distance} + */ +@com.google.protobuf.Generated +public final class Distance extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.Distance) + DistanceOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Distance"); + } + + // Use Distance.newBuilder() to construct. + private Distance(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Distance() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_Distance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_Distance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.Distance.class, + com.google.devicesandservices.health.v4.Distance.Builder.class); + } + + private int bitField0_; + public static final int INTERVAL_FIELD_NUMBER = 2; + private com.google.devicesandservices.health.v4.ObservationTimeInterval interval_; + + /** + * + * + *
+   * Required. Observed interval.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the interval field is set. + */ + @java.lang.Override + public boolean hasInterval() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. Observed interval.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The interval. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ObservationTimeInterval getInterval() { + return interval_ == null + ? com.google.devicesandservices.health.v4.ObservationTimeInterval.getDefaultInstance() + : interval_; + } + + /** + * + * + *
+   * Required. Observed interval.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ObservationTimeIntervalOrBuilder + getIntervalOrBuilder() { + return interval_ == null + ? com.google.devicesandservices.health.v4.ObservationTimeInterval.getDefaultInstance() + : interval_; + } + + public static final int MILLIMETERS_FIELD_NUMBER = 3; + private long millimeters_ = 0L; + + /** + * + * + *
+   * Required. Distance in millimeters over the observed interval.
+   * 
+ * + * int64 millimeters = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The millimeters. + */ + @java.lang.Override + public long getMillimeters() { + return millimeters_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getInterval()); + } + if (millimeters_ != 0L) { + output.writeInt64(3, millimeters_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getInterval()); + } + if (millimeters_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, millimeters_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.Distance)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.Distance other = + (com.google.devicesandservices.health.v4.Distance) obj; + + if (hasInterval() != other.hasInterval()) return false; + if (hasInterval()) { + if (!getInterval().equals(other.getInterval())) return false; + } + if (getMillimeters() != other.getMillimeters()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasInterval()) { + hash = (37 * hash) + INTERVAL_FIELD_NUMBER; + hash = (53 * hash) + getInterval().hashCode(); + } + hash = (37 * hash) + MILLIMETERS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getMillimeters()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.Distance parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.Distance parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Distance parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.Distance parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Distance parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.Distance parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Distance parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.Distance parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Distance parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.Distance parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Distance parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.Distance parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.devicesandservices.health.v4.Distance prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Distance traveled over an interval of time.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.Distance} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.Distance) + com.google.devicesandservices.health.v4.DistanceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_Distance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_Distance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.Distance.class, + com.google.devicesandservices.health.v4.Distance.Builder.class); + } + + // Construct using com.google.devicesandservices.health.v4.Distance.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetIntervalFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + interval_ = null; + if (intervalBuilder_ != null) { + intervalBuilder_.dispose(); + intervalBuilder_ = null; + } + millimeters_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_Distance_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.Distance getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.Distance.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.Distance build() { + com.google.devicesandservices.health.v4.Distance result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.Distance buildPartial() { + com.google.devicesandservices.health.v4.Distance result = + new com.google.devicesandservices.health.v4.Distance(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.devicesandservices.health.v4.Distance result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.interval_ = intervalBuilder_ == null ? interval_ : intervalBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.millimeters_ = millimeters_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.Distance) { + return mergeFrom((com.google.devicesandservices.health.v4.Distance) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.devicesandservices.health.v4.Distance other) { + if (other == com.google.devicesandservices.health.v4.Distance.getDefaultInstance()) + return this; + if (other.hasInterval()) { + mergeInterval(other.getInterval()); + } + if (other.getMillimeters() != 0L) { + setMillimeters(other.getMillimeters()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + input.readMessage( + internalGetIntervalFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 18 + case 24: + { + millimeters_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.devicesandservices.health.v4.ObservationTimeInterval interval_; + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ObservationTimeInterval, + com.google.devicesandservices.health.v4.ObservationTimeInterval.Builder, + com.google.devicesandservices.health.v4.ObservationTimeIntervalOrBuilder> + intervalBuilder_; + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the interval field is set. + */ + public boolean hasInterval() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The interval. + */ + public com.google.devicesandservices.health.v4.ObservationTimeInterval getInterval() { + if (intervalBuilder_ == null) { + return interval_ == null + ? com.google.devicesandservices.health.v4.ObservationTimeInterval.getDefaultInstance() + : interval_; + } else { + return intervalBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setInterval( + com.google.devicesandservices.health.v4.ObservationTimeInterval value) { + if (intervalBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + interval_ = value; + } else { + intervalBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setInterval( + com.google.devicesandservices.health.v4.ObservationTimeInterval.Builder builderForValue) { + if (intervalBuilder_ == null) { + interval_ = builderForValue.build(); + } else { + intervalBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeInterval( + com.google.devicesandservices.health.v4.ObservationTimeInterval value) { + if (intervalBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && interval_ != null + && interval_ + != com.google.devicesandservices.health.v4.ObservationTimeInterval + .getDefaultInstance()) { + getIntervalBuilder().mergeFrom(value); + } else { + interval_ = value; + } + } else { + intervalBuilder_.mergeFrom(value); + } + if (interval_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearInterval() { + bitField0_ = (bitField0_ & ~0x00000001); + interval_ = null; + if (intervalBuilder_ != null) { + intervalBuilder_.dispose(); + intervalBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.devicesandservices.health.v4.ObservationTimeInterval.Builder + getIntervalBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetIntervalFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.devicesandservices.health.v4.ObservationTimeIntervalOrBuilder + getIntervalOrBuilder() { + if (intervalBuilder_ != null) { + return intervalBuilder_.getMessageOrBuilder(); + } else { + return interval_ == null + ? com.google.devicesandservices.health.v4.ObservationTimeInterval.getDefaultInstance() + : interval_; + } + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ObservationTimeInterval, + com.google.devicesandservices.health.v4.ObservationTimeInterval.Builder, + com.google.devicesandservices.health.v4.ObservationTimeIntervalOrBuilder> + internalGetIntervalFieldBuilder() { + if (intervalBuilder_ == null) { + intervalBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ObservationTimeInterval, + com.google.devicesandservices.health.v4.ObservationTimeInterval.Builder, + com.google.devicesandservices.health.v4.ObservationTimeIntervalOrBuilder>( + getInterval(), getParentForChildren(), isClean()); + interval_ = null; + } + return intervalBuilder_; + } + + private long millimeters_; + + /** + * + * + *
+     * Required. Distance in millimeters over the observed interval.
+     * 
+ * + * int64 millimeters = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The millimeters. + */ + @java.lang.Override + public long getMillimeters() { + return millimeters_; + } + + /** + * + * + *
+     * Required. Distance in millimeters over the observed interval.
+     * 
+ * + * int64 millimeters = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The millimeters to set. + * @return This builder for chaining. + */ + public Builder setMillimeters(long value) { + + millimeters_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Distance in millimeters over the observed interval.
+     * 
+ * + * int64 millimeters = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearMillimeters() { + bitField0_ = (bitField0_ & ~0x00000002); + millimeters_ = 0L; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.Distance) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.Distance) + private static final com.google.devicesandservices.health.v4.Distance DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.Distance(); + } + + public static com.google.devicesandservices.health.v4.Distance getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Distance parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.Distance getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DistanceOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DistanceOrBuilder.java new file mode 100644 index 000000000000..e6fd901a0d41 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DistanceOrBuilder.java @@ -0,0 +1,84 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface DistanceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.Distance) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Observed interval.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the interval field is set. + */ + boolean hasInterval(); + + /** + * + * + *
+   * Required. Observed interval.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The interval. + */ + com.google.devicesandservices.health.v4.ObservationTimeInterval getInterval(); + + /** + * + * + *
+   * Required. Observed interval.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.devicesandservices.health.v4.ObservationTimeIntervalOrBuilder getIntervalOrBuilder(); + + /** + * + * + *
+   * Required. Distance in millimeters over the observed interval.
+   * 
+ * + * int64 millimeters = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The millimeters. + */ + long getMillimeters(); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DistanceRollupValue.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DistanceRollupValue.java new file mode 100644 index 000000000000..5b46b4a31d66 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DistanceRollupValue.java @@ -0,0 +1,504 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * Result of the rollup of the user's distance.
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.DistanceRollupValue} + */ +@com.google.protobuf.Generated +public final class DistanceRollupValue extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.DistanceRollupValue) + DistanceRollupValueOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DistanceRollupValue"); + } + + // Use DistanceRollupValue.newBuilder() to construct. + private DistanceRollupValue(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DistanceRollupValue() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_DistanceRollupValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_DistanceRollupValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.DistanceRollupValue.class, + com.google.devicesandservices.health.v4.DistanceRollupValue.Builder.class); + } + + public static final int MILLIMETERS_SUM_FIELD_NUMBER = 1; + private long millimetersSum_ = 0L; + + /** + * + * + *
+   * Sum of the distance in millimeters.
+   * 
+ * + * int64 millimeters_sum = 1; + * + * @return The millimetersSum. + */ + @java.lang.Override + public long getMillimetersSum() { + return millimetersSum_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (millimetersSum_ != 0L) { + output.writeInt64(1, millimetersSum_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (millimetersSum_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, millimetersSum_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.DistanceRollupValue)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.DistanceRollupValue other = + (com.google.devicesandservices.health.v4.DistanceRollupValue) obj; + + if (getMillimetersSum() != other.getMillimetersSum()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MILLIMETERS_SUM_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getMillimetersSum()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.DistanceRollupValue parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.DistanceRollupValue parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DistanceRollupValue parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.DistanceRollupValue parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DistanceRollupValue parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.DistanceRollupValue parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DistanceRollupValue parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.DistanceRollupValue parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DistanceRollupValue parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.DistanceRollupValue parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.DistanceRollupValue parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.DistanceRollupValue parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.DistanceRollupValue prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Result of the rollup of the user's distance.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.DistanceRollupValue} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.DistanceRollupValue) + com.google.devicesandservices.health.v4.DistanceRollupValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_DistanceRollupValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_DistanceRollupValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.DistanceRollupValue.class, + com.google.devicesandservices.health.v4.DistanceRollupValue.Builder.class); + } + + // Construct using com.google.devicesandservices.health.v4.DistanceRollupValue.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + millimetersSum_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_DistanceRollupValue_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.DistanceRollupValue getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.DistanceRollupValue.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.DistanceRollupValue build() { + com.google.devicesandservices.health.v4.DistanceRollupValue result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.DistanceRollupValue buildPartial() { + com.google.devicesandservices.health.v4.DistanceRollupValue result = + new com.google.devicesandservices.health.v4.DistanceRollupValue(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.devicesandservices.health.v4.DistanceRollupValue result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.millimetersSum_ = millimetersSum_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.DistanceRollupValue) { + return mergeFrom((com.google.devicesandservices.health.v4.DistanceRollupValue) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.devicesandservices.health.v4.DistanceRollupValue other) { + if (other == com.google.devicesandservices.health.v4.DistanceRollupValue.getDefaultInstance()) + return this; + if (other.getMillimetersSum() != 0L) { + setMillimetersSum(other.getMillimetersSum()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + millimetersSum_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private long millimetersSum_; + + /** + * + * + *
+     * Sum of the distance in millimeters.
+     * 
+ * + * int64 millimeters_sum = 1; + * + * @return The millimetersSum. + */ + @java.lang.Override + public long getMillimetersSum() { + return millimetersSum_; + } + + /** + * + * + *
+     * Sum of the distance in millimeters.
+     * 
+ * + * int64 millimeters_sum = 1; + * + * @param value The millimetersSum to set. + * @return This builder for chaining. + */ + public Builder setMillimetersSum(long value) { + + millimetersSum_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Sum of the distance in millimeters.
+     * 
+ * + * int64 millimeters_sum = 1; + * + * @return This builder for chaining. + */ + public Builder clearMillimetersSum() { + bitField0_ = (bitField0_ & ~0x00000001); + millimetersSum_ = 0L; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.DistanceRollupValue) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.DistanceRollupValue) + private static final com.google.devicesandservices.health.v4.DistanceRollupValue DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.DistanceRollupValue(); + } + + public static com.google.devicesandservices.health.v4.DistanceRollupValue getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DistanceRollupValue parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.DistanceRollupValue getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DistanceRollupValueOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DistanceRollupValueOrBuilder.java new file mode 100644 index 000000000000..066cca65e1d6 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/DistanceRollupValueOrBuilder.java @@ -0,0 +1,41 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface DistanceRollupValueOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.DistanceRollupValue) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Sum of the distance in millimeters.
+   * 
+ * + * int64 millimeters_sum = 1; + * + * @return The millimetersSum. + */ + long getMillimetersSum(); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/Exercise.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/Exercise.java new file mode 100644 index 000000000000..9d2573dc17e2 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/Exercise.java @@ -0,0 +1,10276 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * An exercise that stores information about a physical activity.
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.Exercise} + */ +@com.google.protobuf.Generated +public final class Exercise extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.Exercise) + ExerciseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Exercise"); + } + + // Use Exercise.newBuilder() to construct. + private Exercise(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Exercise() { + exerciseType_ = 0; + splits_ = java.util.Collections.emptyList(); + exerciseEvents_ = java.util.Collections.emptyList(); + splitSummaries_ = java.util.Collections.emptyList(); + displayName_ = ""; + notes_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_Exercise_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_Exercise_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.Exercise.class, + com.google.devicesandservices.health.v4.Exercise.Builder.class); + } + + /** + * + * + *
+   * The type of activity performed during an exercise.
+   * 
+ * + * Protobuf enum {@code google.devicesandservices.health.v4.Exercise.ExerciseType} + */ + public enum ExerciseType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Exercise type is unspecified.
+     * 
+ * + * EXERCISE_TYPE_UNSPECIFIED = 0; + */ + EXERCISE_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Running type.
+     * 
+ * + * RUNNING = 1; + */ + RUNNING(1), + /** + * + * + *
+     * Walking type.
+     * 
+ * + * WALKING = 2; + */ + WALKING(2), + /** + * + * + *
+     * Biking type.
+     * 
+ * + * BIKING = 3; + */ + BIKING(3), + /** + * + * + *
+     * Swimming type.
+     * 
+ * + * SWIMMING = 4; + */ + SWIMMING(4), + /** + * + * + *
+     * Hiking type.
+     * 
+ * + * HIKING = 5; + */ + HIKING(5), + /** + * + * + *
+     * Yoga type.
+     * 
+ * + * YOGA = 6; + */ + YOGA(6), + /** + * + * + *
+     * Pilates type.
+     * 
+ * + * PILATES = 7; + */ + PILATES(7), + /** + * + * + *
+     * Workout type.
+     * 
+ * + * WORKOUT = 8; + */ + WORKOUT(8), + /** + * + * + *
+     * HIIT type.
+     * 
+ * + * HIIT = 9; + */ + HIIT(9), + /** + * + * + *
+     * Weightlifting type.
+     * 
+ * + * WEIGHTLIFTING = 10; + */ + WEIGHTLIFTING(10), + /** + * + * + *
+     * Strength training type.
+     * 
+ * + * STRENGTH_TRAINING = 11; + */ + STRENGTH_TRAINING(11), + /** + * + * + *
+     * Other type.
+     * 
+ * + * OTHER = 12; + */ + OTHER(12), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ExerciseType"); + } + + /** + * + * + *
+     * Exercise type is unspecified.
+     * 
+ * + * EXERCISE_TYPE_UNSPECIFIED = 0; + */ + public static final int EXERCISE_TYPE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Running type.
+     * 
+ * + * RUNNING = 1; + */ + public static final int RUNNING_VALUE = 1; + + /** + * + * + *
+     * Walking type.
+     * 
+ * + * WALKING = 2; + */ + public static final int WALKING_VALUE = 2; + + /** + * + * + *
+     * Biking type.
+     * 
+ * + * BIKING = 3; + */ + public static final int BIKING_VALUE = 3; + + /** + * + * + *
+     * Swimming type.
+     * 
+ * + * SWIMMING = 4; + */ + public static final int SWIMMING_VALUE = 4; + + /** + * + * + *
+     * Hiking type.
+     * 
+ * + * HIKING = 5; + */ + public static final int HIKING_VALUE = 5; + + /** + * + * + *
+     * Yoga type.
+     * 
+ * + * YOGA = 6; + */ + public static final int YOGA_VALUE = 6; + + /** + * + * + *
+     * Pilates type.
+     * 
+ * + * PILATES = 7; + */ + public static final int PILATES_VALUE = 7; + + /** + * + * + *
+     * Workout type.
+     * 
+ * + * WORKOUT = 8; + */ + public static final int WORKOUT_VALUE = 8; + + /** + * + * + *
+     * HIIT type.
+     * 
+ * + * HIIT = 9; + */ + public static final int HIIT_VALUE = 9; + + /** + * + * + *
+     * Weightlifting type.
+     * 
+ * + * WEIGHTLIFTING = 10; + */ + public static final int WEIGHTLIFTING_VALUE = 10; + + /** + * + * + *
+     * Strength training type.
+     * 
+ * + * STRENGTH_TRAINING = 11; + */ + public static final int STRENGTH_TRAINING_VALUE = 11; + + /** + * + * + *
+     * Other type.
+     * 
+ * + * OTHER = 12; + */ + public static final int OTHER_VALUE = 12; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ExerciseType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ExerciseType forNumber(int value) { + switch (value) { + case 0: + return EXERCISE_TYPE_UNSPECIFIED; + case 1: + return RUNNING; + case 2: + return WALKING; + case 3: + return BIKING; + case 4: + return SWIMMING; + case 5: + return HIKING; + case 6: + return YOGA; + case 7: + return PILATES; + case 8: + return WORKOUT; + case 9: + return HIIT; + case 10: + return WEIGHTLIFTING; + case 11: + return STRENGTH_TRAINING; + case 12: + return OTHER; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ExerciseType findValueByNumber(int number) { + return ExerciseType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.devicesandservices.health.v4.Exercise.getDescriptor().getEnumTypes().get(0); + } + + private static final ExerciseType[] VALUES = values(); + + public static ExerciseType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private ExerciseType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.devicesandservices.health.v4.Exercise.ExerciseType) + } + + public interface SplitSummaryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.Exercise.SplitSummary) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. Lap start time
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + + /** + * + * + *
+     * Required. Lap start time
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The startTime. + */ + com.google.protobuf.Timestamp getStartTime(); + + /** + * + * + *
+     * Required. Lap start time
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + + /** + * + * + *
+     * Required. Lap start time offset from UTC
+     * 
+ * + * + * .google.protobuf.Duration start_utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the startUtcOffset field is set. + */ + boolean hasStartUtcOffset(); + + /** + * + * + *
+     * Required. Lap start time offset from UTC
+     * 
+ * + * + * .google.protobuf.Duration start_utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The startUtcOffset. + */ + com.google.protobuf.Duration getStartUtcOffset(); + + /** + * + * + *
+     * Required. Lap start time offset from UTC
+     * 
+ * + * + * .google.protobuf.Duration start_utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.DurationOrBuilder getStartUtcOffsetOrBuilder(); + + /** + * + * + *
+     * Required. Lap end time
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + + /** + * + * + *
+     * Required. Lap end time
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + + /** + * + * + *
+     * Required. Lap end time
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + * + * + *
+     * Required. Lap end time offset from UTC
+     * 
+ * + * .google.protobuf.Duration end_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the endUtcOffset field is set. + */ + boolean hasEndUtcOffset(); + + /** + * + * + *
+     * Required. Lap end time offset from UTC
+     * 
+ * + * .google.protobuf.Duration end_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The endUtcOffset. + */ + com.google.protobuf.Duration getEndUtcOffset(); + + /** + * + * + *
+     * Required. Lap end time offset from UTC
+     * 
+ * + * .google.protobuf.Duration end_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.DurationOrBuilder getEndUtcOffsetOrBuilder(); + + /** + * + * + *
+     * Output only. Lap time excluding the pauses.
+     * 
+ * + * + * .google.protobuf.Duration active_duration = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the activeDuration field is set. + */ + boolean hasActiveDuration(); + + /** + * + * + *
+     * Output only. Lap time excluding the pauses.
+     * 
+ * + * + * .google.protobuf.Duration active_duration = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The activeDuration. + */ + com.google.protobuf.Duration getActiveDuration(); + + /** + * + * + *
+     * Output only. Lap time excluding the pauses.
+     * 
+ * + * + * .google.protobuf.Duration active_duration = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.DurationOrBuilder getActiveDurationOrBuilder(); + + /** + * + * + *
+     * Required. Summary metrics for this split.
+     * 
+ * + * + * .google.devicesandservices.health.v4.MetricsSummary metrics_summary = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the metricsSummary field is set. + */ + boolean hasMetricsSummary(); + + /** + * + * + *
+     * Required. Summary metrics for this split.
+     * 
+ * + * + * .google.devicesandservices.health.v4.MetricsSummary metrics_summary = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The metricsSummary. + */ + com.google.devicesandservices.health.v4.MetricsSummary getMetricsSummary(); + + /** + * + * + *
+     * Required. Summary metrics for this split.
+     * 
+ * + * + * .google.devicesandservices.health.v4.MetricsSummary metrics_summary = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.devicesandservices.health.v4.MetricsSummaryOrBuilder getMetricsSummaryOrBuilder(); + + /** + * + * + *
+     * Required. Method used to split the exercise laps.
+     * Users may manually mark the lap as complete even if the tracking
+     * is automatic.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Exercise.SplitSummary.SplitType split_type = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for splitType. + */ + int getSplitTypeValue(); + + /** + * + * + *
+     * Required. Method used to split the exercise laps.
+     * Users may manually mark the lap as complete even if the tracking
+     * is automatic.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Exercise.SplitSummary.SplitType split_type = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The splitType. + */ + com.google.devicesandservices.health.v4.Exercise.SplitSummary.SplitType getSplitType(); + } + + /** + * + * + *
+   * Represents splits or laps recorded within an exercise. Lap events
+   * partition a workout into segments based on criteria like distance, time, or
+   * calories.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.Exercise.SplitSummary} + */ + public static final class SplitSummary extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.Exercise.SplitSummary) + SplitSummaryOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SplitSummary"); + } + + // Use SplitSummary.newBuilder() to construct. + private SplitSummary(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private SplitSummary() { + splitType_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_Exercise_SplitSummary_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_Exercise_SplitSummary_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.Exercise.SplitSummary.class, + com.google.devicesandservices.health.v4.Exercise.SplitSummary.Builder.class); + } + + /** + * + * + *
+     * The type of the split, such as manual, duration, distance, calories.
+     * 
+ * + * Protobuf enum {@code google.devicesandservices.health.v4.Exercise.SplitSummary.SplitType} + */ + public enum SplitType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Split type is unspecified.
+       * 
+ * + * SPLIT_TYPE_UNSPECIFIED = 0; + */ + SPLIT_TYPE_UNSPECIFIED(0), + /** + * + * + *
+       * Manual split.
+       * 
+ * + * MANUAL = 1; + */ + MANUAL(1), + /** + * + * + *
+       * Split by duration.
+       * 
+ * + * DURATION = 2; + */ + DURATION(2), + /** + * + * + *
+       * Split by distance.
+       * 
+ * + * DISTANCE = 3; + */ + DISTANCE(3), + /** + * + * + *
+       * Split by calories.
+       * 
+ * + * CALORIES = 4; + */ + CALORIES(4), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SplitType"); + } + + /** + * + * + *
+       * Split type is unspecified.
+       * 
+ * + * SPLIT_TYPE_UNSPECIFIED = 0; + */ + public static final int SPLIT_TYPE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+       * Manual split.
+       * 
+ * + * MANUAL = 1; + */ + public static final int MANUAL_VALUE = 1; + + /** + * + * + *
+       * Split by duration.
+       * 
+ * + * DURATION = 2; + */ + public static final int DURATION_VALUE = 2; + + /** + * + * + *
+       * Split by distance.
+       * 
+ * + * DISTANCE = 3; + */ + public static final int DISTANCE_VALUE = 3; + + /** + * + * + *
+       * Split by calories.
+       * 
+ * + * CALORIES = 4; + */ + public static final int CALORIES_VALUE = 4; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static SplitType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static SplitType forNumber(int value) { + switch (value) { + case 0: + return SPLIT_TYPE_UNSPECIFIED; + case 1: + return MANUAL; + case 2: + return DURATION; + case 3: + return DISTANCE; + case 4: + return CALORIES; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public SplitType findValueByNumber(int number) { + return SplitType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.devicesandservices.health.v4.Exercise.SplitSummary.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final SplitType[] VALUES = values(); + + public static SplitType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private SplitType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.devicesandservices.health.v4.Exercise.SplitSummary.SplitType) + } + + private int bitField0_; + public static final int START_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp startTime_; + + /** + * + * + *
+     * Required. Lap start time
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the startTime field is set. + */ + @java.lang.Override + public boolean hasStartTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. Lap start time
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The startTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + + /** + * + * + *
+     * Required. Lap start time
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + + public static final int START_UTC_OFFSET_FIELD_NUMBER = 2; + private com.google.protobuf.Duration startUtcOffset_; + + /** + * + * + *
+     * Required. Lap start time offset from UTC
+     * 
+ * + * + * .google.protobuf.Duration start_utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the startUtcOffset field is set. + */ + @java.lang.Override + public boolean hasStartUtcOffset() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Required. Lap start time offset from UTC
+     * 
+ * + * + * .google.protobuf.Duration start_utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The startUtcOffset. + */ + @java.lang.Override + public com.google.protobuf.Duration getStartUtcOffset() { + return startUtcOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : startUtcOffset_; + } + + /** + * + * + *
+     * Required. Lap start time offset from UTC
+     * 
+ * + * + * .google.protobuf.Duration start_utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getStartUtcOffsetOrBuilder() { + return startUtcOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : startUtcOffset_; + } + + public static final int END_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp endTime_; + + /** + * + * + *
+     * Required. Lap end time
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Required. Lap end time
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + /** + * + * + *
+     * Required. Lap end time
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + public static final int END_UTC_OFFSET_FIELD_NUMBER = 4; + private com.google.protobuf.Duration endUtcOffset_; + + /** + * + * + *
+     * Required. Lap end time offset from UTC
+     * 
+ * + * .google.protobuf.Duration end_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the endUtcOffset field is set. + */ + @java.lang.Override + public boolean hasEndUtcOffset() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+     * Required. Lap end time offset from UTC
+     * 
+ * + * .google.protobuf.Duration end_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The endUtcOffset. + */ + @java.lang.Override + public com.google.protobuf.Duration getEndUtcOffset() { + return endUtcOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : endUtcOffset_; + } + + /** + * + * + *
+     * Required. Lap end time offset from UTC
+     * 
+ * + * .google.protobuf.Duration end_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getEndUtcOffsetOrBuilder() { + return endUtcOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : endUtcOffset_; + } + + public static final int ACTIVE_DURATION_FIELD_NUMBER = 5; + private com.google.protobuf.Duration activeDuration_; + + /** + * + * + *
+     * Output only. Lap time excluding the pauses.
+     * 
+ * + * + * .google.protobuf.Duration active_duration = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the activeDuration field is set. + */ + @java.lang.Override + public boolean hasActiveDuration() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+     * Output only. Lap time excluding the pauses.
+     * 
+ * + * + * .google.protobuf.Duration active_duration = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The activeDuration. + */ + @java.lang.Override + public com.google.protobuf.Duration getActiveDuration() { + return activeDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : activeDuration_; + } + + /** + * + * + *
+     * Output only. Lap time excluding the pauses.
+     * 
+ * + * + * .google.protobuf.Duration active_duration = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getActiveDurationOrBuilder() { + return activeDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : activeDuration_; + } + + public static final int METRICS_SUMMARY_FIELD_NUMBER = 6; + private com.google.devicesandservices.health.v4.MetricsSummary metricsSummary_; + + /** + * + * + *
+     * Required. Summary metrics for this split.
+     * 
+ * + * + * .google.devicesandservices.health.v4.MetricsSummary metrics_summary = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the metricsSummary field is set. + */ + @java.lang.Override + public boolean hasMetricsSummary() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+     * Required. Summary metrics for this split.
+     * 
+ * + * + * .google.devicesandservices.health.v4.MetricsSummary metrics_summary = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The metricsSummary. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.MetricsSummary getMetricsSummary() { + return metricsSummary_ == null + ? com.google.devicesandservices.health.v4.MetricsSummary.getDefaultInstance() + : metricsSummary_; + } + + /** + * + * + *
+     * Required. Summary metrics for this split.
+     * 
+ * + * + * .google.devicesandservices.health.v4.MetricsSummary metrics_summary = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.MetricsSummaryOrBuilder + getMetricsSummaryOrBuilder() { + return metricsSummary_ == null + ? com.google.devicesandservices.health.v4.MetricsSummary.getDefaultInstance() + : metricsSummary_; + } + + public static final int SPLIT_TYPE_FIELD_NUMBER = 7; + private int splitType_ = 0; + + /** + * + * + *
+     * Required. Method used to split the exercise laps.
+     * Users may manually mark the lap as complete even if the tracking
+     * is automatic.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Exercise.SplitSummary.SplitType split_type = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for splitType. + */ + @java.lang.Override + public int getSplitTypeValue() { + return splitType_; + } + + /** + * + * + *
+     * Required. Method used to split the exercise laps.
+     * Users may manually mark the lap as complete even if the tracking
+     * is automatic.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Exercise.SplitSummary.SplitType split_type = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The splitType. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Exercise.SplitSummary.SplitType getSplitType() { + com.google.devicesandservices.health.v4.Exercise.SplitSummary.SplitType result = + com.google.devicesandservices.health.v4.Exercise.SplitSummary.SplitType.forNumber( + splitType_); + return result == null + ? com.google.devicesandservices.health.v4.Exercise.SplitSummary.SplitType.UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getStartTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getStartUtcOffset()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(3, getEndTime()); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(4, getEndUtcOffset()); + } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeMessage(5, getActiveDuration()); + } + if (((bitField0_ & 0x00000020) != 0)) { + output.writeMessage(6, getMetricsSummary()); + } + if (splitType_ + != com.google.devicesandservices.health.v4.Exercise.SplitSummary.SplitType + .SPLIT_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(7, splitType_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getStartTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getStartUtcOffset()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getEndTime()); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getEndUtcOffset()); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getActiveDuration()); + } + if (((bitField0_ & 0x00000020) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getMetricsSummary()); + } + if (splitType_ + != com.google.devicesandservices.health.v4.Exercise.SplitSummary.SplitType + .SPLIT_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(7, splitType_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.Exercise.SplitSummary)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.Exercise.SplitSummary other = + (com.google.devicesandservices.health.v4.Exercise.SplitSummary) obj; + + if (hasStartTime() != other.hasStartTime()) return false; + if (hasStartTime()) { + if (!getStartTime().equals(other.getStartTime())) return false; + } + if (hasStartUtcOffset() != other.hasStartUtcOffset()) return false; + if (hasStartUtcOffset()) { + if (!getStartUtcOffset().equals(other.getStartUtcOffset())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime().equals(other.getEndTime())) return false; + } + if (hasEndUtcOffset() != other.hasEndUtcOffset()) return false; + if (hasEndUtcOffset()) { + if (!getEndUtcOffset().equals(other.getEndUtcOffset())) return false; + } + if (hasActiveDuration() != other.hasActiveDuration()) return false; + if (hasActiveDuration()) { + if (!getActiveDuration().equals(other.getActiveDuration())) return false; + } + if (hasMetricsSummary() != other.hasMetricsSummary()) return false; + if (hasMetricsSummary()) { + if (!getMetricsSummary().equals(other.getMetricsSummary())) return false; + } + if (splitType_ != other.splitType_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasStartTime()) { + hash = (37 * hash) + START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getStartTime().hashCode(); + } + if (hasStartUtcOffset()) { + hash = (37 * hash) + START_UTC_OFFSET_FIELD_NUMBER; + hash = (53 * hash) + getStartUtcOffset().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + if (hasEndUtcOffset()) { + hash = (37 * hash) + END_UTC_OFFSET_FIELD_NUMBER; + hash = (53 * hash) + getEndUtcOffset().hashCode(); + } + if (hasActiveDuration()) { + hash = (37 * hash) + ACTIVE_DURATION_FIELD_NUMBER; + hash = (53 * hash) + getActiveDuration().hashCode(); + } + if (hasMetricsSummary()) { + hash = (37 * hash) + METRICS_SUMMARY_FIELD_NUMBER; + hash = (53 * hash) + getMetricsSummary().hashCode(); + } + hash = (37 * hash) + SPLIT_TYPE_FIELD_NUMBER; + hash = (53 * hash) + splitType_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.Exercise.SplitSummary parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.Exercise.SplitSummary parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Exercise.SplitSummary parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.Exercise.SplitSummary parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Exercise.SplitSummary parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.Exercise.SplitSummary parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Exercise.SplitSummary parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.Exercise.SplitSummary parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Exercise.SplitSummary parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.Exercise.SplitSummary parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Exercise.SplitSummary parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.Exercise.SplitSummary parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.Exercise.SplitSummary prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+     * Represents splits or laps recorded within an exercise. Lap events
+     * partition a workout into segments based on criteria like distance, time, or
+     * calories.
+     * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.Exercise.SplitSummary} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.Exercise.SplitSummary) + com.google.devicesandservices.health.v4.Exercise.SplitSummaryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_Exercise_SplitSummary_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_Exercise_SplitSummary_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.Exercise.SplitSummary.class, + com.google.devicesandservices.health.v4.Exercise.SplitSummary.Builder.class); + } + + // Construct using com.google.devicesandservices.health.v4.Exercise.SplitSummary.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetStartTimeFieldBuilder(); + internalGetStartUtcOffsetFieldBuilder(); + internalGetEndTimeFieldBuilder(); + internalGetEndUtcOffsetFieldBuilder(); + internalGetActiveDurationFieldBuilder(); + internalGetMetricsSummaryFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + startUtcOffset_ = null; + if (startUtcOffsetBuilder_ != null) { + startUtcOffsetBuilder_.dispose(); + startUtcOffsetBuilder_ = null; + } + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + endUtcOffset_ = null; + if (endUtcOffsetBuilder_ != null) { + endUtcOffsetBuilder_.dispose(); + endUtcOffsetBuilder_ = null; + } + activeDuration_ = null; + if (activeDurationBuilder_ != null) { + activeDurationBuilder_.dispose(); + activeDurationBuilder_ = null; + } + metricsSummary_ = null; + if (metricsSummaryBuilder_ != null) { + metricsSummaryBuilder_.dispose(); + metricsSummaryBuilder_ = null; + } + splitType_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_Exercise_SplitSummary_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.Exercise.SplitSummary + getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.Exercise.SplitSummary.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.Exercise.SplitSummary build() { + com.google.devicesandservices.health.v4.Exercise.SplitSummary result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.Exercise.SplitSummary buildPartial() { + com.google.devicesandservices.health.v4.Exercise.SplitSummary result = + new com.google.devicesandservices.health.v4.Exercise.SplitSummary(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.devicesandservices.health.v4.Exercise.SplitSummary result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.startTime_ = startTimeBuilder_ == null ? startTime_ : startTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.startUtcOffset_ = + startUtcOffsetBuilder_ == null ? startUtcOffset_ : startUtcOffsetBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.endTime_ = endTimeBuilder_ == null ? endTime_ : endTimeBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.endUtcOffset_ = + endUtcOffsetBuilder_ == null ? endUtcOffset_ : endUtcOffsetBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.activeDuration_ = + activeDurationBuilder_ == null ? activeDuration_ : activeDurationBuilder_.build(); + to_bitField0_ |= 0x00000010; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.metricsSummary_ = + metricsSummaryBuilder_ == null ? metricsSummary_ : metricsSummaryBuilder_.build(); + to_bitField0_ |= 0x00000020; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.splitType_ = splitType_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.Exercise.SplitSummary) { + return mergeFrom((com.google.devicesandservices.health.v4.Exercise.SplitSummary) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.devicesandservices.health.v4.Exercise.SplitSummary other) { + if (other + == com.google.devicesandservices.health.v4.Exercise.SplitSummary.getDefaultInstance()) + return this; + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.hasStartUtcOffset()) { + mergeStartUtcOffset(other.getStartUtcOffset()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (other.hasEndUtcOffset()) { + mergeEndUtcOffset(other.getEndUtcOffset()); + } + if (other.hasActiveDuration()) { + mergeActiveDuration(other.getActiveDuration()); + } + if (other.hasMetricsSummary()) { + mergeMetricsSummary(other.getMetricsSummary()); + } + if (other.splitType_ != 0) { + setSplitTypeValue(other.getSplitTypeValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetStartTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetStartUtcOffsetFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetEndTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage( + internalGetEndUtcOffsetFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + input.readMessage( + internalGetActiveDurationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + input.readMessage( + internalGetMetricsSummaryFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 56: + { + splitType_ = input.readEnum(); + bitField0_ |= 0x00000040; + break; + } // case 56 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.Timestamp startTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + startTimeBuilder_; + + /** + * + * + *
+       * Required. Lap start time
+       * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+       * Required. Lap start time
+       * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The startTime. + */ + public com.google.protobuf.Timestamp getStartTime() { + if (startTimeBuilder_ == null) { + return startTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : startTime_; + } else { + return startTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+       * Required. Lap start time
+       * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + } else { + startTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. Lap start time
+       * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. Lap start time
+       * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && startTime_ != null + && startTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getStartTimeBuilder().mergeFrom(value); + } else { + startTime_ = value; + } + } else { + startTimeBuilder_.mergeFrom(value); + } + if (startTime_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * Required. Lap start time
+       * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearStartTime() { + bitField0_ = (bitField0_ & ~0x00000001); + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. Lap start time
+       * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetStartTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * Required. Lap start time
+       * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : startTime_; + } + } + + /** + * + * + *
+       * Required. Lap start time
+       * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getStartTime(), getParentForChildren(), isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + private com.google.protobuf.Duration startUtcOffset_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + startUtcOffsetBuilder_; + + /** + * + * + *
+       * Required. Lap start time offset from UTC
+       * 
+ * + * + * .google.protobuf.Duration start_utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the startUtcOffset field is set. + */ + public boolean hasStartUtcOffset() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+       * Required. Lap start time offset from UTC
+       * 
+ * + * + * .google.protobuf.Duration start_utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The startUtcOffset. + */ + public com.google.protobuf.Duration getStartUtcOffset() { + if (startUtcOffsetBuilder_ == null) { + return startUtcOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : startUtcOffset_; + } else { + return startUtcOffsetBuilder_.getMessage(); + } + } + + /** + * + * + *
+       * Required. Lap start time offset from UTC
+       * 
+ * + * + * .google.protobuf.Duration start_utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setStartUtcOffset(com.google.protobuf.Duration value) { + if (startUtcOffsetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startUtcOffset_ = value; + } else { + startUtcOffsetBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. Lap start time offset from UTC
+       * 
+ * + * + * .google.protobuf.Duration start_utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setStartUtcOffset(com.google.protobuf.Duration.Builder builderForValue) { + if (startUtcOffsetBuilder_ == null) { + startUtcOffset_ = builderForValue.build(); + } else { + startUtcOffsetBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. Lap start time offset from UTC
+       * 
+ * + * + * .google.protobuf.Duration start_utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeStartUtcOffset(com.google.protobuf.Duration value) { + if (startUtcOffsetBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && startUtcOffset_ != null + && startUtcOffset_ != com.google.protobuf.Duration.getDefaultInstance()) { + getStartUtcOffsetBuilder().mergeFrom(value); + } else { + startUtcOffset_ = value; + } + } else { + startUtcOffsetBuilder_.mergeFrom(value); + } + if (startUtcOffset_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * Required. Lap start time offset from UTC
+       * 
+ * + * + * .google.protobuf.Duration start_utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearStartUtcOffset() { + bitField0_ = (bitField0_ & ~0x00000002); + startUtcOffset_ = null; + if (startUtcOffsetBuilder_ != null) { + startUtcOffsetBuilder_.dispose(); + startUtcOffsetBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. Lap start time offset from UTC
+       * 
+ * + * + * .google.protobuf.Duration start_utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.Duration.Builder getStartUtcOffsetBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetStartUtcOffsetFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * Required. Lap start time offset from UTC
+       * 
+ * + * + * .google.protobuf.Duration start_utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.DurationOrBuilder getStartUtcOffsetOrBuilder() { + if (startUtcOffsetBuilder_ != null) { + return startUtcOffsetBuilder_.getMessageOrBuilder(); + } else { + return startUtcOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : startUtcOffset_; + } + } + + /** + * + * + *
+       * Required. Lap start time offset from UTC
+       * 
+ * + * + * .google.protobuf.Duration start_utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + internalGetStartUtcOffsetFieldBuilder() { + if (startUtcOffsetBuilder_ == null) { + startUtcOffsetBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getStartUtcOffset(), getParentForChildren(), isClean()); + startUtcOffset_ = null; + } + return startUtcOffsetBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + + /** + * + * + *
+       * Required. Lap end time
+       * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+       * Required. Lap end time
+       * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+       * Required. Lap end time
+       * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + } else { + endTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. Lap end time
+       * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. Lap end time
+       * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && endTime_ != null + && endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEndTimeBuilder().mergeFrom(value); + } else { + endTime_ = value; + } + } else { + endTimeBuilder_.mergeFrom(value); + } + if (endTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * Required. Lap end time
+       * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearEndTime() { + bitField0_ = (bitField0_ & ~0x00000004); + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. Lap end time
+       * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetEndTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * Required. Lap end time
+       * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + + /** + * + * + *
+       * Required. Lap end time
+       * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + private com.google.protobuf.Duration endUtcOffset_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + endUtcOffsetBuilder_; + + /** + * + * + *
+       * Required. Lap end time offset from UTC
+       * 
+ * + * + * .google.protobuf.Duration end_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the endUtcOffset field is set. + */ + public boolean hasEndUtcOffset() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+       * Required. Lap end time offset from UTC
+       * 
+ * + * + * .google.protobuf.Duration end_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The endUtcOffset. + */ + public com.google.protobuf.Duration getEndUtcOffset() { + if (endUtcOffsetBuilder_ == null) { + return endUtcOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : endUtcOffset_; + } else { + return endUtcOffsetBuilder_.getMessage(); + } + } + + /** + * + * + *
+       * Required. Lap end time offset from UTC
+       * 
+ * + * + * .google.protobuf.Duration end_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setEndUtcOffset(com.google.protobuf.Duration value) { + if (endUtcOffsetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endUtcOffset_ = value; + } else { + endUtcOffsetBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. Lap end time offset from UTC
+       * 
+ * + * + * .google.protobuf.Duration end_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setEndUtcOffset(com.google.protobuf.Duration.Builder builderForValue) { + if (endUtcOffsetBuilder_ == null) { + endUtcOffset_ = builderForValue.build(); + } else { + endUtcOffsetBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. Lap end time offset from UTC
+       * 
+ * + * + * .google.protobuf.Duration end_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeEndUtcOffset(com.google.protobuf.Duration value) { + if (endUtcOffsetBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && endUtcOffset_ != null + && endUtcOffset_ != com.google.protobuf.Duration.getDefaultInstance()) { + getEndUtcOffsetBuilder().mergeFrom(value); + } else { + endUtcOffset_ = value; + } + } else { + endUtcOffsetBuilder_.mergeFrom(value); + } + if (endUtcOffset_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * Required. Lap end time offset from UTC
+       * 
+ * + * + * .google.protobuf.Duration end_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearEndUtcOffset() { + bitField0_ = (bitField0_ & ~0x00000008); + endUtcOffset_ = null; + if (endUtcOffsetBuilder_ != null) { + endUtcOffsetBuilder_.dispose(); + endUtcOffsetBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. Lap end time offset from UTC
+       * 
+ * + * + * .google.protobuf.Duration end_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.Duration.Builder getEndUtcOffsetBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return internalGetEndUtcOffsetFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * Required. Lap end time offset from UTC
+       * 
+ * + * + * .google.protobuf.Duration end_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.DurationOrBuilder getEndUtcOffsetOrBuilder() { + if (endUtcOffsetBuilder_ != null) { + return endUtcOffsetBuilder_.getMessageOrBuilder(); + } else { + return endUtcOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : endUtcOffset_; + } + } + + /** + * + * + *
+       * Required. Lap end time offset from UTC
+       * 
+ * + * + * .google.protobuf.Duration end_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + internalGetEndUtcOffsetFieldBuilder() { + if (endUtcOffsetBuilder_ == null) { + endUtcOffsetBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getEndUtcOffset(), getParentForChildren(), isClean()); + endUtcOffset_ = null; + } + return endUtcOffsetBuilder_; + } + + private com.google.protobuf.Duration activeDuration_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + activeDurationBuilder_; + + /** + * + * + *
+       * Output only. Lap time excluding the pauses.
+       * 
+ * + * + * .google.protobuf.Duration active_duration = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the activeDuration field is set. + */ + public boolean hasActiveDuration() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+       * Output only. Lap time excluding the pauses.
+       * 
+ * + * + * .google.protobuf.Duration active_duration = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The activeDuration. + */ + public com.google.protobuf.Duration getActiveDuration() { + if (activeDurationBuilder_ == null) { + return activeDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : activeDuration_; + } else { + return activeDurationBuilder_.getMessage(); + } + } + + /** + * + * + *
+       * Output only. Lap time excluding the pauses.
+       * 
+ * + * + * .google.protobuf.Duration active_duration = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setActiveDuration(com.google.protobuf.Duration value) { + if (activeDurationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + activeDuration_ = value; + } else { + activeDurationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. Lap time excluding the pauses.
+       * 
+ * + * + * .google.protobuf.Duration active_duration = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setActiveDuration(com.google.protobuf.Duration.Builder builderForValue) { + if (activeDurationBuilder_ == null) { + activeDuration_ = builderForValue.build(); + } else { + activeDurationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. Lap time excluding the pauses.
+       * 
+ * + * + * .google.protobuf.Duration active_duration = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeActiveDuration(com.google.protobuf.Duration value) { + if (activeDurationBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && activeDuration_ != null + && activeDuration_ != com.google.protobuf.Duration.getDefaultInstance()) { + getActiveDurationBuilder().mergeFrom(value); + } else { + activeDuration_ = value; + } + } else { + activeDurationBuilder_.mergeFrom(value); + } + if (activeDuration_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * Output only. Lap time excluding the pauses.
+       * 
+ * + * + * .google.protobuf.Duration active_duration = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearActiveDuration() { + bitField0_ = (bitField0_ & ~0x00000010); + activeDuration_ = null; + if (activeDurationBuilder_ != null) { + activeDurationBuilder_.dispose(); + activeDurationBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. Lap time excluding the pauses.
+       * 
+ * + * + * .google.protobuf.Duration active_duration = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Duration.Builder getActiveDurationBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return internalGetActiveDurationFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * Output only. Lap time excluding the pauses.
+       * 
+ * + * + * .google.protobuf.Duration active_duration = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.DurationOrBuilder getActiveDurationOrBuilder() { + if (activeDurationBuilder_ != null) { + return activeDurationBuilder_.getMessageOrBuilder(); + } else { + return activeDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : activeDuration_; + } + } + + /** + * + * + *
+       * Output only. Lap time excluding the pauses.
+       * 
+ * + * + * .google.protobuf.Duration active_duration = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + internalGetActiveDurationFieldBuilder() { + if (activeDurationBuilder_ == null) { + activeDurationBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getActiveDuration(), getParentForChildren(), isClean()); + activeDuration_ = null; + } + return activeDurationBuilder_; + } + + private com.google.devicesandservices.health.v4.MetricsSummary metricsSummary_; + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.MetricsSummary, + com.google.devicesandservices.health.v4.MetricsSummary.Builder, + com.google.devicesandservices.health.v4.MetricsSummaryOrBuilder> + metricsSummaryBuilder_; + + /** + * + * + *
+       * Required. Summary metrics for this split.
+       * 
+ * + * + * .google.devicesandservices.health.v4.MetricsSummary metrics_summary = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the metricsSummary field is set. + */ + public boolean hasMetricsSummary() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+       * Required. Summary metrics for this split.
+       * 
+ * + * + * .google.devicesandservices.health.v4.MetricsSummary metrics_summary = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The metricsSummary. + */ + public com.google.devicesandservices.health.v4.MetricsSummary getMetricsSummary() { + if (metricsSummaryBuilder_ == null) { + return metricsSummary_ == null + ? com.google.devicesandservices.health.v4.MetricsSummary.getDefaultInstance() + : metricsSummary_; + } else { + return metricsSummaryBuilder_.getMessage(); + } + } + + /** + * + * + *
+       * Required. Summary metrics for this split.
+       * 
+ * + * + * .google.devicesandservices.health.v4.MetricsSummary metrics_summary = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setMetricsSummary( + com.google.devicesandservices.health.v4.MetricsSummary value) { + if (metricsSummaryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metricsSummary_ = value; + } else { + metricsSummaryBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. Summary metrics for this split.
+       * 
+ * + * + * .google.devicesandservices.health.v4.MetricsSummary metrics_summary = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setMetricsSummary( + com.google.devicesandservices.health.v4.MetricsSummary.Builder builderForValue) { + if (metricsSummaryBuilder_ == null) { + metricsSummary_ = builderForValue.build(); + } else { + metricsSummaryBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. Summary metrics for this split.
+       * 
+ * + * + * .google.devicesandservices.health.v4.MetricsSummary metrics_summary = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeMetricsSummary( + com.google.devicesandservices.health.v4.MetricsSummary value) { + if (metricsSummaryBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && metricsSummary_ != null + && metricsSummary_ + != com.google.devicesandservices.health.v4.MetricsSummary.getDefaultInstance()) { + getMetricsSummaryBuilder().mergeFrom(value); + } else { + metricsSummary_ = value; + } + } else { + metricsSummaryBuilder_.mergeFrom(value); + } + if (metricsSummary_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * Required. Summary metrics for this split.
+       * 
+ * + * + * .google.devicesandservices.health.v4.MetricsSummary metrics_summary = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearMetricsSummary() { + bitField0_ = (bitField0_ & ~0x00000020); + metricsSummary_ = null; + if (metricsSummaryBuilder_ != null) { + metricsSummaryBuilder_.dispose(); + metricsSummaryBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. Summary metrics for this split.
+       * 
+ * + * + * .google.devicesandservices.health.v4.MetricsSummary metrics_summary = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.devicesandservices.health.v4.MetricsSummary.Builder + getMetricsSummaryBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return internalGetMetricsSummaryFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * Required. Summary metrics for this split.
+       * 
+ * + * + * .google.devicesandservices.health.v4.MetricsSummary metrics_summary = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.devicesandservices.health.v4.MetricsSummaryOrBuilder + getMetricsSummaryOrBuilder() { + if (metricsSummaryBuilder_ != null) { + return metricsSummaryBuilder_.getMessageOrBuilder(); + } else { + return metricsSummary_ == null + ? com.google.devicesandservices.health.v4.MetricsSummary.getDefaultInstance() + : metricsSummary_; + } + } + + /** + * + * + *
+       * Required. Summary metrics for this split.
+       * 
+ * + * + * .google.devicesandservices.health.v4.MetricsSummary metrics_summary = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.MetricsSummary, + com.google.devicesandservices.health.v4.MetricsSummary.Builder, + com.google.devicesandservices.health.v4.MetricsSummaryOrBuilder> + internalGetMetricsSummaryFieldBuilder() { + if (metricsSummaryBuilder_ == null) { + metricsSummaryBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.MetricsSummary, + com.google.devicesandservices.health.v4.MetricsSummary.Builder, + com.google.devicesandservices.health.v4.MetricsSummaryOrBuilder>( + getMetricsSummary(), getParentForChildren(), isClean()); + metricsSummary_ = null; + } + return metricsSummaryBuilder_; + } + + private int splitType_ = 0; + + /** + * + * + *
+       * Required. Method used to split the exercise laps.
+       * Users may manually mark the lap as complete even if the tracking
+       * is automatic.
+       * 
+ * + * + * .google.devicesandservices.health.v4.Exercise.SplitSummary.SplitType split_type = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for splitType. + */ + @java.lang.Override + public int getSplitTypeValue() { + return splitType_; + } + + /** + * + * + *
+       * Required. Method used to split the exercise laps.
+       * Users may manually mark the lap as complete even if the tracking
+       * is automatic.
+       * 
+ * + * + * .google.devicesandservices.health.v4.Exercise.SplitSummary.SplitType split_type = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for splitType to set. + * @return This builder for chaining. + */ + public Builder setSplitTypeValue(int value) { + splitType_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. Method used to split the exercise laps.
+       * Users may manually mark the lap as complete even if the tracking
+       * is automatic.
+       * 
+ * + * + * .google.devicesandservices.health.v4.Exercise.SplitSummary.SplitType split_type = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The splitType. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Exercise.SplitSummary.SplitType + getSplitType() { + com.google.devicesandservices.health.v4.Exercise.SplitSummary.SplitType result = + com.google.devicesandservices.health.v4.Exercise.SplitSummary.SplitType.forNumber( + splitType_); + return result == null + ? com.google.devicesandservices.health.v4.Exercise.SplitSummary.SplitType.UNRECOGNIZED + : result; + } + + /** + * + * + *
+       * Required. Method used to split the exercise laps.
+       * Users may manually mark the lap as complete even if the tracking
+       * is automatic.
+       * 
+ * + * + * .google.devicesandservices.health.v4.Exercise.SplitSummary.SplitType split_type = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The splitType to set. + * @return This builder for chaining. + */ + public Builder setSplitType( + com.google.devicesandservices.health.v4.Exercise.SplitSummary.SplitType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000040; + splitType_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. Method used to split the exercise laps.
+       * Users may manually mark the lap as complete even if the tracking
+       * is automatic.
+       * 
+ * + * + * .google.devicesandservices.health.v4.Exercise.SplitSummary.SplitType split_type = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearSplitType() { + bitField0_ = (bitField0_ & ~0x00000040); + splitType_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.Exercise.SplitSummary) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.Exercise.SplitSummary) + private static final com.google.devicesandservices.health.v4.Exercise.SplitSummary + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.Exercise.SplitSummary(); + } + + public static com.google.devicesandservices.health.v4.Exercise.SplitSummary + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SplitSummary parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.Exercise.SplitSummary + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ExerciseEventOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.Exercise.ExerciseEvent) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. Exercise event time
+     * 
+ * + * .google.protobuf.Timestamp event_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the eventTime field is set. + */ + boolean hasEventTime(); + + /** + * + * + *
+     * Required. Exercise event time
+     * 
+ * + * .google.protobuf.Timestamp event_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The eventTime. + */ + com.google.protobuf.Timestamp getEventTime(); + + /** + * + * + *
+     * Required. Exercise event time
+     * 
+ * + * .google.protobuf.Timestamp event_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.TimestampOrBuilder getEventTimeOrBuilder(); + + /** + * + * + *
+     * Required. Exercise event time offset from UTC
+     * 
+ * + * + * .google.protobuf.Duration event_utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the eventUtcOffset field is set. + */ + boolean hasEventUtcOffset(); + + /** + * + * + *
+     * Required. Exercise event time offset from UTC
+     * 
+ * + * + * .google.protobuf.Duration event_utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The eventUtcOffset. + */ + com.google.protobuf.Duration getEventUtcOffset(); + + /** + * + * + *
+     * Required. Exercise event time offset from UTC
+     * 
+ * + * + * .google.protobuf.Duration event_utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.DurationOrBuilder getEventUtcOffsetOrBuilder(); + + /** + * + * + *
+     * Required. The type of the event, such as start, stop, pause, resume.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Exercise.ExerciseEvent.ExerciseEventType exercise_event_type = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for exerciseEventType. + */ + int getExerciseEventTypeValue(); + + /** + * + * + *
+     * Required. The type of the event, such as start, stop, pause, resume.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Exercise.ExerciseEvent.ExerciseEventType exercise_event_type = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The exerciseEventType. + */ + com.google.devicesandservices.health.v4.Exercise.ExerciseEvent.ExerciseEventType + getExerciseEventType(); + } + + /** + * + * + *
+   * Represents instantaneous events that happen during an exercise,
+   * such as start, stop, pause, split.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.Exercise.ExerciseEvent} + */ + public static final class ExerciseEvent extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.Exercise.ExerciseEvent) + ExerciseEventOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ExerciseEvent"); + } + + // Use ExerciseEvent.newBuilder() to construct. + private ExerciseEvent(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ExerciseEvent() { + exerciseEventType_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_Exercise_ExerciseEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_Exercise_ExerciseEvent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.Exercise.ExerciseEvent.class, + com.google.devicesandservices.health.v4.Exercise.ExerciseEvent.Builder.class); + } + + /** + * + * + *
+     * The type of the event, such as start, stop, pause, resume.
+     * 
+ * + * Protobuf enum {@code + * google.devicesandservices.health.v4.Exercise.ExerciseEvent.ExerciseEventType} + */ + public enum ExerciseEventType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Exercise event type is unspecified.
+       * 
+ * + * EXERCISE_EVENT_TYPE_UNSPECIFIED = 0; + */ + EXERCISE_EVENT_TYPE_UNSPECIFIED(0), + /** + * + * + *
+       * Exercise start event.
+       * 
+ * + * START = 1; + */ + START(1), + /** + * + * + *
+       * Exercise stop event.
+       * 
+ * + * STOP = 2; + */ + STOP(2), + /** + * + * + *
+       * Exercise pause event.
+       * 
+ * + * PAUSE = 3; + */ + PAUSE(3), + /** + * + * + *
+       * Exercise resume event.
+       * 
+ * + * RESUME = 4; + */ + RESUME(4), + /** + * + * + *
+       * Exercise auto-pause event.
+       * 
+ * + * AUTO_PAUSE = 5; + */ + AUTO_PAUSE(5), + /** + * + * + *
+       * Exercise auto-resume event.
+       * 
+ * + * AUTO_RESUME = 6; + */ + AUTO_RESUME(6), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ExerciseEventType"); + } + + /** + * + * + *
+       * Exercise event type is unspecified.
+       * 
+ * + * EXERCISE_EVENT_TYPE_UNSPECIFIED = 0; + */ + public static final int EXERCISE_EVENT_TYPE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+       * Exercise start event.
+       * 
+ * + * START = 1; + */ + public static final int START_VALUE = 1; + + /** + * + * + *
+       * Exercise stop event.
+       * 
+ * + * STOP = 2; + */ + public static final int STOP_VALUE = 2; + + /** + * + * + *
+       * Exercise pause event.
+       * 
+ * + * PAUSE = 3; + */ + public static final int PAUSE_VALUE = 3; + + /** + * + * + *
+       * Exercise resume event.
+       * 
+ * + * RESUME = 4; + */ + public static final int RESUME_VALUE = 4; + + /** + * + * + *
+       * Exercise auto-pause event.
+       * 
+ * + * AUTO_PAUSE = 5; + */ + public static final int AUTO_PAUSE_VALUE = 5; + + /** + * + * + *
+       * Exercise auto-resume event.
+       * 
+ * + * AUTO_RESUME = 6; + */ + public static final int AUTO_RESUME_VALUE = 6; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ExerciseEventType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ExerciseEventType forNumber(int value) { + switch (value) { + case 0: + return EXERCISE_EVENT_TYPE_UNSPECIFIED; + case 1: + return START; + case 2: + return STOP; + case 3: + return PAUSE; + case 4: + return RESUME; + case 5: + return AUTO_PAUSE; + case 6: + return AUTO_RESUME; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ExerciseEventType findValueByNumber(int number) { + return ExerciseEventType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.devicesandservices.health.v4.Exercise.ExerciseEvent.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final ExerciseEventType[] VALUES = values(); + + public static ExerciseEventType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private ExerciseEventType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.devicesandservices.health.v4.Exercise.ExerciseEvent.ExerciseEventType) + } + + private int bitField0_; + public static final int EVENT_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp eventTime_; + + /** + * + * + *
+     * Required. Exercise event time
+     * 
+ * + * .google.protobuf.Timestamp event_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the eventTime field is set. + */ + @java.lang.Override + public boolean hasEventTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. Exercise event time
+     * 
+ * + * .google.protobuf.Timestamp event_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The eventTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEventTime() { + return eventTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : eventTime_; + } + + /** + * + * + *
+     * Required. Exercise event time
+     * 
+ * + * .google.protobuf.Timestamp event_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEventTimeOrBuilder() { + return eventTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : eventTime_; + } + + public static final int EVENT_UTC_OFFSET_FIELD_NUMBER = 2; + private com.google.protobuf.Duration eventUtcOffset_; + + /** + * + * + *
+     * Required. Exercise event time offset from UTC
+     * 
+ * + * + * .google.protobuf.Duration event_utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the eventUtcOffset field is set. + */ + @java.lang.Override + public boolean hasEventUtcOffset() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Required. Exercise event time offset from UTC
+     * 
+ * + * + * .google.protobuf.Duration event_utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The eventUtcOffset. + */ + @java.lang.Override + public com.google.protobuf.Duration getEventUtcOffset() { + return eventUtcOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : eventUtcOffset_; + } + + /** + * + * + *
+     * Required. Exercise event time offset from UTC
+     * 
+ * + * + * .google.protobuf.Duration event_utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getEventUtcOffsetOrBuilder() { + return eventUtcOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : eventUtcOffset_; + } + + public static final int EXERCISE_EVENT_TYPE_FIELD_NUMBER = 3; + private int exerciseEventType_ = 0; + + /** + * + * + *
+     * Required. The type of the event, such as start, stop, pause, resume.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Exercise.ExerciseEvent.ExerciseEventType exercise_event_type = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for exerciseEventType. + */ + @java.lang.Override + public int getExerciseEventTypeValue() { + return exerciseEventType_; + } + + /** + * + * + *
+     * Required. The type of the event, such as start, stop, pause, resume.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Exercise.ExerciseEvent.ExerciseEventType exercise_event_type = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The exerciseEventType. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Exercise.ExerciseEvent.ExerciseEventType + getExerciseEventType() { + com.google.devicesandservices.health.v4.Exercise.ExerciseEvent.ExerciseEventType result = + com.google.devicesandservices.health.v4.Exercise.ExerciseEvent.ExerciseEventType + .forNumber(exerciseEventType_); + return result == null + ? com.google.devicesandservices.health.v4.Exercise.ExerciseEvent.ExerciseEventType + .UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getEventTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getEventUtcOffset()); + } + if (exerciseEventType_ + != com.google.devicesandservices.health.v4.Exercise.ExerciseEvent.ExerciseEventType + .EXERCISE_EVENT_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(3, exerciseEventType_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getEventTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEventUtcOffset()); + } + if (exerciseEventType_ + != com.google.devicesandservices.health.v4.Exercise.ExerciseEvent.ExerciseEventType + .EXERCISE_EVENT_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, exerciseEventType_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.Exercise.ExerciseEvent)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.Exercise.ExerciseEvent other = + (com.google.devicesandservices.health.v4.Exercise.ExerciseEvent) obj; + + if (hasEventTime() != other.hasEventTime()) return false; + if (hasEventTime()) { + if (!getEventTime().equals(other.getEventTime())) return false; + } + if (hasEventUtcOffset() != other.hasEventUtcOffset()) return false; + if (hasEventUtcOffset()) { + if (!getEventUtcOffset().equals(other.getEventUtcOffset())) return false; + } + if (exerciseEventType_ != other.exerciseEventType_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasEventTime()) { + hash = (37 * hash) + EVENT_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEventTime().hashCode(); + } + if (hasEventUtcOffset()) { + hash = (37 * hash) + EVENT_UTC_OFFSET_FIELD_NUMBER; + hash = (53 * hash) + getEventUtcOffset().hashCode(); + } + hash = (37 * hash) + EXERCISE_EVENT_TYPE_FIELD_NUMBER; + hash = (53 * hash) + exerciseEventType_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.Exercise.ExerciseEvent parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.Exercise.ExerciseEvent parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Exercise.ExerciseEvent parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.Exercise.ExerciseEvent parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Exercise.ExerciseEvent parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.Exercise.ExerciseEvent parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Exercise.ExerciseEvent parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.Exercise.ExerciseEvent parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Exercise.ExerciseEvent parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.Exercise.ExerciseEvent parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Exercise.ExerciseEvent parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.Exercise.ExerciseEvent parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.Exercise.ExerciseEvent prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+     * Represents instantaneous events that happen during an exercise,
+     * such as start, stop, pause, split.
+     * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.Exercise.ExerciseEvent} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.Exercise.ExerciseEvent) + com.google.devicesandservices.health.v4.Exercise.ExerciseEventOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_Exercise_ExerciseEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_Exercise_ExerciseEvent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.Exercise.ExerciseEvent.class, + com.google.devicesandservices.health.v4.Exercise.ExerciseEvent.Builder.class); + } + + // Construct using com.google.devicesandservices.health.v4.Exercise.ExerciseEvent.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetEventTimeFieldBuilder(); + internalGetEventUtcOffsetFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + eventTime_ = null; + if (eventTimeBuilder_ != null) { + eventTimeBuilder_.dispose(); + eventTimeBuilder_ = null; + } + eventUtcOffset_ = null; + if (eventUtcOffsetBuilder_ != null) { + eventUtcOffsetBuilder_.dispose(); + eventUtcOffsetBuilder_ = null; + } + exerciseEventType_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_Exercise_ExerciseEvent_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.Exercise.ExerciseEvent + getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.Exercise.ExerciseEvent.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.Exercise.ExerciseEvent build() { + com.google.devicesandservices.health.v4.Exercise.ExerciseEvent result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.Exercise.ExerciseEvent buildPartial() { + com.google.devicesandservices.health.v4.Exercise.ExerciseEvent result = + new com.google.devicesandservices.health.v4.Exercise.ExerciseEvent(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.devicesandservices.health.v4.Exercise.ExerciseEvent result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.eventTime_ = eventTimeBuilder_ == null ? eventTime_ : eventTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.eventUtcOffset_ = + eventUtcOffsetBuilder_ == null ? eventUtcOffset_ : eventUtcOffsetBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.exerciseEventType_ = exerciseEventType_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.Exercise.ExerciseEvent) { + return mergeFrom((com.google.devicesandservices.health.v4.Exercise.ExerciseEvent) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.devicesandservices.health.v4.Exercise.ExerciseEvent other) { + if (other + == com.google.devicesandservices.health.v4.Exercise.ExerciseEvent.getDefaultInstance()) + return this; + if (other.hasEventTime()) { + mergeEventTime(other.getEventTime()); + } + if (other.hasEventUtcOffset()) { + mergeEventUtcOffset(other.getEventUtcOffset()); + } + if (other.exerciseEventType_ != 0) { + setExerciseEventTypeValue(other.getExerciseEventTypeValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetEventTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetEventUtcOffsetFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + exerciseEventType_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.Timestamp eventTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + eventTimeBuilder_; + + /** + * + * + *
+       * Required. Exercise event time
+       * 
+ * + * .google.protobuf.Timestamp event_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the eventTime field is set. + */ + public boolean hasEventTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+       * Required. Exercise event time
+       * 
+ * + * .google.protobuf.Timestamp event_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The eventTime. + */ + public com.google.protobuf.Timestamp getEventTime() { + if (eventTimeBuilder_ == null) { + return eventTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : eventTime_; + } else { + return eventTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+       * Required. Exercise event time
+       * 
+ * + * .google.protobuf.Timestamp event_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setEventTime(com.google.protobuf.Timestamp value) { + if (eventTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + eventTime_ = value; + } else { + eventTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. Exercise event time
+       * 
+ * + * .google.protobuf.Timestamp event_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setEventTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (eventTimeBuilder_ == null) { + eventTime_ = builderForValue.build(); + } else { + eventTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. Exercise event time
+       * 
+ * + * .google.protobuf.Timestamp event_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeEventTime(com.google.protobuf.Timestamp value) { + if (eventTimeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && eventTime_ != null + && eventTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEventTimeBuilder().mergeFrom(value); + } else { + eventTime_ = value; + } + } else { + eventTimeBuilder_.mergeFrom(value); + } + if (eventTime_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * Required. Exercise event time
+       * 
+ * + * .google.protobuf.Timestamp event_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearEventTime() { + bitField0_ = (bitField0_ & ~0x00000001); + eventTime_ = null; + if (eventTimeBuilder_ != null) { + eventTimeBuilder_.dispose(); + eventTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. Exercise event time
+       * 
+ * + * .google.protobuf.Timestamp event_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.Timestamp.Builder getEventTimeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetEventTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * Required. Exercise event time
+       * 
+ * + * .google.protobuf.Timestamp event_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.TimestampOrBuilder getEventTimeOrBuilder() { + if (eventTimeBuilder_ != null) { + return eventTimeBuilder_.getMessageOrBuilder(); + } else { + return eventTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : eventTime_; + } + } + + /** + * + * + *
+       * Required. Exercise event time
+       * 
+ * + * .google.protobuf.Timestamp event_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetEventTimeFieldBuilder() { + if (eventTimeBuilder_ == null) { + eventTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEventTime(), getParentForChildren(), isClean()); + eventTime_ = null; + } + return eventTimeBuilder_; + } + + private com.google.protobuf.Duration eventUtcOffset_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + eventUtcOffsetBuilder_; + + /** + * + * + *
+       * Required. Exercise event time offset from UTC
+       * 
+ * + * + * .google.protobuf.Duration event_utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the eventUtcOffset field is set. + */ + public boolean hasEventUtcOffset() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+       * Required. Exercise event time offset from UTC
+       * 
+ * + * + * .google.protobuf.Duration event_utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The eventUtcOffset. + */ + public com.google.protobuf.Duration getEventUtcOffset() { + if (eventUtcOffsetBuilder_ == null) { + return eventUtcOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : eventUtcOffset_; + } else { + return eventUtcOffsetBuilder_.getMessage(); + } + } + + /** + * + * + *
+       * Required. Exercise event time offset from UTC
+       * 
+ * + * + * .google.protobuf.Duration event_utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setEventUtcOffset(com.google.protobuf.Duration value) { + if (eventUtcOffsetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + eventUtcOffset_ = value; + } else { + eventUtcOffsetBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. Exercise event time offset from UTC
+       * 
+ * + * + * .google.protobuf.Duration event_utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setEventUtcOffset(com.google.protobuf.Duration.Builder builderForValue) { + if (eventUtcOffsetBuilder_ == null) { + eventUtcOffset_ = builderForValue.build(); + } else { + eventUtcOffsetBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. Exercise event time offset from UTC
+       * 
+ * + * + * .google.protobuf.Duration event_utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeEventUtcOffset(com.google.protobuf.Duration value) { + if (eventUtcOffsetBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && eventUtcOffset_ != null + && eventUtcOffset_ != com.google.protobuf.Duration.getDefaultInstance()) { + getEventUtcOffsetBuilder().mergeFrom(value); + } else { + eventUtcOffset_ = value; + } + } else { + eventUtcOffsetBuilder_.mergeFrom(value); + } + if (eventUtcOffset_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * Required. Exercise event time offset from UTC
+       * 
+ * + * + * .google.protobuf.Duration event_utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearEventUtcOffset() { + bitField0_ = (bitField0_ & ~0x00000002); + eventUtcOffset_ = null; + if (eventUtcOffsetBuilder_ != null) { + eventUtcOffsetBuilder_.dispose(); + eventUtcOffsetBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. Exercise event time offset from UTC
+       * 
+ * + * + * .google.protobuf.Duration event_utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.Duration.Builder getEventUtcOffsetBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetEventUtcOffsetFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * Required. Exercise event time offset from UTC
+       * 
+ * + * + * .google.protobuf.Duration event_utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.DurationOrBuilder getEventUtcOffsetOrBuilder() { + if (eventUtcOffsetBuilder_ != null) { + return eventUtcOffsetBuilder_.getMessageOrBuilder(); + } else { + return eventUtcOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : eventUtcOffset_; + } + } + + /** + * + * + *
+       * Required. Exercise event time offset from UTC
+       * 
+ * + * + * .google.protobuf.Duration event_utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + internalGetEventUtcOffsetFieldBuilder() { + if (eventUtcOffsetBuilder_ == null) { + eventUtcOffsetBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getEventUtcOffset(), getParentForChildren(), isClean()); + eventUtcOffset_ = null; + } + return eventUtcOffsetBuilder_; + } + + private int exerciseEventType_ = 0; + + /** + * + * + *
+       * Required. The type of the event, such as start, stop, pause, resume.
+       * 
+ * + * + * .google.devicesandservices.health.v4.Exercise.ExerciseEvent.ExerciseEventType exercise_event_type = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for exerciseEventType. + */ + @java.lang.Override + public int getExerciseEventTypeValue() { + return exerciseEventType_; + } + + /** + * + * + *
+       * Required. The type of the event, such as start, stop, pause, resume.
+       * 
+ * + * + * .google.devicesandservices.health.v4.Exercise.ExerciseEvent.ExerciseEventType exercise_event_type = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for exerciseEventType to set. + * @return This builder for chaining. + */ + public Builder setExerciseEventTypeValue(int value) { + exerciseEventType_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The type of the event, such as start, stop, pause, resume.
+       * 
+ * + * + * .google.devicesandservices.health.v4.Exercise.ExerciseEvent.ExerciseEventType exercise_event_type = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The exerciseEventType. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Exercise.ExerciseEvent.ExerciseEventType + getExerciseEventType() { + com.google.devicesandservices.health.v4.Exercise.ExerciseEvent.ExerciseEventType result = + com.google.devicesandservices.health.v4.Exercise.ExerciseEvent.ExerciseEventType + .forNumber(exerciseEventType_); + return result == null + ? com.google.devicesandservices.health.v4.Exercise.ExerciseEvent.ExerciseEventType + .UNRECOGNIZED + : result; + } + + /** + * + * + *
+       * Required. The type of the event, such as start, stop, pause, resume.
+       * 
+ * + * + * .google.devicesandservices.health.v4.Exercise.ExerciseEvent.ExerciseEventType exercise_event_type = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The exerciseEventType to set. + * @return This builder for chaining. + */ + public Builder setExerciseEventType( + com.google.devicesandservices.health.v4.Exercise.ExerciseEvent.ExerciseEventType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + exerciseEventType_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The type of the event, such as start, stop, pause, resume.
+       * 
+ * + * + * .google.devicesandservices.health.v4.Exercise.ExerciseEvent.ExerciseEventType exercise_event_type = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearExerciseEventType() { + bitField0_ = (bitField0_ & ~0x00000004); + exerciseEventType_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.Exercise.ExerciseEvent) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.Exercise.ExerciseEvent) + private static final com.google.devicesandservices.health.v4.Exercise.ExerciseEvent + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.Exercise.ExerciseEvent(); + } + + public static com.google.devicesandservices.health.v4.Exercise.ExerciseEvent + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExerciseEvent parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.Exercise.ExerciseEvent + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ExerciseMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.Exercise.ExerciseMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Optional. Pool length in millimeters. Only present in the swimming
+     * exercises.
+     * 
+ * + * int64 pool_length_millimeters = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The poolLengthMillimeters. + */ + long getPoolLengthMillimeters(); + + /** + * + * + *
+     * Optional. Whether the exercise had GPS tracking.
+     * 
+ * + * bool has_gps = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The hasGps. + */ + boolean getHasGps(); + } + + /** + * + * + *
+   * Additional exercise metadata.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.Exercise.ExerciseMetadata} + */ + public static final class ExerciseMetadata extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.Exercise.ExerciseMetadata) + ExerciseMetadataOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ExerciseMetadata"); + } + + // Use ExerciseMetadata.newBuilder() to construct. + private ExerciseMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ExerciseMetadata() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_Exercise_ExerciseMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_Exercise_ExerciseMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.Exercise.ExerciseMetadata.class, + com.google.devicesandservices.health.v4.Exercise.ExerciseMetadata.Builder.class); + } + + public static final int POOL_LENGTH_MILLIMETERS_FIELD_NUMBER = 1; + private long poolLengthMillimeters_ = 0L; + + /** + * + * + *
+     * Optional. Pool length in millimeters. Only present in the swimming
+     * exercises.
+     * 
+ * + * int64 pool_length_millimeters = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The poolLengthMillimeters. + */ + @java.lang.Override + public long getPoolLengthMillimeters() { + return poolLengthMillimeters_; + } + + public static final int HAS_GPS_FIELD_NUMBER = 2; + private boolean hasGps_ = false; + + /** + * + * + *
+     * Optional. Whether the exercise had GPS tracking.
+     * 
+ * + * bool has_gps = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The hasGps. + */ + @java.lang.Override + public boolean getHasGps() { + return hasGps_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (poolLengthMillimeters_ != 0L) { + output.writeInt64(1, poolLengthMillimeters_); + } + if (hasGps_ != false) { + output.writeBool(2, hasGps_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (poolLengthMillimeters_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, poolLengthMillimeters_); + } + if (hasGps_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, hasGps_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.Exercise.ExerciseMetadata)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.Exercise.ExerciseMetadata other = + (com.google.devicesandservices.health.v4.Exercise.ExerciseMetadata) obj; + + if (getPoolLengthMillimeters() != other.getPoolLengthMillimeters()) return false; + if (getHasGps() != other.getHasGps()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + POOL_LENGTH_MILLIMETERS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getPoolLengthMillimeters()); + hash = (37 * hash) + HAS_GPS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getHasGps()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.Exercise.ExerciseMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.Exercise.ExerciseMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Exercise.ExerciseMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.Exercise.ExerciseMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Exercise.ExerciseMetadata parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.Exercise.ExerciseMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Exercise.ExerciseMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.Exercise.ExerciseMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Exercise.ExerciseMetadata + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.Exercise.ExerciseMetadata + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Exercise.ExerciseMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.Exercise.ExerciseMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.Exercise.ExerciseMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+     * Additional exercise metadata.
+     * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.Exercise.ExerciseMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.Exercise.ExerciseMetadata) + com.google.devicesandservices.health.v4.Exercise.ExerciseMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_Exercise_ExerciseMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_Exercise_ExerciseMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.Exercise.ExerciseMetadata.class, + com.google.devicesandservices.health.v4.Exercise.ExerciseMetadata.Builder.class); + } + + // Construct using + // com.google.devicesandservices.health.v4.Exercise.ExerciseMetadata.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + poolLengthMillimeters_ = 0L; + hasGps_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_Exercise_ExerciseMetadata_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.Exercise.ExerciseMetadata + getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.Exercise.ExerciseMetadata + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.Exercise.ExerciseMetadata build() { + com.google.devicesandservices.health.v4.Exercise.ExerciseMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.Exercise.ExerciseMetadata buildPartial() { + com.google.devicesandservices.health.v4.Exercise.ExerciseMetadata result = + new com.google.devicesandservices.health.v4.Exercise.ExerciseMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.devicesandservices.health.v4.Exercise.ExerciseMetadata result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.poolLengthMillimeters_ = poolLengthMillimeters_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.hasGps_ = hasGps_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.Exercise.ExerciseMetadata) { + return mergeFrom( + (com.google.devicesandservices.health.v4.Exercise.ExerciseMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.devicesandservices.health.v4.Exercise.ExerciseMetadata other) { + if (other + == com.google.devicesandservices.health.v4.Exercise.ExerciseMetadata + .getDefaultInstance()) return this; + if (other.getPoolLengthMillimeters() != 0L) { + setPoolLengthMillimeters(other.getPoolLengthMillimeters()); + } + if (other.getHasGps() != false) { + setHasGps(other.getHasGps()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + poolLengthMillimeters_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + hasGps_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private long poolLengthMillimeters_; + + /** + * + * + *
+       * Optional. Pool length in millimeters. Only present in the swimming
+       * exercises.
+       * 
+ * + * int64 pool_length_millimeters = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The poolLengthMillimeters. + */ + @java.lang.Override + public long getPoolLengthMillimeters() { + return poolLengthMillimeters_; + } + + /** + * + * + *
+       * Optional. Pool length in millimeters. Only present in the swimming
+       * exercises.
+       * 
+ * + * int64 pool_length_millimeters = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The poolLengthMillimeters to set. + * @return This builder for chaining. + */ + public Builder setPoolLengthMillimeters(long value) { + + poolLengthMillimeters_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. Pool length in millimeters. Only present in the swimming
+       * exercises.
+       * 
+ * + * int64 pool_length_millimeters = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPoolLengthMillimeters() { + bitField0_ = (bitField0_ & ~0x00000001); + poolLengthMillimeters_ = 0L; + onChanged(); + return this; + } + + private boolean hasGps_; + + /** + * + * + *
+       * Optional. Whether the exercise had GPS tracking.
+       * 
+ * + * bool has_gps = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The hasGps. + */ + @java.lang.Override + public boolean getHasGps() { + return hasGps_; + } + + /** + * + * + *
+       * Optional. Whether the exercise had GPS tracking.
+       * 
+ * + * bool has_gps = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The hasGps to set. + * @return This builder for chaining. + */ + public Builder setHasGps(boolean value) { + + hasGps_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. Whether the exercise had GPS tracking.
+       * 
+ * + * bool has_gps = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearHasGps() { + bitField0_ = (bitField0_ & ~0x00000002); + hasGps_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.Exercise.ExerciseMetadata) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.Exercise.ExerciseMetadata) + private static final com.google.devicesandservices.health.v4.Exercise.ExerciseMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.Exercise.ExerciseMetadata(); + } + + public static com.google.devicesandservices.health.v4.Exercise.ExerciseMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExerciseMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.Exercise.ExerciseMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int INTERVAL_FIELD_NUMBER = 2; + private com.google.devicesandservices.health.v4.SessionTimeInterval interval_; + + /** + * + * + *
+   * Required. Observed exercise interval
+   * 
+ * + * + * .google.devicesandservices.health.v4.SessionTimeInterval interval = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the interval field is set. + */ + @java.lang.Override + public boolean hasInterval() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. Observed exercise interval
+   * 
+ * + * + * .google.devicesandservices.health.v4.SessionTimeInterval interval = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The interval. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.SessionTimeInterval getInterval() { + return interval_ == null + ? com.google.devicesandservices.health.v4.SessionTimeInterval.getDefaultInstance() + : interval_; + } + + /** + * + * + *
+   * Required. Observed exercise interval
+   * 
+ * + * + * .google.devicesandservices.health.v4.SessionTimeInterval interval = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.SessionTimeIntervalOrBuilder + getIntervalOrBuilder() { + return interval_ == null + ? com.google.devicesandservices.health.v4.SessionTimeInterval.getDefaultInstance() + : interval_; + } + + public static final int EXERCISE_TYPE_FIELD_NUMBER = 6; + private int exerciseType_ = 0; + + /** + * + * + *
+   * Required. The type of activity performed during an exercise.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Exercise.ExerciseType exercise_type = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for exerciseType. + */ + @java.lang.Override + public int getExerciseTypeValue() { + return exerciseType_; + } + + /** + * + * + *
+   * Required. The type of activity performed during an exercise.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Exercise.ExerciseType exercise_type = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The exerciseType. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Exercise.ExerciseType getExerciseType() { + com.google.devicesandservices.health.v4.Exercise.ExerciseType result = + com.google.devicesandservices.health.v4.Exercise.ExerciseType.forNumber(exerciseType_); + return result == null + ? com.google.devicesandservices.health.v4.Exercise.ExerciseType.UNRECOGNIZED + : result; + } + + public static final int SPLITS_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private java.util.List splits_; + + /** + * + * + *
+   * 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]; + * + */ + @java.lang.Override + public java.util.List + getSplitsList() { + return splits_; + } + + /** + * + * + *
+   * 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]; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.devicesandservices.health.v4.Exercise.SplitSummaryOrBuilder> + getSplitsOrBuilderList() { + return splits_; + } + + /** + * + * + *
+   * 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]; + * + */ + @java.lang.Override + public int getSplitsCount() { + return splits_.size(); + } + + /** + * + * + *
+   * 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]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Exercise.SplitSummary getSplits(int index) { + return splits_.get(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]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Exercise.SplitSummaryOrBuilder getSplitsOrBuilder( + int index) { + return splits_.get(index); + } + + public static final int EXERCISE_EVENTS_FIELD_NUMBER = 15; + + @SuppressWarnings("serial") + private java.util.List + exerciseEvents_; + + /** + * + * + *
+   * 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]; + * + */ + @java.lang.Override + public java.util.List + getExerciseEventsList() { + return exerciseEvents_; + } + + /** + * + * + *
+   * 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]; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.devicesandservices.health.v4.Exercise.ExerciseEventOrBuilder> + getExerciseEventsOrBuilderList() { + return exerciseEvents_; + } + + /** + * + * + *
+   * 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]; + * + */ + @java.lang.Override + public int getExerciseEventsCount() { + return exerciseEvents_.size(); + } + + /** + * + * + *
+   * 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]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Exercise.ExerciseEvent getExerciseEvents( + int index) { + return exerciseEvents_.get(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]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Exercise.ExerciseEventOrBuilder + getExerciseEventsOrBuilder(int index) { + return exerciseEvents_.get(index); + } + + public static final int SPLIT_SUMMARIES_FIELD_NUMBER = 9; + + @SuppressWarnings("serial") + private java.util.List + splitSummaries_; + + /** + * + * + *
+   * 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]; + * + */ + @java.lang.Override + public java.util.List + getSplitSummariesList() { + return splitSummaries_; + } + + /** + * + * + *
+   * 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]; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.devicesandservices.health.v4.Exercise.SplitSummaryOrBuilder> + getSplitSummariesOrBuilderList() { + return splitSummaries_; + } + + /** + * + * + *
+   * 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]; + * + */ + @java.lang.Override + public int getSplitSummariesCount() { + return splitSummaries_.size(); + } + + /** + * + * + *
+   * 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]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Exercise.SplitSummary getSplitSummaries( + int index) { + return splitSummaries_.get(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]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Exercise.SplitSummaryOrBuilder + getSplitSummariesOrBuilder(int index) { + return splitSummaries_.get(index); + } + + public static final int METRICS_SUMMARY_FIELD_NUMBER = 10; + private com.google.devicesandservices.health.v4.MetricsSummary metricsSummary_; + + /** + * + * + *
+   * Required. Summary metrics for this exercise
+   * ( )
+   * 
+ * + * + * .google.devicesandservices.health.v4.MetricsSummary metrics_summary = 10 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the metricsSummary field is set. + */ + @java.lang.Override + public boolean hasMetricsSummary() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Required. Summary metrics for this exercise
+   * ( )
+   * 
+ * + * + * .google.devicesandservices.health.v4.MetricsSummary metrics_summary = 10 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The metricsSummary. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.MetricsSummary getMetricsSummary() { + return metricsSummary_ == null + ? com.google.devicesandservices.health.v4.MetricsSummary.getDefaultInstance() + : metricsSummary_; + } + + /** + * + * + *
+   * Required. Summary metrics for this exercise
+   * ( )
+   * 
+ * + * + * .google.devicesandservices.health.v4.MetricsSummary metrics_summary = 10 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.MetricsSummaryOrBuilder + getMetricsSummaryOrBuilder() { + return metricsSummary_ == null + ? com.google.devicesandservices.health.v4.MetricsSummary.getDefaultInstance() + : metricsSummary_; + } + + public static final int EXERCISE_METADATA_FIELD_NUMBER = 11; + private com.google.devicesandservices.health.v4.Exercise.ExerciseMetadata exerciseMetadata_; + + /** + * + * + *
+   * Optional. Additional exercise metadata.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Exercise.ExerciseMetadata exercise_metadata = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the exerciseMetadata field is set. + */ + @java.lang.Override + public boolean hasExerciseMetadata() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Optional. Additional exercise metadata.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Exercise.ExerciseMetadata exercise_metadata = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The exerciseMetadata. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Exercise.ExerciseMetadata getExerciseMetadata() { + return exerciseMetadata_ == null + ? com.google.devicesandservices.health.v4.Exercise.ExerciseMetadata.getDefaultInstance() + : exerciseMetadata_; + } + + /** + * + * + *
+   * Optional. Additional exercise metadata.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Exercise.ExerciseMetadata exercise_metadata = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Exercise.ExerciseMetadataOrBuilder + getExerciseMetadataOrBuilder() { + return exerciseMetadata_ == null + ? com.google.devicesandservices.health.v4.Exercise.ExerciseMetadata.getDefaultInstance() + : exerciseMetadata_; + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 12; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + + /** + * + * + *
+   * Required. Exercise display name.
+   * 
+ * + * string display_name = 12 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Exercise display name.
+   * 
+ * + * string display_name = 12 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ACTIVE_DURATION_FIELD_NUMBER = 13; + private com.google.protobuf.Duration activeDuration_; + + /** + * + * + *
+   * Optional. Duration excluding pauses.
+   * 
+ * + * .google.protobuf.Duration active_duration = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the activeDuration field is set. + */ + @java.lang.Override + public boolean hasActiveDuration() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+   * Optional. Duration excluding pauses.
+   * 
+ * + * .google.protobuf.Duration active_duration = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The activeDuration. + */ + @java.lang.Override + public com.google.protobuf.Duration getActiveDuration() { + return activeDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : activeDuration_; + } + + /** + * + * + *
+   * Optional. Duration excluding pauses.
+   * 
+ * + * .google.protobuf.Duration active_duration = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getActiveDurationOrBuilder() { + return activeDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : activeDuration_; + } + + public static final int NOTES_FIELD_NUMBER = 14; + + @SuppressWarnings("serial") + private volatile java.lang.Object notes_ = ""; + + /** + * + * + *
+   * Optional. Standard free-form notes captured at manual logging.
+   * 
+ * + * string notes = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The notes. + */ + @java.lang.Override + public java.lang.String getNotes() { + java.lang.Object ref = notes_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + notes_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Standard free-form notes captured at manual logging.
+   * 
+ * + * string notes = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for notes. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNotesBytes() { + java.lang.Object ref = notes_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + notes_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 16; + private com.google.protobuf.Timestamp updateTime_; + + /** + * + * + *
+   * 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]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+   * 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]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + /** + * + * + *
+   * 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]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int CREATE_TIME_FIELD_NUMBER = 17; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
+   * Output only. Represents the timestamp of the creation of the exercise.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+   * Output only. Represents the timestamp of the creation of the exercise.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + /** + * + * + *
+   * Output only. Represents the timestamp of the creation of the exercise.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getInterval()); + } + if (exerciseType_ + != com.google.devicesandservices.health.v4.Exercise.ExerciseType.EXERCISE_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(6, exerciseType_); + } + for (int i = 0; i < splits_.size(); i++) { + output.writeMessage(8, splits_.get(i)); + } + for (int i = 0; i < splitSummaries_.size(); i++) { + output.writeMessage(9, splitSummaries_.get(i)); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(10, getMetricsSummary()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(11, getExerciseMetadata()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 12, displayName_); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(13, getActiveDuration()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(notes_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 14, notes_); + } + for (int i = 0; i < exerciseEvents_.size(); i++) { + output.writeMessage(15, exerciseEvents_.get(i)); + } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeMessage(16, getUpdateTime()); + } + if (((bitField0_ & 0x00000020) != 0)) { + output.writeMessage(17, getCreateTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getInterval()); + } + if (exerciseType_ + != com.google.devicesandservices.health.v4.Exercise.ExerciseType.EXERCISE_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, exerciseType_); + } + for (int i = 0; i < splits_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, splits_.get(i)); + } + for (int i = 0; i < splitSummaries_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, splitSummaries_.get(i)); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getMetricsSummary()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getExerciseMetadata()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(12, displayName_); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, getActiveDuration()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(notes_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(14, notes_); + } + for (int i = 0; i < exerciseEvents_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(15, exerciseEvents_.get(i)); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(16, getUpdateTime()); + } + if (((bitField0_ & 0x00000020) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(17, getCreateTime()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.Exercise)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.Exercise other = + (com.google.devicesandservices.health.v4.Exercise) obj; + + if (hasInterval() != other.hasInterval()) return false; + if (hasInterval()) { + if (!getInterval().equals(other.getInterval())) return false; + } + if (exerciseType_ != other.exerciseType_) return false; + if (!getSplitsList().equals(other.getSplitsList())) return false; + if (!getExerciseEventsList().equals(other.getExerciseEventsList())) return false; + if (!getSplitSummariesList().equals(other.getSplitSummariesList())) return false; + if (hasMetricsSummary() != other.hasMetricsSummary()) return false; + if (hasMetricsSummary()) { + if (!getMetricsSummary().equals(other.getMetricsSummary())) return false; + } + if (hasExerciseMetadata() != other.hasExerciseMetadata()) return false; + if (hasExerciseMetadata()) { + if (!getExerciseMetadata().equals(other.getExerciseMetadata())) return false; + } + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (hasActiveDuration() != other.hasActiveDuration()) return false; + if (hasActiveDuration()) { + if (!getActiveDuration().equals(other.getActiveDuration())) return false; + } + if (!getNotes().equals(other.getNotes())) return false; + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasInterval()) { + hash = (37 * hash) + INTERVAL_FIELD_NUMBER; + hash = (53 * hash) + getInterval().hashCode(); + } + hash = (37 * hash) + EXERCISE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + exerciseType_; + if (getSplitsCount() > 0) { + hash = (37 * hash) + SPLITS_FIELD_NUMBER; + hash = (53 * hash) + getSplitsList().hashCode(); + } + if (getExerciseEventsCount() > 0) { + hash = (37 * hash) + EXERCISE_EVENTS_FIELD_NUMBER; + hash = (53 * hash) + getExerciseEventsList().hashCode(); + } + if (getSplitSummariesCount() > 0) { + hash = (37 * hash) + SPLIT_SUMMARIES_FIELD_NUMBER; + hash = (53 * hash) + getSplitSummariesList().hashCode(); + } + if (hasMetricsSummary()) { + hash = (37 * hash) + METRICS_SUMMARY_FIELD_NUMBER; + hash = (53 * hash) + getMetricsSummary().hashCode(); + } + if (hasExerciseMetadata()) { + hash = (37 * hash) + EXERCISE_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getExerciseMetadata().hashCode(); + } + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + if (hasActiveDuration()) { + hash = (37 * hash) + ACTIVE_DURATION_FIELD_NUMBER; + hash = (53 * hash) + getActiveDuration().hashCode(); + } + hash = (37 * hash) + NOTES_FIELD_NUMBER; + hash = (53 * hash) + getNotes().hashCode(); + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.Exercise parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.Exercise parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Exercise parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.Exercise parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Exercise parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.Exercise parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Exercise parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.Exercise parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Exercise parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.Exercise parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Exercise parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.Exercise parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.devicesandservices.health.v4.Exercise prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * An exercise that stores information about a physical activity.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.Exercise} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.Exercise) + com.google.devicesandservices.health.v4.ExerciseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_Exercise_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_Exercise_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.Exercise.class, + com.google.devicesandservices.health.v4.Exercise.Builder.class); + } + + // Construct using com.google.devicesandservices.health.v4.Exercise.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetIntervalFieldBuilder(); + internalGetSplitsFieldBuilder(); + internalGetExerciseEventsFieldBuilder(); + internalGetSplitSummariesFieldBuilder(); + internalGetMetricsSummaryFieldBuilder(); + internalGetExerciseMetadataFieldBuilder(); + internalGetActiveDurationFieldBuilder(); + internalGetUpdateTimeFieldBuilder(); + internalGetCreateTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + interval_ = null; + if (intervalBuilder_ != null) { + intervalBuilder_.dispose(); + intervalBuilder_ = null; + } + exerciseType_ = 0; + if (splitsBuilder_ == null) { + splits_ = java.util.Collections.emptyList(); + } else { + splits_ = null; + splitsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + if (exerciseEventsBuilder_ == null) { + exerciseEvents_ = java.util.Collections.emptyList(); + } else { + exerciseEvents_ = null; + exerciseEventsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + if (splitSummariesBuilder_ == null) { + splitSummaries_ = java.util.Collections.emptyList(); + } else { + splitSummaries_ = null; + splitSummariesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + metricsSummary_ = null; + if (metricsSummaryBuilder_ != null) { + metricsSummaryBuilder_.dispose(); + metricsSummaryBuilder_ = null; + } + exerciseMetadata_ = null; + if (exerciseMetadataBuilder_ != null) { + exerciseMetadataBuilder_.dispose(); + exerciseMetadataBuilder_ = null; + } + displayName_ = ""; + activeDuration_ = null; + if (activeDurationBuilder_ != null) { + activeDurationBuilder_.dispose(); + activeDurationBuilder_ = null; + } + notes_ = ""; + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_Exercise_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.Exercise getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.Exercise.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.Exercise build() { + com.google.devicesandservices.health.v4.Exercise result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.Exercise buildPartial() { + com.google.devicesandservices.health.v4.Exercise result = + new com.google.devicesandservices.health.v4.Exercise(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.devicesandservices.health.v4.Exercise result) { + if (splitsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + splits_ = java.util.Collections.unmodifiableList(splits_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.splits_ = splits_; + } else { + result.splits_ = splitsBuilder_.build(); + } + if (exerciseEventsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + exerciseEvents_ = java.util.Collections.unmodifiableList(exerciseEvents_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.exerciseEvents_ = exerciseEvents_; + } else { + result.exerciseEvents_ = exerciseEventsBuilder_.build(); + } + if (splitSummariesBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + splitSummaries_ = java.util.Collections.unmodifiableList(splitSummaries_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.splitSummaries_ = splitSummaries_; + } else { + result.splitSummaries_ = splitSummariesBuilder_.build(); + } + } + + private void buildPartial0(com.google.devicesandservices.health.v4.Exercise result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.interval_ = intervalBuilder_ == null ? interval_ : intervalBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.exerciseType_ = exerciseType_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.metricsSummary_ = + metricsSummaryBuilder_ == null ? metricsSummary_ : metricsSummaryBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.exerciseMetadata_ = + exerciseMetadataBuilder_ == null ? exerciseMetadata_ : exerciseMetadataBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.activeDuration_ = + activeDurationBuilder_ == null ? activeDuration_ : activeDurationBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.notes_ = notes_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000010; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000020; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.Exercise) { + return mergeFrom((com.google.devicesandservices.health.v4.Exercise) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.devicesandservices.health.v4.Exercise other) { + if (other == com.google.devicesandservices.health.v4.Exercise.getDefaultInstance()) + return this; + if (other.hasInterval()) { + mergeInterval(other.getInterval()); + } + if (other.exerciseType_ != 0) { + setExerciseTypeValue(other.getExerciseTypeValue()); + } + if (splitsBuilder_ == null) { + if (!other.splits_.isEmpty()) { + if (splits_.isEmpty()) { + splits_ = other.splits_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureSplitsIsMutable(); + splits_.addAll(other.splits_); + } + onChanged(); + } + } else { + if (!other.splits_.isEmpty()) { + if (splitsBuilder_.isEmpty()) { + splitsBuilder_.dispose(); + splitsBuilder_ = null; + splits_ = other.splits_; + bitField0_ = (bitField0_ & ~0x00000004); + splitsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetSplitsFieldBuilder() + : null; + } else { + splitsBuilder_.addAllMessages(other.splits_); + } + } + } + if (exerciseEventsBuilder_ == null) { + if (!other.exerciseEvents_.isEmpty()) { + if (exerciseEvents_.isEmpty()) { + exerciseEvents_ = other.exerciseEvents_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureExerciseEventsIsMutable(); + exerciseEvents_.addAll(other.exerciseEvents_); + } + onChanged(); + } + } else { + if (!other.exerciseEvents_.isEmpty()) { + if (exerciseEventsBuilder_.isEmpty()) { + exerciseEventsBuilder_.dispose(); + exerciseEventsBuilder_ = null; + exerciseEvents_ = other.exerciseEvents_; + bitField0_ = (bitField0_ & ~0x00000008); + exerciseEventsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetExerciseEventsFieldBuilder() + : null; + } else { + exerciseEventsBuilder_.addAllMessages(other.exerciseEvents_); + } + } + } + if (splitSummariesBuilder_ == null) { + if (!other.splitSummaries_.isEmpty()) { + if (splitSummaries_.isEmpty()) { + splitSummaries_ = other.splitSummaries_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureSplitSummariesIsMutable(); + splitSummaries_.addAll(other.splitSummaries_); + } + onChanged(); + } + } else { + if (!other.splitSummaries_.isEmpty()) { + if (splitSummariesBuilder_.isEmpty()) { + splitSummariesBuilder_.dispose(); + splitSummariesBuilder_ = null; + splitSummaries_ = other.splitSummaries_; + bitField0_ = (bitField0_ & ~0x00000010); + splitSummariesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetSplitSummariesFieldBuilder() + : null; + } else { + splitSummariesBuilder_.addAllMessages(other.splitSummaries_); + } + } + } + if (other.hasMetricsSummary()) { + mergeMetricsSummary(other.getMetricsSummary()); + } + if (other.hasExerciseMetadata()) { + mergeExerciseMetadata(other.getExerciseMetadata()); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000080; + onChanged(); + } + if (other.hasActiveDuration()) { + mergeActiveDuration(other.getActiveDuration()); + } + if (!other.getNotes().isEmpty()) { + notes_ = other.notes_; + bitField0_ |= 0x00000200; + onChanged(); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + input.readMessage( + internalGetIntervalFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 18 + case 48: + { + exerciseType_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 48 + case 66: + { + com.google.devicesandservices.health.v4.Exercise.SplitSummary m = + input.readMessage( + com.google.devicesandservices.health.v4.Exercise.SplitSummary.parser(), + extensionRegistry); + if (splitsBuilder_ == null) { + ensureSplitsIsMutable(); + splits_.add(m); + } else { + splitsBuilder_.addMessage(m); + } + break; + } // case 66 + case 74: + { + com.google.devicesandservices.health.v4.Exercise.SplitSummary m = + input.readMessage( + com.google.devicesandservices.health.v4.Exercise.SplitSummary.parser(), + extensionRegistry); + if (splitSummariesBuilder_ == null) { + ensureSplitSummariesIsMutable(); + splitSummaries_.add(m); + } else { + splitSummariesBuilder_.addMessage(m); + } + break; + } // case 74 + case 82: + { + input.readMessage( + internalGetMetricsSummaryFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 82 + case 90: + { + input.readMessage( + internalGetExerciseMetadataFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 90 + case 98: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 98 + case 106: + { + input.readMessage( + internalGetActiveDurationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000100; + break; + } // case 106 + case 114: + { + notes_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case 114 + case 122: + { + com.google.devicesandservices.health.v4.Exercise.ExerciseEvent m = + input.readMessage( + com.google.devicesandservices.health.v4.Exercise.ExerciseEvent.parser(), + extensionRegistry); + if (exerciseEventsBuilder_ == null) { + ensureExerciseEventsIsMutable(); + exerciseEvents_.add(m); + } else { + exerciseEventsBuilder_.addMessage(m); + } + break; + } // case 122 + case 130: + { + input.readMessage( + internalGetUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000400; + break; + } // case 130 + case 138: + { + input.readMessage( + internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000800; + break; + } // case 138 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.devicesandservices.health.v4.SessionTimeInterval interval_; + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.SessionTimeInterval, + com.google.devicesandservices.health.v4.SessionTimeInterval.Builder, + com.google.devicesandservices.health.v4.SessionTimeIntervalOrBuilder> + intervalBuilder_; + + /** + * + * + *
+     * Required. Observed exercise interval
+     * 
+ * + * + * .google.devicesandservices.health.v4.SessionTimeInterval interval = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the interval field is set. + */ + public boolean hasInterval() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. Observed exercise interval
+     * 
+ * + * + * .google.devicesandservices.health.v4.SessionTimeInterval interval = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The interval. + */ + public com.google.devicesandservices.health.v4.SessionTimeInterval getInterval() { + if (intervalBuilder_ == null) { + return interval_ == null + ? com.google.devicesandservices.health.v4.SessionTimeInterval.getDefaultInstance() + : interval_; + } else { + return intervalBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. Observed exercise interval
+     * 
+ * + * + * .google.devicesandservices.health.v4.SessionTimeInterval interval = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setInterval(com.google.devicesandservices.health.v4.SessionTimeInterval value) { + if (intervalBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + interval_ = value; + } else { + intervalBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Observed exercise interval
+     * 
+ * + * + * .google.devicesandservices.health.v4.SessionTimeInterval interval = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setInterval( + com.google.devicesandservices.health.v4.SessionTimeInterval.Builder builderForValue) { + if (intervalBuilder_ == null) { + interval_ = builderForValue.build(); + } else { + intervalBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Observed exercise interval
+     * 
+ * + * + * .google.devicesandservices.health.v4.SessionTimeInterval interval = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeInterval( + com.google.devicesandservices.health.v4.SessionTimeInterval value) { + if (intervalBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && interval_ != null + && interval_ + != com.google.devicesandservices.health.v4.SessionTimeInterval + .getDefaultInstance()) { + getIntervalBuilder().mergeFrom(value); + } else { + interval_ = value; + } + } else { + intervalBuilder_.mergeFrom(value); + } + if (interval_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. Observed exercise interval
+     * 
+ * + * + * .google.devicesandservices.health.v4.SessionTimeInterval interval = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearInterval() { + bitField0_ = (bitField0_ & ~0x00000001); + interval_ = null; + if (intervalBuilder_ != null) { + intervalBuilder_.dispose(); + intervalBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Observed exercise interval
+     * 
+ * + * + * .google.devicesandservices.health.v4.SessionTimeInterval interval = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.devicesandservices.health.v4.SessionTimeInterval.Builder + getIntervalBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetIntervalFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. Observed exercise interval
+     * 
+ * + * + * .google.devicesandservices.health.v4.SessionTimeInterval interval = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.devicesandservices.health.v4.SessionTimeIntervalOrBuilder + getIntervalOrBuilder() { + if (intervalBuilder_ != null) { + return intervalBuilder_.getMessageOrBuilder(); + } else { + return interval_ == null + ? com.google.devicesandservices.health.v4.SessionTimeInterval.getDefaultInstance() + : interval_; + } + } + + /** + * + * + *
+     * Required. Observed exercise interval
+     * 
+ * + * + * .google.devicesandservices.health.v4.SessionTimeInterval interval = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.SessionTimeInterval, + com.google.devicesandservices.health.v4.SessionTimeInterval.Builder, + com.google.devicesandservices.health.v4.SessionTimeIntervalOrBuilder> + internalGetIntervalFieldBuilder() { + if (intervalBuilder_ == null) { + intervalBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.SessionTimeInterval, + com.google.devicesandservices.health.v4.SessionTimeInterval.Builder, + com.google.devicesandservices.health.v4.SessionTimeIntervalOrBuilder>( + getInterval(), getParentForChildren(), isClean()); + interval_ = null; + } + return intervalBuilder_; + } + + private int exerciseType_ = 0; + + /** + * + * + *
+     * Required. The type of activity performed during an exercise.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Exercise.ExerciseType exercise_type = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for exerciseType. + */ + @java.lang.Override + public int getExerciseTypeValue() { + return exerciseType_; + } + + /** + * + * + *
+     * Required. The type of activity performed during an exercise.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Exercise.ExerciseType exercise_type = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for exerciseType to set. + * @return This builder for chaining. + */ + public Builder setExerciseTypeValue(int value) { + exerciseType_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The type of activity performed during an exercise.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Exercise.ExerciseType exercise_type = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The exerciseType. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Exercise.ExerciseType getExerciseType() { + com.google.devicesandservices.health.v4.Exercise.ExerciseType result = + com.google.devicesandservices.health.v4.Exercise.ExerciseType.forNumber(exerciseType_); + return result == null + ? com.google.devicesandservices.health.v4.Exercise.ExerciseType.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Required. The type of activity performed during an exercise.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Exercise.ExerciseType exercise_type = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The exerciseType to set. + * @return This builder for chaining. + */ + public Builder setExerciseType( + com.google.devicesandservices.health.v4.Exercise.ExerciseType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + exerciseType_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The type of activity performed during an exercise.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Exercise.ExerciseType exercise_type = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearExerciseType() { + bitField0_ = (bitField0_ & ~0x00000002); + exerciseType_ = 0; + onChanged(); + return this; + } + + private java.util.List splits_ = + java.util.Collections.emptyList(); + + private void ensureSplitsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + splits_ = + new java.util.ArrayList( + splits_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.devicesandservices.health.v4.Exercise.SplitSummary, + com.google.devicesandservices.health.v4.Exercise.SplitSummary.Builder, + com.google.devicesandservices.health.v4.Exercise.SplitSummaryOrBuilder> + splitsBuilder_; + + /** + * + * + *
+     * 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]; + * + */ + public java.util.List + getSplitsList() { + if (splitsBuilder_ == null) { + return java.util.Collections.unmodifiableList(splits_); + } else { + return splitsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * 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]; + * + */ + public int getSplitsCount() { + if (splitsBuilder_ == null) { + return splits_.size(); + } else { + return splitsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * 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]; + * + */ + public com.google.devicesandservices.health.v4.Exercise.SplitSummary getSplits(int index) { + if (splitsBuilder_ == null) { + return splits_.get(index); + } else { + return splitsBuilder_.getMessage(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]; + * + */ + public Builder setSplits( + int index, com.google.devicesandservices.health.v4.Exercise.SplitSummary value) { + if (splitsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSplitsIsMutable(); + splits_.set(index, value); + onChanged(); + } else { + splitsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * 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]; + * + */ + public Builder setSplits( + int index, + com.google.devicesandservices.health.v4.Exercise.SplitSummary.Builder builderForValue) { + if (splitsBuilder_ == null) { + ensureSplitsIsMutable(); + splits_.set(index, builderForValue.build()); + onChanged(); + } else { + splitsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * 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]; + * + */ + public Builder addSplits(com.google.devicesandservices.health.v4.Exercise.SplitSummary value) { + if (splitsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSplitsIsMutable(); + splits_.add(value); + onChanged(); + } else { + splitsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * 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]; + * + */ + public Builder addSplits( + int index, com.google.devicesandservices.health.v4.Exercise.SplitSummary value) { + if (splitsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSplitsIsMutable(); + splits_.add(index, value); + onChanged(); + } else { + splitsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * 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]; + * + */ + public Builder addSplits( + com.google.devicesandservices.health.v4.Exercise.SplitSummary.Builder builderForValue) { + if (splitsBuilder_ == null) { + ensureSplitsIsMutable(); + splits_.add(builderForValue.build()); + onChanged(); + } else { + splitsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * 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]; + * + */ + public Builder addSplits( + int index, + com.google.devicesandservices.health.v4.Exercise.SplitSummary.Builder builderForValue) { + if (splitsBuilder_ == null) { + ensureSplitsIsMutable(); + splits_.add(index, builderForValue.build()); + onChanged(); + } else { + splitsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * 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]; + * + */ + public Builder addAllSplits( + java.lang.Iterable + values) { + if (splitsBuilder_ == null) { + ensureSplitsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, splits_); + onChanged(); + } else { + splitsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * 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]; + * + */ + public Builder clearSplits() { + if (splitsBuilder_ == null) { + splits_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + splitsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * 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]; + * + */ + public Builder removeSplits(int index) { + if (splitsBuilder_ == null) { + ensureSplitsIsMutable(); + splits_.remove(index); + onChanged(); + } else { + splitsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * 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]; + * + */ + public com.google.devicesandservices.health.v4.Exercise.SplitSummary.Builder getSplitsBuilder( + int index) { + return internalGetSplitsFieldBuilder().getBuilder(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]; + * + */ + public com.google.devicesandservices.health.v4.Exercise.SplitSummaryOrBuilder + getSplitsOrBuilder(int index) { + if (splitsBuilder_ == null) { + return splits_.get(index); + } else { + return splitsBuilder_.getMessageOrBuilder(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]; + * + */ + public java.util.List< + ? extends com.google.devicesandservices.health.v4.Exercise.SplitSummaryOrBuilder> + getSplitsOrBuilderList() { + if (splitsBuilder_ != null) { + return splitsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(splits_); + } + } + + /** + * + * + *
+     * 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]; + * + */ + public com.google.devicesandservices.health.v4.Exercise.SplitSummary.Builder + addSplitsBuilder() { + return internalGetSplitsFieldBuilder() + .addBuilder( + com.google.devicesandservices.health.v4.Exercise.SplitSummary.getDefaultInstance()); + } + + /** + * + * + *
+     * 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]; + * + */ + public com.google.devicesandservices.health.v4.Exercise.SplitSummary.Builder addSplitsBuilder( + int index) { + return internalGetSplitsFieldBuilder() + .addBuilder( + index, + com.google.devicesandservices.health.v4.Exercise.SplitSummary.getDefaultInstance()); + } + + /** + * + * + *
+     * 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]; + * + */ + public java.util.List + getSplitsBuilderList() { + return internalGetSplitsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.devicesandservices.health.v4.Exercise.SplitSummary, + com.google.devicesandservices.health.v4.Exercise.SplitSummary.Builder, + com.google.devicesandservices.health.v4.Exercise.SplitSummaryOrBuilder> + internalGetSplitsFieldBuilder() { + if (splitsBuilder_ == null) { + splitsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.devicesandservices.health.v4.Exercise.SplitSummary, + com.google.devicesandservices.health.v4.Exercise.SplitSummary.Builder, + com.google.devicesandservices.health.v4.Exercise.SplitSummaryOrBuilder>( + splits_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); + splits_ = null; + } + return splitsBuilder_; + } + + private java.util.List + exerciseEvents_ = java.util.Collections.emptyList(); + + private void ensureExerciseEventsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + exerciseEvents_ = + new java.util.ArrayList( + exerciseEvents_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.devicesandservices.health.v4.Exercise.ExerciseEvent, + com.google.devicesandservices.health.v4.Exercise.ExerciseEvent.Builder, + com.google.devicesandservices.health.v4.Exercise.ExerciseEventOrBuilder> + exerciseEventsBuilder_; + + /** + * + * + *
+     * 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]; + * + */ + public java.util.List + getExerciseEventsList() { + if (exerciseEventsBuilder_ == null) { + return java.util.Collections.unmodifiableList(exerciseEvents_); + } else { + return exerciseEventsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * 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]; + * + */ + public int getExerciseEventsCount() { + if (exerciseEventsBuilder_ == null) { + return exerciseEvents_.size(); + } else { + return exerciseEventsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * 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]; + * + */ + public com.google.devicesandservices.health.v4.Exercise.ExerciseEvent getExerciseEvents( + int index) { + if (exerciseEventsBuilder_ == null) { + return exerciseEvents_.get(index); + } else { + return exerciseEventsBuilder_.getMessage(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]; + * + */ + public Builder setExerciseEvents( + int index, com.google.devicesandservices.health.v4.Exercise.ExerciseEvent value) { + if (exerciseEventsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureExerciseEventsIsMutable(); + exerciseEvents_.set(index, value); + onChanged(); + } else { + exerciseEventsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * 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]; + * + */ + public Builder setExerciseEvents( + int index, + com.google.devicesandservices.health.v4.Exercise.ExerciseEvent.Builder builderForValue) { + if (exerciseEventsBuilder_ == null) { + ensureExerciseEventsIsMutable(); + exerciseEvents_.set(index, builderForValue.build()); + onChanged(); + } else { + exerciseEventsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * 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]; + * + */ + public Builder addExerciseEvents( + com.google.devicesandservices.health.v4.Exercise.ExerciseEvent value) { + if (exerciseEventsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureExerciseEventsIsMutable(); + exerciseEvents_.add(value); + onChanged(); + } else { + exerciseEventsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * 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]; + * + */ + public Builder addExerciseEvents( + int index, com.google.devicesandservices.health.v4.Exercise.ExerciseEvent value) { + if (exerciseEventsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureExerciseEventsIsMutable(); + exerciseEvents_.add(index, value); + onChanged(); + } else { + exerciseEventsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * 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]; + * + */ + public Builder addExerciseEvents( + com.google.devicesandservices.health.v4.Exercise.ExerciseEvent.Builder builderForValue) { + if (exerciseEventsBuilder_ == null) { + ensureExerciseEventsIsMutable(); + exerciseEvents_.add(builderForValue.build()); + onChanged(); + } else { + exerciseEventsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * 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]; + * + */ + public Builder addExerciseEvents( + int index, + com.google.devicesandservices.health.v4.Exercise.ExerciseEvent.Builder builderForValue) { + if (exerciseEventsBuilder_ == null) { + ensureExerciseEventsIsMutable(); + exerciseEvents_.add(index, builderForValue.build()); + onChanged(); + } else { + exerciseEventsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * 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]; + * + */ + public Builder addAllExerciseEvents( + java.lang.Iterable + values) { + if (exerciseEventsBuilder_ == null) { + ensureExerciseEventsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, exerciseEvents_); + onChanged(); + } else { + exerciseEventsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * 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]; + * + */ + public Builder clearExerciseEvents() { + if (exerciseEventsBuilder_ == null) { + exerciseEvents_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + exerciseEventsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * 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]; + * + */ + public Builder removeExerciseEvents(int index) { + if (exerciseEventsBuilder_ == null) { + ensureExerciseEventsIsMutable(); + exerciseEvents_.remove(index); + onChanged(); + } else { + exerciseEventsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * 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]; + * + */ + public com.google.devicesandservices.health.v4.Exercise.ExerciseEvent.Builder + getExerciseEventsBuilder(int index) { + return internalGetExerciseEventsFieldBuilder().getBuilder(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]; + * + */ + public com.google.devicesandservices.health.v4.Exercise.ExerciseEventOrBuilder + getExerciseEventsOrBuilder(int index) { + if (exerciseEventsBuilder_ == null) { + return exerciseEvents_.get(index); + } else { + return exerciseEventsBuilder_.getMessageOrBuilder(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]; + * + */ + public java.util.List< + ? extends com.google.devicesandservices.health.v4.Exercise.ExerciseEventOrBuilder> + getExerciseEventsOrBuilderList() { + if (exerciseEventsBuilder_ != null) { + return exerciseEventsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(exerciseEvents_); + } + } + + /** + * + * + *
+     * 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]; + * + */ + public com.google.devicesandservices.health.v4.Exercise.ExerciseEvent.Builder + addExerciseEventsBuilder() { + return internalGetExerciseEventsFieldBuilder() + .addBuilder( + com.google.devicesandservices.health.v4.Exercise.ExerciseEvent.getDefaultInstance()); + } + + /** + * + * + *
+     * 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]; + * + */ + public com.google.devicesandservices.health.v4.Exercise.ExerciseEvent.Builder + addExerciseEventsBuilder(int index) { + return internalGetExerciseEventsFieldBuilder() + .addBuilder( + index, + com.google.devicesandservices.health.v4.Exercise.ExerciseEvent.getDefaultInstance()); + } + + /** + * + * + *
+     * 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]; + * + */ + public java.util.List + getExerciseEventsBuilderList() { + return internalGetExerciseEventsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.devicesandservices.health.v4.Exercise.ExerciseEvent, + com.google.devicesandservices.health.v4.Exercise.ExerciseEvent.Builder, + com.google.devicesandservices.health.v4.Exercise.ExerciseEventOrBuilder> + internalGetExerciseEventsFieldBuilder() { + if (exerciseEventsBuilder_ == null) { + exerciseEventsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.devicesandservices.health.v4.Exercise.ExerciseEvent, + com.google.devicesandservices.health.v4.Exercise.ExerciseEvent.Builder, + com.google.devicesandservices.health.v4.Exercise.ExerciseEventOrBuilder>( + exerciseEvents_, + ((bitField0_ & 0x00000008) != 0), + getParentForChildren(), + isClean()); + exerciseEvents_ = null; + } + return exerciseEventsBuilder_; + } + + private java.util.List + splitSummaries_ = java.util.Collections.emptyList(); + + private void ensureSplitSummariesIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + splitSummaries_ = + new java.util.ArrayList( + splitSummaries_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.devicesandservices.health.v4.Exercise.SplitSummary, + com.google.devicesandservices.health.v4.Exercise.SplitSummary.Builder, + com.google.devicesandservices.health.v4.Exercise.SplitSummaryOrBuilder> + splitSummariesBuilder_; + + /** + * + * + *
+     * 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]; + * + */ + public java.util.List + getSplitSummariesList() { + if (splitSummariesBuilder_ == null) { + return java.util.Collections.unmodifiableList(splitSummaries_); + } else { + return splitSummariesBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * 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]; + * + */ + public int getSplitSummariesCount() { + if (splitSummariesBuilder_ == null) { + return splitSummaries_.size(); + } else { + return splitSummariesBuilder_.getCount(); + } + } + + /** + * + * + *
+     * 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]; + * + */ + public com.google.devicesandservices.health.v4.Exercise.SplitSummary getSplitSummaries( + int index) { + if (splitSummariesBuilder_ == null) { + return splitSummaries_.get(index); + } else { + return splitSummariesBuilder_.getMessage(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]; + * + */ + public Builder setSplitSummaries( + int index, com.google.devicesandservices.health.v4.Exercise.SplitSummary value) { + if (splitSummariesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSplitSummariesIsMutable(); + splitSummaries_.set(index, value); + onChanged(); + } else { + splitSummariesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * 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]; + * + */ + public Builder setSplitSummaries( + int index, + com.google.devicesandservices.health.v4.Exercise.SplitSummary.Builder builderForValue) { + if (splitSummariesBuilder_ == null) { + ensureSplitSummariesIsMutable(); + splitSummaries_.set(index, builderForValue.build()); + onChanged(); + } else { + splitSummariesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * 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]; + * + */ + public Builder addSplitSummaries( + com.google.devicesandservices.health.v4.Exercise.SplitSummary value) { + if (splitSummariesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSplitSummariesIsMutable(); + splitSummaries_.add(value); + onChanged(); + } else { + splitSummariesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * 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]; + * + */ + public Builder addSplitSummaries( + int index, com.google.devicesandservices.health.v4.Exercise.SplitSummary value) { + if (splitSummariesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSplitSummariesIsMutable(); + splitSummaries_.add(index, value); + onChanged(); + } else { + splitSummariesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * 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]; + * + */ + public Builder addSplitSummaries( + com.google.devicesandservices.health.v4.Exercise.SplitSummary.Builder builderForValue) { + if (splitSummariesBuilder_ == null) { + ensureSplitSummariesIsMutable(); + splitSummaries_.add(builderForValue.build()); + onChanged(); + } else { + splitSummariesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * 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]; + * + */ + public Builder addSplitSummaries( + int index, + com.google.devicesandservices.health.v4.Exercise.SplitSummary.Builder builderForValue) { + if (splitSummariesBuilder_ == null) { + ensureSplitSummariesIsMutable(); + splitSummaries_.add(index, builderForValue.build()); + onChanged(); + } else { + splitSummariesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * 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]; + * + */ + public Builder addAllSplitSummaries( + java.lang.Iterable + values) { + if (splitSummariesBuilder_ == null) { + ensureSplitSummariesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, splitSummaries_); + onChanged(); + } else { + splitSummariesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * 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]; + * + */ + public Builder clearSplitSummaries() { + if (splitSummariesBuilder_ == null) { + splitSummaries_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + splitSummariesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * 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]; + * + */ + public Builder removeSplitSummaries(int index) { + if (splitSummariesBuilder_ == null) { + ensureSplitSummariesIsMutable(); + splitSummaries_.remove(index); + onChanged(); + } else { + splitSummariesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * 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]; + * + */ + public com.google.devicesandservices.health.v4.Exercise.SplitSummary.Builder + getSplitSummariesBuilder(int index) { + return internalGetSplitSummariesFieldBuilder().getBuilder(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]; + * + */ + public com.google.devicesandservices.health.v4.Exercise.SplitSummaryOrBuilder + getSplitSummariesOrBuilder(int index) { + if (splitSummariesBuilder_ == null) { + return splitSummaries_.get(index); + } else { + return splitSummariesBuilder_.getMessageOrBuilder(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]; + * + */ + public java.util.List< + ? extends com.google.devicesandservices.health.v4.Exercise.SplitSummaryOrBuilder> + getSplitSummariesOrBuilderList() { + if (splitSummariesBuilder_ != null) { + return splitSummariesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(splitSummaries_); + } + } + + /** + * + * + *
+     * 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]; + * + */ + public com.google.devicesandservices.health.v4.Exercise.SplitSummary.Builder + addSplitSummariesBuilder() { + return internalGetSplitSummariesFieldBuilder() + .addBuilder( + com.google.devicesandservices.health.v4.Exercise.SplitSummary.getDefaultInstance()); + } + + /** + * + * + *
+     * 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]; + * + */ + public com.google.devicesandservices.health.v4.Exercise.SplitSummary.Builder + addSplitSummariesBuilder(int index) { + return internalGetSplitSummariesFieldBuilder() + .addBuilder( + index, + com.google.devicesandservices.health.v4.Exercise.SplitSummary.getDefaultInstance()); + } + + /** + * + * + *
+     * 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]; + * + */ + public java.util.List + getSplitSummariesBuilderList() { + return internalGetSplitSummariesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.devicesandservices.health.v4.Exercise.SplitSummary, + com.google.devicesandservices.health.v4.Exercise.SplitSummary.Builder, + com.google.devicesandservices.health.v4.Exercise.SplitSummaryOrBuilder> + internalGetSplitSummariesFieldBuilder() { + if (splitSummariesBuilder_ == null) { + splitSummariesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.devicesandservices.health.v4.Exercise.SplitSummary, + com.google.devicesandservices.health.v4.Exercise.SplitSummary.Builder, + com.google.devicesandservices.health.v4.Exercise.SplitSummaryOrBuilder>( + splitSummaries_, + ((bitField0_ & 0x00000010) != 0), + getParentForChildren(), + isClean()); + splitSummaries_ = null; + } + return splitSummariesBuilder_; + } + + private com.google.devicesandservices.health.v4.MetricsSummary metricsSummary_; + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.MetricsSummary, + com.google.devicesandservices.health.v4.MetricsSummary.Builder, + com.google.devicesandservices.health.v4.MetricsSummaryOrBuilder> + metricsSummaryBuilder_; + + /** + * + * + *
+     * Required. Summary metrics for this exercise
+     * ( )
+     * 
+ * + * + * .google.devicesandservices.health.v4.MetricsSummary metrics_summary = 10 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the metricsSummary field is set. + */ + public boolean hasMetricsSummary() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+     * Required. Summary metrics for this exercise
+     * ( )
+     * 
+ * + * + * .google.devicesandservices.health.v4.MetricsSummary metrics_summary = 10 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The metricsSummary. + */ + public com.google.devicesandservices.health.v4.MetricsSummary getMetricsSummary() { + if (metricsSummaryBuilder_ == null) { + return metricsSummary_ == null + ? com.google.devicesandservices.health.v4.MetricsSummary.getDefaultInstance() + : metricsSummary_; + } else { + return metricsSummaryBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. Summary metrics for this exercise
+     * ( )
+     * 
+ * + * + * .google.devicesandservices.health.v4.MetricsSummary metrics_summary = 10 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setMetricsSummary(com.google.devicesandservices.health.v4.MetricsSummary value) { + if (metricsSummaryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metricsSummary_ = value; + } else { + metricsSummaryBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Summary metrics for this exercise
+     * ( )
+     * 
+ * + * + * .google.devicesandservices.health.v4.MetricsSummary metrics_summary = 10 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setMetricsSummary( + com.google.devicesandservices.health.v4.MetricsSummary.Builder builderForValue) { + if (metricsSummaryBuilder_ == null) { + metricsSummary_ = builderForValue.build(); + } else { + metricsSummaryBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Summary metrics for this exercise
+     * ( )
+     * 
+ * + * + * .google.devicesandservices.health.v4.MetricsSummary metrics_summary = 10 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeMetricsSummary( + com.google.devicesandservices.health.v4.MetricsSummary value) { + if (metricsSummaryBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && metricsSummary_ != null + && metricsSummary_ + != com.google.devicesandservices.health.v4.MetricsSummary.getDefaultInstance()) { + getMetricsSummaryBuilder().mergeFrom(value); + } else { + metricsSummary_ = value; + } + } else { + metricsSummaryBuilder_.mergeFrom(value); + } + if (metricsSummary_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. Summary metrics for this exercise
+     * ( )
+     * 
+ * + * + * .google.devicesandservices.health.v4.MetricsSummary metrics_summary = 10 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearMetricsSummary() { + bitField0_ = (bitField0_ & ~0x00000020); + metricsSummary_ = null; + if (metricsSummaryBuilder_ != null) { + metricsSummaryBuilder_.dispose(); + metricsSummaryBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Summary metrics for this exercise
+     * ( )
+     * 
+ * + * + * .google.devicesandservices.health.v4.MetricsSummary metrics_summary = 10 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.devicesandservices.health.v4.MetricsSummary.Builder + getMetricsSummaryBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return internalGetMetricsSummaryFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. Summary metrics for this exercise
+     * ( )
+     * 
+ * + * + * .google.devicesandservices.health.v4.MetricsSummary metrics_summary = 10 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.devicesandservices.health.v4.MetricsSummaryOrBuilder + getMetricsSummaryOrBuilder() { + if (metricsSummaryBuilder_ != null) { + return metricsSummaryBuilder_.getMessageOrBuilder(); + } else { + return metricsSummary_ == null + ? com.google.devicesandservices.health.v4.MetricsSummary.getDefaultInstance() + : metricsSummary_; + } + } + + /** + * + * + *
+     * Required. Summary metrics for this exercise
+     * ( )
+     * 
+ * + * + * .google.devicesandservices.health.v4.MetricsSummary metrics_summary = 10 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.MetricsSummary, + com.google.devicesandservices.health.v4.MetricsSummary.Builder, + com.google.devicesandservices.health.v4.MetricsSummaryOrBuilder> + internalGetMetricsSummaryFieldBuilder() { + if (metricsSummaryBuilder_ == null) { + metricsSummaryBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.MetricsSummary, + com.google.devicesandservices.health.v4.MetricsSummary.Builder, + com.google.devicesandservices.health.v4.MetricsSummaryOrBuilder>( + getMetricsSummary(), getParentForChildren(), isClean()); + metricsSummary_ = null; + } + return metricsSummaryBuilder_; + } + + private com.google.devicesandservices.health.v4.Exercise.ExerciseMetadata exerciseMetadata_; + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.Exercise.ExerciseMetadata, + com.google.devicesandservices.health.v4.Exercise.ExerciseMetadata.Builder, + com.google.devicesandservices.health.v4.Exercise.ExerciseMetadataOrBuilder> + exerciseMetadataBuilder_; + + /** + * + * + *
+     * Optional. Additional exercise metadata.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Exercise.ExerciseMetadata exercise_metadata = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the exerciseMetadata field is set. + */ + public boolean hasExerciseMetadata() { + return ((bitField0_ & 0x00000040) != 0); + } + + /** + * + * + *
+     * Optional. Additional exercise metadata.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Exercise.ExerciseMetadata exercise_metadata = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The exerciseMetadata. + */ + public com.google.devicesandservices.health.v4.Exercise.ExerciseMetadata getExerciseMetadata() { + if (exerciseMetadataBuilder_ == null) { + return exerciseMetadata_ == null + ? com.google.devicesandservices.health.v4.Exercise.ExerciseMetadata.getDefaultInstance() + : exerciseMetadata_; + } else { + return exerciseMetadataBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. Additional exercise metadata.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Exercise.ExerciseMetadata exercise_metadata = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setExerciseMetadata( + com.google.devicesandservices.health.v4.Exercise.ExerciseMetadata value) { + if (exerciseMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + exerciseMetadata_ = value; + } else { + exerciseMetadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Additional exercise metadata.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Exercise.ExerciseMetadata exercise_metadata = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setExerciseMetadata( + com.google.devicesandservices.health.v4.Exercise.ExerciseMetadata.Builder builderForValue) { + if (exerciseMetadataBuilder_ == null) { + exerciseMetadata_ = builderForValue.build(); + } else { + exerciseMetadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Additional exercise metadata.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Exercise.ExerciseMetadata exercise_metadata = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeExerciseMetadata( + com.google.devicesandservices.health.v4.Exercise.ExerciseMetadata value) { + if (exerciseMetadataBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && exerciseMetadata_ != null + && exerciseMetadata_ + != com.google.devicesandservices.health.v4.Exercise.ExerciseMetadata + .getDefaultInstance()) { + getExerciseMetadataBuilder().mergeFrom(value); + } else { + exerciseMetadata_ = value; + } + } else { + exerciseMetadataBuilder_.mergeFrom(value); + } + if (exerciseMetadata_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. Additional exercise metadata.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Exercise.ExerciseMetadata exercise_metadata = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearExerciseMetadata() { + bitField0_ = (bitField0_ & ~0x00000040); + exerciseMetadata_ = null; + if (exerciseMetadataBuilder_ != null) { + exerciseMetadataBuilder_.dispose(); + exerciseMetadataBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Additional exercise metadata.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Exercise.ExerciseMetadata exercise_metadata = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.devicesandservices.health.v4.Exercise.ExerciseMetadata.Builder + getExerciseMetadataBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return internalGetExerciseMetadataFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Additional exercise metadata.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Exercise.ExerciseMetadata exercise_metadata = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.devicesandservices.health.v4.Exercise.ExerciseMetadataOrBuilder + getExerciseMetadataOrBuilder() { + if (exerciseMetadataBuilder_ != null) { + return exerciseMetadataBuilder_.getMessageOrBuilder(); + } else { + return exerciseMetadata_ == null + ? com.google.devicesandservices.health.v4.Exercise.ExerciseMetadata.getDefaultInstance() + : exerciseMetadata_; + } + } + + /** + * + * + *
+     * Optional. Additional exercise metadata.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Exercise.ExerciseMetadata exercise_metadata = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.Exercise.ExerciseMetadata, + com.google.devicesandservices.health.v4.Exercise.ExerciseMetadata.Builder, + com.google.devicesandservices.health.v4.Exercise.ExerciseMetadataOrBuilder> + internalGetExerciseMetadataFieldBuilder() { + if (exerciseMetadataBuilder_ == null) { + exerciseMetadataBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.Exercise.ExerciseMetadata, + com.google.devicesandservices.health.v4.Exercise.ExerciseMetadata.Builder, + com.google.devicesandservices.health.v4.Exercise.ExerciseMetadataOrBuilder>( + getExerciseMetadata(), getParentForChildren(), isClean()); + exerciseMetadata_ = null; + } + return exerciseMetadataBuilder_; + } + + private java.lang.Object displayName_ = ""; + + /** + * + * + *
+     * Required. Exercise display name.
+     * 
+ * + * string display_name = 12 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Exercise display name.
+     * 
+ * + * string display_name = 12 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Exercise display name.
+     * 
+ * + * string display_name = 12 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Exercise display name.
+     * 
+ * + * string display_name = 12 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Exercise display name.
+     * 
+ * + * string display_name = 12 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + private com.google.protobuf.Duration activeDuration_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + activeDurationBuilder_; + + /** + * + * + *
+     * Optional. Duration excluding pauses.
+     * 
+ * + * + * .google.protobuf.Duration active_duration = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the activeDuration field is set. + */ + public boolean hasActiveDuration() { + return ((bitField0_ & 0x00000100) != 0); + } + + /** + * + * + *
+     * Optional. Duration excluding pauses.
+     * 
+ * + * + * .google.protobuf.Duration active_duration = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The activeDuration. + */ + public com.google.protobuf.Duration getActiveDuration() { + if (activeDurationBuilder_ == null) { + return activeDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : activeDuration_; + } else { + return activeDurationBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. Duration excluding pauses.
+     * 
+ * + * + * .google.protobuf.Duration active_duration = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setActiveDuration(com.google.protobuf.Duration value) { + if (activeDurationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + activeDuration_ = value; + } else { + activeDurationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Duration excluding pauses.
+     * 
+ * + * + * .google.protobuf.Duration active_duration = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setActiveDuration(com.google.protobuf.Duration.Builder builderForValue) { + if (activeDurationBuilder_ == null) { + activeDuration_ = builderForValue.build(); + } else { + activeDurationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Duration excluding pauses.
+     * 
+ * + * + * .google.protobuf.Duration active_duration = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeActiveDuration(com.google.protobuf.Duration value) { + if (activeDurationBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0) + && activeDuration_ != null + && activeDuration_ != com.google.protobuf.Duration.getDefaultInstance()) { + getActiveDurationBuilder().mergeFrom(value); + } else { + activeDuration_ = value; + } + } else { + activeDurationBuilder_.mergeFrom(value); + } + if (activeDuration_ != null) { + bitField0_ |= 0x00000100; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. Duration excluding pauses.
+     * 
+ * + * + * .google.protobuf.Duration active_duration = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearActiveDuration() { + bitField0_ = (bitField0_ & ~0x00000100); + activeDuration_ = null; + if (activeDurationBuilder_ != null) { + activeDurationBuilder_.dispose(); + activeDurationBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Duration excluding pauses.
+     * 
+ * + * + * .google.protobuf.Duration active_duration = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Duration.Builder getActiveDurationBuilder() { + bitField0_ |= 0x00000100; + onChanged(); + return internalGetActiveDurationFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Duration excluding pauses.
+     * 
+ * + * + * .google.protobuf.Duration active_duration = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.DurationOrBuilder getActiveDurationOrBuilder() { + if (activeDurationBuilder_ != null) { + return activeDurationBuilder_.getMessageOrBuilder(); + } else { + return activeDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : activeDuration_; + } + } + + /** + * + * + *
+     * Optional. Duration excluding pauses.
+     * 
+ * + * + * .google.protobuf.Duration active_duration = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + internalGetActiveDurationFieldBuilder() { + if (activeDurationBuilder_ == null) { + activeDurationBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getActiveDuration(), getParentForChildren(), isClean()); + activeDuration_ = null; + } + return activeDurationBuilder_; + } + + private java.lang.Object notes_ = ""; + + /** + * + * + *
+     * Optional. Standard free-form notes captured at manual logging.
+     * 
+ * + * string notes = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The notes. + */ + public java.lang.String getNotes() { + java.lang.Object ref = notes_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + notes_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Standard free-form notes captured at manual logging.
+     * 
+ * + * string notes = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for notes. + */ + public com.google.protobuf.ByteString getNotesBytes() { + java.lang.Object ref = notes_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + notes_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Standard free-form notes captured at manual logging.
+     * 
+ * + * string notes = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The notes to set. + * @return This builder for chaining. + */ + public Builder setNotes(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + notes_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Standard free-form notes captured at manual logging.
+     * 
+ * + * string notes = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearNotes() { + notes_ = getDefaultInstance().getNotes(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Standard free-form notes captured at manual logging.
+     * 
+ * + * string notes = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for notes to set. + * @return This builder for chaining. + */ + public Builder setNotesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + notes_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + + /** + * + * + *
+     * 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]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000400) != 0); + } + + /** + * + * + *
+     * 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]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * 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]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + /** + * + * + *
+     * 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]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + /** + * + * + *
+     * 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]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000400) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000400; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * 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]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000400); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * 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]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000400; + onChanged(); + return internalGetUpdateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * 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]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + + /** + * + * + *
+     * 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]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
+     * Output only. Represents the timestamp of the creation of the exercise.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000800) != 0); + } + + /** + * + * + *
+     * Output only. Represents the timestamp of the creation of the exercise.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. Represents the timestamp of the creation of the exercise.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Represents the timestamp of the creation of the exercise.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Represents the timestamp of the creation of the exercise.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000800) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000800; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. Represents the timestamp of the creation of the exercise.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000800); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Represents the timestamp of the creation of the exercise.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000800; + onChanged(); + return internalGetCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Represents the timestamp of the creation of the exercise.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + + /** + * + * + *
+     * Output only. Represents the timestamp of the creation of the exercise.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.Exercise) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.Exercise) + private static final com.google.devicesandservices.health.v4.Exercise DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.Exercise(); + } + + public static com.google.devicesandservices.health.v4.Exercise getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Exercise parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.Exercise getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ExerciseOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ExerciseOrBuilder.java new file mode 100644 index 000000000000..c6ae68f705e8 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ExerciseOrBuilder.java @@ -0,0 +1,606 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface ExerciseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.Exercise) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Observed exercise interval
+   * 
+ * + * + * .google.devicesandservices.health.v4.SessionTimeInterval interval = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the interval field is set. + */ + boolean hasInterval(); + + /** + * + * + *
+   * Required. Observed exercise interval
+   * 
+ * + * + * .google.devicesandservices.health.v4.SessionTimeInterval interval = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The interval. + */ + com.google.devicesandservices.health.v4.SessionTimeInterval getInterval(); + + /** + * + * + *
+   * Required. Observed exercise interval
+   * 
+ * + * + * .google.devicesandservices.health.v4.SessionTimeInterval interval = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.devicesandservices.health.v4.SessionTimeIntervalOrBuilder getIntervalOrBuilder(); + + /** + * + * + *
+   * Required. The type of activity performed during an exercise.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Exercise.ExerciseType exercise_type = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for exerciseType. + */ + 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]; + * + * + * @return The exerciseType. + */ + com.google.devicesandservices.health.v4.Exercise.ExerciseType getExerciseType(); + + /** + * + * + *
+   * 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]; + * + */ + java.util.List 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]; + * + */ + com.google.devicesandservices.health.v4.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]; + * + */ + 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]; + * + */ + java.util.List + 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]; + * + */ + com.google.devicesandservices.health.v4.Exercise.SplitSummaryOrBuilder getSplitsOrBuilder( + 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]; + * + */ + java.util.List + 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]; + * + */ + com.google.devicesandservices.health.v4.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]; + * + */ + 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]; + * + */ + java.util.List + 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]; + * + */ + com.google.devicesandservices.health.v4.Exercise.ExerciseEventOrBuilder + getExerciseEventsOrBuilder(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]; + * + */ + java.util.List + 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]; + * + */ + com.google.devicesandservices.health.v4.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]; + * + */ + 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]; + * + */ + java.util.List + 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]; + * + */ + com.google.devicesandservices.health.v4.Exercise.SplitSummaryOrBuilder getSplitSummariesOrBuilder( + int index); + + /** + * + * + *
+   * Required. Summary metrics for this exercise
+   * ( )
+   * 
+ * + * + * .google.devicesandservices.health.v4.MetricsSummary metrics_summary = 10 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the metricsSummary field is set. + */ + boolean hasMetricsSummary(); + + /** + * + * + *
+   * Required. Summary metrics for this exercise
+   * ( )
+   * 
+ * + * + * .google.devicesandservices.health.v4.MetricsSummary metrics_summary = 10 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The metricsSummary. + */ + com.google.devicesandservices.health.v4.MetricsSummary getMetricsSummary(); + + /** + * + * + *
+   * Required. Summary metrics for this exercise
+   * ( )
+   * 
+ * + * + * .google.devicesandservices.health.v4.MetricsSummary metrics_summary = 10 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.devicesandservices.health.v4.MetricsSummaryOrBuilder getMetricsSummaryOrBuilder(); + + /** + * + * + *
+   * Optional. Additional exercise metadata.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Exercise.ExerciseMetadata exercise_metadata = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the exerciseMetadata field is set. + */ + boolean hasExerciseMetadata(); + + /** + * + * + *
+   * Optional. Additional exercise metadata.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Exercise.ExerciseMetadata exercise_metadata = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The exerciseMetadata. + */ + com.google.devicesandservices.health.v4.Exercise.ExerciseMetadata getExerciseMetadata(); + + /** + * + * + *
+   * Optional. Additional exercise metadata.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Exercise.ExerciseMetadata exercise_metadata = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.devicesandservices.health.v4.Exercise.ExerciseMetadataOrBuilder + getExerciseMetadataOrBuilder(); + + /** + * + * + *
+   * Required. Exercise display name.
+   * 
+ * + * string display_name = 12 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + + /** + * + * + *
+   * Required. Exercise display name.
+   * 
+ * + * string display_name = 12 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Optional. Duration excluding pauses.
+   * 
+ * + * .google.protobuf.Duration active_duration = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the activeDuration field is set. + */ + boolean hasActiveDuration(); + + /** + * + * + *
+   * Optional. Duration excluding pauses.
+   * 
+ * + * .google.protobuf.Duration active_duration = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The activeDuration. + */ + com.google.protobuf.Duration getActiveDuration(); + + /** + * + * + *
+   * Optional. Duration excluding pauses.
+   * 
+ * + * .google.protobuf.Duration active_duration = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.DurationOrBuilder getActiveDurationOrBuilder(); + + /** + * + * + *
+   * Optional. Standard free-form notes captured at manual logging.
+   * 
+ * + * string notes = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The notes. + */ + java.lang.String getNotes(); + + /** + * + * + *
+   * Optional. Standard free-form notes captured at manual logging.
+   * 
+ * + * string notes = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for notes. + */ + com.google.protobuf.ByteString getNotesBytes(); + + /** + * + * + *
+   * 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]; + * + * + * @return Whether the updateTime field is set. + */ + 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]; + * + * + * @return The updateTime. + */ + com.google.protobuf.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]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Represents the timestamp of the creation of the exercise.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + 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]; + * + * + * @return The createTime. + */ + com.google.protobuf.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]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ExportExerciseTcxRequest.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ExportExerciseTcxRequest.java new file mode 100644 index 000000000000..81232295a940 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ExportExerciseTcxRequest.java @@ -0,0 +1,772 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_points.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * Represents a request to export exercise data in TCX format.
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.ExportExerciseTcxRequest} + */ +@com.google.protobuf.Generated +public final class ExportExerciseTcxRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.ExportExerciseTcxRequest) + ExportExerciseTcxRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ExportExerciseTcxRequest"); + } + + // Use ExportExerciseTcxRequest.newBuilder() to construct. + private ExportExerciseTcxRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ExportExerciseTcxRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_ExportExerciseTcxRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_ExportExerciseTcxRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.ExportExerciseTcxRequest.class, + com.google.devicesandservices.health.v4.ExportExerciseTcxRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The resource name of the exercise data point to export.
+   *
+   * Format: `users/{user}/dataTypes/exercise/dataPoints/{data_point}`
+   * Example: `users/me/dataTypes/exercise/dataPoints/2026443605080188808`
+   *
+   * The `{user}` is the alias `"me"` currently. Future versions may support
+   * user IDs.
+   * The `{data_point}` ID maps to the exercise ID, which is a long integer.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The resource name of the exercise data point to export.
+   *
+   * Format: `users/{user}/dataTypes/exercise/dataPoints/{data_point}`
+   * Example: `users/me/dataTypes/exercise/dataPoints/2026443605080188808`
+   *
+   * The `{user}` is the alias `"me"` currently. Future versions may support
+   * user IDs.
+   * The `{data_point}` ID maps to the exercise ID, which is a long integer.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PARTIAL_DATA_FIELD_NUMBER = 2; + private boolean partialData_ = false; + + /** + * + * + *
+   * Optional. Indicates whether to include the TCX data points when the GPS
+   * data is not available. If not specified, defaults to `false` and partial
+   * data will not be included.
+   * 
+ * + * bool partial_data = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The partialData. + */ + @java.lang.Override + public boolean getPartialData() { + return partialData_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (partialData_ != false) { + output.writeBool(2, partialData_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (partialData_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, partialData_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.ExportExerciseTcxRequest)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.ExportExerciseTcxRequest other = + (com.google.devicesandservices.health.v4.ExportExerciseTcxRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (getPartialData() != other.getPartialData()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + PARTIAL_DATA_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getPartialData()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.ExportExerciseTcxRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.ExportExerciseTcxRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ExportExerciseTcxRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.ExportExerciseTcxRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ExportExerciseTcxRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.ExportExerciseTcxRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ExportExerciseTcxRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.ExportExerciseTcxRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ExportExerciseTcxRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.ExportExerciseTcxRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ExportExerciseTcxRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.ExportExerciseTcxRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.ExportExerciseTcxRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Represents a request to export exercise data in TCX format.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.ExportExerciseTcxRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.ExportExerciseTcxRequest) + com.google.devicesandservices.health.v4.ExportExerciseTcxRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_ExportExerciseTcxRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_ExportExerciseTcxRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.ExportExerciseTcxRequest.class, + com.google.devicesandservices.health.v4.ExportExerciseTcxRequest.Builder.class); + } + + // Construct using com.google.devicesandservices.health.v4.ExportExerciseTcxRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + partialData_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_ExportExerciseTcxRequest_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.ExportExerciseTcxRequest + getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.ExportExerciseTcxRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.ExportExerciseTcxRequest build() { + com.google.devicesandservices.health.v4.ExportExerciseTcxRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.ExportExerciseTcxRequest buildPartial() { + com.google.devicesandservices.health.v4.ExportExerciseTcxRequest result = + new com.google.devicesandservices.health.v4.ExportExerciseTcxRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.devicesandservices.health.v4.ExportExerciseTcxRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.partialData_ = partialData_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.ExportExerciseTcxRequest) { + return mergeFrom((com.google.devicesandservices.health.v4.ExportExerciseTcxRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.devicesandservices.health.v4.ExportExerciseTcxRequest other) { + if (other + == com.google.devicesandservices.health.v4.ExportExerciseTcxRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPartialData() != false) { + setPartialData(other.getPartialData()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + partialData_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. The resource name of the exercise data point to export.
+     *
+     * Format: `users/{user}/dataTypes/exercise/dataPoints/{data_point}`
+     * Example: `users/me/dataTypes/exercise/dataPoints/2026443605080188808`
+     *
+     * The `{user}` is the alias `"me"` currently. Future versions may support
+     * user IDs.
+     * The `{data_point}` ID maps to the exercise ID, which is a long integer.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The resource name of the exercise data point to export.
+     *
+     * Format: `users/{user}/dataTypes/exercise/dataPoints/{data_point}`
+     * Example: `users/me/dataTypes/exercise/dataPoints/2026443605080188808`
+     *
+     * The `{user}` is the alias `"me"` currently. Future versions may support
+     * user IDs.
+     * The `{data_point}` ID maps to the exercise ID, which is a long integer.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The resource name of the exercise data point to export.
+     *
+     * Format: `users/{user}/dataTypes/exercise/dataPoints/{data_point}`
+     * Example: `users/me/dataTypes/exercise/dataPoints/2026443605080188808`
+     *
+     * The `{user}` is the alias `"me"` currently. Future versions may support
+     * user IDs.
+     * The `{data_point}` ID maps to the exercise ID, which is a long integer.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource name of the exercise data point to export.
+     *
+     * Format: `users/{user}/dataTypes/exercise/dataPoints/{data_point}`
+     * Example: `users/me/dataTypes/exercise/dataPoints/2026443605080188808`
+     *
+     * The `{user}` is the alias `"me"` currently. Future versions may support
+     * user IDs.
+     * The `{data_point}` ID maps to the exercise ID, which is a long integer.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource name of the exercise data point to export.
+     *
+     * Format: `users/{user}/dataTypes/exercise/dataPoints/{data_point}`
+     * Example: `users/me/dataTypes/exercise/dataPoints/2026443605080188808`
+     *
+     * The `{user}` is the alias `"me"` currently. Future versions may support
+     * user IDs.
+     * The `{data_point}` ID maps to the exercise ID, which is a long integer.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private boolean partialData_; + + /** + * + * + *
+     * Optional. Indicates whether to include the TCX data points when the GPS
+     * data is not available. If not specified, defaults to `false` and partial
+     * data will not be included.
+     * 
+ * + * bool partial_data = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The partialData. + */ + @java.lang.Override + public boolean getPartialData() { + return partialData_; + } + + /** + * + * + *
+     * Optional. Indicates whether to include the TCX data points when the GPS
+     * data is not available. If not specified, defaults to `false` and partial
+     * data will not be included.
+     * 
+ * + * bool partial_data = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The partialData to set. + * @return This builder for chaining. + */ + public Builder setPartialData(boolean value) { + + partialData_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Indicates whether to include the TCX data points when the GPS
+     * data is not available. If not specified, defaults to `false` and partial
+     * data will not be included.
+     * 
+ * + * bool partial_data = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPartialData() { + bitField0_ = (bitField0_ & ~0x00000002); + partialData_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.ExportExerciseTcxRequest) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.ExportExerciseTcxRequest) + private static final com.google.devicesandservices.health.v4.ExportExerciseTcxRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.ExportExerciseTcxRequest(); + } + + public static com.google.devicesandservices.health.v4.ExportExerciseTcxRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExportExerciseTcxRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.ExportExerciseTcxRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ExportExerciseTcxRequestOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ExportExerciseTcxRequestOrBuilder.java new file mode 100644 index 000000000000..d041136b230f --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ExportExerciseTcxRequestOrBuilder.java @@ -0,0 +1,87 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_points.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface ExportExerciseTcxRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.ExportExerciseTcxRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the exercise data point to export.
+   *
+   * Format: `users/{user}/dataTypes/exercise/dataPoints/{data_point}`
+   * Example: `users/me/dataTypes/exercise/dataPoints/2026443605080188808`
+   *
+   * The `{user}` is the alias `"me"` currently. Future versions may support
+   * user IDs.
+   * The `{data_point}` ID maps to the exercise ID, which is a long integer.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The resource name of the exercise data point to export.
+   *
+   * Format: `users/{user}/dataTypes/exercise/dataPoints/{data_point}`
+   * Example: `users/me/dataTypes/exercise/dataPoints/2026443605080188808`
+   *
+   * The `{user}` is the alias `"me"` currently. Future versions may support
+   * user IDs.
+   * The `{data_point}` ID maps to the exercise ID, which is a long integer.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. Indicates whether to include the TCX data points when the GPS
+   * data is not available. If not specified, defaults to `false` and partial
+   * data will not be included.
+   * 
+ * + * bool partial_data = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The partialData. + */ + boolean getPartialData(); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ExportExerciseTcxResponse.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ExportExerciseTcxResponse.java new file mode 100644 index 000000000000..2dc468ee7108 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ExportExerciseTcxResponse.java @@ -0,0 +1,606 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_points.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * Represents a Response for exporting exercise data in TCX format.
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.ExportExerciseTcxResponse} + */ +@com.google.protobuf.Generated +public final class ExportExerciseTcxResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.ExportExerciseTcxResponse) + ExportExerciseTcxResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ExportExerciseTcxResponse"); + } + + // Use ExportExerciseTcxResponse.newBuilder() to construct. + private ExportExerciseTcxResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ExportExerciseTcxResponse() { + tcxData_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_ExportExerciseTcxResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_ExportExerciseTcxResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.ExportExerciseTcxResponse.class, + com.google.devicesandservices.health.v4.ExportExerciseTcxResponse.Builder.class); + } + + public static final int TCX_DATA_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object tcxData_ = ""; + + /** + * + * + *
+   * Contains the exported TCX data.
+   * 
+ * + * string tcx_data = 2; + * + * @return The tcxData. + */ + @java.lang.Override + public java.lang.String getTcxData() { + java.lang.Object ref = tcxData_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tcxData_ = s; + return s; + } + } + + /** + * + * + *
+   * Contains the exported TCX data.
+   * 
+ * + * string tcx_data = 2; + * + * @return The bytes for tcxData. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTcxDataBytes() { + java.lang.Object ref = tcxData_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tcxData_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tcxData_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, tcxData_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tcxData_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, tcxData_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.ExportExerciseTcxResponse)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.ExportExerciseTcxResponse other = + (com.google.devicesandservices.health.v4.ExportExerciseTcxResponse) obj; + + if (!getTcxData().equals(other.getTcxData())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TCX_DATA_FIELD_NUMBER; + hash = (53 * hash) + getTcxData().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.ExportExerciseTcxResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.ExportExerciseTcxResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ExportExerciseTcxResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.ExportExerciseTcxResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ExportExerciseTcxResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.ExportExerciseTcxResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ExportExerciseTcxResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.ExportExerciseTcxResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ExportExerciseTcxResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.ExportExerciseTcxResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ExportExerciseTcxResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.ExportExerciseTcxResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.ExportExerciseTcxResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Represents a Response for exporting exercise data in TCX format.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.ExportExerciseTcxResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.ExportExerciseTcxResponse) + com.google.devicesandservices.health.v4.ExportExerciseTcxResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_ExportExerciseTcxResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_ExportExerciseTcxResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.ExportExerciseTcxResponse.class, + com.google.devicesandservices.health.v4.ExportExerciseTcxResponse.Builder.class); + } + + // Construct using + // com.google.devicesandservices.health.v4.ExportExerciseTcxResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + tcxData_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_ExportExerciseTcxResponse_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.ExportExerciseTcxResponse + getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.ExportExerciseTcxResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.ExportExerciseTcxResponse build() { + com.google.devicesandservices.health.v4.ExportExerciseTcxResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.ExportExerciseTcxResponse buildPartial() { + com.google.devicesandservices.health.v4.ExportExerciseTcxResponse result = + new com.google.devicesandservices.health.v4.ExportExerciseTcxResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.devicesandservices.health.v4.ExportExerciseTcxResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.tcxData_ = tcxData_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.ExportExerciseTcxResponse) { + return mergeFrom((com.google.devicesandservices.health.v4.ExportExerciseTcxResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.devicesandservices.health.v4.ExportExerciseTcxResponse other) { + if (other + == com.google.devicesandservices.health.v4.ExportExerciseTcxResponse.getDefaultInstance()) + return this; + if (!other.getTcxData().isEmpty()) { + tcxData_ = other.tcxData_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + tcxData_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object tcxData_ = ""; + + /** + * + * + *
+     * Contains the exported TCX data.
+     * 
+ * + * string tcx_data = 2; + * + * @return The tcxData. + */ + public java.lang.String getTcxData() { + java.lang.Object ref = tcxData_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tcxData_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Contains the exported TCX data.
+     * 
+ * + * string tcx_data = 2; + * + * @return The bytes for tcxData. + */ + public com.google.protobuf.ByteString getTcxDataBytes() { + java.lang.Object ref = tcxData_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tcxData_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Contains the exported TCX data.
+     * 
+ * + * string tcx_data = 2; + * + * @param value The tcxData to set. + * @return This builder for chaining. + */ + public Builder setTcxData(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + tcxData_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Contains the exported TCX data.
+     * 
+ * + * string tcx_data = 2; + * + * @return This builder for chaining. + */ + public Builder clearTcxData() { + tcxData_ = getDefaultInstance().getTcxData(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Contains the exported TCX data.
+     * 
+ * + * string tcx_data = 2; + * + * @param value The bytes for tcxData to set. + * @return This builder for chaining. + */ + public Builder setTcxDataBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + tcxData_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.ExportExerciseTcxResponse) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.ExportExerciseTcxResponse) + private static final com.google.devicesandservices.health.v4.ExportExerciseTcxResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.ExportExerciseTcxResponse(); + } + + public static com.google.devicesandservices.health.v4.ExportExerciseTcxResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExportExerciseTcxResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.ExportExerciseTcxResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ExportExerciseTcxResponseOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ExportExerciseTcxResponseOrBuilder.java new file mode 100644 index 000000000000..e517ffbfb283 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ExportExerciseTcxResponseOrBuilder.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_points.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface ExportExerciseTcxResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.ExportExerciseTcxResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Contains the exported TCX data.
+   * 
+ * + * string tcx_data = 2; + * + * @return The tcxData. + */ + java.lang.String getTcxData(); + + /** + * + * + *
+   * Contains the exported TCX data.
+   * 
+ * + * string tcx_data = 2; + * + * @return The bytes for tcxData. + */ + com.google.protobuf.ByteString getTcxDataBytes(); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/Floors.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/Floors.java new file mode 100644 index 000000000000..b97acfc3bbf3 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/Floors.java @@ -0,0 +1,826 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * Gained elevation measured in floors over the time interval
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.Floors} + */ +@com.google.protobuf.Generated +public final class Floors extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.Floors) + FloorsOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Floors"); + } + + // Use Floors.newBuilder() to construct. + private Floors(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Floors() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_Floors_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_Floors_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.Floors.class, + com.google.devicesandservices.health.v4.Floors.Builder.class); + } + + private int bitField0_; + public static final int INTERVAL_FIELD_NUMBER = 2; + private com.google.devicesandservices.health.v4.ObservationTimeInterval interval_; + + /** + * + * + *
+   * Required. Observed interval
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the interval field is set. + */ + @java.lang.Override + public boolean hasInterval() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. Observed interval
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The interval. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ObservationTimeInterval getInterval() { + return interval_ == null + ? com.google.devicesandservices.health.v4.ObservationTimeInterval.getDefaultInstance() + : interval_; + } + + /** + * + * + *
+   * Required. Observed interval
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ObservationTimeIntervalOrBuilder + getIntervalOrBuilder() { + return interval_ == null + ? com.google.devicesandservices.health.v4.ObservationTimeInterval.getDefaultInstance() + : interval_; + } + + public static final int COUNT_FIELD_NUMBER = 4; + private long count_ = 0L; + + /** + * + * + *
+   * Required. Number of floors in the recorded interval
+   * 
+ * + * int64 count = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count. + */ + @java.lang.Override + public long getCount() { + return count_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getInterval()); + } + if (count_ != 0L) { + output.writeInt64(4, count_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getInterval()); + } + if (count_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, count_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.Floors)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.Floors other = + (com.google.devicesandservices.health.v4.Floors) obj; + + if (hasInterval() != other.hasInterval()) return false; + if (hasInterval()) { + if (!getInterval().equals(other.getInterval())) return false; + } + if (getCount() != other.getCount()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasInterval()) { + hash = (37 * hash) + INTERVAL_FIELD_NUMBER; + hash = (53 * hash) + getInterval().hashCode(); + } + hash = (37 * hash) + COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getCount()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.Floors parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.Floors parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Floors parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.Floors parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Floors parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.Floors parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Floors parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.Floors parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Floors parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.Floors parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Floors parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.Floors parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.devicesandservices.health.v4.Floors prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Gained elevation measured in floors over the time interval
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.Floors} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.Floors) + com.google.devicesandservices.health.v4.FloorsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_Floors_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_Floors_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.Floors.class, + com.google.devicesandservices.health.v4.Floors.Builder.class); + } + + // Construct using com.google.devicesandservices.health.v4.Floors.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetIntervalFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + interval_ = null; + if (intervalBuilder_ != null) { + intervalBuilder_.dispose(); + intervalBuilder_ = null; + } + count_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_Floors_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.Floors getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.Floors.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.Floors build() { + com.google.devicesandservices.health.v4.Floors result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.Floors buildPartial() { + com.google.devicesandservices.health.v4.Floors result = + new com.google.devicesandservices.health.v4.Floors(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.devicesandservices.health.v4.Floors result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.interval_ = intervalBuilder_ == null ? interval_ : intervalBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.count_ = count_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.Floors) { + return mergeFrom((com.google.devicesandservices.health.v4.Floors) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.devicesandservices.health.v4.Floors other) { + if (other == com.google.devicesandservices.health.v4.Floors.getDefaultInstance()) return this; + if (other.hasInterval()) { + mergeInterval(other.getInterval()); + } + if (other.getCount() != 0L) { + setCount(other.getCount()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + input.readMessage( + internalGetIntervalFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 18 + case 32: + { + count_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.devicesandservices.health.v4.ObservationTimeInterval interval_; + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ObservationTimeInterval, + com.google.devicesandservices.health.v4.ObservationTimeInterval.Builder, + com.google.devicesandservices.health.v4.ObservationTimeIntervalOrBuilder> + intervalBuilder_; + + /** + * + * + *
+     * Required. Observed interval
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the interval field is set. + */ + public boolean hasInterval() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. Observed interval
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The interval. + */ + public com.google.devicesandservices.health.v4.ObservationTimeInterval getInterval() { + if (intervalBuilder_ == null) { + return interval_ == null + ? com.google.devicesandservices.health.v4.ObservationTimeInterval.getDefaultInstance() + : interval_; + } else { + return intervalBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. Observed interval
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setInterval( + com.google.devicesandservices.health.v4.ObservationTimeInterval value) { + if (intervalBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + interval_ = value; + } else { + intervalBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Observed interval
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setInterval( + com.google.devicesandservices.health.v4.ObservationTimeInterval.Builder builderForValue) { + if (intervalBuilder_ == null) { + interval_ = builderForValue.build(); + } else { + intervalBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Observed interval
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeInterval( + com.google.devicesandservices.health.v4.ObservationTimeInterval value) { + if (intervalBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && interval_ != null + && interval_ + != com.google.devicesandservices.health.v4.ObservationTimeInterval + .getDefaultInstance()) { + getIntervalBuilder().mergeFrom(value); + } else { + interval_ = value; + } + } else { + intervalBuilder_.mergeFrom(value); + } + if (interval_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. Observed interval
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearInterval() { + bitField0_ = (bitField0_ & ~0x00000001); + interval_ = null; + if (intervalBuilder_ != null) { + intervalBuilder_.dispose(); + intervalBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Observed interval
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.devicesandservices.health.v4.ObservationTimeInterval.Builder + getIntervalBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetIntervalFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. Observed interval
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.devicesandservices.health.v4.ObservationTimeIntervalOrBuilder + getIntervalOrBuilder() { + if (intervalBuilder_ != null) { + return intervalBuilder_.getMessageOrBuilder(); + } else { + return interval_ == null + ? com.google.devicesandservices.health.v4.ObservationTimeInterval.getDefaultInstance() + : interval_; + } + } + + /** + * + * + *
+     * Required. Observed interval
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ObservationTimeInterval, + com.google.devicesandservices.health.v4.ObservationTimeInterval.Builder, + com.google.devicesandservices.health.v4.ObservationTimeIntervalOrBuilder> + internalGetIntervalFieldBuilder() { + if (intervalBuilder_ == null) { + intervalBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ObservationTimeInterval, + com.google.devicesandservices.health.v4.ObservationTimeInterval.Builder, + com.google.devicesandservices.health.v4.ObservationTimeIntervalOrBuilder>( + getInterval(), getParentForChildren(), isClean()); + interval_ = null; + } + return intervalBuilder_; + } + + private long count_; + + /** + * + * + *
+     * Required. Number of floors in the recorded interval
+     * 
+ * + * int64 count = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count. + */ + @java.lang.Override + public long getCount() { + return count_; + } + + /** + * + * + *
+     * Required. Number of floors in the recorded interval
+     * 
+ * + * int64 count = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The count to set. + * @return This builder for chaining. + */ + public Builder setCount(long value) { + + count_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Number of floors in the recorded interval
+     * 
+ * + * int64 count = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearCount() { + bitField0_ = (bitField0_ & ~0x00000002); + count_ = 0L; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.Floors) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.Floors) + private static final com.google.devicesandservices.health.v4.Floors DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.Floors(); + } + + public static com.google.devicesandservices.health.v4.Floors getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Floors parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.Floors getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/FloorsOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/FloorsOrBuilder.java new file mode 100644 index 000000000000..02ac9655b408 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/FloorsOrBuilder.java @@ -0,0 +1,84 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface FloorsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.Floors) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Observed interval
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the interval field is set. + */ + boolean hasInterval(); + + /** + * + * + *
+   * Required. Observed interval
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The interval. + */ + com.google.devicesandservices.health.v4.ObservationTimeInterval getInterval(); + + /** + * + * + *
+   * Required. Observed interval
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.devicesandservices.health.v4.ObservationTimeIntervalOrBuilder getIntervalOrBuilder(); + + /** + * + * + *
+   * Required. Number of floors in the recorded interval
+   * 
+ * + * int64 count = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count. + */ + long getCount(); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/FloorsRollupValue.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/FloorsRollupValue.java new file mode 100644 index 000000000000..dddaf1d8e249 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/FloorsRollupValue.java @@ -0,0 +1,504 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * Represents the result of the rollup of the user's floors.
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.FloorsRollupValue} + */ +@com.google.protobuf.Generated +public final class FloorsRollupValue extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.FloorsRollupValue) + FloorsRollupValueOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "FloorsRollupValue"); + } + + // Use FloorsRollupValue.newBuilder() to construct. + private FloorsRollupValue(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private FloorsRollupValue() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_FloorsRollupValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_FloorsRollupValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.FloorsRollupValue.class, + com.google.devicesandservices.health.v4.FloorsRollupValue.Builder.class); + } + + public static final int COUNT_SUM_FIELD_NUMBER = 1; + private long countSum_ = 0L; + + /** + * + * + *
+   * Sum of the floors count.
+   * 
+ * + * int64 count_sum = 1; + * + * @return The countSum. + */ + @java.lang.Override + public long getCountSum() { + return countSum_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (countSum_ != 0L) { + output.writeInt64(1, countSum_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (countSum_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, countSum_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.FloorsRollupValue)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.FloorsRollupValue other = + (com.google.devicesandservices.health.v4.FloorsRollupValue) obj; + + if (getCountSum() != other.getCountSum()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + COUNT_SUM_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getCountSum()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.FloorsRollupValue parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.FloorsRollupValue parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.FloorsRollupValue parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.FloorsRollupValue parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.FloorsRollupValue parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.FloorsRollupValue parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.FloorsRollupValue parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.FloorsRollupValue parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.FloorsRollupValue parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.FloorsRollupValue parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.FloorsRollupValue parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.FloorsRollupValue parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.FloorsRollupValue prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Represents the result of the rollup of the user's floors.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.FloorsRollupValue} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.FloorsRollupValue) + com.google.devicesandservices.health.v4.FloorsRollupValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_FloorsRollupValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_FloorsRollupValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.FloorsRollupValue.class, + com.google.devicesandservices.health.v4.FloorsRollupValue.Builder.class); + } + + // Construct using com.google.devicesandservices.health.v4.FloorsRollupValue.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + countSum_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_FloorsRollupValue_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.FloorsRollupValue getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.FloorsRollupValue.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.FloorsRollupValue build() { + com.google.devicesandservices.health.v4.FloorsRollupValue result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.FloorsRollupValue buildPartial() { + com.google.devicesandservices.health.v4.FloorsRollupValue result = + new com.google.devicesandservices.health.v4.FloorsRollupValue(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.devicesandservices.health.v4.FloorsRollupValue result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.countSum_ = countSum_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.FloorsRollupValue) { + return mergeFrom((com.google.devicesandservices.health.v4.FloorsRollupValue) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.devicesandservices.health.v4.FloorsRollupValue other) { + if (other == com.google.devicesandservices.health.v4.FloorsRollupValue.getDefaultInstance()) + return this; + if (other.getCountSum() != 0L) { + setCountSum(other.getCountSum()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + countSum_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private long countSum_; + + /** + * + * + *
+     * Sum of the floors count.
+     * 
+ * + * int64 count_sum = 1; + * + * @return The countSum. + */ + @java.lang.Override + public long getCountSum() { + return countSum_; + } + + /** + * + * + *
+     * Sum of the floors count.
+     * 
+ * + * int64 count_sum = 1; + * + * @param value The countSum to set. + * @return This builder for chaining. + */ + public Builder setCountSum(long value) { + + countSum_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Sum of the floors count.
+     * 
+ * + * int64 count_sum = 1; + * + * @return This builder for chaining. + */ + public Builder clearCountSum() { + bitField0_ = (bitField0_ & ~0x00000001); + countSum_ = 0L; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.FloorsRollupValue) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.FloorsRollupValue) + private static final com.google.devicesandservices.health.v4.FloorsRollupValue DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.FloorsRollupValue(); + } + + public static com.google.devicesandservices.health.v4.FloorsRollupValue getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FloorsRollupValue parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.FloorsRollupValue getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/FloorsRollupValueOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/FloorsRollupValueOrBuilder.java new file mode 100644 index 000000000000..0d75fe355be9 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/FloorsRollupValueOrBuilder.java @@ -0,0 +1,41 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface FloorsRollupValueOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.FloorsRollupValue) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Sum of the floors count.
+   * 
+ * + * int64 count_sum = 1; + * + * @return The countSum. + */ + long getCountSum(); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/GetDataPointRequest.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/GetDataPointRequest.java new file mode 100644 index 000000000000..952059554943 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/GetDataPointRequest.java @@ -0,0 +1,653 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_points.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * Request for getting a single data point
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.GetDataPointRequest} + */ +@com.google.protobuf.Generated +public final class GetDataPointRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.GetDataPointRequest) + GetDataPointRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GetDataPointRequest"); + } + + // Use GetDataPointRequest.newBuilder() to construct. + private GetDataPointRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GetDataPointRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_GetDataPointRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_GetDataPointRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.GetDataPointRequest.class, + com.google.devicesandservices.health.v4.GetDataPointRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name of the data point to retrieve.
+   *
+   * Format: `users/{user}/dataTypes/{data_type}/dataPoints/{data_point}`
+   *
+   * See
+   * [DataPoint.name][google.devicesandservices.health.v4.DataPoint.name]
+   * for examples and possible values.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The name of the data point to retrieve.
+   *
+   * Format: `users/{user}/dataTypes/{data_type}/dataPoints/{data_point}`
+   *
+   * See
+   * [DataPoint.name][google.devicesandservices.health.v4.DataPoint.name]
+   * for examples and possible values.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.GetDataPointRequest)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.GetDataPointRequest other = + (com.google.devicesandservices.health.v4.GetDataPointRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.GetDataPointRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.GetDataPointRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.GetDataPointRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.GetDataPointRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.GetDataPointRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.GetDataPointRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.GetDataPointRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.GetDataPointRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.GetDataPointRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.GetDataPointRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.GetDataPointRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.GetDataPointRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.GetDataPointRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request for getting a single data point
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.GetDataPointRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.GetDataPointRequest) + com.google.devicesandservices.health.v4.GetDataPointRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_GetDataPointRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_GetDataPointRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.GetDataPointRequest.class, + com.google.devicesandservices.health.v4.GetDataPointRequest.Builder.class); + } + + // Construct using com.google.devicesandservices.health.v4.GetDataPointRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_GetDataPointRequest_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.GetDataPointRequest getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.GetDataPointRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.GetDataPointRequest build() { + com.google.devicesandservices.health.v4.GetDataPointRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.GetDataPointRequest buildPartial() { + com.google.devicesandservices.health.v4.GetDataPointRequest result = + new com.google.devicesandservices.health.v4.GetDataPointRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.devicesandservices.health.v4.GetDataPointRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.GetDataPointRequest) { + return mergeFrom((com.google.devicesandservices.health.v4.GetDataPointRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.devicesandservices.health.v4.GetDataPointRequest other) { + if (other == com.google.devicesandservices.health.v4.GetDataPointRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. The name of the data point to retrieve.
+     *
+     * Format: `users/{user}/dataTypes/{data_type}/dataPoints/{data_point}`
+     *
+     * See
+     * [DataPoint.name][google.devicesandservices.health.v4.DataPoint.name]
+     * for examples and possible values.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The name of the data point to retrieve.
+     *
+     * Format: `users/{user}/dataTypes/{data_type}/dataPoints/{data_point}`
+     *
+     * See
+     * [DataPoint.name][google.devicesandservices.health.v4.DataPoint.name]
+     * for examples and possible values.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The name of the data point to retrieve.
+     *
+     * Format: `users/{user}/dataTypes/{data_type}/dataPoints/{data_point}`
+     *
+     * See
+     * [DataPoint.name][google.devicesandservices.health.v4.DataPoint.name]
+     * for examples and possible values.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the data point to retrieve.
+     *
+     * Format: `users/{user}/dataTypes/{data_type}/dataPoints/{data_point}`
+     *
+     * See
+     * [DataPoint.name][google.devicesandservices.health.v4.DataPoint.name]
+     * for examples and possible values.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the data point to retrieve.
+     *
+     * Format: `users/{user}/dataTypes/{data_type}/dataPoints/{data_point}`
+     *
+     * See
+     * [DataPoint.name][google.devicesandservices.health.v4.DataPoint.name]
+     * for examples and possible values.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.GetDataPointRequest) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.GetDataPointRequest) + private static final com.google.devicesandservices.health.v4.GetDataPointRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.GetDataPointRequest(); + } + + public static com.google.devicesandservices.health.v4.GetDataPointRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetDataPointRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.GetDataPointRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/GetDataPointRequestOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/GetDataPointRequestOrBuilder.java new file mode 100644 index 000000000000..0850d63fb5c1 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/GetDataPointRequestOrBuilder.java @@ -0,0 +1,70 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_points.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface GetDataPointRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.GetDataPointRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the data point to retrieve.
+   *
+   * Format: `users/{user}/dataTypes/{data_type}/dataPoints/{data_point}`
+   *
+   * See
+   * [DataPoint.name][google.devicesandservices.health.v4.DataPoint.name]
+   * for examples and possible values.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The name of the data point to retrieve.
+   *
+   * Format: `users/{user}/dataTypes/{data_type}/dataPoints/{data_point}`
+   *
+   * See
+   * [DataPoint.name][google.devicesandservices.health.v4.DataPoint.name]
+   * for examples and possible values.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/GetIdentityRequest.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/GetIdentityRequest.java new file mode 100644 index 000000000000..99d5d4e62cf4 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/GetIdentityRequest.java @@ -0,0 +1,618 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/health_profile.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * Request message for getting Identity details.
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.GetIdentityRequest} + */ +@com.google.protobuf.Generated +public final class GetIdentityRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.GetIdentityRequest) + GetIdentityRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GetIdentityRequest"); + } + + // Use GetIdentityRequest.newBuilder() to construct. + private GetIdentityRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GetIdentityRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.HealthProfileProto + .internal_static_google_devicesandservices_health_v4_GetIdentityRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.HealthProfileProto + .internal_static_google_devicesandservices_health_v4_GetIdentityRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.GetIdentityRequest.class, + com.google.devicesandservices.health.v4.GetIdentityRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The resource name of the Identity.
+   * Format: `users/me/identity`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The resource name of the Identity.
+   * Format: `users/me/identity`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.GetIdentityRequest)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.GetIdentityRequest other = + (com.google.devicesandservices.health.v4.GetIdentityRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.GetIdentityRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.GetIdentityRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.GetIdentityRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.GetIdentityRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.GetIdentityRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.GetIdentityRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.GetIdentityRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.GetIdentityRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.GetIdentityRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.GetIdentityRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.GetIdentityRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.GetIdentityRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.GetIdentityRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for getting Identity details.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.GetIdentityRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.GetIdentityRequest) + com.google.devicesandservices.health.v4.GetIdentityRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.HealthProfileProto + .internal_static_google_devicesandservices_health_v4_GetIdentityRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.HealthProfileProto + .internal_static_google_devicesandservices_health_v4_GetIdentityRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.GetIdentityRequest.class, + com.google.devicesandservices.health.v4.GetIdentityRequest.Builder.class); + } + + // Construct using com.google.devicesandservices.health.v4.GetIdentityRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.HealthProfileProto + .internal_static_google_devicesandservices_health_v4_GetIdentityRequest_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.GetIdentityRequest getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.GetIdentityRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.GetIdentityRequest build() { + com.google.devicesandservices.health.v4.GetIdentityRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.GetIdentityRequest buildPartial() { + com.google.devicesandservices.health.v4.GetIdentityRequest result = + new com.google.devicesandservices.health.v4.GetIdentityRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.devicesandservices.health.v4.GetIdentityRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.GetIdentityRequest) { + return mergeFrom((com.google.devicesandservices.health.v4.GetIdentityRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.devicesandservices.health.v4.GetIdentityRequest other) { + if (other == com.google.devicesandservices.health.v4.GetIdentityRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. The resource name of the Identity.
+     * Format: `users/me/identity`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The resource name of the Identity.
+     * Format: `users/me/identity`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The resource name of the Identity.
+     * Format: `users/me/identity`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource name of the Identity.
+     * Format: `users/me/identity`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource name of the Identity.
+     * Format: `users/me/identity`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.GetIdentityRequest) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.GetIdentityRequest) + private static final com.google.devicesandservices.health.v4.GetIdentityRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.GetIdentityRequest(); + } + + public static com.google.devicesandservices.health.v4.GetIdentityRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetIdentityRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.GetIdentityRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/GetIdentityRequestOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/GetIdentityRequestOrBuilder.java new file mode 100644 index 000000000000..3e2b73883a11 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/GetIdentityRequestOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/health_profile.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface GetIdentityRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.GetIdentityRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the Identity.
+   * Format: `users/me/identity`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The resource name of the Identity.
+   * Format: `users/me/identity`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/GetProfileRequest.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/GetProfileRequest.java new file mode 100644 index 000000000000..28aac3d134cc --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/GetProfileRequest.java @@ -0,0 +1,618 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/health_profile.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * Request message for getting Profile details.
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.GetProfileRequest} + */ +@com.google.protobuf.Generated +public final class GetProfileRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.GetProfileRequest) + GetProfileRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GetProfileRequest"); + } + + // Use GetProfileRequest.newBuilder() to construct. + private GetProfileRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GetProfileRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.HealthProfileProto + .internal_static_google_devicesandservices_health_v4_GetProfileRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.HealthProfileProto + .internal_static_google_devicesandservices_health_v4_GetProfileRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.GetProfileRequest.class, + com.google.devicesandservices.health.v4.GetProfileRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name of the Profile.
+   * Format: `users/me/profile`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The name of the Profile.
+   * Format: `users/me/profile`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.GetProfileRequest)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.GetProfileRequest other = + (com.google.devicesandservices.health.v4.GetProfileRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.GetProfileRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.GetProfileRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.GetProfileRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.GetProfileRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.GetProfileRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.GetProfileRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.GetProfileRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.GetProfileRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.GetProfileRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.GetProfileRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.GetProfileRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.GetProfileRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.GetProfileRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for getting Profile details.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.GetProfileRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.GetProfileRequest) + com.google.devicesandservices.health.v4.GetProfileRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.HealthProfileProto + .internal_static_google_devicesandservices_health_v4_GetProfileRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.HealthProfileProto + .internal_static_google_devicesandservices_health_v4_GetProfileRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.GetProfileRequest.class, + com.google.devicesandservices.health.v4.GetProfileRequest.Builder.class); + } + + // Construct using com.google.devicesandservices.health.v4.GetProfileRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.HealthProfileProto + .internal_static_google_devicesandservices_health_v4_GetProfileRequest_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.GetProfileRequest getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.GetProfileRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.GetProfileRequest build() { + com.google.devicesandservices.health.v4.GetProfileRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.GetProfileRequest buildPartial() { + com.google.devicesandservices.health.v4.GetProfileRequest result = + new com.google.devicesandservices.health.v4.GetProfileRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.devicesandservices.health.v4.GetProfileRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.GetProfileRequest) { + return mergeFrom((com.google.devicesandservices.health.v4.GetProfileRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.devicesandservices.health.v4.GetProfileRequest other) { + if (other == com.google.devicesandservices.health.v4.GetProfileRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. The name of the Profile.
+     * Format: `users/me/profile`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The name of the Profile.
+     * Format: `users/me/profile`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The name of the Profile.
+     * Format: `users/me/profile`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the Profile.
+     * Format: `users/me/profile`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the Profile.
+     * Format: `users/me/profile`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.GetProfileRequest) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.GetProfileRequest) + private static final com.google.devicesandservices.health.v4.GetProfileRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.GetProfileRequest(); + } + + public static com.google.devicesandservices.health.v4.GetProfileRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetProfileRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.GetProfileRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/GetProfileRequestOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/GetProfileRequestOrBuilder.java new file mode 100644 index 000000000000..5b9262e983bb --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/GetProfileRequestOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/health_profile.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface GetProfileRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.GetProfileRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the Profile.
+   * Format: `users/me/profile`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The name of the Profile.
+   * Format: `users/me/profile`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/GetSettingsRequest.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/GetSettingsRequest.java new file mode 100644 index 000000000000..58ecf1aacdad --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/GetSettingsRequest.java @@ -0,0 +1,618 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/health_profile.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * Request message for getting Settings details.
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.GetSettingsRequest} + */ +@com.google.protobuf.Generated +public final class GetSettingsRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.GetSettingsRequest) + GetSettingsRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GetSettingsRequest"); + } + + // Use GetSettingsRequest.newBuilder() to construct. + private GetSettingsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GetSettingsRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.HealthProfileProto + .internal_static_google_devicesandservices_health_v4_GetSettingsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.HealthProfileProto + .internal_static_google_devicesandservices_health_v4_GetSettingsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.GetSettingsRequest.class, + com.google.devicesandservices.health.v4.GetSettingsRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name of the Settings.
+   * Format: `users/me/settings`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The name of the Settings.
+   * Format: `users/me/settings`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.GetSettingsRequest)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.GetSettingsRequest other = + (com.google.devicesandservices.health.v4.GetSettingsRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.GetSettingsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.GetSettingsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.GetSettingsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.GetSettingsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.GetSettingsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.GetSettingsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.GetSettingsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.GetSettingsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.GetSettingsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.GetSettingsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.GetSettingsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.GetSettingsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.GetSettingsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for getting Settings details.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.GetSettingsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.GetSettingsRequest) + com.google.devicesandservices.health.v4.GetSettingsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.HealthProfileProto + .internal_static_google_devicesandservices_health_v4_GetSettingsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.HealthProfileProto + .internal_static_google_devicesandservices_health_v4_GetSettingsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.GetSettingsRequest.class, + com.google.devicesandservices.health.v4.GetSettingsRequest.Builder.class); + } + + // Construct using com.google.devicesandservices.health.v4.GetSettingsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.HealthProfileProto + .internal_static_google_devicesandservices_health_v4_GetSettingsRequest_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.GetSettingsRequest getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.GetSettingsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.GetSettingsRequest build() { + com.google.devicesandservices.health.v4.GetSettingsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.GetSettingsRequest buildPartial() { + com.google.devicesandservices.health.v4.GetSettingsRequest result = + new com.google.devicesandservices.health.v4.GetSettingsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.devicesandservices.health.v4.GetSettingsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.GetSettingsRequest) { + return mergeFrom((com.google.devicesandservices.health.v4.GetSettingsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.devicesandservices.health.v4.GetSettingsRequest other) { + if (other == com.google.devicesandservices.health.v4.GetSettingsRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. The name of the Settings.
+     * Format: `users/me/settings`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The name of the Settings.
+     * Format: `users/me/settings`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The name of the Settings.
+     * Format: `users/me/settings`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the Settings.
+     * Format: `users/me/settings`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the Settings.
+     * Format: `users/me/settings`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.GetSettingsRequest) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.GetSettingsRequest) + private static final com.google.devicesandservices.health.v4.GetSettingsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.GetSettingsRequest(); + } + + public static com.google.devicesandservices.health.v4.GetSettingsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetSettingsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.GetSettingsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/GetSettingsRequestOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/GetSettingsRequestOrBuilder.java new file mode 100644 index 000000000000..66846d19bb54 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/GetSettingsRequestOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/health_profile.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface GetSettingsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.GetSettingsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the Settings.
+   * Format: `users/me/settings`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The name of the Settings.
+   * Format: `users/me/settings`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/HealthProfileProto.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/HealthProfileProto.java new file mode 100644 index 000000000000..457d553e1f66 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/HealthProfileProto.java @@ -0,0 +1,343 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/health_profile.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public final class HealthProfileProto extends com.google.protobuf.GeneratedFile { + private HealthProfileProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "HealthProfileProto"); + } + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_Profile_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_Profile_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_Settings_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_Settings_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_Identity_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_Identity_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_GetProfileRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_GetProfileRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_UpdateProfileRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_UpdateProfileRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_GetSettingsRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_GetSettingsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_UpdateSettingsRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_UpdateSettingsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_GetIdentityRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_GetIdentityRequest_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n" + + "8google/devicesandservices/health/v4/health_profile.proto\022#google.devicesandser" + + "vices.health.v4\032\034google/api/annotations." + + "proto\032\027google/api/client.proto\032\037google/a" + + "pi/field_behavior.proto\032\031google/api/reso" + + "urce.proto\032\036google/protobuf/duration.proto\032" + + " google/protobuf/field_mask.proto\032\026google/type/date.proto\"\252\004\n" + + "\007Profile\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\010\022\020\n" + + "\003age\030\006 \001(\005B\003\340A\001\0225\n" + + "\025membership_start_date\030\t \001(\0132\021.google.type.DateB\003\340A\003\022:\n" + + "(user_configured_walking_stride_length_mm\030\r" + + " \001(\005B\003\340A\001H\000\210\001\001\022:\n" + + "(user_configured_running_stride_length_mm\030\016" + + " \001(\005B\003\340A\001H\001\210\001\001\022/\n" + + "\035auto_walking_stride_length_mm\030\017" + + " \001(\005B\003\340A\003H\002\210\001\001\022/\n" + + "\035auto_running_stride_length_mm\030\020" + + " \001(\005B\003\340A\003H\003\210\001\001:K\352AH\n" + + "\035health.goog" + + "leapis.com/Profile\022\024users/{user}/profile*\010profiles2\007profileB+\n" + + ")_user_configured_walking_stride_length_mmB+\n" + + ")_user_configured_running_stride_length_mmB \n" + + "\036_auto_walking_stride_length_mmB \n" + + "\036_auto_running_stride_length_mm\"\373\016\n" + + "\010Settings\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\010\022 \n" + + "\023auto_stride_enabled\030\002 \001(\010B\003\340A\001\022V\n\r" + + "distance_unit\030\005 \001(\0162:.google.devi" + + "cesandservices.health.v4.Settings.DistanceUnitB\003\340A\001\022T\n" + + "\014glucose_unit\030\007 \001(\01629.goog" + + "le.devicesandservices.health.v4.Settings.GlucoseUnitB\003\340A\001\022R\n" + + "\013height_unit\030\010 \001(\01628" + + ".google.devicesandservices.health.v4.Settings.HeightUnitB\003\340A\001\022\034\n" + + "\017language_locale\030\t \001(\tB\003\340A\001\0222\n\n" + + "utc_offset\030\n" + + " \001(\0132\031.google.protobuf.DurationB\003\340A\001\022g\n" + + "\032stride_length_walking_type\030\r" + + " \001(\0162>.google.devicesands" + + "ervices.health.v4.Settings.StrideLengthTypeB\003\340A\001\022g\n" + + "\032stride_length_running_type\030\016" + + " \001(\0162>.google.devicesandservices.health.v4.Settings.StrideLengthTypeB\003\340A\001\022N\n" + + "\tswim_unit\030\017" + + " \001(\01626.google.devicesandservices.health.v4.Settings.SwimUnitB\003\340A\001\022\\\n" + + "\020temperature_unit\030\020 \001(\0162=.google.devicesands" + + "ervices.health.v4.Settings.TemperatureUnitB\003\340A\001\022\026\n" + + "\ttime_zone\030\021 \001(\tB\003\340A\001\022R\n" + + "\013weight_unit\030\022" + + " \001(\01628.google.devicesandservices.health.v4.Settings.WeightUnitB\003\340A\001\022P\n\n" + + "water_unit\030\023" + + " \001(\01627.google.devicesandservices.health.v4.Settings.WaterUnitB\003\340A\001\"d\n" + + "\014DistanceUnit\022\035\n" + + "\031DISTANCE_UNIT_UNSPECIFIED\020\000\022\027\n" + + "\023DISTANCE_UNIT_MILES\020\001\022\034\n" + + "\030DISTANCE_UNIT_KILOMETERS\020\002\"\\\n" + + "\013GlucoseUnit\022\034\n" + + "\030GLUCOSE_UNIT_UNSPECIFIED\020\000\022\026\n" + + "\022GLUCOSE_UNIT_MG_DL\020\001\022\027\n" + + "\023GLUCOSE_UNIT_MMOL_L\020\002\"^\n\n" + + "HeightUnit\022\033\n" + + "\027HEIGHT_UNIT_UNSPECIFIED\020\000\022\026\n" + + "\022HEIGHT_UNIT_INCHES\020\001\022\033\n" + + "\027HEIGHT_UNIT_CENTIMETERS\020\002\"\222\001\n" + + "\020StrideLengthType\022\"\n" + + "\036STRIDE_LENGTH_TYPE_UNSPECIFIED\020\000\022\036\n" + + "\032STRIDE_LENGTH_TYPE_DEFAULT\020\001\022\035\n" + + "\031STRIDE_LENGTH_TYPE_MANUAL\020\002\022\033\n" + + "\027STRIDE_LENGTH_TYPE_AUTO\020\003\"P\n" + + "\010SwimUnit\022\031\n" + + "\025SWIM_UNIT_UNSPECIFIED\020\000\022\024\n" + + "\020SWIM_UNIT_METERS\020\001\022\023\n" + + "\017SWIM_UNIT_YARDS\020\002\"r\n" + + "\017TemperatureUnit\022 \n" + + "\034TEMPERATURE_UNIT_UNSPECIFIED\020\000\022\034\n" + + "\030TEMPERATURE_UNIT_CELSIUS\020\001\022\037\n" + + "\033TEMPERATURE_UNIT_FAHRENHEIT\020\002\"s\n\n" + + "WeightUnit\022\033\n" + + "\027WEIGHT_UNIT_UNSPECIFIED\020\000\022\026\n" + + "\022WEIGHT_UNIT_POUNDS\020\001\022\025\n" + + "\021WEIGHT_UNIT_STONE\020\002\022\031\n" + + "\025WEIGHT_UNIT_KILOGRAMS\020\003\"d\n" + + "\tWaterUnit\022\032\n" + + "\026WATER_UNIT_UNSPECIFIED\020\000\022\021\n\r" + + "WATER_UNIT_ML\020\001\022\024\n" + + "\020WATER_UNIT_FL_OZ\020\002\022\022\n" + + "\016WATER_UNIT_CUP\020\003:N\352AK\n" + + "\036health.googleapis." + + "com/Settings\022\025users/{user}/settings*\010settings2\010settings\"\251\001\n" + + "\010Identity\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\010\022\033\n" + + "\016legacy_user_id\030\002 \001(\tB\003\340A\003\022\033\n" + + "\016health_user_id\030\003 \001(\tB\003\340A\003:P\352AM\n" + + "\036health.googleapis.com/Identity\022\025users/{user}/identity*\n" + + "identities2\010identity\"H\n" + + "\021GetProfileRequest\0223\n" + + "\004name\030\001 \001(\tB%\340A\002\372A\037\n" + + "\035health.googleapis.com/Profile\"\220\001\n" + + "\024UpdateProfileRequest\022B\n" + + "\007profile\030\001" + + " \001(\0132,.google.devicesandservices.health.v4.ProfileB\003\340A\002\0224\n" + + "\013update_mask\030\002 \001(\0132\032.google.protobuf.FieldMaskB\003\340A\001\"J\n" + + "\022GetSettingsRequest\0224\n" + + "\004name\030\001 \001(\tB&\340A\002\372A \n" + + "\036health.googleapis.com/Settings\"\223\001\n" + + "\025UpdateSettingsRequest\022D\n" + + "\010settings\030\001" + + " \001(\0132-.google.devicesandservices.health.v4.SettingsB\003\340A\002\0224\n" + + "\013update_mask\030\002 \001(\0132\032.google.protobuf.FieldMaskB\003\340A\001\"J\n" + + "\022GetIdentityRequest\0224\n" + + "\004name\030\001 \001(\tB&\340A\002\372A \n" + + "\036health.googleapis.com/Identity2\211\n\n" + + "\024HealthProfileService\022\235\001\n\n" + + "GetProfile\0226.google.devicesandservices.health.v4.GetProfileR" + + "equest\032,.google.devicesandservices.healt" + + "h.v4.Profile\")\332A\004name\202\323\344\223\002\034\022\032/v4/{name=users/*/profile}\022\303\001\n\r" + + "UpdateProfile\0229.google.devicesandservices.health.v4.UpdatePr" + + "ofileRequest\032,.google.devicesandservices" + + ".health.v4.Profile\"I\332A\023profile,update_ma" + + "sk\202\323\344\223\002-2\"/v4/{profile.name=users/*/profile}:\007profile\022\241\001\n" + + "\013GetSettings\0227.google.devicesandservices.health.v4.GetSettingsR" + + "equest\032-.google.devicesandservices.healt" + + "h.v4.Settings\"*\332A\004name\202\323\344\223\002\035\022\033/v4/{name=users/*/settings}\022\312\001\n" + + "\016UpdateSettings\022:.google.devicesandservices.health.v4.Updat" + + "eSettingsRequest\032-.google.devicesandserv" + + "ices.health.v4.Settings\"M\332A\024settings,upd" + + "ate_mask\202\323\344\223\00202$/v4/{settings.name=users/*/settings}:\010settings\022\241\001\n" + + "\013GetIdentity\0227.google.devicesandservices.health.v4.Get" + + "IdentityRequest\032-.google.devicesandservi" + + "ces.health.v4.Identity\"*\332A\004name\202\323\344\223\002\035\022\033/" + + "v4/{name=users/*/identity}\032\365\002\312A\025health.g" + + "oogleapis.com\322A\331\002https://www.googleapis." + + "com/auth/googlehealth.activity_and_fitness.readonly,https://www.googleapis.com/a" + + "uth/googlehealth.health_metrics_and_measurements.readonly,https://www.googleapis" + + ".com/auth/googlehealth.profile.readonly,https://www.googleapis.com/auth/googlehe" + + "alth.settings.readonly,https://www.googl" + + "eapis.com/auth/googlehealth.sleep.readonlyB\210\002\n" + + "\'com.google.devicesandservices.health.v4B\022HealthProfileProtoP\001ZRgoogle.gol" + + "ang.org/genproto/googleapis/devicesandservices/health/apiv4main;healthpb\252\002#Googl" + + "e.DevicesAndServices.Health.V4\312\002#Google\\" + + "DevicesAndServices\\Health\\V4\352\002&Google::D" + + "evicesAndServices::Health::V4b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.protobuf.DurationProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + com.google.type.DateProto.getDescriptor(), + }); + internal_static_google_devicesandservices_health_v4_Profile_descriptor = + getDescriptor().getMessageType(0); + internal_static_google_devicesandservices_health_v4_Profile_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_Profile_descriptor, + new java.lang.String[] { + "Name", + "Age", + "MembershipStartDate", + "UserConfiguredWalkingStrideLengthMm", + "UserConfiguredRunningStrideLengthMm", + "AutoWalkingStrideLengthMm", + "AutoRunningStrideLengthMm", + }); + internal_static_google_devicesandservices_health_v4_Settings_descriptor = + getDescriptor().getMessageType(1); + internal_static_google_devicesandservices_health_v4_Settings_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_Settings_descriptor, + new java.lang.String[] { + "Name", + "AutoStrideEnabled", + "DistanceUnit", + "GlucoseUnit", + "HeightUnit", + "LanguageLocale", + "UtcOffset", + "StrideLengthWalkingType", + "StrideLengthRunningType", + "SwimUnit", + "TemperatureUnit", + "TimeZone", + "WeightUnit", + "WaterUnit", + }); + internal_static_google_devicesandservices_health_v4_Identity_descriptor = + getDescriptor().getMessageType(2); + internal_static_google_devicesandservices_health_v4_Identity_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_Identity_descriptor, + new java.lang.String[] { + "Name", "LegacyUserId", "HealthUserId", + }); + internal_static_google_devicesandservices_health_v4_GetProfileRequest_descriptor = + getDescriptor().getMessageType(3); + internal_static_google_devicesandservices_health_v4_GetProfileRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_GetProfileRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_devicesandservices_health_v4_UpdateProfileRequest_descriptor = + getDescriptor().getMessageType(4); + internal_static_google_devicesandservices_health_v4_UpdateProfileRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_UpdateProfileRequest_descriptor, + new java.lang.String[] { + "Profile", "UpdateMask", + }); + internal_static_google_devicesandservices_health_v4_GetSettingsRequest_descriptor = + getDescriptor().getMessageType(5); + internal_static_google_devicesandservices_health_v4_GetSettingsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_GetSettingsRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_devicesandservices_health_v4_UpdateSettingsRequest_descriptor = + getDescriptor().getMessageType(6); + internal_static_google_devicesandservices_health_v4_UpdateSettingsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_UpdateSettingsRequest_descriptor, + new java.lang.String[] { + "Settings", "UpdateMask", + }); + internal_static_google_devicesandservices_health_v4_GetIdentityRequest_descriptor = + getDescriptor().getMessageType(7); + internal_static_google_devicesandservices_health_v4_GetIdentityRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_GetIdentityRequest_descriptor, + new java.lang.String[] { + "Name", + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.protobuf.DurationProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + com.google.type.DateProto.getDescriptor(); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/HeartRate.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/HeartRate.java new file mode 100644 index 000000000000..f33a66affbc6 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/HeartRate.java @@ -0,0 +1,2440 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * A heart rate measurement.
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.HeartRate} + */ +@com.google.protobuf.Generated +public final class HeartRate extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.HeartRate) + HeartRateOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "HeartRate"); + } + + // Use HeartRate.newBuilder() to construct. + private HeartRate(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private HeartRate() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_HeartRate_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_HeartRate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.HeartRate.class, + com.google.devicesandservices.health.v4.HeartRate.Builder.class); + } + + public interface HeartRateMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.HeartRate.HeartRateMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Optional. Indicates the user’s level of activity when the heart rate
+     * sample was measured
+     * 
+ * + * + * .google.devicesandservices.health.v4.HeartRate.HeartRateMetadata.MotionContext motion_context = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for motionContext. + */ + int getMotionContextValue(); + + /** + * + * + *
+     * Optional. Indicates the user’s level of activity when the heart rate
+     * sample was measured
+     * 
+ * + * + * .google.devicesandservices.health.v4.HeartRate.HeartRateMetadata.MotionContext motion_context = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The motionContext. + */ + com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata.MotionContext + getMotionContext(); + + /** + * + * + *
+     * Optional. Indicates the location of the sensor that measured the heart
+     * rate.
+     * 
+ * + * + * .google.devicesandservices.health.v4.HeartRate.HeartRateMetadata.SensorLocation sensor_location = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for sensorLocation. + */ + int getSensorLocationValue(); + + /** + * + * + *
+     * Optional. Indicates the location of the sensor that measured the heart
+     * rate.
+     * 
+ * + * + * .google.devicesandservices.health.v4.HeartRate.HeartRateMetadata.SensorLocation sensor_location = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The sensorLocation. + */ + com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata.SensorLocation + getSensorLocation(); + } + + /** + * + * + *
+   * Heart rate metadata.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.HeartRate.HeartRateMetadata} + */ + public static final class HeartRateMetadata extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.HeartRate.HeartRateMetadata) + HeartRateMetadataOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "HeartRateMetadata"); + } + + // Use HeartRateMetadata.newBuilder() to construct. + private HeartRateMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private HeartRateMetadata() { + motionContext_ = 0; + sensorLocation_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_HeartRate_HeartRateMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_HeartRate_HeartRateMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata.class, + com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata.Builder.class); + } + + /** + * + * + *
+     * The user’s level of activity when the heart rate sample was measured.
+     * 
+ * + * Protobuf enum {@code + * google.devicesandservices.health.v4.HeartRate.HeartRateMetadata.MotionContext} + */ + public enum MotionContext implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * The default value when no data is available.
+       * 
+ * + * MOTION_CONTEXT_UNSPECIFIED = 0; + */ + MOTION_CONTEXT_UNSPECIFIED(0), + /** + * + * + *
+       * The user is active.
+       * 
+ * + * ACTIVE = 1; + */ + ACTIVE(1), + /** + * + * + *
+       * The user is inactive.
+       * 
+ * + * SEDENTARY = 2; + */ + SEDENTARY(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "MotionContext"); + } + + /** + * + * + *
+       * The default value when no data is available.
+       * 
+ * + * MOTION_CONTEXT_UNSPECIFIED = 0; + */ + public static final int MOTION_CONTEXT_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+       * The user is active.
+       * 
+ * + * ACTIVE = 1; + */ + public static final int ACTIVE_VALUE = 1; + + /** + * + * + *
+       * The user is inactive.
+       * 
+ * + * SEDENTARY = 2; + */ + public static final int SEDENTARY_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static MotionContext valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static MotionContext forNumber(int value) { + switch (value) { + case 0: + return MOTION_CONTEXT_UNSPECIFIED; + case 1: + return ACTIVE; + case 2: + return SEDENTARY; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public MotionContext findValueByNumber(int number) { + return MotionContext.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final MotionContext[] VALUES = values(); + + public static MotionContext valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private MotionContext(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.devicesandservices.health.v4.HeartRate.HeartRateMetadata.MotionContext) + } + + /** + * + * + *
+     * The location of the sensor that measured the heart rate.
+     * 
+ * + * Protobuf enum {@code + * google.devicesandservices.health.v4.HeartRate.HeartRateMetadata.SensorLocation} + */ + public enum SensorLocation implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * The default value when no data is available.
+       * 
+ * + * SENSOR_LOCATION_UNSPECIFIED = 0; + */ + SENSOR_LOCATION_UNSPECIFIED(0), + /** + * + * + *
+       * Chest sensor.
+       * 
+ * + * CHEST = 1; + */ + CHEST(1), + /** + * + * + *
+       * Wrist sensor.
+       * 
+ * + * WRIST = 2; + */ + WRIST(2), + /** + * + * + *
+       * Finger sensor.
+       * 
+ * + * FINGER = 3; + */ + FINGER(3), + /** + * + * + *
+       * Hand sensor.
+       * 
+ * + * HAND = 4; + */ + HAND(4), + /** + * + * + *
+       * Ear lobe sensor.
+       * 
+ * + * EAR_LOBE = 5; + */ + EAR_LOBE(5), + /** + * + * + *
+       * Foot sensor.
+       * 
+ * + * FOOT = 6; + */ + FOOT(6), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SensorLocation"); + } + + /** + * + * + *
+       * The default value when no data is available.
+       * 
+ * + * SENSOR_LOCATION_UNSPECIFIED = 0; + */ + public static final int SENSOR_LOCATION_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+       * Chest sensor.
+       * 
+ * + * CHEST = 1; + */ + public static final int CHEST_VALUE = 1; + + /** + * + * + *
+       * Wrist sensor.
+       * 
+ * + * WRIST = 2; + */ + public static final int WRIST_VALUE = 2; + + /** + * + * + *
+       * Finger sensor.
+       * 
+ * + * FINGER = 3; + */ + public static final int FINGER_VALUE = 3; + + /** + * + * + *
+       * Hand sensor.
+       * 
+ * + * HAND = 4; + */ + public static final int HAND_VALUE = 4; + + /** + * + * + *
+       * Ear lobe sensor.
+       * 
+ * + * EAR_LOBE = 5; + */ + public static final int EAR_LOBE_VALUE = 5; + + /** + * + * + *
+       * Foot sensor.
+       * 
+ * + * FOOT = 6; + */ + public static final int FOOT_VALUE = 6; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static SensorLocation valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static SensorLocation forNumber(int value) { + switch (value) { + case 0: + return SENSOR_LOCATION_UNSPECIFIED; + case 1: + return CHEST; + case 2: + return WRIST; + case 3: + return FINGER; + case 4: + return HAND; + case 5: + return EAR_LOBE; + case 6: + return FOOT; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public SensorLocation findValueByNumber(int number) { + return SensorLocation.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata.getDescriptor() + .getEnumTypes() + .get(1); + } + + private static final SensorLocation[] VALUES = values(); + + public static SensorLocation valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private SensorLocation(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.devicesandservices.health.v4.HeartRate.HeartRateMetadata.SensorLocation) + } + + public static final int MOTION_CONTEXT_FIELD_NUMBER = 1; + private int motionContext_ = 0; + + /** + * + * + *
+     * Optional. Indicates the user’s level of activity when the heart rate
+     * sample was measured
+     * 
+ * + * + * .google.devicesandservices.health.v4.HeartRate.HeartRateMetadata.MotionContext motion_context = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for motionContext. + */ + @java.lang.Override + public int getMotionContextValue() { + return motionContext_; + } + + /** + * + * + *
+     * Optional. Indicates the user’s level of activity when the heart rate
+     * sample was measured
+     * 
+ * + * + * .google.devicesandservices.health.v4.HeartRate.HeartRateMetadata.MotionContext motion_context = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The motionContext. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata.MotionContext + getMotionContext() { + com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata.MotionContext result = + com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata.MotionContext + .forNumber(motionContext_); + return result == null + ? com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata.MotionContext + .UNRECOGNIZED + : result; + } + + public static final int SENSOR_LOCATION_FIELD_NUMBER = 2; + private int sensorLocation_ = 0; + + /** + * + * + *
+     * Optional. Indicates the location of the sensor that measured the heart
+     * rate.
+     * 
+ * + * + * .google.devicesandservices.health.v4.HeartRate.HeartRateMetadata.SensorLocation sensor_location = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for sensorLocation. + */ + @java.lang.Override + public int getSensorLocationValue() { + return sensorLocation_; + } + + /** + * + * + *
+     * Optional. Indicates the location of the sensor that measured the heart
+     * rate.
+     * 
+ * + * + * .google.devicesandservices.health.v4.HeartRate.HeartRateMetadata.SensorLocation sensor_location = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The sensorLocation. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata.SensorLocation + getSensorLocation() { + com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata.SensorLocation result = + com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata.SensorLocation + .forNumber(sensorLocation_); + return result == null + ? com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata.SensorLocation + .UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (motionContext_ + != com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata.MotionContext + .MOTION_CONTEXT_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, motionContext_); + } + if (sensorLocation_ + != com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata.SensorLocation + .SENSOR_LOCATION_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, sensorLocation_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (motionContext_ + != com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata.MotionContext + .MOTION_CONTEXT_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, motionContext_); + } + if (sensorLocation_ + != com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata.SensorLocation + .SENSOR_LOCATION_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, sensorLocation_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata other = + (com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata) obj; + + if (motionContext_ != other.motionContext_) return false; + if (sensorLocation_ != other.sensorLocation_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MOTION_CONTEXT_FIELD_NUMBER; + hash = (53 * hash) + motionContext_; + hash = (37 * hash) + SENSOR_LOCATION_FIELD_NUMBER; + hash = (53 * hash) + sensorLocation_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+     * Heart rate metadata.
+     * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.HeartRate.HeartRateMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.HeartRate.HeartRateMetadata) + com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_HeartRate_HeartRateMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_HeartRate_HeartRateMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata.class, + com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata.Builder.class); + } + + // Construct using + // com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + motionContext_ = 0; + sensorLocation_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_HeartRate_HeartRateMetadata_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata + getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata build() { + com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata buildPartial() { + com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata result = + new com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.motionContext_ = motionContext_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.sensorLocation_ = sensorLocation_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata) { + return mergeFrom( + (com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata other) { + if (other + == com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata + .getDefaultInstance()) return this; + if (other.motionContext_ != 0) { + setMotionContextValue(other.getMotionContextValue()); + } + if (other.sensorLocation_ != 0) { + setSensorLocationValue(other.getSensorLocationValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + motionContext_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + sensorLocation_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int motionContext_ = 0; + + /** + * + * + *
+       * Optional. Indicates the user’s level of activity when the heart rate
+       * sample was measured
+       * 
+ * + * + * .google.devicesandservices.health.v4.HeartRate.HeartRateMetadata.MotionContext motion_context = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for motionContext. + */ + @java.lang.Override + public int getMotionContextValue() { + return motionContext_; + } + + /** + * + * + *
+       * Optional. Indicates the user’s level of activity when the heart rate
+       * sample was measured
+       * 
+ * + * + * .google.devicesandservices.health.v4.HeartRate.HeartRateMetadata.MotionContext motion_context = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for motionContext to set. + * @return This builder for chaining. + */ + public Builder setMotionContextValue(int value) { + motionContext_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. Indicates the user’s level of activity when the heart rate
+       * sample was measured
+       * 
+ * + * + * .google.devicesandservices.health.v4.HeartRate.HeartRateMetadata.MotionContext motion_context = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The motionContext. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata.MotionContext + getMotionContext() { + com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata.MotionContext result = + com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata.MotionContext + .forNumber(motionContext_); + return result == null + ? com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata.MotionContext + .UNRECOGNIZED + : result; + } + + /** + * + * + *
+       * Optional. Indicates the user’s level of activity when the heart rate
+       * sample was measured
+       * 
+ * + * + * .google.devicesandservices.health.v4.HeartRate.HeartRateMetadata.MotionContext motion_context = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The motionContext to set. + * @return This builder for chaining. + */ + public Builder setMotionContext( + com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata.MotionContext value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + motionContext_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. Indicates the user’s level of activity when the heart rate
+       * sample was measured
+       * 
+ * + * + * .google.devicesandservices.health.v4.HeartRate.HeartRateMetadata.MotionContext motion_context = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearMotionContext() { + bitField0_ = (bitField0_ & ~0x00000001); + motionContext_ = 0; + onChanged(); + return this; + } + + private int sensorLocation_ = 0; + + /** + * + * + *
+       * Optional. Indicates the location of the sensor that measured the heart
+       * rate.
+       * 
+ * + * + * .google.devicesandservices.health.v4.HeartRate.HeartRateMetadata.SensorLocation sensor_location = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for sensorLocation. + */ + @java.lang.Override + public int getSensorLocationValue() { + return sensorLocation_; + } + + /** + * + * + *
+       * Optional. Indicates the location of the sensor that measured the heart
+       * rate.
+       * 
+ * + * + * .google.devicesandservices.health.v4.HeartRate.HeartRateMetadata.SensorLocation sensor_location = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for sensorLocation to set. + * @return This builder for chaining. + */ + public Builder setSensorLocationValue(int value) { + sensorLocation_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. Indicates the location of the sensor that measured the heart
+       * rate.
+       * 
+ * + * + * .google.devicesandservices.health.v4.HeartRate.HeartRateMetadata.SensorLocation sensor_location = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The sensorLocation. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata.SensorLocation + getSensorLocation() { + com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata.SensorLocation result = + com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata.SensorLocation + .forNumber(sensorLocation_); + return result == null + ? com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata.SensorLocation + .UNRECOGNIZED + : result; + } + + /** + * + * + *
+       * Optional. Indicates the location of the sensor that measured the heart
+       * rate.
+       * 
+ * + * + * .google.devicesandservices.health.v4.HeartRate.HeartRateMetadata.SensorLocation sensor_location = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The sensorLocation to set. + * @return This builder for chaining. + */ + public Builder setSensorLocation( + com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata.SensorLocation + value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + sensorLocation_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. Indicates the location of the sensor that measured the heart
+       * rate.
+       * 
+ * + * + * .google.devicesandservices.health.v4.HeartRate.HeartRateMetadata.SensorLocation sensor_location = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearSensorLocation() { + bitField0_ = (bitField0_ & ~0x00000002); + sensorLocation_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.HeartRate.HeartRateMetadata) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.HeartRate.HeartRateMetadata) + private static final com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata(); + } + + public static com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public HeartRateMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int SAMPLE_TIME_FIELD_NUMBER = 2; + private com.google.devicesandservices.health.v4.ObservationSampleTime sampleTime_; + + /** + * + * + *
+   * Required. Observation time
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the sampleTime field is set. + */ + @java.lang.Override + public boolean hasSampleTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. Observation time
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The sampleTime. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ObservationSampleTime getSampleTime() { + return sampleTime_ == null + ? com.google.devicesandservices.health.v4.ObservationSampleTime.getDefaultInstance() + : sampleTime_; + } + + /** + * + * + *
+   * Required. Observation time
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ObservationSampleTimeOrBuilder + getSampleTimeOrBuilder() { + return sampleTime_ == null + ? com.google.devicesandservices.health.v4.ObservationSampleTime.getDefaultInstance() + : sampleTime_; + } + + public static final int BEATS_PER_MINUTE_FIELD_NUMBER = 4; + private long beatsPerMinute_ = 0L; + + /** + * + * + *
+   * Required. The heart rate value in beats per minute.
+   * 
+ * + * int64 beats_per_minute = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The beatsPerMinute. + */ + @java.lang.Override + public long getBeatsPerMinute() { + return beatsPerMinute_; + } + + public static final int METADATA_FIELD_NUMBER = 6; + private com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata metadata_; + + /** + * + * + *
+   * Optional. Metadata about the heart rate sample.
+   * 
+ * + * + * .google.devicesandservices.health.v4.HeartRate.HeartRateMetadata metadata = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the metadata field is set. + */ + @java.lang.Override + public boolean hasMetadata() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Optional. Metadata about the heart rate sample.
+   * 
+ * + * + * .google.devicesandservices.health.v4.HeartRate.HeartRateMetadata metadata = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The metadata. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata getMetadata() { + return metadata_ == null + ? com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata.getDefaultInstance() + : metadata_; + } + + /** + * + * + *
+   * Optional. Metadata about the heart rate sample.
+   * 
+ * + * + * .google.devicesandservices.health.v4.HeartRate.HeartRateMetadata metadata = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadataOrBuilder + getMetadataOrBuilder() { + return metadata_ == null + ? com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata.getDefaultInstance() + : metadata_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getSampleTime()); + } + if (beatsPerMinute_ != 0L) { + output.writeInt64(4, beatsPerMinute_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(6, getMetadata()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getSampleTime()); + } + if (beatsPerMinute_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, beatsPerMinute_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getMetadata()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.HeartRate)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.HeartRate other = + (com.google.devicesandservices.health.v4.HeartRate) obj; + + if (hasSampleTime() != other.hasSampleTime()) return false; + if (hasSampleTime()) { + if (!getSampleTime().equals(other.getSampleTime())) return false; + } + if (getBeatsPerMinute() != other.getBeatsPerMinute()) return false; + if (hasMetadata() != other.hasMetadata()) return false; + if (hasMetadata()) { + if (!getMetadata().equals(other.getMetadata())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasSampleTime()) { + hash = (37 * hash) + SAMPLE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getSampleTime().hashCode(); + } + hash = (37 * hash) + BEATS_PER_MINUTE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getBeatsPerMinute()); + if (hasMetadata()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + getMetadata().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.HeartRate parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.HeartRate parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.HeartRate parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.HeartRate parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.HeartRate parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.HeartRate parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.HeartRate parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.HeartRate parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.HeartRate parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.HeartRate parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.HeartRate parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.HeartRate parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.devicesandservices.health.v4.HeartRate prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A heart rate measurement.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.HeartRate} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.HeartRate) + com.google.devicesandservices.health.v4.HeartRateOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_HeartRate_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_HeartRate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.HeartRate.class, + com.google.devicesandservices.health.v4.HeartRate.Builder.class); + } + + // Construct using com.google.devicesandservices.health.v4.HeartRate.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetSampleTimeFieldBuilder(); + internalGetMetadataFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + sampleTime_ = null; + if (sampleTimeBuilder_ != null) { + sampleTimeBuilder_.dispose(); + sampleTimeBuilder_ = null; + } + beatsPerMinute_ = 0L; + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_HeartRate_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.HeartRate getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.HeartRate.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.HeartRate build() { + com.google.devicesandservices.health.v4.HeartRate result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.HeartRate buildPartial() { + com.google.devicesandservices.health.v4.HeartRate result = + new com.google.devicesandservices.health.v4.HeartRate(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.devicesandservices.health.v4.HeartRate result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.sampleTime_ = sampleTimeBuilder_ == null ? sampleTime_ : sampleTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.beatsPerMinute_ = beatsPerMinute_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.metadata_ = metadataBuilder_ == null ? metadata_ : metadataBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.HeartRate) { + return mergeFrom((com.google.devicesandservices.health.v4.HeartRate) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.devicesandservices.health.v4.HeartRate other) { + if (other == com.google.devicesandservices.health.v4.HeartRate.getDefaultInstance()) + return this; + if (other.hasSampleTime()) { + mergeSampleTime(other.getSampleTime()); + } + if (other.getBeatsPerMinute() != 0L) { + setBeatsPerMinute(other.getBeatsPerMinute()); + } + if (other.hasMetadata()) { + mergeMetadata(other.getMetadata()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + input.readMessage( + internalGetSampleTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 18 + case 32: + { + beatsPerMinute_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 32 + case 50: + { + input.readMessage( + internalGetMetadataFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.devicesandservices.health.v4.ObservationSampleTime sampleTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ObservationSampleTime, + com.google.devicesandservices.health.v4.ObservationSampleTime.Builder, + com.google.devicesandservices.health.v4.ObservationSampleTimeOrBuilder> + sampleTimeBuilder_; + + /** + * + * + *
+     * Required. Observation time
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the sampleTime field is set. + */ + public boolean hasSampleTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. Observation time
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The sampleTime. + */ + public com.google.devicesandservices.health.v4.ObservationSampleTime getSampleTime() { + if (sampleTimeBuilder_ == null) { + return sampleTime_ == null + ? com.google.devicesandservices.health.v4.ObservationSampleTime.getDefaultInstance() + : sampleTime_; + } else { + return sampleTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. Observation time
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSampleTime( + com.google.devicesandservices.health.v4.ObservationSampleTime value) { + if (sampleTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sampleTime_ = value; + } else { + sampleTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Observation time
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSampleTime( + com.google.devicesandservices.health.v4.ObservationSampleTime.Builder builderForValue) { + if (sampleTimeBuilder_ == null) { + sampleTime_ = builderForValue.build(); + } else { + sampleTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Observation time
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeSampleTime( + com.google.devicesandservices.health.v4.ObservationSampleTime value) { + if (sampleTimeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && sampleTime_ != null + && sampleTime_ + != com.google.devicesandservices.health.v4.ObservationSampleTime + .getDefaultInstance()) { + getSampleTimeBuilder().mergeFrom(value); + } else { + sampleTime_ = value; + } + } else { + sampleTimeBuilder_.mergeFrom(value); + } + if (sampleTime_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. Observation time
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearSampleTime() { + bitField0_ = (bitField0_ & ~0x00000001); + sampleTime_ = null; + if (sampleTimeBuilder_ != null) { + sampleTimeBuilder_.dispose(); + sampleTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Observation time
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.devicesandservices.health.v4.ObservationSampleTime.Builder + getSampleTimeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetSampleTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. Observation time
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.devicesandservices.health.v4.ObservationSampleTimeOrBuilder + getSampleTimeOrBuilder() { + if (sampleTimeBuilder_ != null) { + return sampleTimeBuilder_.getMessageOrBuilder(); + } else { + return sampleTime_ == null + ? com.google.devicesandservices.health.v4.ObservationSampleTime.getDefaultInstance() + : sampleTime_; + } + } + + /** + * + * + *
+     * Required. Observation time
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ObservationSampleTime, + com.google.devicesandservices.health.v4.ObservationSampleTime.Builder, + com.google.devicesandservices.health.v4.ObservationSampleTimeOrBuilder> + internalGetSampleTimeFieldBuilder() { + if (sampleTimeBuilder_ == null) { + sampleTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ObservationSampleTime, + com.google.devicesandservices.health.v4.ObservationSampleTime.Builder, + com.google.devicesandservices.health.v4.ObservationSampleTimeOrBuilder>( + getSampleTime(), getParentForChildren(), isClean()); + sampleTime_ = null; + } + return sampleTimeBuilder_; + } + + private long beatsPerMinute_; + + /** + * + * + *
+     * Required. The heart rate value in beats per minute.
+     * 
+ * + * int64 beats_per_minute = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The beatsPerMinute. + */ + @java.lang.Override + public long getBeatsPerMinute() { + return beatsPerMinute_; + } + + /** + * + * + *
+     * Required. The heart rate value in beats per minute.
+     * 
+ * + * int64 beats_per_minute = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The beatsPerMinute to set. + * @return This builder for chaining. + */ + public Builder setBeatsPerMinute(long value) { + + beatsPerMinute_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The heart rate value in beats per minute.
+     * 
+ * + * int64 beats_per_minute = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearBeatsPerMinute() { + bitField0_ = (bitField0_ & ~0x00000002); + beatsPerMinute_ = 0L; + onChanged(); + return this; + } + + private com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata metadata_; + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata, + com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata.Builder, + com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadataOrBuilder> + metadataBuilder_; + + /** + * + * + *
+     * Optional. Metadata about the heart rate sample.
+     * 
+ * + * + * .google.devicesandservices.health.v4.HeartRate.HeartRateMetadata metadata = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the metadata field is set. + */ + public boolean hasMetadata() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Optional. Metadata about the heart rate sample.
+     * 
+ * + * + * .google.devicesandservices.health.v4.HeartRate.HeartRateMetadata metadata = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The metadata. + */ + public com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata getMetadata() { + if (metadataBuilder_ == null) { + return metadata_ == null + ? com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata + .getDefaultInstance() + : metadata_; + } else { + return metadataBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. Metadata about the heart rate sample.
+     * 
+ * + * + * .google.devicesandservices.health.v4.HeartRate.HeartRateMetadata metadata = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setMetadata( + com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata value) { + if (metadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metadata_ = value; + } else { + metadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Metadata about the heart rate sample.
+     * 
+ * + * + * .google.devicesandservices.health.v4.HeartRate.HeartRateMetadata metadata = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setMetadata( + com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata.Builder + builderForValue) { + if (metadataBuilder_ == null) { + metadata_ = builderForValue.build(); + } else { + metadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Metadata about the heart rate sample.
+     * 
+ * + * + * .google.devicesandservices.health.v4.HeartRate.HeartRateMetadata metadata = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeMetadata( + com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata value) { + if (metadataBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && metadata_ != null + && metadata_ + != com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata + .getDefaultInstance()) { + getMetadataBuilder().mergeFrom(value); + } else { + metadata_ = value; + } + } else { + metadataBuilder_.mergeFrom(value); + } + if (metadata_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. Metadata about the heart rate sample.
+     * 
+ * + * + * .google.devicesandservices.health.v4.HeartRate.HeartRateMetadata metadata = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearMetadata() { + bitField0_ = (bitField0_ & ~0x00000004); + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Metadata about the heart rate sample.
+     * 
+ * + * + * .google.devicesandservices.health.v4.HeartRate.HeartRateMetadata metadata = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata.Builder + getMetadataBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetMetadataFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Metadata about the heart rate sample.
+     * 
+ * + * + * .google.devicesandservices.health.v4.HeartRate.HeartRateMetadata metadata = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadataOrBuilder + getMetadataOrBuilder() { + if (metadataBuilder_ != null) { + return metadataBuilder_.getMessageOrBuilder(); + } else { + return metadata_ == null + ? com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata + .getDefaultInstance() + : metadata_; + } + } + + /** + * + * + *
+     * Optional. Metadata about the heart rate sample.
+     * 
+ * + * + * .google.devicesandservices.health.v4.HeartRate.HeartRateMetadata metadata = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata, + com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata.Builder, + com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadataOrBuilder> + internalGetMetadataFieldBuilder() { + if (metadataBuilder_ == null) { + metadataBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata, + com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata.Builder, + com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadataOrBuilder>( + getMetadata(), getParentForChildren(), isClean()); + metadata_ = null; + } + return metadataBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.HeartRate) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.HeartRate) + private static final com.google.devicesandservices.health.v4.HeartRate DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.HeartRate(); + } + + public static com.google.devicesandservices.health.v4.HeartRate getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public HeartRate parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.HeartRate getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/HeartRateOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/HeartRateOrBuilder.java new file mode 100644 index 000000000000..b2ced84a69fd --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/HeartRateOrBuilder.java @@ -0,0 +1,128 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface HeartRateOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.HeartRate) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Observation time
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the sampleTime field is set. + */ + boolean hasSampleTime(); + + /** + * + * + *
+   * Required. Observation time
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The sampleTime. + */ + com.google.devicesandservices.health.v4.ObservationSampleTime getSampleTime(); + + /** + * + * + *
+   * Required. Observation time
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.devicesandservices.health.v4.ObservationSampleTimeOrBuilder getSampleTimeOrBuilder(); + + /** + * + * + *
+   * Required. The heart rate value in beats per minute.
+   * 
+ * + * int64 beats_per_minute = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The beatsPerMinute. + */ + long getBeatsPerMinute(); + + /** + * + * + *
+   * Optional. Metadata about the heart rate sample.
+   * 
+ * + * + * .google.devicesandservices.health.v4.HeartRate.HeartRateMetadata metadata = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the metadata field is set. + */ + boolean hasMetadata(); + + /** + * + * + *
+   * Optional. Metadata about the heart rate sample.
+   * 
+ * + * + * .google.devicesandservices.health.v4.HeartRate.HeartRateMetadata metadata = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The metadata. + */ + com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadata getMetadata(); + + /** + * + * + *
+   * Optional. Metadata about the heart rate sample.
+   * 
+ * + * + * .google.devicesandservices.health.v4.HeartRate.HeartRateMetadata metadata = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.devicesandservices.health.v4.HeartRate.HeartRateMetadataOrBuilder + getMetadataOrBuilder(); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/HeartRateRollupValue.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/HeartRateRollupValue.java new file mode 100644 index 000000000000..7bae7a12baf5 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/HeartRateRollupValue.java @@ -0,0 +1,831 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * Represents the result of the rollup of the heart rate data type.
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.HeartRateRollupValue} + */ +@com.google.protobuf.Generated +public final class HeartRateRollupValue extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.HeartRateRollupValue) + HeartRateRollupValueOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "HeartRateRollupValue"); + } + + // Use HeartRateRollupValue.newBuilder() to construct. + private HeartRateRollupValue(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private HeartRateRollupValue() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_HeartRateRollupValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_HeartRateRollupValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.HeartRateRollupValue.class, + com.google.devicesandservices.health.v4.HeartRateRollupValue.Builder.class); + } + + private int bitField0_; + public static final int BEATS_PER_MINUTE_AVG_FIELD_NUMBER = 1; + private double beatsPerMinuteAvg_ = 0D; + + /** + * + * + *
+   * The average heart rate value in the interval.
+   * 
+ * + * optional double beats_per_minute_avg = 1; + * + * @return Whether the beatsPerMinuteAvg field is set. + */ + @java.lang.Override + public boolean hasBeatsPerMinuteAvg() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * The average heart rate value in the interval.
+   * 
+ * + * optional double beats_per_minute_avg = 1; + * + * @return The beatsPerMinuteAvg. + */ + @java.lang.Override + public double getBeatsPerMinuteAvg() { + return beatsPerMinuteAvg_; + } + + public static final int BEATS_PER_MINUTE_MAX_FIELD_NUMBER = 2; + private double beatsPerMinuteMax_ = 0D; + + /** + * + * + *
+   * The maximum heart rate value in the interval.
+   * 
+ * + * optional double beats_per_minute_max = 2; + * + * @return Whether the beatsPerMinuteMax field is set. + */ + @java.lang.Override + public boolean hasBeatsPerMinuteMax() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * The maximum heart rate value in the interval.
+   * 
+ * + * optional double beats_per_minute_max = 2; + * + * @return The beatsPerMinuteMax. + */ + @java.lang.Override + public double getBeatsPerMinuteMax() { + return beatsPerMinuteMax_; + } + + public static final int BEATS_PER_MINUTE_MIN_FIELD_NUMBER = 3; + private double beatsPerMinuteMin_ = 0D; + + /** + * + * + *
+   * The minimum heart rate value in the interval.
+   * 
+ * + * optional double beats_per_minute_min = 3; + * + * @return Whether the beatsPerMinuteMin field is set. + */ + @java.lang.Override + public boolean hasBeatsPerMinuteMin() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * The minimum heart rate value in the interval.
+   * 
+ * + * optional double beats_per_minute_min = 3; + * + * @return The beatsPerMinuteMin. + */ + @java.lang.Override + public double getBeatsPerMinuteMin() { + return beatsPerMinuteMin_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeDouble(1, beatsPerMinuteAvg_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeDouble(2, beatsPerMinuteMax_); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeDouble(3, beatsPerMinuteMin_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(1, beatsPerMinuteAvg_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(2, beatsPerMinuteMax_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(3, beatsPerMinuteMin_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.HeartRateRollupValue)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.HeartRateRollupValue other = + (com.google.devicesandservices.health.v4.HeartRateRollupValue) obj; + + if (hasBeatsPerMinuteAvg() != other.hasBeatsPerMinuteAvg()) return false; + if (hasBeatsPerMinuteAvg()) { + if (java.lang.Double.doubleToLongBits(getBeatsPerMinuteAvg()) + != java.lang.Double.doubleToLongBits(other.getBeatsPerMinuteAvg())) return false; + } + if (hasBeatsPerMinuteMax() != other.hasBeatsPerMinuteMax()) return false; + if (hasBeatsPerMinuteMax()) { + if (java.lang.Double.doubleToLongBits(getBeatsPerMinuteMax()) + != java.lang.Double.doubleToLongBits(other.getBeatsPerMinuteMax())) return false; + } + if (hasBeatsPerMinuteMin() != other.hasBeatsPerMinuteMin()) return false; + if (hasBeatsPerMinuteMin()) { + if (java.lang.Double.doubleToLongBits(getBeatsPerMinuteMin()) + != java.lang.Double.doubleToLongBits(other.getBeatsPerMinuteMin())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasBeatsPerMinuteAvg()) { + hash = (37 * hash) + BEATS_PER_MINUTE_AVG_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getBeatsPerMinuteAvg())); + } + if (hasBeatsPerMinuteMax()) { + hash = (37 * hash) + BEATS_PER_MINUTE_MAX_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getBeatsPerMinuteMax())); + } + if (hasBeatsPerMinuteMin()) { + hash = (37 * hash) + BEATS_PER_MINUTE_MIN_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getBeatsPerMinuteMin())); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.HeartRateRollupValue parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.HeartRateRollupValue parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.HeartRateRollupValue parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.HeartRateRollupValue parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.HeartRateRollupValue parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.HeartRateRollupValue parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.HeartRateRollupValue parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.HeartRateRollupValue parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.HeartRateRollupValue parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.HeartRateRollupValue parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.HeartRateRollupValue parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.HeartRateRollupValue parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.HeartRateRollupValue prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Represents the result of the rollup of the heart rate data type.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.HeartRateRollupValue} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.HeartRateRollupValue) + com.google.devicesandservices.health.v4.HeartRateRollupValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_HeartRateRollupValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_HeartRateRollupValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.HeartRateRollupValue.class, + com.google.devicesandservices.health.v4.HeartRateRollupValue.Builder.class); + } + + // Construct using com.google.devicesandservices.health.v4.HeartRateRollupValue.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + beatsPerMinuteAvg_ = 0D; + beatsPerMinuteMax_ = 0D; + beatsPerMinuteMin_ = 0D; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_HeartRateRollupValue_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.HeartRateRollupValue + getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.HeartRateRollupValue.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.HeartRateRollupValue build() { + com.google.devicesandservices.health.v4.HeartRateRollupValue result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.HeartRateRollupValue buildPartial() { + com.google.devicesandservices.health.v4.HeartRateRollupValue result = + new com.google.devicesandservices.health.v4.HeartRateRollupValue(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.devicesandservices.health.v4.HeartRateRollupValue result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.beatsPerMinuteAvg_ = beatsPerMinuteAvg_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.beatsPerMinuteMax_ = beatsPerMinuteMax_; + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.beatsPerMinuteMin_ = beatsPerMinuteMin_; + to_bitField0_ |= 0x00000004; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.HeartRateRollupValue) { + return mergeFrom((com.google.devicesandservices.health.v4.HeartRateRollupValue) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.devicesandservices.health.v4.HeartRateRollupValue other) { + if (other + == com.google.devicesandservices.health.v4.HeartRateRollupValue.getDefaultInstance()) + return this; + if (other.hasBeatsPerMinuteAvg()) { + setBeatsPerMinuteAvg(other.getBeatsPerMinuteAvg()); + } + if (other.hasBeatsPerMinuteMax()) { + setBeatsPerMinuteMax(other.getBeatsPerMinuteMax()); + } + if (other.hasBeatsPerMinuteMin()) { + setBeatsPerMinuteMin(other.getBeatsPerMinuteMin()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 9: + { + beatsPerMinuteAvg_ = input.readDouble(); + bitField0_ |= 0x00000001; + break; + } // case 9 + case 17: + { + beatsPerMinuteMax_ = input.readDouble(); + bitField0_ |= 0x00000002; + break; + } // case 17 + case 25: + { + beatsPerMinuteMin_ = input.readDouble(); + bitField0_ |= 0x00000004; + break; + } // case 25 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private double beatsPerMinuteAvg_; + + /** + * + * + *
+     * The average heart rate value in the interval.
+     * 
+ * + * optional double beats_per_minute_avg = 1; + * + * @return Whether the beatsPerMinuteAvg field is set. + */ + @java.lang.Override + public boolean hasBeatsPerMinuteAvg() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * The average heart rate value in the interval.
+     * 
+ * + * optional double beats_per_minute_avg = 1; + * + * @return The beatsPerMinuteAvg. + */ + @java.lang.Override + public double getBeatsPerMinuteAvg() { + return beatsPerMinuteAvg_; + } + + /** + * + * + *
+     * The average heart rate value in the interval.
+     * 
+ * + * optional double beats_per_minute_avg = 1; + * + * @param value The beatsPerMinuteAvg to set. + * @return This builder for chaining. + */ + public Builder setBeatsPerMinuteAvg(double value) { + + beatsPerMinuteAvg_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The average heart rate value in the interval.
+     * 
+ * + * optional double beats_per_minute_avg = 1; + * + * @return This builder for chaining. + */ + public Builder clearBeatsPerMinuteAvg() { + bitField0_ = (bitField0_ & ~0x00000001); + beatsPerMinuteAvg_ = 0D; + onChanged(); + return this; + } + + private double beatsPerMinuteMax_; + + /** + * + * + *
+     * The maximum heart rate value in the interval.
+     * 
+ * + * optional double beats_per_minute_max = 2; + * + * @return Whether the beatsPerMinuteMax field is set. + */ + @java.lang.Override + public boolean hasBeatsPerMinuteMax() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * The maximum heart rate value in the interval.
+     * 
+ * + * optional double beats_per_minute_max = 2; + * + * @return The beatsPerMinuteMax. + */ + @java.lang.Override + public double getBeatsPerMinuteMax() { + return beatsPerMinuteMax_; + } + + /** + * + * + *
+     * The maximum heart rate value in the interval.
+     * 
+ * + * optional double beats_per_minute_max = 2; + * + * @param value The beatsPerMinuteMax to set. + * @return This builder for chaining. + */ + public Builder setBeatsPerMinuteMax(double value) { + + beatsPerMinuteMax_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * The maximum heart rate value in the interval.
+     * 
+ * + * optional double beats_per_minute_max = 2; + * + * @return This builder for chaining. + */ + public Builder clearBeatsPerMinuteMax() { + bitField0_ = (bitField0_ & ~0x00000002); + beatsPerMinuteMax_ = 0D; + onChanged(); + return this; + } + + private double beatsPerMinuteMin_; + + /** + * + * + *
+     * The minimum heart rate value in the interval.
+     * 
+ * + * optional double beats_per_minute_min = 3; + * + * @return Whether the beatsPerMinuteMin field is set. + */ + @java.lang.Override + public boolean hasBeatsPerMinuteMin() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * The minimum heart rate value in the interval.
+     * 
+ * + * optional double beats_per_minute_min = 3; + * + * @return The beatsPerMinuteMin. + */ + @java.lang.Override + public double getBeatsPerMinuteMin() { + return beatsPerMinuteMin_; + } + + /** + * + * + *
+     * The minimum heart rate value in the interval.
+     * 
+ * + * optional double beats_per_minute_min = 3; + * + * @param value The beatsPerMinuteMin to set. + * @return This builder for chaining. + */ + public Builder setBeatsPerMinuteMin(double value) { + + beatsPerMinuteMin_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * The minimum heart rate value in the interval.
+     * 
+ * + * optional double beats_per_minute_min = 3; + * + * @return This builder for chaining. + */ + public Builder clearBeatsPerMinuteMin() { + bitField0_ = (bitField0_ & ~0x00000004); + beatsPerMinuteMin_ = 0D; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.HeartRateRollupValue) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.HeartRateRollupValue) + private static final com.google.devicesandservices.health.v4.HeartRateRollupValue + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.HeartRateRollupValue(); + } + + public static com.google.devicesandservices.health.v4.HeartRateRollupValue getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public HeartRateRollupValue parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.HeartRateRollupValue getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/HeartRateRollupValueOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/HeartRateRollupValueOrBuilder.java new file mode 100644 index 000000000000..2e3f90a1359d --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/HeartRateRollupValueOrBuilder.java @@ -0,0 +1,106 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface HeartRateRollupValueOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.HeartRateRollupValue) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The average heart rate value in the interval.
+   * 
+ * + * optional double beats_per_minute_avg = 1; + * + * @return Whether the beatsPerMinuteAvg field is set. + */ + boolean hasBeatsPerMinuteAvg(); + + /** + * + * + *
+   * The average heart rate value in the interval.
+   * 
+ * + * optional double beats_per_minute_avg = 1; + * + * @return The beatsPerMinuteAvg. + */ + double getBeatsPerMinuteAvg(); + + /** + * + * + *
+   * The maximum heart rate value in the interval.
+   * 
+ * + * optional double beats_per_minute_max = 2; + * + * @return Whether the beatsPerMinuteMax field is set. + */ + boolean hasBeatsPerMinuteMax(); + + /** + * + * + *
+   * The maximum heart rate value in the interval.
+   * 
+ * + * optional double beats_per_minute_max = 2; + * + * @return The beatsPerMinuteMax. + */ + double getBeatsPerMinuteMax(); + + /** + * + * + *
+   * The minimum heart rate value in the interval.
+   * 
+ * + * optional double beats_per_minute_min = 3; + * + * @return Whether the beatsPerMinuteMin field is set. + */ + boolean hasBeatsPerMinuteMin(); + + /** + * + * + *
+   * The minimum heart rate value in the interval.
+   * 
+ * + * optional double beats_per_minute_min = 3; + * + * @return The beatsPerMinuteMin. + */ + double getBeatsPerMinuteMin(); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/HeartRateVariability.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/HeartRateVariability.java new file mode 100644 index 000000000000..57beb499bcd4 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/HeartRateVariability.java @@ -0,0 +1,970 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * Captures user's heart rate variability (HRV) as measured by the root mean
+ * square of successive differences (RMSSD) between normal heartbeats or by
+ * standard deviation of the inter-beat intervals (SDNN).
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.HeartRateVariability} + */ +@com.google.protobuf.Generated +public final class HeartRateVariability extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.HeartRateVariability) + HeartRateVariabilityOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "HeartRateVariability"); + } + + // Use HeartRateVariability.newBuilder() to construct. + private HeartRateVariability(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private HeartRateVariability() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_HeartRateVariability_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_HeartRateVariability_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.HeartRateVariability.class, + com.google.devicesandservices.health.v4.HeartRateVariability.Builder.class); + } + + private int bitField0_; + public static final int SAMPLE_TIME_FIELD_NUMBER = 1; + private com.google.devicesandservices.health.v4.ObservationSampleTime sampleTime_; + + /** + * + * + *
+   * Required. The time of the heart rate variability measurement.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the sampleTime field is set. + */ + @java.lang.Override + public boolean hasSampleTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The time of the heart rate variability measurement.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The sampleTime. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ObservationSampleTime getSampleTime() { + return sampleTime_ == null + ? com.google.devicesandservices.health.v4.ObservationSampleTime.getDefaultInstance() + : sampleTime_; + } + + /** + * + * + *
+   * Required. The time of the heart rate variability measurement.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ObservationSampleTimeOrBuilder + getSampleTimeOrBuilder() { + return sampleTime_ == null + ? com.google.devicesandservices.health.v4.ObservationSampleTime.getDefaultInstance() + : sampleTime_; + } + + public static final int ROOT_MEAN_SQUARE_OF_SUCCESSIVE_DIFFERENCES_MILLISECONDS_FIELD_NUMBER = 2; + private double rootMeanSquareOfSuccessiveDifferencesMilliseconds_ = 0D; + + /** + * + * + *
+   * Optional. The root mean square of successive differences between normal
+   * heartbeats. This is a measure of heart rate variability used by Fitbit.
+   * 
+ * + * + * double root_mean_square_of_successive_differences_milliseconds = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The rootMeanSquareOfSuccessiveDifferencesMilliseconds. + */ + @java.lang.Override + public double getRootMeanSquareOfSuccessiveDifferencesMilliseconds() { + return rootMeanSquareOfSuccessiveDifferencesMilliseconds_; + } + + public static final int STANDARD_DEVIATION_MILLISECONDS_FIELD_NUMBER = 3; + private double standardDeviationMilliseconds_ = 0D; + + /** + * + * + *
+   * Optional. The standard deviation of the heart rate variability measurement.
+   * 
+ * + * double standard_deviation_milliseconds = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The standardDeviationMilliseconds. + */ + @java.lang.Override + public double getStandardDeviationMilliseconds() { + return standardDeviationMilliseconds_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getSampleTime()); + } + if (java.lang.Double.doubleToRawLongBits(rootMeanSquareOfSuccessiveDifferencesMilliseconds_) + != 0) { + output.writeDouble(2, rootMeanSquareOfSuccessiveDifferencesMilliseconds_); + } + if (java.lang.Double.doubleToRawLongBits(standardDeviationMilliseconds_) != 0) { + output.writeDouble(3, standardDeviationMilliseconds_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getSampleTime()); + } + if (java.lang.Double.doubleToRawLongBits(rootMeanSquareOfSuccessiveDifferencesMilliseconds_) + != 0) { + size += + com.google.protobuf.CodedOutputStream.computeDoubleSize( + 2, rootMeanSquareOfSuccessiveDifferencesMilliseconds_); + } + if (java.lang.Double.doubleToRawLongBits(standardDeviationMilliseconds_) != 0) { + size += + com.google.protobuf.CodedOutputStream.computeDoubleSize( + 3, standardDeviationMilliseconds_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.HeartRateVariability)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.HeartRateVariability other = + (com.google.devicesandservices.health.v4.HeartRateVariability) obj; + + if (hasSampleTime() != other.hasSampleTime()) return false; + if (hasSampleTime()) { + if (!getSampleTime().equals(other.getSampleTime())) return false; + } + if (java.lang.Double.doubleToLongBits(getRootMeanSquareOfSuccessiveDifferencesMilliseconds()) + != java.lang.Double.doubleToLongBits( + other.getRootMeanSquareOfSuccessiveDifferencesMilliseconds())) return false; + if (java.lang.Double.doubleToLongBits(getStandardDeviationMilliseconds()) + != java.lang.Double.doubleToLongBits(other.getStandardDeviationMilliseconds())) + return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasSampleTime()) { + hash = (37 * hash) + SAMPLE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getSampleTime().hashCode(); + } + hash = (37 * hash) + ROOT_MEAN_SQUARE_OF_SUCCESSIVE_DIFFERENCES_MILLISECONDS_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits( + getRootMeanSquareOfSuccessiveDifferencesMilliseconds())); + hash = (37 * hash) + STANDARD_DEVIATION_MILLISECONDS_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getStandardDeviationMilliseconds())); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.HeartRateVariability parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.HeartRateVariability parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.HeartRateVariability parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.HeartRateVariability parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.HeartRateVariability parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.HeartRateVariability parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.HeartRateVariability parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.HeartRateVariability parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.HeartRateVariability parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.HeartRateVariability parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.HeartRateVariability parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.HeartRateVariability parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.HeartRateVariability prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Captures user's heart rate variability (HRV) as measured by the root mean
+   * square of successive differences (RMSSD) between normal heartbeats or by
+   * standard deviation of the inter-beat intervals (SDNN).
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.HeartRateVariability} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.HeartRateVariability) + com.google.devicesandservices.health.v4.HeartRateVariabilityOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_HeartRateVariability_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_HeartRateVariability_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.HeartRateVariability.class, + com.google.devicesandservices.health.v4.HeartRateVariability.Builder.class); + } + + // Construct using com.google.devicesandservices.health.v4.HeartRateVariability.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetSampleTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + sampleTime_ = null; + if (sampleTimeBuilder_ != null) { + sampleTimeBuilder_.dispose(); + sampleTimeBuilder_ = null; + } + rootMeanSquareOfSuccessiveDifferencesMilliseconds_ = 0D; + standardDeviationMilliseconds_ = 0D; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_HeartRateVariability_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.HeartRateVariability + getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.HeartRateVariability.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.HeartRateVariability build() { + com.google.devicesandservices.health.v4.HeartRateVariability result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.HeartRateVariability buildPartial() { + com.google.devicesandservices.health.v4.HeartRateVariability result = + new com.google.devicesandservices.health.v4.HeartRateVariability(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.devicesandservices.health.v4.HeartRateVariability result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.sampleTime_ = sampleTimeBuilder_ == null ? sampleTime_ : sampleTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.rootMeanSquareOfSuccessiveDifferencesMilliseconds_ = + rootMeanSquareOfSuccessiveDifferencesMilliseconds_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.standardDeviationMilliseconds_ = standardDeviationMilliseconds_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.HeartRateVariability) { + return mergeFrom((com.google.devicesandservices.health.v4.HeartRateVariability) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.devicesandservices.health.v4.HeartRateVariability other) { + if (other + == com.google.devicesandservices.health.v4.HeartRateVariability.getDefaultInstance()) + return this; + if (other.hasSampleTime()) { + mergeSampleTime(other.getSampleTime()); + } + if (java.lang.Double.doubleToRawLongBits( + other.getRootMeanSquareOfSuccessiveDifferencesMilliseconds()) + != 0) { + setRootMeanSquareOfSuccessiveDifferencesMilliseconds( + other.getRootMeanSquareOfSuccessiveDifferencesMilliseconds()); + } + if (java.lang.Double.doubleToRawLongBits(other.getStandardDeviationMilliseconds()) != 0) { + setStandardDeviationMilliseconds(other.getStandardDeviationMilliseconds()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetSampleTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 17: + { + rootMeanSquareOfSuccessiveDifferencesMilliseconds_ = input.readDouble(); + bitField0_ |= 0x00000002; + break; + } // case 17 + case 25: + { + standardDeviationMilliseconds_ = input.readDouble(); + bitField0_ |= 0x00000004; + break; + } // case 25 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.devicesandservices.health.v4.ObservationSampleTime sampleTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ObservationSampleTime, + com.google.devicesandservices.health.v4.ObservationSampleTime.Builder, + com.google.devicesandservices.health.v4.ObservationSampleTimeOrBuilder> + sampleTimeBuilder_; + + /** + * + * + *
+     * Required. The time of the heart rate variability measurement.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the sampleTime field is set. + */ + public boolean hasSampleTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. The time of the heart rate variability measurement.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The sampleTime. + */ + public com.google.devicesandservices.health.v4.ObservationSampleTime getSampleTime() { + if (sampleTimeBuilder_ == null) { + return sampleTime_ == null + ? com.google.devicesandservices.health.v4.ObservationSampleTime.getDefaultInstance() + : sampleTime_; + } else { + return sampleTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The time of the heart rate variability measurement.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSampleTime( + com.google.devicesandservices.health.v4.ObservationSampleTime value) { + if (sampleTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sampleTime_ = value; + } else { + sampleTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The time of the heart rate variability measurement.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSampleTime( + com.google.devicesandservices.health.v4.ObservationSampleTime.Builder builderForValue) { + if (sampleTimeBuilder_ == null) { + sampleTime_ = builderForValue.build(); + } else { + sampleTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The time of the heart rate variability measurement.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeSampleTime( + com.google.devicesandservices.health.v4.ObservationSampleTime value) { + if (sampleTimeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && sampleTime_ != null + && sampleTime_ + != com.google.devicesandservices.health.v4.ObservationSampleTime + .getDefaultInstance()) { + getSampleTimeBuilder().mergeFrom(value); + } else { + sampleTime_ = value; + } + } else { + sampleTimeBuilder_.mergeFrom(value); + } + if (sampleTime_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The time of the heart rate variability measurement.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearSampleTime() { + bitField0_ = (bitField0_ & ~0x00000001); + sampleTime_ = null; + if (sampleTimeBuilder_ != null) { + sampleTimeBuilder_.dispose(); + sampleTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The time of the heart rate variability measurement.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.devicesandservices.health.v4.ObservationSampleTime.Builder + getSampleTimeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetSampleTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The time of the heart rate variability measurement.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.devicesandservices.health.v4.ObservationSampleTimeOrBuilder + getSampleTimeOrBuilder() { + if (sampleTimeBuilder_ != null) { + return sampleTimeBuilder_.getMessageOrBuilder(); + } else { + return sampleTime_ == null + ? com.google.devicesandservices.health.v4.ObservationSampleTime.getDefaultInstance() + : sampleTime_; + } + } + + /** + * + * + *
+     * Required. The time of the heart rate variability measurement.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ObservationSampleTime, + com.google.devicesandservices.health.v4.ObservationSampleTime.Builder, + com.google.devicesandservices.health.v4.ObservationSampleTimeOrBuilder> + internalGetSampleTimeFieldBuilder() { + if (sampleTimeBuilder_ == null) { + sampleTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ObservationSampleTime, + com.google.devicesandservices.health.v4.ObservationSampleTime.Builder, + com.google.devicesandservices.health.v4.ObservationSampleTimeOrBuilder>( + getSampleTime(), getParentForChildren(), isClean()); + sampleTime_ = null; + } + return sampleTimeBuilder_; + } + + private double rootMeanSquareOfSuccessiveDifferencesMilliseconds_; + + /** + * + * + *
+     * Optional. The root mean square of successive differences between normal
+     * heartbeats. This is a measure of heart rate variability used by Fitbit.
+     * 
+ * + * + * double root_mean_square_of_successive_differences_milliseconds = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The rootMeanSquareOfSuccessiveDifferencesMilliseconds. + */ + @java.lang.Override + public double getRootMeanSquareOfSuccessiveDifferencesMilliseconds() { + return rootMeanSquareOfSuccessiveDifferencesMilliseconds_; + } + + /** + * + * + *
+     * Optional. The root mean square of successive differences between normal
+     * heartbeats. This is a measure of heart rate variability used by Fitbit.
+     * 
+ * + * + * double root_mean_square_of_successive_differences_milliseconds = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The rootMeanSquareOfSuccessiveDifferencesMilliseconds to set. + * @return This builder for chaining. + */ + public Builder setRootMeanSquareOfSuccessiveDifferencesMilliseconds(double value) { + + rootMeanSquareOfSuccessiveDifferencesMilliseconds_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The root mean square of successive differences between normal
+     * heartbeats. This is a measure of heart rate variability used by Fitbit.
+     * 
+ * + * + * double root_mean_square_of_successive_differences_milliseconds = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearRootMeanSquareOfSuccessiveDifferencesMilliseconds() { + bitField0_ = (bitField0_ & ~0x00000002); + rootMeanSquareOfSuccessiveDifferencesMilliseconds_ = 0D; + onChanged(); + return this; + } + + private double standardDeviationMilliseconds_; + + /** + * + * + *
+     * Optional. The standard deviation of the heart rate variability measurement.
+     * 
+ * + * double standard_deviation_milliseconds = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The standardDeviationMilliseconds. + */ + @java.lang.Override + public double getStandardDeviationMilliseconds() { + return standardDeviationMilliseconds_; + } + + /** + * + * + *
+     * Optional. The standard deviation of the heart rate variability measurement.
+     * 
+ * + * double standard_deviation_milliseconds = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The standardDeviationMilliseconds to set. + * @return This builder for chaining. + */ + public Builder setStandardDeviationMilliseconds(double value) { + + standardDeviationMilliseconds_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The standard deviation of the heart rate variability measurement.
+     * 
+ * + * double standard_deviation_milliseconds = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearStandardDeviationMilliseconds() { + bitField0_ = (bitField0_ & ~0x00000004); + standardDeviationMilliseconds_ = 0D; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.HeartRateVariability) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.HeartRateVariability) + private static final com.google.devicesandservices.health.v4.HeartRateVariability + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.HeartRateVariability(); + } + + public static com.google.devicesandservices.health.v4.HeartRateVariability getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public HeartRateVariability parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.HeartRateVariability getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/HeartRateVariabilityOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/HeartRateVariabilityOrBuilder.java new file mode 100644 index 000000000000..e849610bc2e5 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/HeartRateVariabilityOrBuilder.java @@ -0,0 +1,101 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface HeartRateVariabilityOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.HeartRateVariability) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The time of the heart rate variability measurement.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the sampleTime field is set. + */ + boolean hasSampleTime(); + + /** + * + * + *
+   * Required. The time of the heart rate variability measurement.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The sampleTime. + */ + com.google.devicesandservices.health.v4.ObservationSampleTime getSampleTime(); + + /** + * + * + *
+   * Required. The time of the heart rate variability measurement.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.devicesandservices.health.v4.ObservationSampleTimeOrBuilder getSampleTimeOrBuilder(); + + /** + * + * + *
+   * Optional. The root mean square of successive differences between normal
+   * heartbeats. This is a measure of heart rate variability used by Fitbit.
+   * 
+ * + * + * double root_mean_square_of_successive_differences_milliseconds = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The rootMeanSquareOfSuccessiveDifferencesMilliseconds. + */ + double getRootMeanSquareOfSuccessiveDifferencesMilliseconds(); + + /** + * + * + *
+   * Optional. The standard deviation of the heart rate variability measurement.
+   * 
+ * + * double standard_deviation_milliseconds = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The standardDeviationMilliseconds. + */ + double getStandardDeviationMilliseconds(); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/HeartRateVariabilityPersonalRangeRollupValue.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/HeartRateVariabilityPersonalRangeRollupValue.java new file mode 100644 index 000000000000..54b5fca73508 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/HeartRateVariabilityPersonalRangeRollupValue.java @@ -0,0 +1,758 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * Represents the result of the rollup of the user's daily heart rate
+ * variability personal range.
+ * 
+ * + * Protobuf type {@code + * google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue} + */ +@com.google.protobuf.Generated +public final class HeartRateVariabilityPersonalRangeRollupValue + extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue) + HeartRateVariabilityPersonalRangeRollupValueOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "HeartRateVariabilityPersonalRangeRollupValue"); + } + + // Use HeartRateVariabilityPersonalRangeRollupValue.newBuilder() to construct. + private HeartRateVariabilityPersonalRangeRollupValue( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private HeartRateVariabilityPersonalRangeRollupValue() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_HeartRateVariabilityPersonalRangeRollupValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_HeartRateVariabilityPersonalRangeRollupValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue + .class, + com.google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue + .Builder.class); + } + + private int bitField0_; + public static final int AVERAGE_HEART_RATE_VARIABILITY_MILLISECONDS_MIN_FIELD_NUMBER = 1; + private double averageHeartRateVariabilityMillisecondsMin_ = 0D; + + /** + * + * + *
+   * The lower bound of the user's average heart rate variability personal
+   * range.
+   * 
+ * + * optional double average_heart_rate_variability_milliseconds_min = 1; + * + * @return Whether the averageHeartRateVariabilityMillisecondsMin field is set. + */ + @java.lang.Override + public boolean hasAverageHeartRateVariabilityMillisecondsMin() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * The lower bound of the user's average heart rate variability personal
+   * range.
+   * 
+ * + * optional double average_heart_rate_variability_milliseconds_min = 1; + * + * @return The averageHeartRateVariabilityMillisecondsMin. + */ + @java.lang.Override + public double getAverageHeartRateVariabilityMillisecondsMin() { + return averageHeartRateVariabilityMillisecondsMin_; + } + + public static final int AVERAGE_HEART_RATE_VARIABILITY_MILLISECONDS_MAX_FIELD_NUMBER = 2; + private double averageHeartRateVariabilityMillisecondsMax_ = 0D; + + /** + * + * + *
+   * The upper bound of the user's average heart rate variability personal
+   * range.
+   * 
+ * + * optional double average_heart_rate_variability_milliseconds_max = 2; + * + * @return Whether the averageHeartRateVariabilityMillisecondsMax field is set. + */ + @java.lang.Override + public boolean hasAverageHeartRateVariabilityMillisecondsMax() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * The upper bound of the user's average heart rate variability personal
+   * range.
+   * 
+ * + * optional double average_heart_rate_variability_milliseconds_max = 2; + * + * @return The averageHeartRateVariabilityMillisecondsMax. + */ + @java.lang.Override + public double getAverageHeartRateVariabilityMillisecondsMax() { + return averageHeartRateVariabilityMillisecondsMax_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeDouble(1, averageHeartRateVariabilityMillisecondsMin_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeDouble(2, averageHeartRateVariabilityMillisecondsMax_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeDoubleSize( + 1, averageHeartRateVariabilityMillisecondsMin_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeDoubleSize( + 2, averageHeartRateVariabilityMillisecondsMax_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue other = + (com.google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue) obj; + + if (hasAverageHeartRateVariabilityMillisecondsMin() + != other.hasAverageHeartRateVariabilityMillisecondsMin()) return false; + if (hasAverageHeartRateVariabilityMillisecondsMin()) { + if (java.lang.Double.doubleToLongBits(getAverageHeartRateVariabilityMillisecondsMin()) + != java.lang.Double.doubleToLongBits( + other.getAverageHeartRateVariabilityMillisecondsMin())) return false; + } + if (hasAverageHeartRateVariabilityMillisecondsMax() + != other.hasAverageHeartRateVariabilityMillisecondsMax()) return false; + if (hasAverageHeartRateVariabilityMillisecondsMax()) { + if (java.lang.Double.doubleToLongBits(getAverageHeartRateVariabilityMillisecondsMax()) + != java.lang.Double.doubleToLongBits( + other.getAverageHeartRateVariabilityMillisecondsMax())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAverageHeartRateVariabilityMillisecondsMin()) { + hash = (37 * hash) + AVERAGE_HEART_RATE_VARIABILITY_MILLISECONDS_MIN_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits( + getAverageHeartRateVariabilityMillisecondsMin())); + } + if (hasAverageHeartRateVariabilityMillisecondsMax()) { + hash = (37 * hash) + AVERAGE_HEART_RATE_VARIABILITY_MILLISECONDS_MAX_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits( + getAverageHeartRateVariabilityMillisecondsMax())); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Represents the result of the rollup of the user's daily heart rate
+   * variability personal range.
+   * 
+ * + * Protobuf type {@code + * google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue) + com.google.devicesandservices.health.v4 + .HeartRateVariabilityPersonalRangeRollupValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_HeartRateVariabilityPersonalRangeRollupValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_HeartRateVariabilityPersonalRangeRollupValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue + .class, + com.google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue + .Builder.class); + } + + // Construct using + // com.google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + averageHeartRateVariabilityMillisecondsMin_ = 0D; + averageHeartRateVariabilityMillisecondsMax_ = 0D; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_HeartRateVariabilityPersonalRangeRollupValue_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue + getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue + build() { + com.google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue + buildPartial() { + com.google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue result = + new com.google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue + result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.averageHeartRateVariabilityMillisecondsMin_ = + averageHeartRateVariabilityMillisecondsMin_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.averageHeartRateVariabilityMillisecondsMax_ = + averageHeartRateVariabilityMillisecondsMax_; + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue) { + return mergeFrom( + (com.google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue + other) { + if (other + == com.google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue + .getDefaultInstance()) return this; + if (other.hasAverageHeartRateVariabilityMillisecondsMin()) { + setAverageHeartRateVariabilityMillisecondsMin( + other.getAverageHeartRateVariabilityMillisecondsMin()); + } + if (other.hasAverageHeartRateVariabilityMillisecondsMax()) { + setAverageHeartRateVariabilityMillisecondsMax( + other.getAverageHeartRateVariabilityMillisecondsMax()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 9: + { + averageHeartRateVariabilityMillisecondsMin_ = input.readDouble(); + bitField0_ |= 0x00000001; + break; + } // case 9 + case 17: + { + averageHeartRateVariabilityMillisecondsMax_ = input.readDouble(); + bitField0_ |= 0x00000002; + break; + } // case 17 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private double averageHeartRateVariabilityMillisecondsMin_; + + /** + * + * + *
+     * The lower bound of the user's average heart rate variability personal
+     * range.
+     * 
+ * + * optional double average_heart_rate_variability_milliseconds_min = 1; + * + * @return Whether the averageHeartRateVariabilityMillisecondsMin field is set. + */ + @java.lang.Override + public boolean hasAverageHeartRateVariabilityMillisecondsMin() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * The lower bound of the user's average heart rate variability personal
+     * range.
+     * 
+ * + * optional double average_heart_rate_variability_milliseconds_min = 1; + * + * @return The averageHeartRateVariabilityMillisecondsMin. + */ + @java.lang.Override + public double getAverageHeartRateVariabilityMillisecondsMin() { + return averageHeartRateVariabilityMillisecondsMin_; + } + + /** + * + * + *
+     * The lower bound of the user's average heart rate variability personal
+     * range.
+     * 
+ * + * optional double average_heart_rate_variability_milliseconds_min = 1; + * + * @param value The averageHeartRateVariabilityMillisecondsMin to set. + * @return This builder for chaining. + */ + public Builder setAverageHeartRateVariabilityMillisecondsMin(double value) { + + averageHeartRateVariabilityMillisecondsMin_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The lower bound of the user's average heart rate variability personal
+     * range.
+     * 
+ * + * optional double average_heart_rate_variability_milliseconds_min = 1; + * + * @return This builder for chaining. + */ + public Builder clearAverageHeartRateVariabilityMillisecondsMin() { + bitField0_ = (bitField0_ & ~0x00000001); + averageHeartRateVariabilityMillisecondsMin_ = 0D; + onChanged(); + return this; + } + + private double averageHeartRateVariabilityMillisecondsMax_; + + /** + * + * + *
+     * The upper bound of the user's average heart rate variability personal
+     * range.
+     * 
+ * + * optional double average_heart_rate_variability_milliseconds_max = 2; + * + * @return Whether the averageHeartRateVariabilityMillisecondsMax field is set. + */ + @java.lang.Override + public boolean hasAverageHeartRateVariabilityMillisecondsMax() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * The upper bound of the user's average heart rate variability personal
+     * range.
+     * 
+ * + * optional double average_heart_rate_variability_milliseconds_max = 2; + * + * @return The averageHeartRateVariabilityMillisecondsMax. + */ + @java.lang.Override + public double getAverageHeartRateVariabilityMillisecondsMax() { + return averageHeartRateVariabilityMillisecondsMax_; + } + + /** + * + * + *
+     * The upper bound of the user's average heart rate variability personal
+     * range.
+     * 
+ * + * optional double average_heart_rate_variability_milliseconds_max = 2; + * + * @param value The averageHeartRateVariabilityMillisecondsMax to set. + * @return This builder for chaining. + */ + public Builder setAverageHeartRateVariabilityMillisecondsMax(double value) { + + averageHeartRateVariabilityMillisecondsMax_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * The upper bound of the user's average heart rate variability personal
+     * range.
+     * 
+ * + * optional double average_heart_rate_variability_milliseconds_max = 2; + * + * @return This builder for chaining. + */ + public Builder clearAverageHeartRateVariabilityMillisecondsMax() { + bitField0_ = (bitField0_ & ~0x00000002); + averageHeartRateVariabilityMillisecondsMax_ = 0D; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue) + private static final com.google.devicesandservices.health.v4 + .HeartRateVariabilityPersonalRangeRollupValue + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue(); + } + + public static com.google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public HeartRateVariabilityPersonalRangeRollupValue parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser + getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/HeartRateVariabilityPersonalRangeRollupValueOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/HeartRateVariabilityPersonalRangeRollupValueOrBuilder.java new file mode 100644 index 000000000000..0ab9f5ad1a4a --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/HeartRateVariabilityPersonalRangeRollupValueOrBuilder.java @@ -0,0 +1,84 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface HeartRateVariabilityPersonalRangeRollupValueOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.HeartRateVariabilityPersonalRangeRollupValue) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The lower bound of the user's average heart rate variability personal
+   * range.
+   * 
+ * + * optional double average_heart_rate_variability_milliseconds_min = 1; + * + * @return Whether the averageHeartRateVariabilityMillisecondsMin field is set. + */ + boolean hasAverageHeartRateVariabilityMillisecondsMin(); + + /** + * + * + *
+   * The lower bound of the user's average heart rate variability personal
+   * range.
+   * 
+ * + * optional double average_heart_rate_variability_milliseconds_min = 1; + * + * @return The averageHeartRateVariabilityMillisecondsMin. + */ + double getAverageHeartRateVariabilityMillisecondsMin(); + + /** + * + * + *
+   * The upper bound of the user's average heart rate variability personal
+   * range.
+   * 
+ * + * optional double average_heart_rate_variability_milliseconds_max = 2; + * + * @return Whether the averageHeartRateVariabilityMillisecondsMax field is set. + */ + boolean hasAverageHeartRateVariabilityMillisecondsMax(); + + /** + * + * + *
+   * The upper bound of the user's average heart rate variability personal
+   * range.
+   * 
+ * + * optional double average_heart_rate_variability_milliseconds_max = 2; + * + * @return The averageHeartRateVariabilityMillisecondsMax. + */ + double getAverageHeartRateVariabilityMillisecondsMax(); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/HeartRateZoneType.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/HeartRateZoneType.java new file mode 100644 index 000000000000..55d30db3d252 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/HeartRateZoneType.java @@ -0,0 +1,241 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * The heart rate zone type.
+ * 
+ * + * Protobuf enum {@code google.devicesandservices.health.v4.HeartRateZoneType} + */ +@com.google.protobuf.Generated +public enum HeartRateZoneType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Unspecified heart rate zone.
+   * 
+ * + * HEART_RATE_ZONE_TYPE_UNSPECIFIED = 0; + */ + HEART_RATE_ZONE_TYPE_UNSPECIFIED(0), + /** + * + * + *
+   * The light heart rate zone.
+   * 
+ * + * LIGHT = 1; + */ + LIGHT(1), + /** + * + * + *
+   * The moderate heart rate zone.
+   * 
+ * + * MODERATE = 2; + */ + MODERATE(2), + /** + * + * + *
+   * The vigorous heart rate zone.
+   * 
+ * + * VIGOROUS = 3; + */ + VIGOROUS(3), + /** + * + * + *
+   * The peak heart rate zone.
+   * 
+ * + * PEAK = 4; + */ + PEAK(4), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "HeartRateZoneType"); + } + + /** + * + * + *
+   * Unspecified heart rate zone.
+   * 
+ * + * HEART_RATE_ZONE_TYPE_UNSPECIFIED = 0; + */ + public static final int HEART_RATE_ZONE_TYPE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+   * The light heart rate zone.
+   * 
+ * + * LIGHT = 1; + */ + public static final int LIGHT_VALUE = 1; + + /** + * + * + *
+   * The moderate heart rate zone.
+   * 
+ * + * MODERATE = 2; + */ + public static final int MODERATE_VALUE = 2; + + /** + * + * + *
+   * The vigorous heart rate zone.
+   * 
+ * + * VIGOROUS = 3; + */ + public static final int VIGOROUS_VALUE = 3; + + /** + * + * + *
+   * The peak heart rate zone.
+   * 
+ * + * PEAK = 4; + */ + public static final int PEAK_VALUE = 4; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static HeartRateZoneType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static HeartRateZoneType forNumber(int value) { + switch (value) { + case 0: + return HEART_RATE_ZONE_TYPE_UNSPECIFIED; + case 1: + return LIGHT; + case 2: + return MODERATE; + case 3: + return VIGOROUS; + case 4: + return PEAK; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public HeartRateZoneType findValueByNumber(int number) { + return HeartRateZoneType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final HeartRateZoneType[] VALUES = values(); + + public static HeartRateZoneType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private HeartRateZoneType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.devicesandservices.health.v4.HeartRateZoneType) +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/Height.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/Height.java new file mode 100644 index 000000000000..5cf9d75b3c4a --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/Height.java @@ -0,0 +1,826 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * Body height measurement.
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.Height} + */ +@com.google.protobuf.Generated +public final class Height extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.Height) + HeightOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Height"); + } + + // Use Height.newBuilder() to construct. + private Height(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Height() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_Height_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_Height_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.Height.class, + com.google.devicesandservices.health.v4.Height.Builder.class); + } + + private int bitField0_; + public static final int SAMPLE_TIME_FIELD_NUMBER = 1; + private com.google.devicesandservices.health.v4.ObservationSampleTime sampleTime_; + + /** + * + * + *
+   * Required. The time at which the height was recorded.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the sampleTime field is set. + */ + @java.lang.Override + public boolean hasSampleTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The time at which the height was recorded.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The sampleTime. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ObservationSampleTime getSampleTime() { + return sampleTime_ == null + ? com.google.devicesandservices.health.v4.ObservationSampleTime.getDefaultInstance() + : sampleTime_; + } + + /** + * + * + *
+   * Required. The time at which the height was recorded.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ObservationSampleTimeOrBuilder + getSampleTimeOrBuilder() { + return sampleTime_ == null + ? com.google.devicesandservices.health.v4.ObservationSampleTime.getDefaultInstance() + : sampleTime_; + } + + public static final int HEIGHT_MILLIMETERS_FIELD_NUMBER = 2; + private long heightMillimeters_ = 0L; + + /** + * + * + *
+   * Required. Height of the user in millimeters.
+   * 
+ * + * int64 height_millimeters = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The heightMillimeters. + */ + @java.lang.Override + public long getHeightMillimeters() { + return heightMillimeters_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getSampleTime()); + } + if (heightMillimeters_ != 0L) { + output.writeInt64(2, heightMillimeters_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getSampleTime()); + } + if (heightMillimeters_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, heightMillimeters_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.Height)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.Height other = + (com.google.devicesandservices.health.v4.Height) obj; + + if (hasSampleTime() != other.hasSampleTime()) return false; + if (hasSampleTime()) { + if (!getSampleTime().equals(other.getSampleTime())) return false; + } + if (getHeightMillimeters() != other.getHeightMillimeters()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasSampleTime()) { + hash = (37 * hash) + SAMPLE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getSampleTime().hashCode(); + } + hash = (37 * hash) + HEIGHT_MILLIMETERS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getHeightMillimeters()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.Height parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.Height parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Height parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.Height parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Height parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.Height parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Height parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.Height parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Height parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.Height parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Height parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.Height parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.devicesandservices.health.v4.Height prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Body height measurement.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.Height} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.Height) + com.google.devicesandservices.health.v4.HeightOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_Height_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_Height_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.Height.class, + com.google.devicesandservices.health.v4.Height.Builder.class); + } + + // Construct using com.google.devicesandservices.health.v4.Height.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetSampleTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + sampleTime_ = null; + if (sampleTimeBuilder_ != null) { + sampleTimeBuilder_.dispose(); + sampleTimeBuilder_ = null; + } + heightMillimeters_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_Height_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.Height getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.Height.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.Height build() { + com.google.devicesandservices.health.v4.Height result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.Height buildPartial() { + com.google.devicesandservices.health.v4.Height result = + new com.google.devicesandservices.health.v4.Height(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.devicesandservices.health.v4.Height result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.sampleTime_ = sampleTimeBuilder_ == null ? sampleTime_ : sampleTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.heightMillimeters_ = heightMillimeters_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.Height) { + return mergeFrom((com.google.devicesandservices.health.v4.Height) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.devicesandservices.health.v4.Height other) { + if (other == com.google.devicesandservices.health.v4.Height.getDefaultInstance()) return this; + if (other.hasSampleTime()) { + mergeSampleTime(other.getSampleTime()); + } + if (other.getHeightMillimeters() != 0L) { + setHeightMillimeters(other.getHeightMillimeters()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetSampleTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + heightMillimeters_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.devicesandservices.health.v4.ObservationSampleTime sampleTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ObservationSampleTime, + com.google.devicesandservices.health.v4.ObservationSampleTime.Builder, + com.google.devicesandservices.health.v4.ObservationSampleTimeOrBuilder> + sampleTimeBuilder_; + + /** + * + * + *
+     * Required. The time at which the height was recorded.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the sampleTime field is set. + */ + public boolean hasSampleTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. The time at which the height was recorded.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The sampleTime. + */ + public com.google.devicesandservices.health.v4.ObservationSampleTime getSampleTime() { + if (sampleTimeBuilder_ == null) { + return sampleTime_ == null + ? com.google.devicesandservices.health.v4.ObservationSampleTime.getDefaultInstance() + : sampleTime_; + } else { + return sampleTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The time at which the height was recorded.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSampleTime( + com.google.devicesandservices.health.v4.ObservationSampleTime value) { + if (sampleTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sampleTime_ = value; + } else { + sampleTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The time at which the height was recorded.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSampleTime( + com.google.devicesandservices.health.v4.ObservationSampleTime.Builder builderForValue) { + if (sampleTimeBuilder_ == null) { + sampleTime_ = builderForValue.build(); + } else { + sampleTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The time at which the height was recorded.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeSampleTime( + com.google.devicesandservices.health.v4.ObservationSampleTime value) { + if (sampleTimeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && sampleTime_ != null + && sampleTime_ + != com.google.devicesandservices.health.v4.ObservationSampleTime + .getDefaultInstance()) { + getSampleTimeBuilder().mergeFrom(value); + } else { + sampleTime_ = value; + } + } else { + sampleTimeBuilder_.mergeFrom(value); + } + if (sampleTime_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The time at which the height was recorded.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearSampleTime() { + bitField0_ = (bitField0_ & ~0x00000001); + sampleTime_ = null; + if (sampleTimeBuilder_ != null) { + sampleTimeBuilder_.dispose(); + sampleTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The time at which the height was recorded.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.devicesandservices.health.v4.ObservationSampleTime.Builder + getSampleTimeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetSampleTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The time at which the height was recorded.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.devicesandservices.health.v4.ObservationSampleTimeOrBuilder + getSampleTimeOrBuilder() { + if (sampleTimeBuilder_ != null) { + return sampleTimeBuilder_.getMessageOrBuilder(); + } else { + return sampleTime_ == null + ? com.google.devicesandservices.health.v4.ObservationSampleTime.getDefaultInstance() + : sampleTime_; + } + } + + /** + * + * + *
+     * Required. The time at which the height was recorded.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ObservationSampleTime, + com.google.devicesandservices.health.v4.ObservationSampleTime.Builder, + com.google.devicesandservices.health.v4.ObservationSampleTimeOrBuilder> + internalGetSampleTimeFieldBuilder() { + if (sampleTimeBuilder_ == null) { + sampleTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ObservationSampleTime, + com.google.devicesandservices.health.v4.ObservationSampleTime.Builder, + com.google.devicesandservices.health.v4.ObservationSampleTimeOrBuilder>( + getSampleTime(), getParentForChildren(), isClean()); + sampleTime_ = null; + } + return sampleTimeBuilder_; + } + + private long heightMillimeters_; + + /** + * + * + *
+     * Required. Height of the user in millimeters.
+     * 
+ * + * int64 height_millimeters = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The heightMillimeters. + */ + @java.lang.Override + public long getHeightMillimeters() { + return heightMillimeters_; + } + + /** + * + * + *
+     * Required. Height of the user in millimeters.
+     * 
+ * + * int64 height_millimeters = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The heightMillimeters to set. + * @return This builder for chaining. + */ + public Builder setHeightMillimeters(long value) { + + heightMillimeters_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Height of the user in millimeters.
+     * 
+ * + * int64 height_millimeters = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearHeightMillimeters() { + bitField0_ = (bitField0_ & ~0x00000002); + heightMillimeters_ = 0L; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.Height) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.Height) + private static final com.google.devicesandservices.health.v4.Height DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.Height(); + } + + public static com.google.devicesandservices.health.v4.Height getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Height parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.Height getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/HeightOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/HeightOrBuilder.java new file mode 100644 index 000000000000..669d2a5a7b90 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/HeightOrBuilder.java @@ -0,0 +1,84 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface HeightOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.Height) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The time at which the height was recorded.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the sampleTime field is set. + */ + boolean hasSampleTime(); + + /** + * + * + *
+   * Required. The time at which the height was recorded.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The sampleTime. + */ + com.google.devicesandservices.health.v4.ObservationSampleTime getSampleTime(); + + /** + * + * + *
+   * Required. The time at which the height was recorded.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.devicesandservices.health.v4.ObservationSampleTimeOrBuilder getSampleTimeOrBuilder(); + + /** + * + * + *
+   * Required. Height of the user in millimeters.
+   * 
+ * + * int64 height_millimeters = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The heightMillimeters. + */ + long getHeightMillimeters(); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/HydrationLog.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/HydrationLog.java new file mode 100644 index 000000000000..d26cea600c4f --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/HydrationLog.java @@ -0,0 +1,1041 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * Holds information about a user logged hydration.
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.HydrationLog} + */ +@com.google.protobuf.Generated +public final class HydrationLog extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.HydrationLog) + HydrationLogOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "HydrationLog"); + } + + // Use HydrationLog.newBuilder() to construct. + private HydrationLog(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private HydrationLog() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_HydrationLog_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_HydrationLog_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.HydrationLog.class, + com.google.devicesandservices.health.v4.HydrationLog.Builder.class); + } + + private int bitField0_; + public static final int INTERVAL_FIELD_NUMBER = 1; + private com.google.devicesandservices.health.v4.SessionTimeInterval interval_; + + /** + * + * + *
+   * Required. Observed interval.
+   * 
+ * + * + * .google.devicesandservices.health.v4.SessionTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the interval field is set. + */ + @java.lang.Override + public boolean hasInterval() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. Observed interval.
+   * 
+ * + * + * .google.devicesandservices.health.v4.SessionTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The interval. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.SessionTimeInterval getInterval() { + return interval_ == null + ? com.google.devicesandservices.health.v4.SessionTimeInterval.getDefaultInstance() + : interval_; + } + + /** + * + * + *
+   * Required. Observed interval.
+   * 
+ * + * + * .google.devicesandservices.health.v4.SessionTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.SessionTimeIntervalOrBuilder + getIntervalOrBuilder() { + return interval_ == null + ? com.google.devicesandservices.health.v4.SessionTimeInterval.getDefaultInstance() + : interval_; + } + + public static final int AMOUNT_CONSUMED_FIELD_NUMBER = 2; + private com.google.devicesandservices.health.v4.VolumeQuantity amountConsumed_; + + /** + * + * + *
+   * Required. Amount of liquid (ex. water) consumed.
+   * 
+ * + * + * .google.devicesandservices.health.v4.VolumeQuantity amount_consumed = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the amountConsumed field is set. + */ + @java.lang.Override + public boolean hasAmountConsumed() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Required. Amount of liquid (ex. water) consumed.
+   * 
+ * + * + * .google.devicesandservices.health.v4.VolumeQuantity amount_consumed = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The amountConsumed. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.VolumeQuantity getAmountConsumed() { + return amountConsumed_ == null + ? com.google.devicesandservices.health.v4.VolumeQuantity.getDefaultInstance() + : amountConsumed_; + } + + /** + * + * + *
+   * Required. Amount of liquid (ex. water) consumed.
+   * 
+ * + * + * .google.devicesandservices.health.v4.VolumeQuantity amount_consumed = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.VolumeQuantityOrBuilder + getAmountConsumedOrBuilder() { + return amountConsumed_ == null + ? com.google.devicesandservices.health.v4.VolumeQuantity.getDefaultInstance() + : amountConsumed_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getInterval()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getAmountConsumed()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getInterval()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getAmountConsumed()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.HydrationLog)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.HydrationLog other = + (com.google.devicesandservices.health.v4.HydrationLog) obj; + + if (hasInterval() != other.hasInterval()) return false; + if (hasInterval()) { + if (!getInterval().equals(other.getInterval())) return false; + } + if (hasAmountConsumed() != other.hasAmountConsumed()) return false; + if (hasAmountConsumed()) { + if (!getAmountConsumed().equals(other.getAmountConsumed())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasInterval()) { + hash = (37 * hash) + INTERVAL_FIELD_NUMBER; + hash = (53 * hash) + getInterval().hashCode(); + } + if (hasAmountConsumed()) { + hash = (37 * hash) + AMOUNT_CONSUMED_FIELD_NUMBER; + hash = (53 * hash) + getAmountConsumed().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.HydrationLog parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.HydrationLog parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.HydrationLog parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.HydrationLog parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.HydrationLog parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.HydrationLog parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.HydrationLog parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.HydrationLog parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.HydrationLog parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.HydrationLog parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.HydrationLog parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.HydrationLog parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.devicesandservices.health.v4.HydrationLog prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Holds information about a user logged hydration.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.HydrationLog} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.HydrationLog) + com.google.devicesandservices.health.v4.HydrationLogOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_HydrationLog_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_HydrationLog_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.HydrationLog.class, + com.google.devicesandservices.health.v4.HydrationLog.Builder.class); + } + + // Construct using com.google.devicesandservices.health.v4.HydrationLog.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetIntervalFieldBuilder(); + internalGetAmountConsumedFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + interval_ = null; + if (intervalBuilder_ != null) { + intervalBuilder_.dispose(); + intervalBuilder_ = null; + } + amountConsumed_ = null; + if (amountConsumedBuilder_ != null) { + amountConsumedBuilder_.dispose(); + amountConsumedBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_HydrationLog_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.HydrationLog getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.HydrationLog.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.HydrationLog build() { + com.google.devicesandservices.health.v4.HydrationLog result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.HydrationLog buildPartial() { + com.google.devicesandservices.health.v4.HydrationLog result = + new com.google.devicesandservices.health.v4.HydrationLog(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.devicesandservices.health.v4.HydrationLog result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.interval_ = intervalBuilder_ == null ? interval_ : intervalBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.amountConsumed_ = + amountConsumedBuilder_ == null ? amountConsumed_ : amountConsumedBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.HydrationLog) { + return mergeFrom((com.google.devicesandservices.health.v4.HydrationLog) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.devicesandservices.health.v4.HydrationLog other) { + if (other == com.google.devicesandservices.health.v4.HydrationLog.getDefaultInstance()) + return this; + if (other.hasInterval()) { + mergeInterval(other.getInterval()); + } + if (other.hasAmountConsumed()) { + mergeAmountConsumed(other.getAmountConsumed()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetIntervalFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetAmountConsumedFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.devicesandservices.health.v4.SessionTimeInterval interval_; + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.SessionTimeInterval, + com.google.devicesandservices.health.v4.SessionTimeInterval.Builder, + com.google.devicesandservices.health.v4.SessionTimeIntervalOrBuilder> + intervalBuilder_; + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.SessionTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the interval field is set. + */ + public boolean hasInterval() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.SessionTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The interval. + */ + public com.google.devicesandservices.health.v4.SessionTimeInterval getInterval() { + if (intervalBuilder_ == null) { + return interval_ == null + ? com.google.devicesandservices.health.v4.SessionTimeInterval.getDefaultInstance() + : interval_; + } else { + return intervalBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.SessionTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setInterval(com.google.devicesandservices.health.v4.SessionTimeInterval value) { + if (intervalBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + interval_ = value; + } else { + intervalBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.SessionTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setInterval( + com.google.devicesandservices.health.v4.SessionTimeInterval.Builder builderForValue) { + if (intervalBuilder_ == null) { + interval_ = builderForValue.build(); + } else { + intervalBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.SessionTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeInterval( + com.google.devicesandservices.health.v4.SessionTimeInterval value) { + if (intervalBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && interval_ != null + && interval_ + != com.google.devicesandservices.health.v4.SessionTimeInterval + .getDefaultInstance()) { + getIntervalBuilder().mergeFrom(value); + } else { + interval_ = value; + } + } else { + intervalBuilder_.mergeFrom(value); + } + if (interval_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.SessionTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearInterval() { + bitField0_ = (bitField0_ & ~0x00000001); + interval_ = null; + if (intervalBuilder_ != null) { + intervalBuilder_.dispose(); + intervalBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.SessionTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.devicesandservices.health.v4.SessionTimeInterval.Builder + getIntervalBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetIntervalFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.SessionTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.devicesandservices.health.v4.SessionTimeIntervalOrBuilder + getIntervalOrBuilder() { + if (intervalBuilder_ != null) { + return intervalBuilder_.getMessageOrBuilder(); + } else { + return interval_ == null + ? com.google.devicesandservices.health.v4.SessionTimeInterval.getDefaultInstance() + : interval_; + } + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.SessionTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.SessionTimeInterval, + com.google.devicesandservices.health.v4.SessionTimeInterval.Builder, + com.google.devicesandservices.health.v4.SessionTimeIntervalOrBuilder> + internalGetIntervalFieldBuilder() { + if (intervalBuilder_ == null) { + intervalBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.SessionTimeInterval, + com.google.devicesandservices.health.v4.SessionTimeInterval.Builder, + com.google.devicesandservices.health.v4.SessionTimeIntervalOrBuilder>( + getInterval(), getParentForChildren(), isClean()); + interval_ = null; + } + return intervalBuilder_; + } + + private com.google.devicesandservices.health.v4.VolumeQuantity amountConsumed_; + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.VolumeQuantity, + com.google.devicesandservices.health.v4.VolumeQuantity.Builder, + com.google.devicesandservices.health.v4.VolumeQuantityOrBuilder> + amountConsumedBuilder_; + + /** + * + * + *
+     * Required. Amount of liquid (ex. water) consumed.
+     * 
+ * + * + * .google.devicesandservices.health.v4.VolumeQuantity amount_consumed = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the amountConsumed field is set. + */ + public boolean hasAmountConsumed() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Required. Amount of liquid (ex. water) consumed.
+     * 
+ * + * + * .google.devicesandservices.health.v4.VolumeQuantity amount_consumed = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The amountConsumed. + */ + public com.google.devicesandservices.health.v4.VolumeQuantity getAmountConsumed() { + if (amountConsumedBuilder_ == null) { + return amountConsumed_ == null + ? com.google.devicesandservices.health.v4.VolumeQuantity.getDefaultInstance() + : amountConsumed_; + } else { + return amountConsumedBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. Amount of liquid (ex. water) consumed.
+     * 
+ * + * + * .google.devicesandservices.health.v4.VolumeQuantity amount_consumed = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAmountConsumed(com.google.devicesandservices.health.v4.VolumeQuantity value) { + if (amountConsumedBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + amountConsumed_ = value; + } else { + amountConsumedBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Amount of liquid (ex. water) consumed.
+     * 
+ * + * + * .google.devicesandservices.health.v4.VolumeQuantity amount_consumed = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAmountConsumed( + com.google.devicesandservices.health.v4.VolumeQuantity.Builder builderForValue) { + if (amountConsumedBuilder_ == null) { + amountConsumed_ = builderForValue.build(); + } else { + amountConsumedBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Amount of liquid (ex. water) consumed.
+     * 
+ * + * + * .google.devicesandservices.health.v4.VolumeQuantity amount_consumed = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeAmountConsumed( + com.google.devicesandservices.health.v4.VolumeQuantity value) { + if (amountConsumedBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && amountConsumed_ != null + && amountConsumed_ + != com.google.devicesandservices.health.v4.VolumeQuantity.getDefaultInstance()) { + getAmountConsumedBuilder().mergeFrom(value); + } else { + amountConsumed_ = value; + } + } else { + amountConsumedBuilder_.mergeFrom(value); + } + if (amountConsumed_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. Amount of liquid (ex. water) consumed.
+     * 
+ * + * + * .google.devicesandservices.health.v4.VolumeQuantity amount_consumed = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearAmountConsumed() { + bitField0_ = (bitField0_ & ~0x00000002); + amountConsumed_ = null; + if (amountConsumedBuilder_ != null) { + amountConsumedBuilder_.dispose(); + amountConsumedBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Amount of liquid (ex. water) consumed.
+     * 
+ * + * + * .google.devicesandservices.health.v4.VolumeQuantity amount_consumed = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.devicesandservices.health.v4.VolumeQuantity.Builder + getAmountConsumedBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetAmountConsumedFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. Amount of liquid (ex. water) consumed.
+     * 
+ * + * + * .google.devicesandservices.health.v4.VolumeQuantity amount_consumed = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.devicesandservices.health.v4.VolumeQuantityOrBuilder + getAmountConsumedOrBuilder() { + if (amountConsumedBuilder_ != null) { + return amountConsumedBuilder_.getMessageOrBuilder(); + } else { + return amountConsumed_ == null + ? com.google.devicesandservices.health.v4.VolumeQuantity.getDefaultInstance() + : amountConsumed_; + } + } + + /** + * + * + *
+     * Required. Amount of liquid (ex. water) consumed.
+     * 
+ * + * + * .google.devicesandservices.health.v4.VolumeQuantity amount_consumed = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.VolumeQuantity, + com.google.devicesandservices.health.v4.VolumeQuantity.Builder, + com.google.devicesandservices.health.v4.VolumeQuantityOrBuilder> + internalGetAmountConsumedFieldBuilder() { + if (amountConsumedBuilder_ == null) { + amountConsumedBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.VolumeQuantity, + com.google.devicesandservices.health.v4.VolumeQuantity.Builder, + com.google.devicesandservices.health.v4.VolumeQuantityOrBuilder>( + getAmountConsumed(), getParentForChildren(), isClean()); + amountConsumed_ = null; + } + return amountConsumedBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.HydrationLog) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.HydrationLog) + private static final com.google.devicesandservices.health.v4.HydrationLog DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.HydrationLog(); + } + + public static com.google.devicesandservices.health.v4.HydrationLog getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public HydrationLog parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.HydrationLog getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/HydrationLogOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/HydrationLogOrBuilder.java new file mode 100644 index 000000000000..de3eb1b31618 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/HydrationLogOrBuilder.java @@ -0,0 +1,114 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface HydrationLogOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.HydrationLog) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Observed interval.
+   * 
+ * + * + * .google.devicesandservices.health.v4.SessionTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the interval field is set. + */ + boolean hasInterval(); + + /** + * + * + *
+   * Required. Observed interval.
+   * 
+ * + * + * .google.devicesandservices.health.v4.SessionTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The interval. + */ + com.google.devicesandservices.health.v4.SessionTimeInterval getInterval(); + + /** + * + * + *
+   * Required. Observed interval.
+   * 
+ * + * + * .google.devicesandservices.health.v4.SessionTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.devicesandservices.health.v4.SessionTimeIntervalOrBuilder getIntervalOrBuilder(); + + /** + * + * + *
+   * Required. Amount of liquid (ex. water) consumed.
+   * 
+ * + * + * .google.devicesandservices.health.v4.VolumeQuantity amount_consumed = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the amountConsumed field is set. + */ + boolean hasAmountConsumed(); + + /** + * + * + *
+   * Required. Amount of liquid (ex. water) consumed.
+   * 
+ * + * + * .google.devicesandservices.health.v4.VolumeQuantity amount_consumed = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The amountConsumed. + */ + com.google.devicesandservices.health.v4.VolumeQuantity getAmountConsumed(); + + /** + * + * + *
+   * Required. Amount of liquid (ex. water) consumed.
+   * 
+ * + * + * .google.devicesandservices.health.v4.VolumeQuantity amount_consumed = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.devicesandservices.health.v4.VolumeQuantityOrBuilder getAmountConsumedOrBuilder(); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/HydrationLogRollupValue.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/HydrationLogRollupValue.java new file mode 100644 index 000000000000..58a215771e73 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/HydrationLogRollupValue.java @@ -0,0 +1,1528 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * Represents the result of the rollup of the hydration log data type.
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.HydrationLogRollupValue} + */ +@com.google.protobuf.Generated +public final class HydrationLogRollupValue extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.HydrationLogRollupValue) + HydrationLogRollupValueOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "HydrationLogRollupValue"); + } + + // Use HydrationLogRollupValue.newBuilder() to construct. + private HydrationLogRollupValue(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private HydrationLogRollupValue() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_HydrationLogRollupValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_HydrationLogRollupValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.HydrationLogRollupValue.class, + com.google.devicesandservices.health.v4.HydrationLogRollupValue.Builder.class); + } + + public interface VolumeQuantityRollupOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.HydrationLogRollupValue.VolumeQuantityRollup) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. The sum of volume in milliliters.
+     * 
+ * + * double milliliters_sum = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The millilitersSum. + */ + double getMillilitersSum(); + + /** + * + * + *
+     * Optional. The user provided unit on the last element.
+     * 
+ * + * + * .google.devicesandservices.health.v4.VolumeUnit user_provided_unit_last = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for userProvidedUnitLast. + */ + int getUserProvidedUnitLastValue(); + + /** + * + * + *
+     * Optional. The user provided unit on the last element.
+     * 
+ * + * + * .google.devicesandservices.health.v4.VolumeUnit user_provided_unit_last = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The userProvidedUnitLast. + */ + com.google.devicesandservices.health.v4.VolumeUnit getUserProvidedUnitLast(); + } + + /** + * + * + *
+   * Rollup for volume quantity.
+   * 
+ * + * Protobuf type {@code + * google.devicesandservices.health.v4.HydrationLogRollupValue.VolumeQuantityRollup} + */ + public static final class VolumeQuantityRollup extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.HydrationLogRollupValue.VolumeQuantityRollup) + VolumeQuantityRollupOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "VolumeQuantityRollup"); + } + + // Use VolumeQuantityRollup.newBuilder() to construct. + private VolumeQuantityRollup(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private VolumeQuantityRollup() { + userProvidedUnitLast_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_HydrationLogRollupValue_VolumeQuantityRollup_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_HydrationLogRollupValue_VolumeQuantityRollup_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.HydrationLogRollupValue.VolumeQuantityRollup + .class, + com.google.devicesandservices.health.v4.HydrationLogRollupValue.VolumeQuantityRollup + .Builder.class); + } + + public static final int MILLILITERS_SUM_FIELD_NUMBER = 1; + private double millilitersSum_ = 0D; + + /** + * + * + *
+     * Required. The sum of volume in milliliters.
+     * 
+ * + * double milliliters_sum = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The millilitersSum. + */ + @java.lang.Override + public double getMillilitersSum() { + return millilitersSum_; + } + + public static final int USER_PROVIDED_UNIT_LAST_FIELD_NUMBER = 2; + private int userProvidedUnitLast_ = 0; + + /** + * + * + *
+     * Optional. The user provided unit on the last element.
+     * 
+ * + * + * .google.devicesandservices.health.v4.VolumeUnit user_provided_unit_last = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for userProvidedUnitLast. + */ + @java.lang.Override + public int getUserProvidedUnitLastValue() { + return userProvidedUnitLast_; + } + + /** + * + * + *
+     * Optional. The user provided unit on the last element.
+     * 
+ * + * + * .google.devicesandservices.health.v4.VolumeUnit user_provided_unit_last = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The userProvidedUnitLast. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.VolumeUnit getUserProvidedUnitLast() { + com.google.devicesandservices.health.v4.VolumeUnit result = + com.google.devicesandservices.health.v4.VolumeUnit.forNumber(userProvidedUnitLast_); + return result == null + ? com.google.devicesandservices.health.v4.VolumeUnit.UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (java.lang.Double.doubleToRawLongBits(millilitersSum_) != 0) { + output.writeDouble(1, millilitersSum_); + } + if (userProvidedUnitLast_ + != com.google.devicesandservices.health.v4.VolumeUnit.VOLUME_UNIT_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, userProvidedUnitLast_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (java.lang.Double.doubleToRawLongBits(millilitersSum_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(1, millilitersSum_); + } + if (userProvidedUnitLast_ + != com.google.devicesandservices.health.v4.VolumeUnit.VOLUME_UNIT_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, userProvidedUnitLast_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.devicesandservices.health.v4.HydrationLogRollupValue.VolumeQuantityRollup)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.HydrationLogRollupValue.VolumeQuantityRollup other = + (com.google.devicesandservices.health.v4.HydrationLogRollupValue.VolumeQuantityRollup) + obj; + + if (java.lang.Double.doubleToLongBits(getMillilitersSum()) + != java.lang.Double.doubleToLongBits(other.getMillilitersSum())) return false; + if (userProvidedUnitLast_ != other.userProvidedUnitLast_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MILLILITERS_SUM_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getMillilitersSum())); + hash = (37 * hash) + USER_PROVIDED_UNIT_LAST_FIELD_NUMBER; + hash = (53 * hash) + userProvidedUnitLast_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.HydrationLogRollupValue + .VolumeQuantityRollup + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.HydrationLogRollupValue + .VolumeQuantityRollup + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.HydrationLogRollupValue + .VolumeQuantityRollup + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.HydrationLogRollupValue + .VolumeQuantityRollup + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.HydrationLogRollupValue + .VolumeQuantityRollup + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.HydrationLogRollupValue + .VolumeQuantityRollup + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.HydrationLogRollupValue + .VolumeQuantityRollup + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.HydrationLogRollupValue + .VolumeQuantityRollup + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.HydrationLogRollupValue + .VolumeQuantityRollup + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.HydrationLogRollupValue + .VolumeQuantityRollup + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.HydrationLogRollupValue + .VolumeQuantityRollup + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.HydrationLogRollupValue + .VolumeQuantityRollup + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.HydrationLogRollupValue.VolumeQuantityRollup + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+     * Rollup for volume quantity.
+     * 
+ * + * Protobuf type {@code + * google.devicesandservices.health.v4.HydrationLogRollupValue.VolumeQuantityRollup} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.HydrationLogRollupValue.VolumeQuantityRollup) + com.google.devicesandservices.health.v4.HydrationLogRollupValue + .VolumeQuantityRollupOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_HydrationLogRollupValue_VolumeQuantityRollup_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_HydrationLogRollupValue_VolumeQuantityRollup_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.HydrationLogRollupValue.VolumeQuantityRollup + .class, + com.google.devicesandservices.health.v4.HydrationLogRollupValue.VolumeQuantityRollup + .Builder.class); + } + + // Construct using + // com.google.devicesandservices.health.v4.HydrationLogRollupValue.VolumeQuantityRollup.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + millilitersSum_ = 0D; + userProvidedUnitLast_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_HydrationLogRollupValue_VolumeQuantityRollup_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.HydrationLogRollupValue.VolumeQuantityRollup + getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.HydrationLogRollupValue.VolumeQuantityRollup + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.HydrationLogRollupValue.VolumeQuantityRollup + build() { + com.google.devicesandservices.health.v4.HydrationLogRollupValue.VolumeQuantityRollup + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.HydrationLogRollupValue.VolumeQuantityRollup + buildPartial() { + com.google.devicesandservices.health.v4.HydrationLogRollupValue.VolumeQuantityRollup + result = + new com.google.devicesandservices.health.v4.HydrationLogRollupValue + .VolumeQuantityRollup(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.devicesandservices.health.v4.HydrationLogRollupValue.VolumeQuantityRollup + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.millilitersSum_ = millilitersSum_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.userProvidedUnitLast_ = userProvidedUnitLast_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.devicesandservices.health.v4.HydrationLogRollupValue.VolumeQuantityRollup) { + return mergeFrom( + (com.google.devicesandservices.health.v4.HydrationLogRollupValue.VolumeQuantityRollup) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.devicesandservices.health.v4.HydrationLogRollupValue.VolumeQuantityRollup + other) { + if (other + == com.google.devicesandservices.health.v4.HydrationLogRollupValue.VolumeQuantityRollup + .getDefaultInstance()) return this; + if (java.lang.Double.doubleToRawLongBits(other.getMillilitersSum()) != 0) { + setMillilitersSum(other.getMillilitersSum()); + } + if (other.userProvidedUnitLast_ != 0) { + setUserProvidedUnitLastValue(other.getUserProvidedUnitLastValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 9: + { + millilitersSum_ = input.readDouble(); + bitField0_ |= 0x00000001; + break; + } // case 9 + case 16: + { + userProvidedUnitLast_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private double millilitersSum_; + + /** + * + * + *
+       * Required. The sum of volume in milliliters.
+       * 
+ * + * double milliliters_sum = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The millilitersSum. + */ + @java.lang.Override + public double getMillilitersSum() { + return millilitersSum_; + } + + /** + * + * + *
+       * Required. The sum of volume in milliliters.
+       * 
+ * + * double milliliters_sum = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The millilitersSum to set. + * @return This builder for chaining. + */ + public Builder setMillilitersSum(double value) { + + millilitersSum_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The sum of volume in milliliters.
+       * 
+ * + * double milliliters_sum = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearMillilitersSum() { + bitField0_ = (bitField0_ & ~0x00000001); + millilitersSum_ = 0D; + onChanged(); + return this; + } + + private int userProvidedUnitLast_ = 0; + + /** + * + * + *
+       * Optional. The user provided unit on the last element.
+       * 
+ * + * + * .google.devicesandservices.health.v4.VolumeUnit user_provided_unit_last = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for userProvidedUnitLast. + */ + @java.lang.Override + public int getUserProvidedUnitLastValue() { + return userProvidedUnitLast_; + } + + /** + * + * + *
+       * Optional. The user provided unit on the last element.
+       * 
+ * + * + * .google.devicesandservices.health.v4.VolumeUnit user_provided_unit_last = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for userProvidedUnitLast to set. + * @return This builder for chaining. + */ + public Builder setUserProvidedUnitLastValue(int value) { + userProvidedUnitLast_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. The user provided unit on the last element.
+       * 
+ * + * + * .google.devicesandservices.health.v4.VolumeUnit user_provided_unit_last = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The userProvidedUnitLast. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.VolumeUnit getUserProvidedUnitLast() { + com.google.devicesandservices.health.v4.VolumeUnit result = + com.google.devicesandservices.health.v4.VolumeUnit.forNumber(userProvidedUnitLast_); + return result == null + ? com.google.devicesandservices.health.v4.VolumeUnit.UNRECOGNIZED + : result; + } + + /** + * + * + *
+       * Optional. The user provided unit on the last element.
+       * 
+ * + * + * .google.devicesandservices.health.v4.VolumeUnit user_provided_unit_last = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The userProvidedUnitLast to set. + * @return This builder for chaining. + */ + public Builder setUserProvidedUnitLast( + com.google.devicesandservices.health.v4.VolumeUnit value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + userProvidedUnitLast_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. The user provided unit on the last element.
+       * 
+ * + * + * .google.devicesandservices.health.v4.VolumeUnit user_provided_unit_last = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearUserProvidedUnitLast() { + bitField0_ = (bitField0_ & ~0x00000002); + userProvidedUnitLast_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.HydrationLogRollupValue.VolumeQuantityRollup) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.HydrationLogRollupValue.VolumeQuantityRollup) + private static final com.google.devicesandservices.health.v4.HydrationLogRollupValue + .VolumeQuantityRollup + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.devicesandservices.health.v4.HydrationLogRollupValue + .VolumeQuantityRollup(); + } + + public static com.google.devicesandservices.health.v4.HydrationLogRollupValue + .VolumeQuantityRollup + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VolumeQuantityRollup parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.HydrationLogRollupValue.VolumeQuantityRollup + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int AMOUNT_CONSUMED_FIELD_NUMBER = 1; + private com.google.devicesandservices.health.v4.HydrationLogRollupValue.VolumeQuantityRollup + amountConsumed_; + + /** + * + * + *
+   * Rollup for amount consumed.
+   * 
+ * + * + * .google.devicesandservices.health.v4.HydrationLogRollupValue.VolumeQuantityRollup amount_consumed = 1; + * + * + * @return Whether the amountConsumed field is set. + */ + @java.lang.Override + public boolean hasAmountConsumed() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Rollup for amount consumed.
+   * 
+ * + * + * .google.devicesandservices.health.v4.HydrationLogRollupValue.VolumeQuantityRollup amount_consumed = 1; + * + * + * @return The amountConsumed. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.HydrationLogRollupValue.VolumeQuantityRollup + getAmountConsumed() { + return amountConsumed_ == null + ? com.google.devicesandservices.health.v4.HydrationLogRollupValue.VolumeQuantityRollup + .getDefaultInstance() + : amountConsumed_; + } + + /** + * + * + *
+   * Rollup for amount consumed.
+   * 
+ * + * + * .google.devicesandservices.health.v4.HydrationLogRollupValue.VolumeQuantityRollup amount_consumed = 1; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.HydrationLogRollupValue + .VolumeQuantityRollupOrBuilder + getAmountConsumedOrBuilder() { + return amountConsumed_ == null + ? com.google.devicesandservices.health.v4.HydrationLogRollupValue.VolumeQuantityRollup + .getDefaultInstance() + : amountConsumed_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getAmountConsumed()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getAmountConsumed()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.HydrationLogRollupValue)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.HydrationLogRollupValue other = + (com.google.devicesandservices.health.v4.HydrationLogRollupValue) obj; + + if (hasAmountConsumed() != other.hasAmountConsumed()) return false; + if (hasAmountConsumed()) { + if (!getAmountConsumed().equals(other.getAmountConsumed())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAmountConsumed()) { + hash = (37 * hash) + AMOUNT_CONSUMED_FIELD_NUMBER; + hash = (53 * hash) + getAmountConsumed().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.HydrationLogRollupValue parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.HydrationLogRollupValue parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.HydrationLogRollupValue parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.HydrationLogRollupValue parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.HydrationLogRollupValue parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.HydrationLogRollupValue parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.HydrationLogRollupValue parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.HydrationLogRollupValue parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.HydrationLogRollupValue parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.HydrationLogRollupValue parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.HydrationLogRollupValue parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.HydrationLogRollupValue parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.HydrationLogRollupValue prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Represents the result of the rollup of the hydration log data type.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.HydrationLogRollupValue} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.HydrationLogRollupValue) + com.google.devicesandservices.health.v4.HydrationLogRollupValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_HydrationLogRollupValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_HydrationLogRollupValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.HydrationLogRollupValue.class, + com.google.devicesandservices.health.v4.HydrationLogRollupValue.Builder.class); + } + + // Construct using com.google.devicesandservices.health.v4.HydrationLogRollupValue.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetAmountConsumedFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + amountConsumed_ = null; + if (amountConsumedBuilder_ != null) { + amountConsumedBuilder_.dispose(); + amountConsumedBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_HydrationLogRollupValue_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.HydrationLogRollupValue + getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.HydrationLogRollupValue.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.HydrationLogRollupValue build() { + com.google.devicesandservices.health.v4.HydrationLogRollupValue result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.HydrationLogRollupValue buildPartial() { + com.google.devicesandservices.health.v4.HydrationLogRollupValue result = + new com.google.devicesandservices.health.v4.HydrationLogRollupValue(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.devicesandservices.health.v4.HydrationLogRollupValue result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.amountConsumed_ = + amountConsumedBuilder_ == null ? amountConsumed_ : amountConsumedBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.HydrationLogRollupValue) { + return mergeFrom((com.google.devicesandservices.health.v4.HydrationLogRollupValue) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.devicesandservices.health.v4.HydrationLogRollupValue other) { + if (other + == com.google.devicesandservices.health.v4.HydrationLogRollupValue.getDefaultInstance()) + return this; + if (other.hasAmountConsumed()) { + mergeAmountConsumed(other.getAmountConsumed()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetAmountConsumedFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.devicesandservices.health.v4.HydrationLogRollupValue.VolumeQuantityRollup + amountConsumed_; + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.HydrationLogRollupValue.VolumeQuantityRollup, + com.google.devicesandservices.health.v4.HydrationLogRollupValue.VolumeQuantityRollup + .Builder, + com.google.devicesandservices.health.v4.HydrationLogRollupValue + .VolumeQuantityRollupOrBuilder> + amountConsumedBuilder_; + + /** + * + * + *
+     * Rollup for amount consumed.
+     * 
+ * + * + * .google.devicesandservices.health.v4.HydrationLogRollupValue.VolumeQuantityRollup amount_consumed = 1; + * + * + * @return Whether the amountConsumed field is set. + */ + public boolean hasAmountConsumed() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Rollup for amount consumed.
+     * 
+ * + * + * .google.devicesandservices.health.v4.HydrationLogRollupValue.VolumeQuantityRollup amount_consumed = 1; + * + * + * @return The amountConsumed. + */ + public com.google.devicesandservices.health.v4.HydrationLogRollupValue.VolumeQuantityRollup + getAmountConsumed() { + if (amountConsumedBuilder_ == null) { + return amountConsumed_ == null + ? com.google.devicesandservices.health.v4.HydrationLogRollupValue.VolumeQuantityRollup + .getDefaultInstance() + : amountConsumed_; + } else { + return amountConsumedBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Rollup for amount consumed.
+     * 
+ * + * + * .google.devicesandservices.health.v4.HydrationLogRollupValue.VolumeQuantityRollup amount_consumed = 1; + * + */ + public Builder setAmountConsumed( + com.google.devicesandservices.health.v4.HydrationLogRollupValue.VolumeQuantityRollup + value) { + if (amountConsumedBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + amountConsumed_ = value; + } else { + amountConsumedBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Rollup for amount consumed.
+     * 
+ * + * + * .google.devicesandservices.health.v4.HydrationLogRollupValue.VolumeQuantityRollup amount_consumed = 1; + * + */ + public Builder setAmountConsumed( + com.google.devicesandservices.health.v4.HydrationLogRollupValue.VolumeQuantityRollup.Builder + builderForValue) { + if (amountConsumedBuilder_ == null) { + amountConsumed_ = builderForValue.build(); + } else { + amountConsumedBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Rollup for amount consumed.
+     * 
+ * + * + * .google.devicesandservices.health.v4.HydrationLogRollupValue.VolumeQuantityRollup amount_consumed = 1; + * + */ + public Builder mergeAmountConsumed( + com.google.devicesandservices.health.v4.HydrationLogRollupValue.VolumeQuantityRollup + value) { + if (amountConsumedBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && amountConsumed_ != null + && amountConsumed_ + != com.google.devicesandservices.health.v4.HydrationLogRollupValue + .VolumeQuantityRollup.getDefaultInstance()) { + getAmountConsumedBuilder().mergeFrom(value); + } else { + amountConsumed_ = value; + } + } else { + amountConsumedBuilder_.mergeFrom(value); + } + if (amountConsumed_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Rollup for amount consumed.
+     * 
+ * + * + * .google.devicesandservices.health.v4.HydrationLogRollupValue.VolumeQuantityRollup amount_consumed = 1; + * + */ + public Builder clearAmountConsumed() { + bitField0_ = (bitField0_ & ~0x00000001); + amountConsumed_ = null; + if (amountConsumedBuilder_ != null) { + amountConsumedBuilder_.dispose(); + amountConsumedBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Rollup for amount consumed.
+     * 
+ * + * + * .google.devicesandservices.health.v4.HydrationLogRollupValue.VolumeQuantityRollup amount_consumed = 1; + * + */ + public com.google.devicesandservices.health.v4.HydrationLogRollupValue.VolumeQuantityRollup + .Builder + getAmountConsumedBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetAmountConsumedFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Rollup for amount consumed.
+     * 
+ * + * + * .google.devicesandservices.health.v4.HydrationLogRollupValue.VolumeQuantityRollup amount_consumed = 1; + * + */ + public com.google.devicesandservices.health.v4.HydrationLogRollupValue + .VolumeQuantityRollupOrBuilder + getAmountConsumedOrBuilder() { + if (amountConsumedBuilder_ != null) { + return amountConsumedBuilder_.getMessageOrBuilder(); + } else { + return amountConsumed_ == null + ? com.google.devicesandservices.health.v4.HydrationLogRollupValue.VolumeQuantityRollup + .getDefaultInstance() + : amountConsumed_; + } + } + + /** + * + * + *
+     * Rollup for amount consumed.
+     * 
+ * + * + * .google.devicesandservices.health.v4.HydrationLogRollupValue.VolumeQuantityRollup amount_consumed = 1; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.HydrationLogRollupValue.VolumeQuantityRollup, + com.google.devicesandservices.health.v4.HydrationLogRollupValue.VolumeQuantityRollup + .Builder, + com.google.devicesandservices.health.v4.HydrationLogRollupValue + .VolumeQuantityRollupOrBuilder> + internalGetAmountConsumedFieldBuilder() { + if (amountConsumedBuilder_ == null) { + amountConsumedBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.HydrationLogRollupValue + .VolumeQuantityRollup, + com.google.devicesandservices.health.v4.HydrationLogRollupValue.VolumeQuantityRollup + .Builder, + com.google.devicesandservices.health.v4.HydrationLogRollupValue + .VolumeQuantityRollupOrBuilder>( + getAmountConsumed(), getParentForChildren(), isClean()); + amountConsumed_ = null; + } + return amountConsumedBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.HydrationLogRollupValue) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.HydrationLogRollupValue) + private static final com.google.devicesandservices.health.v4.HydrationLogRollupValue + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.HydrationLogRollupValue(); + } + + public static com.google.devicesandservices.health.v4.HydrationLogRollupValue + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public HydrationLogRollupValue parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.HydrationLogRollupValue + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/HydrationLogRollupValueOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/HydrationLogRollupValueOrBuilder.java new file mode 100644 index 000000000000..7363bed6adad --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/HydrationLogRollupValueOrBuilder.java @@ -0,0 +1,73 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface HydrationLogRollupValueOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.HydrationLogRollupValue) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Rollup for amount consumed.
+   * 
+ * + * + * .google.devicesandservices.health.v4.HydrationLogRollupValue.VolumeQuantityRollup amount_consumed = 1; + * + * + * @return Whether the amountConsumed field is set. + */ + boolean hasAmountConsumed(); + + /** + * + * + *
+   * Rollup for amount consumed.
+   * 
+ * + * + * .google.devicesandservices.health.v4.HydrationLogRollupValue.VolumeQuantityRollup amount_consumed = 1; + * + * + * @return The amountConsumed. + */ + com.google.devicesandservices.health.v4.HydrationLogRollupValue.VolumeQuantityRollup + getAmountConsumed(); + + /** + * + * + *
+   * Rollup for amount consumed.
+   * 
+ * + * + * .google.devicesandservices.health.v4.HydrationLogRollupValue.VolumeQuantityRollup amount_consumed = 1; + * + */ + com.google.devicesandservices.health.v4.HydrationLogRollupValue.VolumeQuantityRollupOrBuilder + getAmountConsumedOrBuilder(); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/Identity.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/Identity.java new file mode 100644 index 000000000000..9a5b8cc8c4dc --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/Identity.java @@ -0,0 +1,1086 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/health_profile.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * Represents details about the Google user's identity.
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.Identity} + */ +@com.google.protobuf.Generated +public final class Identity extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.Identity) + IdentityOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Identity"); + } + + // Use Identity.newBuilder() to construct. + private Identity(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Identity() { + name_ = ""; + legacyUserId_ = ""; + healthUserId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.HealthProfileProto + .internal_static_google_devicesandservices_health_v4_Identity_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.HealthProfileProto + .internal_static_google_devicesandservices_health_v4_Identity_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.Identity.class, + com.google.devicesandservices.health.v4.Identity.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Identifier. The resource name of this Identity resource.
+   * Format: `users/me/identity`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Identifier. The resource name of this Identity resource.
+   * Format: `users/me/identity`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LEGACY_USER_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object legacyUserId_ = ""; + + /** + * + * + *
+   * Output only. The legacy Fitbit User identifier. This is the Fitbit ID used
+   * in the legacy Fitbit APIs (v1-v3). It can be referenced by clients
+   * migrating from the legacy Fitbit APIs to map their existing identifiers to
+   * the new Google user ID.
+   *
+   * It **must not** be used for any other purpose. It is not of any use for new
+   * clients using only the Google Health APIs.
+   *
+   * Valid values are strings of 1-63 characters, and valid characters are
+   * lowercase and uppercase letters, numbers, and hyphens.
+   * 
+ * + * string legacy_user_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The legacyUserId. + */ + @java.lang.Override + public java.lang.String getLegacyUserId() { + java.lang.Object ref = legacyUserId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + legacyUserId_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The legacy Fitbit User identifier. This is the Fitbit ID used
+   * in the legacy Fitbit APIs (v1-v3). It can be referenced by clients
+   * migrating from the legacy Fitbit APIs to map their existing identifiers to
+   * the new Google user ID.
+   *
+   * It **must not** be used for any other purpose. It is not of any use for new
+   * clients using only the Google Health APIs.
+   *
+   * Valid values are strings of 1-63 characters, and valid characters are
+   * lowercase and uppercase letters, numbers, and hyphens.
+   * 
+ * + * string legacy_user_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for legacyUserId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLegacyUserIdBytes() { + java.lang.Object ref = legacyUserId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + legacyUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int HEALTH_USER_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object healthUserId_ = ""; + + /** + * + * + *
+   * Output only. The Google User Identifier in the Google Health APIs. It
+   * matches the
+   * `{user}` resource ID segment in the resource name paths, e.g.
+   * `users/{user}/dataTypes/steps`.
+   *
+   * Valid values are strings of 1-63 characters, and valid characters are
+   * lowercase and uppercase letters, numbers, and hyphens.
+   * 
+ * + * string health_user_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The healthUserId. + */ + @java.lang.Override + public java.lang.String getHealthUserId() { + java.lang.Object ref = healthUserId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + healthUserId_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The Google User Identifier in the Google Health APIs. It
+   * matches the
+   * `{user}` resource ID segment in the resource name paths, e.g.
+   * `users/{user}/dataTypes/steps`.
+   *
+   * Valid values are strings of 1-63 characters, and valid characters are
+   * lowercase and uppercase letters, numbers, and hyphens.
+   * 
+ * + * string health_user_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for healthUserId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getHealthUserIdBytes() { + java.lang.Object ref = healthUserId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + healthUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(legacyUserId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, legacyUserId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(healthUserId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, healthUserId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(legacyUserId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, legacyUserId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(healthUserId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, healthUserId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.Identity)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.Identity other = + (com.google.devicesandservices.health.v4.Identity) obj; + + if (!getName().equals(other.getName())) return false; + if (!getLegacyUserId().equals(other.getLegacyUserId())) return false; + if (!getHealthUserId().equals(other.getHealthUserId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + LEGACY_USER_ID_FIELD_NUMBER; + hash = (53 * hash) + getLegacyUserId().hashCode(); + hash = (37 * hash) + HEALTH_USER_ID_FIELD_NUMBER; + hash = (53 * hash) + getHealthUserId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.Identity parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.Identity parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Identity parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.Identity parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Identity parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.Identity parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Identity parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.Identity parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Identity parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.Identity parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Identity parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.Identity parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.devicesandservices.health.v4.Identity prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Represents details about the Google user's identity.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.Identity} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.Identity) + com.google.devicesandservices.health.v4.IdentityOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.HealthProfileProto + .internal_static_google_devicesandservices_health_v4_Identity_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.HealthProfileProto + .internal_static_google_devicesandservices_health_v4_Identity_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.Identity.class, + com.google.devicesandservices.health.v4.Identity.Builder.class); + } + + // Construct using com.google.devicesandservices.health.v4.Identity.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + legacyUserId_ = ""; + healthUserId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.HealthProfileProto + .internal_static_google_devicesandservices_health_v4_Identity_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.Identity getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.Identity.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.Identity build() { + com.google.devicesandservices.health.v4.Identity result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.Identity buildPartial() { + com.google.devicesandservices.health.v4.Identity result = + new com.google.devicesandservices.health.v4.Identity(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.devicesandservices.health.v4.Identity result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.legacyUserId_ = legacyUserId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.healthUserId_ = healthUserId_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.Identity) { + return mergeFrom((com.google.devicesandservices.health.v4.Identity) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.devicesandservices.health.v4.Identity other) { + if (other == com.google.devicesandservices.health.v4.Identity.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getLegacyUserId().isEmpty()) { + legacyUserId_ = other.legacyUserId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getHealthUserId().isEmpty()) { + healthUserId_ = other.healthUserId_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + legacyUserId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + healthUserId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Identifier. The resource name of this Identity resource.
+     * Format: `users/me/identity`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Identifier. The resource name of this Identity resource.
+     * Format: `users/me/identity`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Identifier. The resource name of this Identity resource.
+     * Format: `users/me/identity`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. The resource name of this Identity resource.
+     * Format: `users/me/identity`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. The resource name of this Identity resource.
+     * Format: `users/me/identity`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object legacyUserId_ = ""; + + /** + * + * + *
+     * Output only. The legacy Fitbit User identifier. This is the Fitbit ID used
+     * in the legacy Fitbit APIs (v1-v3). It can be referenced by clients
+     * migrating from the legacy Fitbit APIs to map their existing identifiers to
+     * the new Google user ID.
+     *
+     * It **must not** be used for any other purpose. It is not of any use for new
+     * clients using only the Google Health APIs.
+     *
+     * Valid values are strings of 1-63 characters, and valid characters are
+     * lowercase and uppercase letters, numbers, and hyphens.
+     * 
+ * + * string legacy_user_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The legacyUserId. + */ + public java.lang.String getLegacyUserId() { + java.lang.Object ref = legacyUserId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + legacyUserId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The legacy Fitbit User identifier. This is the Fitbit ID used
+     * in the legacy Fitbit APIs (v1-v3). It can be referenced by clients
+     * migrating from the legacy Fitbit APIs to map their existing identifiers to
+     * the new Google user ID.
+     *
+     * It **must not** be used for any other purpose. It is not of any use for new
+     * clients using only the Google Health APIs.
+     *
+     * Valid values are strings of 1-63 characters, and valid characters are
+     * lowercase and uppercase letters, numbers, and hyphens.
+     * 
+ * + * string legacy_user_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for legacyUserId. + */ + public com.google.protobuf.ByteString getLegacyUserIdBytes() { + java.lang.Object ref = legacyUserId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + legacyUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The legacy Fitbit User identifier. This is the Fitbit ID used
+     * in the legacy Fitbit APIs (v1-v3). It can be referenced by clients
+     * migrating from the legacy Fitbit APIs to map their existing identifiers to
+     * the new Google user ID.
+     *
+     * It **must not** be used for any other purpose. It is not of any use for new
+     * clients using only the Google Health APIs.
+     *
+     * Valid values are strings of 1-63 characters, and valid characters are
+     * lowercase and uppercase letters, numbers, and hyphens.
+     * 
+ * + * string legacy_user_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The legacyUserId to set. + * @return This builder for chaining. + */ + public Builder setLegacyUserId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + legacyUserId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The legacy Fitbit User identifier. This is the Fitbit ID used
+     * in the legacy Fitbit APIs (v1-v3). It can be referenced by clients
+     * migrating from the legacy Fitbit APIs to map their existing identifiers to
+     * the new Google user ID.
+     *
+     * It **must not** be used for any other purpose. It is not of any use for new
+     * clients using only the Google Health APIs.
+     *
+     * Valid values are strings of 1-63 characters, and valid characters are
+     * lowercase and uppercase letters, numbers, and hyphens.
+     * 
+ * + * string legacy_user_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearLegacyUserId() { + legacyUserId_ = getDefaultInstance().getLegacyUserId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The legacy Fitbit User identifier. This is the Fitbit ID used
+     * in the legacy Fitbit APIs (v1-v3). It can be referenced by clients
+     * migrating from the legacy Fitbit APIs to map their existing identifiers to
+     * the new Google user ID.
+     *
+     * It **must not** be used for any other purpose. It is not of any use for new
+     * clients using only the Google Health APIs.
+     *
+     * Valid values are strings of 1-63 characters, and valid characters are
+     * lowercase and uppercase letters, numbers, and hyphens.
+     * 
+ * + * string legacy_user_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for legacyUserId to set. + * @return This builder for chaining. + */ + public Builder setLegacyUserIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + legacyUserId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object healthUserId_ = ""; + + /** + * + * + *
+     * Output only. The Google User Identifier in the Google Health APIs. It
+     * matches the
+     * `{user}` resource ID segment in the resource name paths, e.g.
+     * `users/{user}/dataTypes/steps`.
+     *
+     * Valid values are strings of 1-63 characters, and valid characters are
+     * lowercase and uppercase letters, numbers, and hyphens.
+     * 
+ * + * string health_user_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The healthUserId. + */ + public java.lang.String getHealthUserId() { + java.lang.Object ref = healthUserId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + healthUserId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The Google User Identifier in the Google Health APIs. It
+     * matches the
+     * `{user}` resource ID segment in the resource name paths, e.g.
+     * `users/{user}/dataTypes/steps`.
+     *
+     * Valid values are strings of 1-63 characters, and valid characters are
+     * lowercase and uppercase letters, numbers, and hyphens.
+     * 
+ * + * string health_user_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for healthUserId. + */ + public com.google.protobuf.ByteString getHealthUserIdBytes() { + java.lang.Object ref = healthUserId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + healthUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The Google User Identifier in the Google Health APIs. It
+     * matches the
+     * `{user}` resource ID segment in the resource name paths, e.g.
+     * `users/{user}/dataTypes/steps`.
+     *
+     * Valid values are strings of 1-63 characters, and valid characters are
+     * lowercase and uppercase letters, numbers, and hyphens.
+     * 
+ * + * string health_user_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The healthUserId to set. + * @return This builder for chaining. + */ + public Builder setHealthUserId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + healthUserId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The Google User Identifier in the Google Health APIs. It
+     * matches the
+     * `{user}` resource ID segment in the resource name paths, e.g.
+     * `users/{user}/dataTypes/steps`.
+     *
+     * Valid values are strings of 1-63 characters, and valid characters are
+     * lowercase and uppercase letters, numbers, and hyphens.
+     * 
+ * + * string health_user_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearHealthUserId() { + healthUserId_ = getDefaultInstance().getHealthUserId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The Google User Identifier in the Google Health APIs. It
+     * matches the
+     * `{user}` resource ID segment in the resource name paths, e.g.
+     * `users/{user}/dataTypes/steps`.
+     *
+     * Valid values are strings of 1-63 characters, and valid characters are
+     * lowercase and uppercase letters, numbers, and hyphens.
+     * 
+ * + * string health_user_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for healthUserId to set. + * @return This builder for chaining. + */ + public Builder setHealthUserIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + healthUserId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.Identity) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.Identity) + private static final com.google.devicesandservices.health.v4.Identity DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.Identity(); + } + + public static com.google.devicesandservices.health.v4.Identity getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Identity parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.Identity getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/IdentityName.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/IdentityName.java new file mode 100644 index 000000000000..21ce58a5aa1a --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/IdentityName.java @@ -0,0 +1,168 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class IdentityName implements ResourceName { + private static final PathTemplate USER = + PathTemplate.createWithoutUrlEncoding("users/{user}/identity"); + private volatile Map fieldValuesMap; + private final String user; + + @Deprecated + protected IdentityName() { + user = null; + } + + private IdentityName(Builder builder) { + user = Preconditions.checkNotNull(builder.getUser()); + } + + public String getUser() { + return user; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static IdentityName of(String user) { + return newBuilder().setUser(user).build(); + } + + public static String format(String user) { + return newBuilder().setUser(user).build().toString(); + } + + public static IdentityName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + USER.validatedMatch( + formattedString, "IdentityName.parse: formattedString not in valid format"); + return of(matchMap.get("user")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (IdentityName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return USER.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (user != null) { + fieldMapBuilder.put("user", user); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return USER.instantiate("user", user); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + IdentityName that = ((IdentityName) o); + return Objects.equals(this.user, that.user); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(user); + return h; + } + + /** Builder for users/{user}/identity. */ + public static class Builder { + private String user; + + protected Builder() {} + + public String getUser() { + return user; + } + + public Builder setUser(String user) { + this.user = user; + return this; + } + + private Builder(IdentityName identityName) { + this.user = identityName.user; + } + + public IdentityName build() { + return new IdentityName(this); + } + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/IdentityOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/IdentityOrBuilder.java new file mode 100644 index 000000000000..35f24bc2d908 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/IdentityOrBuilder.java @@ -0,0 +1,138 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/health_profile.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface IdentityOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.Identity) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Identifier. The resource name of this Identity resource.
+   * Format: `users/me/identity`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Identifier. The resource name of this Identity resource.
+   * Format: `users/me/identity`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. The legacy Fitbit User identifier. This is the Fitbit ID used
+   * in the legacy Fitbit APIs (v1-v3). It can be referenced by clients
+   * migrating from the legacy Fitbit APIs to map their existing identifiers to
+   * the new Google user ID.
+   *
+   * It **must not** be used for any other purpose. It is not of any use for new
+   * clients using only the Google Health APIs.
+   *
+   * Valid values are strings of 1-63 characters, and valid characters are
+   * lowercase and uppercase letters, numbers, and hyphens.
+   * 
+ * + * string legacy_user_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The legacyUserId. + */ + java.lang.String getLegacyUserId(); + + /** + * + * + *
+   * Output only. The legacy Fitbit User identifier. This is the Fitbit ID used
+   * in the legacy Fitbit APIs (v1-v3). It can be referenced by clients
+   * migrating from the legacy Fitbit APIs to map their existing identifiers to
+   * the new Google user ID.
+   *
+   * It **must not** be used for any other purpose. It is not of any use for new
+   * clients using only the Google Health APIs.
+   *
+   * Valid values are strings of 1-63 characters, and valid characters are
+   * lowercase and uppercase letters, numbers, and hyphens.
+   * 
+ * + * string legacy_user_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for legacyUserId. + */ + com.google.protobuf.ByteString getLegacyUserIdBytes(); + + /** + * + * + *
+   * Output only. The Google User Identifier in the Google Health APIs. It
+   * matches the
+   * `{user}` resource ID segment in the resource name paths, e.g.
+   * `users/{user}/dataTypes/steps`.
+   *
+   * Valid values are strings of 1-63 characters, and valid characters are
+   * lowercase and uppercase letters, numbers, and hyphens.
+   * 
+ * + * string health_user_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The healthUserId. + */ + java.lang.String getHealthUserId(); + + /** + * + * + *
+   * Output only. The Google User Identifier in the Google Health APIs. It
+   * matches the
+   * `{user}` resource ID segment in the resource name paths, e.g.
+   * `users/{user}/dataTypes/steps`.
+   *
+   * Valid values are strings of 1-63 characters, and valid characters are
+   * lowercase and uppercase letters, numbers, and hyphens.
+   * 
+ * + * string health_user_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for healthUserId. + */ + com.google.protobuf.ByteString getHealthUserIdBytes(); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ListDataPointsRequest.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ListDataPointsRequest.java new file mode 100644 index 000000000000..1401ad34aad4 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ListDataPointsRequest.java @@ -0,0 +1,1817 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_points.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * Request for listing raw data points
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.ListDataPointsRequest} + */ +@com.google.protobuf.Generated +public final class ListDataPointsRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.ListDataPointsRequest) + ListDataPointsRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListDataPointsRequest"); + } + + // Use ListDataPointsRequest.newBuilder() to construct. + private ListDataPointsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListDataPointsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_ListDataPointsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_ListDataPointsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.ListDataPointsRequest.class, + com.google.devicesandservices.health.v4.ListDataPointsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. Parent data type of the Data Point collection.
+   *
+   * Format: `users/me/dataTypes/{data_type}`, e.g.:
+   *
+   * - `users/me/dataTypes/steps`
+   * - `users/me/dataTypes/weight`
+   *
+   * For a list of the supported data types see the [DataPoint
+   * data][google.devicesandservices.health.v4.DataPoint] union
+   * field.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Parent data type of the Data Point collection.
+   *
+   * Format: `users/me/dataTypes/{data_type}`, e.g.:
+   *
+   * - `users/me/dataTypes/steps`
+   * - `users/me/dataTypes/weight`
+   *
+   * For a list of the supported data types see the [DataPoint
+   * data][google.devicesandservices.health.v4.DataPoint] union
+   * field.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + + /** + * + * + *
+   * Optional. The maximum number of data points to return.
+   * If unspecified, at most 1440 data points will be returned.
+   * The maximum page size is 10000; values above that will be truncated
+   * accordingly.
+   * For `exercise` and `sleep` the default page size is 25.
+   * The maximum page size for `exercise` and `sleep` is 25.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + + /** + * + * + *
+   * Optional. The `next_page_token` from a previous request, if any.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The `next_page_token` from a previous request, if any.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + + /** + * + * + *
+   * Optional. Filter expression following https://google.aip.dev/160.
+   *
+   * A time range (either physical or civil) can be specified.
+   *
+   * The supported filter fields are:
+   *
+   *
+   * - Interval start time:
+   * - Pattern: `{interval_data_type}.interval.start_time`
+   * - Supported comparison operators: `>=`, `<`
+   * - Timestamp literal expected in RFC-3339 format
+   * - Supported logical operators: `AND`
+   * - Example:
+   * - `steps.interval.start_time >= "2023-11-24T00:00:00Z" AND
+   * steps.interval.start_time < "2023-11-25T00:00:00Z"`
+   * - `distance.interval.start_time >= "2024-08-14T12:34:56Z"`
+   *
+   * - Interval civil start time:
+   * - Pattern: `{interval_data_type}.interval.civil_start_time`
+   * - Supported comparison operators: `>=`, `<`
+   * - Date with optional time literal expected in ISO 8601
+   * `YYYY-MM-DD[THH:mm:ss]` format
+   * - Supported logical operators: `AND`
+   * - Example:
+   * - `steps.interval.civil_start_time >= "2023-11-24" AND
+   * steps.interval.civil_start_time < "2023-11-25"`
+   * - `distance.interval.civil_start_time >= "2024-08-14T12:34:56"`
+   *
+   * - Sample observation physical time:
+   * - Pattern: `{sample_data_type}.sample_time.physical_time`
+   * - Supported comparison operators: `>=`, `<`
+   * - Timestamp literal expected in RFC-3339 format
+   * - Supported logical operators: `AND`
+   * - Example:
+   * - `weight.sample_time.physical_time >= "2023-11-24T00:00:00Z"
+   * AND weight.sample_time.physical_time < "2023-11-25T00:00:00Z"`
+   * - `weight.sample_time.physical_time >=
+   * "2024-08-14T12:34:56Z"`
+   *
+   * - Sample observation civil time:
+   * - Pattern: `{sample_data_type}.sample_time.civil_time`
+   * - Supported comparison operators: `>=`, `<`
+   * - Date with optional time literal expected in ISO 8601
+   * `YYYY-MM-DD[THH:mm:ss]` format
+   * - Supported logical operators: `AND`
+   * - Example:
+   * - `weight.sample_time.civil_time >= "2023-11-24" AND
+   * weight.sample_time.civil_time < "2023-11-25"`
+   * - `weight.sample_time.civil_time >= "2024-08-14T12:34:56"`
+   *
+   * - Daily summary date:
+   * - Pattern: `{daily_summary_data_type}.date`
+   * - Supported comparison operators: `>=`, `<`
+   * - Date literal expected in ISO 8601 `YYYY-MM-DD` format
+   * - Supported logical operators: `AND`
+   * - Example:
+   * - `daily_resting_heart_rate.date >= "2024-08-14"`
+   * - `daily_heart_rate_variability.date < "2024-08-15"`
+   *
+   *
+   * - Session civil start time (**Excluding Sleep**):
+   * - Pattern: `{session_data_type}.interval.civil_start_time`
+   * - Supported comparison operators: `>=`, `<`
+   * - Date with optional time literal expected in ISO 8601
+   * `YYYY-MM-DD[THH:mm:ss]` format
+   * - Supported logical operators: `AND`
+   * - Example:
+   * - `exercise.interval.civil_start_time >= "2023-11-24" AND
+   * exercise.interval.civil_start_time < "2023-11-25"`
+   * - `exercise.interval.civil_start_time >= "2024-08-14T12:34:56"`
+   *
+   * - Session end time (**Sleep specific**):
+   * - Pattern: `sleep.interval.end_time`
+   * - Supported comparison operators: `>=`, `<`
+   * - Timestamp literal expected in RFC-3339 format
+   * - Supported logical operators: `AND`, `OR`
+   * - Example:
+   * - `sleep.interval.end_time >= "2023-11-24T00:00:00Z" AND
+   * sleep.interval.end_time < "2023-11-25T00:00:00Z"`
+   *
+   * - Session civil end time (**Sleep specific**):
+   * - Pattern: `sleep.interval.civil_end_time`
+   * - Supported comparison operators: `>=`, `<`
+   * - Date with optional time literal expected in ISO 8601
+   * `YYYY-MM-DD[THH:mm:ss]` format
+   * - Supported logical operators: `AND`, `OR`
+   * - Example:
+   * - `sleep.interval.civil_end_time >= "2023-11-24" AND
+   * sleep.interval.civil_end_time < "2023-11-25"`
+   *
+   *
+   * Data points in the response will be ordered by the interval start time in
+   * descending order.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Filter expression following https://google.aip.dev/160.
+   *
+   * A time range (either physical or civil) can be specified.
+   *
+   * The supported filter fields are:
+   *
+   *
+   * - Interval start time:
+   * - Pattern: `{interval_data_type}.interval.start_time`
+   * - Supported comparison operators: `>=`, `<`
+   * - Timestamp literal expected in RFC-3339 format
+   * - Supported logical operators: `AND`
+   * - Example:
+   * - `steps.interval.start_time >= "2023-11-24T00:00:00Z" AND
+   * steps.interval.start_time < "2023-11-25T00:00:00Z"`
+   * - `distance.interval.start_time >= "2024-08-14T12:34:56Z"`
+   *
+   * - Interval civil start time:
+   * - Pattern: `{interval_data_type}.interval.civil_start_time`
+   * - Supported comparison operators: `>=`, `<`
+   * - Date with optional time literal expected in ISO 8601
+   * `YYYY-MM-DD[THH:mm:ss]` format
+   * - Supported logical operators: `AND`
+   * - Example:
+   * - `steps.interval.civil_start_time >= "2023-11-24" AND
+   * steps.interval.civil_start_time < "2023-11-25"`
+   * - `distance.interval.civil_start_time >= "2024-08-14T12:34:56"`
+   *
+   * - Sample observation physical time:
+   * - Pattern: `{sample_data_type}.sample_time.physical_time`
+   * - Supported comparison operators: `>=`, `<`
+   * - Timestamp literal expected in RFC-3339 format
+   * - Supported logical operators: `AND`
+   * - Example:
+   * - `weight.sample_time.physical_time >= "2023-11-24T00:00:00Z"
+   * AND weight.sample_time.physical_time < "2023-11-25T00:00:00Z"`
+   * - `weight.sample_time.physical_time >=
+   * "2024-08-14T12:34:56Z"`
+   *
+   * - Sample observation civil time:
+   * - Pattern: `{sample_data_type}.sample_time.civil_time`
+   * - Supported comparison operators: `>=`, `<`
+   * - Date with optional time literal expected in ISO 8601
+   * `YYYY-MM-DD[THH:mm:ss]` format
+   * - Supported logical operators: `AND`
+   * - Example:
+   * - `weight.sample_time.civil_time >= "2023-11-24" AND
+   * weight.sample_time.civil_time < "2023-11-25"`
+   * - `weight.sample_time.civil_time >= "2024-08-14T12:34:56"`
+   *
+   * - Daily summary date:
+   * - Pattern: `{daily_summary_data_type}.date`
+   * - Supported comparison operators: `>=`, `<`
+   * - Date literal expected in ISO 8601 `YYYY-MM-DD` format
+   * - Supported logical operators: `AND`
+   * - Example:
+   * - `daily_resting_heart_rate.date >= "2024-08-14"`
+   * - `daily_heart_rate_variability.date < "2024-08-15"`
+   *
+   *
+   * - Session civil start time (**Excluding Sleep**):
+   * - Pattern: `{session_data_type}.interval.civil_start_time`
+   * - Supported comparison operators: `>=`, `<`
+   * - Date with optional time literal expected in ISO 8601
+   * `YYYY-MM-DD[THH:mm:ss]` format
+   * - Supported logical operators: `AND`
+   * - Example:
+   * - `exercise.interval.civil_start_time >= "2023-11-24" AND
+   * exercise.interval.civil_start_time < "2023-11-25"`
+   * - `exercise.interval.civil_start_time >= "2024-08-14T12:34:56"`
+   *
+   * - Session end time (**Sleep specific**):
+   * - Pattern: `sleep.interval.end_time`
+   * - Supported comparison operators: `>=`, `<`
+   * - Timestamp literal expected in RFC-3339 format
+   * - Supported logical operators: `AND`, `OR`
+   * - Example:
+   * - `sleep.interval.end_time >= "2023-11-24T00:00:00Z" AND
+   * sleep.interval.end_time < "2023-11-25T00:00:00Z"`
+   *
+   * - Session civil end time (**Sleep specific**):
+   * - Pattern: `sleep.interval.civil_end_time`
+   * - Supported comparison operators: `>=`, `<`
+   * - Date with optional time literal expected in ISO 8601
+   * `YYYY-MM-DD[THH:mm:ss]` format
+   * - Supported logical operators: `AND`, `OR`
+   * - Example:
+   * - `sleep.interval.civil_end_time >= "2023-11-24" AND
+   * sleep.interval.civil_end_time < "2023-11-25"`
+   *
+   *
+   * Data points in the response will be ordered by the interval start time in
+   * descending order.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, filter_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, filter_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.ListDataPointsRequest)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.ListDataPointsRequest other = + (com.google.devicesandservices.health.v4.ListDataPointsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.ListDataPointsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.ListDataPointsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ListDataPointsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.ListDataPointsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ListDataPointsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.ListDataPointsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ListDataPointsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.ListDataPointsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ListDataPointsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.ListDataPointsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ListDataPointsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.ListDataPointsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.ListDataPointsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request for listing raw data points
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.ListDataPointsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.ListDataPointsRequest) + com.google.devicesandservices.health.v4.ListDataPointsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_ListDataPointsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_ListDataPointsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.ListDataPointsRequest.class, + com.google.devicesandservices.health.v4.ListDataPointsRequest.Builder.class); + } + + // Construct using com.google.devicesandservices.health.v4.ListDataPointsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_ListDataPointsRequest_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.ListDataPointsRequest + getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.ListDataPointsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.ListDataPointsRequest build() { + com.google.devicesandservices.health.v4.ListDataPointsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.ListDataPointsRequest buildPartial() { + com.google.devicesandservices.health.v4.ListDataPointsRequest result = + new com.google.devicesandservices.health.v4.ListDataPointsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.devicesandservices.health.v4.ListDataPointsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filter_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.ListDataPointsRequest) { + return mergeFrom((com.google.devicesandservices.health.v4.ListDataPointsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.devicesandservices.health.v4.ListDataPointsRequest other) { + if (other + == com.google.devicesandservices.health.v4.ListDataPointsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. Parent data type of the Data Point collection.
+     *
+     * Format: `users/me/dataTypes/{data_type}`, e.g.:
+     *
+     * - `users/me/dataTypes/steps`
+     * - `users/me/dataTypes/weight`
+     *
+     * For a list of the supported data types see the [DataPoint
+     * data][google.devicesandservices.health.v4.DataPoint] union
+     * field.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Parent data type of the Data Point collection.
+     *
+     * Format: `users/me/dataTypes/{data_type}`, e.g.:
+     *
+     * - `users/me/dataTypes/steps`
+     * - `users/me/dataTypes/weight`
+     *
+     * For a list of the supported data types see the [DataPoint
+     * data][google.devicesandservices.health.v4.DataPoint] union
+     * field.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Parent data type of the Data Point collection.
+     *
+     * Format: `users/me/dataTypes/{data_type}`, e.g.:
+     *
+     * - `users/me/dataTypes/steps`
+     * - `users/me/dataTypes/weight`
+     *
+     * For a list of the supported data types see the [DataPoint
+     * data][google.devicesandservices.health.v4.DataPoint] union
+     * field.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Parent data type of the Data Point collection.
+     *
+     * Format: `users/me/dataTypes/{data_type}`, e.g.:
+     *
+     * - `users/me/dataTypes/steps`
+     * - `users/me/dataTypes/weight`
+     *
+     * For a list of the supported data types see the [DataPoint
+     * data][google.devicesandservices.health.v4.DataPoint] union
+     * field.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Parent data type of the Data Point collection.
+     *
+     * Format: `users/me/dataTypes/{data_type}`, e.g.:
+     *
+     * - `users/me/dataTypes/steps`
+     * - `users/me/dataTypes/weight`
+     *
+     * For a list of the supported data types see the [DataPoint
+     * data][google.devicesandservices.health.v4.DataPoint] union
+     * field.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + + /** + * + * + *
+     * Optional. The maximum number of data points to return.
+     * If unspecified, at most 1440 data points will be returned.
+     * The maximum page size is 10000; values above that will be truncated
+     * accordingly.
+     * For `exercise` and `sleep` the default page size is 25.
+     * The maximum page size for `exercise` and `sleep` is 25.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. The maximum number of data points to return.
+     * If unspecified, at most 1440 data points will be returned.
+     * The maximum page size is 10000; values above that will be truncated
+     * accordingly.
+     * For `exercise` and `sleep` the default page size is 25.
+     * The maximum page size for `exercise` and `sleep` is 25.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The maximum number of data points to return.
+     * If unspecified, at most 1440 data points will be returned.
+     * The maximum page size is 10000; values above that will be truncated
+     * accordingly.
+     * For `exercise` and `sleep` the default page size is 25.
+     * The maximum page size for `exercise` and `sleep` is 25.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
+     * Optional. The `next_page_token` from a previous request, if any.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The `next_page_token` from a previous request, if any.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The `next_page_token` from a previous request, if any.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The `next_page_token` from a previous request, if any.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The `next_page_token` from a previous request, if any.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + + /** + * + * + *
+     * Optional. Filter expression following https://google.aip.dev/160.
+     *
+     * A time range (either physical or civil) can be specified.
+     *
+     * The supported filter fields are:
+     *
+     *
+     * - Interval start time:
+     * - Pattern: `{interval_data_type}.interval.start_time`
+     * - Supported comparison operators: `>=`, `<`
+     * - Timestamp literal expected in RFC-3339 format
+     * - Supported logical operators: `AND`
+     * - Example:
+     * - `steps.interval.start_time >= "2023-11-24T00:00:00Z" AND
+     * steps.interval.start_time < "2023-11-25T00:00:00Z"`
+     * - `distance.interval.start_time >= "2024-08-14T12:34:56Z"`
+     *
+     * - Interval civil start time:
+     * - Pattern: `{interval_data_type}.interval.civil_start_time`
+     * - Supported comparison operators: `>=`, `<`
+     * - Date with optional time literal expected in ISO 8601
+     * `YYYY-MM-DD[THH:mm:ss]` format
+     * - Supported logical operators: `AND`
+     * - Example:
+     * - `steps.interval.civil_start_time >= "2023-11-24" AND
+     * steps.interval.civil_start_time < "2023-11-25"`
+     * - `distance.interval.civil_start_time >= "2024-08-14T12:34:56"`
+     *
+     * - Sample observation physical time:
+     * - Pattern: `{sample_data_type}.sample_time.physical_time`
+     * - Supported comparison operators: `>=`, `<`
+     * - Timestamp literal expected in RFC-3339 format
+     * - Supported logical operators: `AND`
+     * - Example:
+     * - `weight.sample_time.physical_time >= "2023-11-24T00:00:00Z"
+     * AND weight.sample_time.physical_time < "2023-11-25T00:00:00Z"`
+     * - `weight.sample_time.physical_time >=
+     * "2024-08-14T12:34:56Z"`
+     *
+     * - Sample observation civil time:
+     * - Pattern: `{sample_data_type}.sample_time.civil_time`
+     * - Supported comparison operators: `>=`, `<`
+     * - Date with optional time literal expected in ISO 8601
+     * `YYYY-MM-DD[THH:mm:ss]` format
+     * - Supported logical operators: `AND`
+     * - Example:
+     * - `weight.sample_time.civil_time >= "2023-11-24" AND
+     * weight.sample_time.civil_time < "2023-11-25"`
+     * - `weight.sample_time.civil_time >= "2024-08-14T12:34:56"`
+     *
+     * - Daily summary date:
+     * - Pattern: `{daily_summary_data_type}.date`
+     * - Supported comparison operators: `>=`, `<`
+     * - Date literal expected in ISO 8601 `YYYY-MM-DD` format
+     * - Supported logical operators: `AND`
+     * - Example:
+     * - `daily_resting_heart_rate.date >= "2024-08-14"`
+     * - `daily_heart_rate_variability.date < "2024-08-15"`
+     *
+     *
+     * - Session civil start time (**Excluding Sleep**):
+     * - Pattern: `{session_data_type}.interval.civil_start_time`
+     * - Supported comparison operators: `>=`, `<`
+     * - Date with optional time literal expected in ISO 8601
+     * `YYYY-MM-DD[THH:mm:ss]` format
+     * - Supported logical operators: `AND`
+     * - Example:
+     * - `exercise.interval.civil_start_time >= "2023-11-24" AND
+     * exercise.interval.civil_start_time < "2023-11-25"`
+     * - `exercise.interval.civil_start_time >= "2024-08-14T12:34:56"`
+     *
+     * - Session end time (**Sleep specific**):
+     * - Pattern: `sleep.interval.end_time`
+     * - Supported comparison operators: `>=`, `<`
+     * - Timestamp literal expected in RFC-3339 format
+     * - Supported logical operators: `AND`, `OR`
+     * - Example:
+     * - `sleep.interval.end_time >= "2023-11-24T00:00:00Z" AND
+     * sleep.interval.end_time < "2023-11-25T00:00:00Z"`
+     *
+     * - Session civil end time (**Sleep specific**):
+     * - Pattern: `sleep.interval.civil_end_time`
+     * - Supported comparison operators: `>=`, `<`
+     * - Date with optional time literal expected in ISO 8601
+     * `YYYY-MM-DD[THH:mm:ss]` format
+     * - Supported logical operators: `AND`, `OR`
+     * - Example:
+     * - `sleep.interval.civil_end_time >= "2023-11-24" AND
+     * sleep.interval.civil_end_time < "2023-11-25"`
+     *
+     *
+     * Data points in the response will be ordered by the interval start time in
+     * descending order.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Filter expression following https://google.aip.dev/160.
+     *
+     * A time range (either physical or civil) can be specified.
+     *
+     * The supported filter fields are:
+     *
+     *
+     * - Interval start time:
+     * - Pattern: `{interval_data_type}.interval.start_time`
+     * - Supported comparison operators: `>=`, `<`
+     * - Timestamp literal expected in RFC-3339 format
+     * - Supported logical operators: `AND`
+     * - Example:
+     * - `steps.interval.start_time >= "2023-11-24T00:00:00Z" AND
+     * steps.interval.start_time < "2023-11-25T00:00:00Z"`
+     * - `distance.interval.start_time >= "2024-08-14T12:34:56Z"`
+     *
+     * - Interval civil start time:
+     * - Pattern: `{interval_data_type}.interval.civil_start_time`
+     * - Supported comparison operators: `>=`, `<`
+     * - Date with optional time literal expected in ISO 8601
+     * `YYYY-MM-DD[THH:mm:ss]` format
+     * - Supported logical operators: `AND`
+     * - Example:
+     * - `steps.interval.civil_start_time >= "2023-11-24" AND
+     * steps.interval.civil_start_time < "2023-11-25"`
+     * - `distance.interval.civil_start_time >= "2024-08-14T12:34:56"`
+     *
+     * - Sample observation physical time:
+     * - Pattern: `{sample_data_type}.sample_time.physical_time`
+     * - Supported comparison operators: `>=`, `<`
+     * - Timestamp literal expected in RFC-3339 format
+     * - Supported logical operators: `AND`
+     * - Example:
+     * - `weight.sample_time.physical_time >= "2023-11-24T00:00:00Z"
+     * AND weight.sample_time.physical_time < "2023-11-25T00:00:00Z"`
+     * - `weight.sample_time.physical_time >=
+     * "2024-08-14T12:34:56Z"`
+     *
+     * - Sample observation civil time:
+     * - Pattern: `{sample_data_type}.sample_time.civil_time`
+     * - Supported comparison operators: `>=`, `<`
+     * - Date with optional time literal expected in ISO 8601
+     * `YYYY-MM-DD[THH:mm:ss]` format
+     * - Supported logical operators: `AND`
+     * - Example:
+     * - `weight.sample_time.civil_time >= "2023-11-24" AND
+     * weight.sample_time.civil_time < "2023-11-25"`
+     * - `weight.sample_time.civil_time >= "2024-08-14T12:34:56"`
+     *
+     * - Daily summary date:
+     * - Pattern: `{daily_summary_data_type}.date`
+     * - Supported comparison operators: `>=`, `<`
+     * - Date literal expected in ISO 8601 `YYYY-MM-DD` format
+     * - Supported logical operators: `AND`
+     * - Example:
+     * - `daily_resting_heart_rate.date >= "2024-08-14"`
+     * - `daily_heart_rate_variability.date < "2024-08-15"`
+     *
+     *
+     * - Session civil start time (**Excluding Sleep**):
+     * - Pattern: `{session_data_type}.interval.civil_start_time`
+     * - Supported comparison operators: `>=`, `<`
+     * - Date with optional time literal expected in ISO 8601
+     * `YYYY-MM-DD[THH:mm:ss]` format
+     * - Supported logical operators: `AND`
+     * - Example:
+     * - `exercise.interval.civil_start_time >= "2023-11-24" AND
+     * exercise.interval.civil_start_time < "2023-11-25"`
+     * - `exercise.interval.civil_start_time >= "2024-08-14T12:34:56"`
+     *
+     * - Session end time (**Sleep specific**):
+     * - Pattern: `sleep.interval.end_time`
+     * - Supported comparison operators: `>=`, `<`
+     * - Timestamp literal expected in RFC-3339 format
+     * - Supported logical operators: `AND`, `OR`
+     * - Example:
+     * - `sleep.interval.end_time >= "2023-11-24T00:00:00Z" AND
+     * sleep.interval.end_time < "2023-11-25T00:00:00Z"`
+     *
+     * - Session civil end time (**Sleep specific**):
+     * - Pattern: `sleep.interval.civil_end_time`
+     * - Supported comparison operators: `>=`, `<`
+     * - Date with optional time literal expected in ISO 8601
+     * `YYYY-MM-DD[THH:mm:ss]` format
+     * - Supported logical operators: `AND`, `OR`
+     * - Example:
+     * - `sleep.interval.civil_end_time >= "2023-11-24" AND
+     * sleep.interval.civil_end_time < "2023-11-25"`
+     *
+     *
+     * Data points in the response will be ordered by the interval start time in
+     * descending order.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Filter expression following https://google.aip.dev/160.
+     *
+     * A time range (either physical or civil) can be specified.
+     *
+     * The supported filter fields are:
+     *
+     *
+     * - Interval start time:
+     * - Pattern: `{interval_data_type}.interval.start_time`
+     * - Supported comparison operators: `>=`, `<`
+     * - Timestamp literal expected in RFC-3339 format
+     * - Supported logical operators: `AND`
+     * - Example:
+     * - `steps.interval.start_time >= "2023-11-24T00:00:00Z" AND
+     * steps.interval.start_time < "2023-11-25T00:00:00Z"`
+     * - `distance.interval.start_time >= "2024-08-14T12:34:56Z"`
+     *
+     * - Interval civil start time:
+     * - Pattern: `{interval_data_type}.interval.civil_start_time`
+     * - Supported comparison operators: `>=`, `<`
+     * - Date with optional time literal expected in ISO 8601
+     * `YYYY-MM-DD[THH:mm:ss]` format
+     * - Supported logical operators: `AND`
+     * - Example:
+     * - `steps.interval.civil_start_time >= "2023-11-24" AND
+     * steps.interval.civil_start_time < "2023-11-25"`
+     * - `distance.interval.civil_start_time >= "2024-08-14T12:34:56"`
+     *
+     * - Sample observation physical time:
+     * - Pattern: `{sample_data_type}.sample_time.physical_time`
+     * - Supported comparison operators: `>=`, `<`
+     * - Timestamp literal expected in RFC-3339 format
+     * - Supported logical operators: `AND`
+     * - Example:
+     * - `weight.sample_time.physical_time >= "2023-11-24T00:00:00Z"
+     * AND weight.sample_time.physical_time < "2023-11-25T00:00:00Z"`
+     * - `weight.sample_time.physical_time >=
+     * "2024-08-14T12:34:56Z"`
+     *
+     * - Sample observation civil time:
+     * - Pattern: `{sample_data_type}.sample_time.civil_time`
+     * - Supported comparison operators: `>=`, `<`
+     * - Date with optional time literal expected in ISO 8601
+     * `YYYY-MM-DD[THH:mm:ss]` format
+     * - Supported logical operators: `AND`
+     * - Example:
+     * - `weight.sample_time.civil_time >= "2023-11-24" AND
+     * weight.sample_time.civil_time < "2023-11-25"`
+     * - `weight.sample_time.civil_time >= "2024-08-14T12:34:56"`
+     *
+     * - Daily summary date:
+     * - Pattern: `{daily_summary_data_type}.date`
+     * - Supported comparison operators: `>=`, `<`
+     * - Date literal expected in ISO 8601 `YYYY-MM-DD` format
+     * - Supported logical operators: `AND`
+     * - Example:
+     * - `daily_resting_heart_rate.date >= "2024-08-14"`
+     * - `daily_heart_rate_variability.date < "2024-08-15"`
+     *
+     *
+     * - Session civil start time (**Excluding Sleep**):
+     * - Pattern: `{session_data_type}.interval.civil_start_time`
+     * - Supported comparison operators: `>=`, `<`
+     * - Date with optional time literal expected in ISO 8601
+     * `YYYY-MM-DD[THH:mm:ss]` format
+     * - Supported logical operators: `AND`
+     * - Example:
+     * - `exercise.interval.civil_start_time >= "2023-11-24" AND
+     * exercise.interval.civil_start_time < "2023-11-25"`
+     * - `exercise.interval.civil_start_time >= "2024-08-14T12:34:56"`
+     *
+     * - Session end time (**Sleep specific**):
+     * - Pattern: `sleep.interval.end_time`
+     * - Supported comparison operators: `>=`, `<`
+     * - Timestamp literal expected in RFC-3339 format
+     * - Supported logical operators: `AND`, `OR`
+     * - Example:
+     * - `sleep.interval.end_time >= "2023-11-24T00:00:00Z" AND
+     * sleep.interval.end_time < "2023-11-25T00:00:00Z"`
+     *
+     * - Session civil end time (**Sleep specific**):
+     * - Pattern: `sleep.interval.civil_end_time`
+     * - Supported comparison operators: `>=`, `<`
+     * - Date with optional time literal expected in ISO 8601
+     * `YYYY-MM-DD[THH:mm:ss]` format
+     * - Supported logical operators: `AND`, `OR`
+     * - Example:
+     * - `sleep.interval.civil_end_time >= "2023-11-24" AND
+     * sleep.interval.civil_end_time < "2023-11-25"`
+     *
+     *
+     * Data points in the response will be ordered by the interval start time in
+     * descending order.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Filter expression following https://google.aip.dev/160.
+     *
+     * A time range (either physical or civil) can be specified.
+     *
+     * The supported filter fields are:
+     *
+     *
+     * - Interval start time:
+     * - Pattern: `{interval_data_type}.interval.start_time`
+     * - Supported comparison operators: `>=`, `<`
+     * - Timestamp literal expected in RFC-3339 format
+     * - Supported logical operators: `AND`
+     * - Example:
+     * - `steps.interval.start_time >= "2023-11-24T00:00:00Z" AND
+     * steps.interval.start_time < "2023-11-25T00:00:00Z"`
+     * - `distance.interval.start_time >= "2024-08-14T12:34:56Z"`
+     *
+     * - Interval civil start time:
+     * - Pattern: `{interval_data_type}.interval.civil_start_time`
+     * - Supported comparison operators: `>=`, `<`
+     * - Date with optional time literal expected in ISO 8601
+     * `YYYY-MM-DD[THH:mm:ss]` format
+     * - Supported logical operators: `AND`
+     * - Example:
+     * - `steps.interval.civil_start_time >= "2023-11-24" AND
+     * steps.interval.civil_start_time < "2023-11-25"`
+     * - `distance.interval.civil_start_time >= "2024-08-14T12:34:56"`
+     *
+     * - Sample observation physical time:
+     * - Pattern: `{sample_data_type}.sample_time.physical_time`
+     * - Supported comparison operators: `>=`, `<`
+     * - Timestamp literal expected in RFC-3339 format
+     * - Supported logical operators: `AND`
+     * - Example:
+     * - `weight.sample_time.physical_time >= "2023-11-24T00:00:00Z"
+     * AND weight.sample_time.physical_time < "2023-11-25T00:00:00Z"`
+     * - `weight.sample_time.physical_time >=
+     * "2024-08-14T12:34:56Z"`
+     *
+     * - Sample observation civil time:
+     * - Pattern: `{sample_data_type}.sample_time.civil_time`
+     * - Supported comparison operators: `>=`, `<`
+     * - Date with optional time literal expected in ISO 8601
+     * `YYYY-MM-DD[THH:mm:ss]` format
+     * - Supported logical operators: `AND`
+     * - Example:
+     * - `weight.sample_time.civil_time >= "2023-11-24" AND
+     * weight.sample_time.civil_time < "2023-11-25"`
+     * - `weight.sample_time.civil_time >= "2024-08-14T12:34:56"`
+     *
+     * - Daily summary date:
+     * - Pattern: `{daily_summary_data_type}.date`
+     * - Supported comparison operators: `>=`, `<`
+     * - Date literal expected in ISO 8601 `YYYY-MM-DD` format
+     * - Supported logical operators: `AND`
+     * - Example:
+     * - `daily_resting_heart_rate.date >= "2024-08-14"`
+     * - `daily_heart_rate_variability.date < "2024-08-15"`
+     *
+     *
+     * - Session civil start time (**Excluding Sleep**):
+     * - Pattern: `{session_data_type}.interval.civil_start_time`
+     * - Supported comparison operators: `>=`, `<`
+     * - Date with optional time literal expected in ISO 8601
+     * `YYYY-MM-DD[THH:mm:ss]` format
+     * - Supported logical operators: `AND`
+     * - Example:
+     * - `exercise.interval.civil_start_time >= "2023-11-24" AND
+     * exercise.interval.civil_start_time < "2023-11-25"`
+     * - `exercise.interval.civil_start_time >= "2024-08-14T12:34:56"`
+     *
+     * - Session end time (**Sleep specific**):
+     * - Pattern: `sleep.interval.end_time`
+     * - Supported comparison operators: `>=`, `<`
+     * - Timestamp literal expected in RFC-3339 format
+     * - Supported logical operators: `AND`, `OR`
+     * - Example:
+     * - `sleep.interval.end_time >= "2023-11-24T00:00:00Z" AND
+     * sleep.interval.end_time < "2023-11-25T00:00:00Z"`
+     *
+     * - Session civil end time (**Sleep specific**):
+     * - Pattern: `sleep.interval.civil_end_time`
+     * - Supported comparison operators: `>=`, `<`
+     * - Date with optional time literal expected in ISO 8601
+     * `YYYY-MM-DD[THH:mm:ss]` format
+     * - Supported logical operators: `AND`, `OR`
+     * - Example:
+     * - `sleep.interval.civil_end_time >= "2023-11-24" AND
+     * sleep.interval.civil_end_time < "2023-11-25"`
+     *
+     *
+     * Data points in the response will be ordered by the interval start time in
+     * descending order.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Filter expression following https://google.aip.dev/160.
+     *
+     * A time range (either physical or civil) can be specified.
+     *
+     * The supported filter fields are:
+     *
+     *
+     * - Interval start time:
+     * - Pattern: `{interval_data_type}.interval.start_time`
+     * - Supported comparison operators: `>=`, `<`
+     * - Timestamp literal expected in RFC-3339 format
+     * - Supported logical operators: `AND`
+     * - Example:
+     * - `steps.interval.start_time >= "2023-11-24T00:00:00Z" AND
+     * steps.interval.start_time < "2023-11-25T00:00:00Z"`
+     * - `distance.interval.start_time >= "2024-08-14T12:34:56Z"`
+     *
+     * - Interval civil start time:
+     * - Pattern: `{interval_data_type}.interval.civil_start_time`
+     * - Supported comparison operators: `>=`, `<`
+     * - Date with optional time literal expected in ISO 8601
+     * `YYYY-MM-DD[THH:mm:ss]` format
+     * - Supported logical operators: `AND`
+     * - Example:
+     * - `steps.interval.civil_start_time >= "2023-11-24" AND
+     * steps.interval.civil_start_time < "2023-11-25"`
+     * - `distance.interval.civil_start_time >= "2024-08-14T12:34:56"`
+     *
+     * - Sample observation physical time:
+     * - Pattern: `{sample_data_type}.sample_time.physical_time`
+     * - Supported comparison operators: `>=`, `<`
+     * - Timestamp literal expected in RFC-3339 format
+     * - Supported logical operators: `AND`
+     * - Example:
+     * - `weight.sample_time.physical_time >= "2023-11-24T00:00:00Z"
+     * AND weight.sample_time.physical_time < "2023-11-25T00:00:00Z"`
+     * - `weight.sample_time.physical_time >=
+     * "2024-08-14T12:34:56Z"`
+     *
+     * - Sample observation civil time:
+     * - Pattern: `{sample_data_type}.sample_time.civil_time`
+     * - Supported comparison operators: `>=`, `<`
+     * - Date with optional time literal expected in ISO 8601
+     * `YYYY-MM-DD[THH:mm:ss]` format
+     * - Supported logical operators: `AND`
+     * - Example:
+     * - `weight.sample_time.civil_time >= "2023-11-24" AND
+     * weight.sample_time.civil_time < "2023-11-25"`
+     * - `weight.sample_time.civil_time >= "2024-08-14T12:34:56"`
+     *
+     * - Daily summary date:
+     * - Pattern: `{daily_summary_data_type}.date`
+     * - Supported comparison operators: `>=`, `<`
+     * - Date literal expected in ISO 8601 `YYYY-MM-DD` format
+     * - Supported logical operators: `AND`
+     * - Example:
+     * - `daily_resting_heart_rate.date >= "2024-08-14"`
+     * - `daily_heart_rate_variability.date < "2024-08-15"`
+     *
+     *
+     * - Session civil start time (**Excluding Sleep**):
+     * - Pattern: `{session_data_type}.interval.civil_start_time`
+     * - Supported comparison operators: `>=`, `<`
+     * - Date with optional time literal expected in ISO 8601
+     * `YYYY-MM-DD[THH:mm:ss]` format
+     * - Supported logical operators: `AND`
+     * - Example:
+     * - `exercise.interval.civil_start_time >= "2023-11-24" AND
+     * exercise.interval.civil_start_time < "2023-11-25"`
+     * - `exercise.interval.civil_start_time >= "2024-08-14T12:34:56"`
+     *
+     * - Session end time (**Sleep specific**):
+     * - Pattern: `sleep.interval.end_time`
+     * - Supported comparison operators: `>=`, `<`
+     * - Timestamp literal expected in RFC-3339 format
+     * - Supported logical operators: `AND`, `OR`
+     * - Example:
+     * - `sleep.interval.end_time >= "2023-11-24T00:00:00Z" AND
+     * sleep.interval.end_time < "2023-11-25T00:00:00Z"`
+     *
+     * - Session civil end time (**Sleep specific**):
+     * - Pattern: `sleep.interval.civil_end_time`
+     * - Supported comparison operators: `>=`, `<`
+     * - Date with optional time literal expected in ISO 8601
+     * `YYYY-MM-DD[THH:mm:ss]` format
+     * - Supported logical operators: `AND`, `OR`
+     * - Example:
+     * - `sleep.interval.civil_end_time >= "2023-11-24" AND
+     * sleep.interval.civil_end_time < "2023-11-25"`
+     *
+     *
+     * Data points in the response will be ordered by the interval start time in
+     * descending order.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.ListDataPointsRequest) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.ListDataPointsRequest) + private static final com.google.devicesandservices.health.v4.ListDataPointsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.ListDataPointsRequest(); + } + + public static com.google.devicesandservices.health.v4.ListDataPointsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListDataPointsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.ListDataPointsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ListDataPointsRequestOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ListDataPointsRequestOrBuilder.java new file mode 100644 index 000000000000..c20c2debd147 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ListDataPointsRequestOrBuilder.java @@ -0,0 +1,330 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_points.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface ListDataPointsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.ListDataPointsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Parent data type of the Data Point collection.
+   *
+   * Format: `users/me/dataTypes/{data_type}`, e.g.:
+   *
+   * - `users/me/dataTypes/steps`
+   * - `users/me/dataTypes/weight`
+   *
+   * For a list of the supported data types see the [DataPoint
+   * data][google.devicesandservices.health.v4.DataPoint] union
+   * field.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. Parent data type of the Data Point collection.
+   *
+   * Format: `users/me/dataTypes/{data_type}`, e.g.:
+   *
+   * - `users/me/dataTypes/steps`
+   * - `users/me/dataTypes/weight`
+   *
+   * For a list of the supported data types see the [DataPoint
+   * data][google.devicesandservices.health.v4.DataPoint] union
+   * field.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. The maximum number of data points to return.
+   * If unspecified, at most 1440 data points will be returned.
+   * The maximum page size is 10000; values above that will be truncated
+   * accordingly.
+   * For `exercise` and `sleep` the default page size is 25.
+   * The maximum page size for `exercise` and `sleep` is 25.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. The `next_page_token` from a previous request, if any.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. The `next_page_token` from a previous request, if any.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. Filter expression following https://google.aip.dev/160.
+   *
+   * A time range (either physical or civil) can be specified.
+   *
+   * The supported filter fields are:
+   *
+   *
+   * - Interval start time:
+   * - Pattern: `{interval_data_type}.interval.start_time`
+   * - Supported comparison operators: `>=`, `<`
+   * - Timestamp literal expected in RFC-3339 format
+   * - Supported logical operators: `AND`
+   * - Example:
+   * - `steps.interval.start_time >= "2023-11-24T00:00:00Z" AND
+   * steps.interval.start_time < "2023-11-25T00:00:00Z"`
+   * - `distance.interval.start_time >= "2024-08-14T12:34:56Z"`
+   *
+   * - Interval civil start time:
+   * - Pattern: `{interval_data_type}.interval.civil_start_time`
+   * - Supported comparison operators: `>=`, `<`
+   * - Date with optional time literal expected in ISO 8601
+   * `YYYY-MM-DD[THH:mm:ss]` format
+   * - Supported logical operators: `AND`
+   * - Example:
+   * - `steps.interval.civil_start_time >= "2023-11-24" AND
+   * steps.interval.civil_start_time < "2023-11-25"`
+   * - `distance.interval.civil_start_time >= "2024-08-14T12:34:56"`
+   *
+   * - Sample observation physical time:
+   * - Pattern: `{sample_data_type}.sample_time.physical_time`
+   * - Supported comparison operators: `>=`, `<`
+   * - Timestamp literal expected in RFC-3339 format
+   * - Supported logical operators: `AND`
+   * - Example:
+   * - `weight.sample_time.physical_time >= "2023-11-24T00:00:00Z"
+   * AND weight.sample_time.physical_time < "2023-11-25T00:00:00Z"`
+   * - `weight.sample_time.physical_time >=
+   * "2024-08-14T12:34:56Z"`
+   *
+   * - Sample observation civil time:
+   * - Pattern: `{sample_data_type}.sample_time.civil_time`
+   * - Supported comparison operators: `>=`, `<`
+   * - Date with optional time literal expected in ISO 8601
+   * `YYYY-MM-DD[THH:mm:ss]` format
+   * - Supported logical operators: `AND`
+   * - Example:
+   * - `weight.sample_time.civil_time >= "2023-11-24" AND
+   * weight.sample_time.civil_time < "2023-11-25"`
+   * - `weight.sample_time.civil_time >= "2024-08-14T12:34:56"`
+   *
+   * - Daily summary date:
+   * - Pattern: `{daily_summary_data_type}.date`
+   * - Supported comparison operators: `>=`, `<`
+   * - Date literal expected in ISO 8601 `YYYY-MM-DD` format
+   * - Supported logical operators: `AND`
+   * - Example:
+   * - `daily_resting_heart_rate.date >= "2024-08-14"`
+   * - `daily_heart_rate_variability.date < "2024-08-15"`
+   *
+   *
+   * - Session civil start time (**Excluding Sleep**):
+   * - Pattern: `{session_data_type}.interval.civil_start_time`
+   * - Supported comparison operators: `>=`, `<`
+   * - Date with optional time literal expected in ISO 8601
+   * `YYYY-MM-DD[THH:mm:ss]` format
+   * - Supported logical operators: `AND`
+   * - Example:
+   * - `exercise.interval.civil_start_time >= "2023-11-24" AND
+   * exercise.interval.civil_start_time < "2023-11-25"`
+   * - `exercise.interval.civil_start_time >= "2024-08-14T12:34:56"`
+   *
+   * - Session end time (**Sleep specific**):
+   * - Pattern: `sleep.interval.end_time`
+   * - Supported comparison operators: `>=`, `<`
+   * - Timestamp literal expected in RFC-3339 format
+   * - Supported logical operators: `AND`, `OR`
+   * - Example:
+   * - `sleep.interval.end_time >= "2023-11-24T00:00:00Z" AND
+   * sleep.interval.end_time < "2023-11-25T00:00:00Z"`
+   *
+   * - Session civil end time (**Sleep specific**):
+   * - Pattern: `sleep.interval.civil_end_time`
+   * - Supported comparison operators: `>=`, `<`
+   * - Date with optional time literal expected in ISO 8601
+   * `YYYY-MM-DD[THH:mm:ss]` format
+   * - Supported logical operators: `AND`, `OR`
+   * - Example:
+   * - `sleep.interval.civil_end_time >= "2023-11-24" AND
+   * sleep.interval.civil_end_time < "2023-11-25"`
+   *
+   *
+   * Data points in the response will be ordered by the interval start time in
+   * descending order.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + + /** + * + * + *
+   * Optional. Filter expression following https://google.aip.dev/160.
+   *
+   * A time range (either physical or civil) can be specified.
+   *
+   * The supported filter fields are:
+   *
+   *
+   * - Interval start time:
+   * - Pattern: `{interval_data_type}.interval.start_time`
+   * - Supported comparison operators: `>=`, `<`
+   * - Timestamp literal expected in RFC-3339 format
+   * - Supported logical operators: `AND`
+   * - Example:
+   * - `steps.interval.start_time >= "2023-11-24T00:00:00Z" AND
+   * steps.interval.start_time < "2023-11-25T00:00:00Z"`
+   * - `distance.interval.start_time >= "2024-08-14T12:34:56Z"`
+   *
+   * - Interval civil start time:
+   * - Pattern: `{interval_data_type}.interval.civil_start_time`
+   * - Supported comparison operators: `>=`, `<`
+   * - Date with optional time literal expected in ISO 8601
+   * `YYYY-MM-DD[THH:mm:ss]` format
+   * - Supported logical operators: `AND`
+   * - Example:
+   * - `steps.interval.civil_start_time >= "2023-11-24" AND
+   * steps.interval.civil_start_time < "2023-11-25"`
+   * - `distance.interval.civil_start_time >= "2024-08-14T12:34:56"`
+   *
+   * - Sample observation physical time:
+   * - Pattern: `{sample_data_type}.sample_time.physical_time`
+   * - Supported comparison operators: `>=`, `<`
+   * - Timestamp literal expected in RFC-3339 format
+   * - Supported logical operators: `AND`
+   * - Example:
+   * - `weight.sample_time.physical_time >= "2023-11-24T00:00:00Z"
+   * AND weight.sample_time.physical_time < "2023-11-25T00:00:00Z"`
+   * - `weight.sample_time.physical_time >=
+   * "2024-08-14T12:34:56Z"`
+   *
+   * - Sample observation civil time:
+   * - Pattern: `{sample_data_type}.sample_time.civil_time`
+   * - Supported comparison operators: `>=`, `<`
+   * - Date with optional time literal expected in ISO 8601
+   * `YYYY-MM-DD[THH:mm:ss]` format
+   * - Supported logical operators: `AND`
+   * - Example:
+   * - `weight.sample_time.civil_time >= "2023-11-24" AND
+   * weight.sample_time.civil_time < "2023-11-25"`
+   * - `weight.sample_time.civil_time >= "2024-08-14T12:34:56"`
+   *
+   * - Daily summary date:
+   * - Pattern: `{daily_summary_data_type}.date`
+   * - Supported comparison operators: `>=`, `<`
+   * - Date literal expected in ISO 8601 `YYYY-MM-DD` format
+   * - Supported logical operators: `AND`
+   * - Example:
+   * - `daily_resting_heart_rate.date >= "2024-08-14"`
+   * - `daily_heart_rate_variability.date < "2024-08-15"`
+   *
+   *
+   * - Session civil start time (**Excluding Sleep**):
+   * - Pattern: `{session_data_type}.interval.civil_start_time`
+   * - Supported comparison operators: `>=`, `<`
+   * - Date with optional time literal expected in ISO 8601
+   * `YYYY-MM-DD[THH:mm:ss]` format
+   * - Supported logical operators: `AND`
+   * - Example:
+   * - `exercise.interval.civil_start_time >= "2023-11-24" AND
+   * exercise.interval.civil_start_time < "2023-11-25"`
+   * - `exercise.interval.civil_start_time >= "2024-08-14T12:34:56"`
+   *
+   * - Session end time (**Sleep specific**):
+   * - Pattern: `sleep.interval.end_time`
+   * - Supported comparison operators: `>=`, `<`
+   * - Timestamp literal expected in RFC-3339 format
+   * - Supported logical operators: `AND`, `OR`
+   * - Example:
+   * - `sleep.interval.end_time >= "2023-11-24T00:00:00Z" AND
+   * sleep.interval.end_time < "2023-11-25T00:00:00Z"`
+   *
+   * - Session civil end time (**Sleep specific**):
+   * - Pattern: `sleep.interval.civil_end_time`
+   * - Supported comparison operators: `>=`, `<`
+   * - Date with optional time literal expected in ISO 8601
+   * `YYYY-MM-DD[THH:mm:ss]` format
+   * - Supported logical operators: `AND`, `OR`
+   * - Example:
+   * - `sleep.interval.civil_end_time >= "2023-11-24" AND
+   * sleep.interval.civil_end_time < "2023-11-25"`
+   *
+   *
+   * Data points in the response will be ordered by the interval start time in
+   * descending order.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ListDataPointsResponse.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ListDataPointsResponse.java new file mode 100644 index 000000000000..3ad3b2d7c599 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ListDataPointsResponse.java @@ -0,0 +1,1128 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_points.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * Response containing raw data points matching the query
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.ListDataPointsResponse} + */ +@com.google.protobuf.Generated +public final class ListDataPointsResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.ListDataPointsResponse) + ListDataPointsResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListDataPointsResponse"); + } + + // Use ListDataPointsResponse.newBuilder() to construct. + private ListDataPointsResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListDataPointsResponse() { + dataPoints_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_ListDataPointsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_ListDataPointsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.ListDataPointsResponse.class, + com.google.devicesandservices.health.v4.ListDataPointsResponse.Builder.class); + } + + public static final int DATA_POINTS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List dataPoints_; + + /** + * + * + *
+   * Data points matching the query
+   * 
+ * + * repeated .google.devicesandservices.health.v4.DataPoint data_points = 1; + */ + @java.lang.Override + public java.util.List getDataPointsList() { + return dataPoints_; + } + + /** + * + * + *
+   * Data points matching the query
+   * 
+ * + * repeated .google.devicesandservices.health.v4.DataPoint data_points = 1; + */ + @java.lang.Override + public java.util.List + getDataPointsOrBuilderList() { + return dataPoints_; + } + + /** + * + * + *
+   * Data points matching the query
+   * 
+ * + * repeated .google.devicesandservices.health.v4.DataPoint data_points = 1; + */ + @java.lang.Override + public int getDataPointsCount() { + return dataPoints_.size(); + } + + /** + * + * + *
+   * Data points matching the query
+   * 
+ * + * repeated .google.devicesandservices.health.v4.DataPoint data_points = 1; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DataPoint getDataPoints(int index) { + return dataPoints_.get(index); + } + + /** + * + * + *
+   * Data points matching the query
+   * 
+ * + * repeated .google.devicesandservices.health.v4.DataPoint data_points = 1; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DataPointOrBuilder getDataPointsOrBuilder( + int index) { + return dataPoints_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * Next page token, empty if the response is complete
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * Next page token, empty if the response is complete
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < dataPoints_.size(); i++) { + output.writeMessage(1, dataPoints_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < dataPoints_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, dataPoints_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.ListDataPointsResponse)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.ListDataPointsResponse other = + (com.google.devicesandservices.health.v4.ListDataPointsResponse) obj; + + if (!getDataPointsList().equals(other.getDataPointsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getDataPointsCount() > 0) { + hash = (37 * hash) + DATA_POINTS_FIELD_NUMBER; + hash = (53 * hash) + getDataPointsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.ListDataPointsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.ListDataPointsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ListDataPointsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.ListDataPointsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ListDataPointsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.ListDataPointsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ListDataPointsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.ListDataPointsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ListDataPointsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.ListDataPointsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ListDataPointsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.ListDataPointsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.ListDataPointsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Response containing raw data points matching the query
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.ListDataPointsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.ListDataPointsResponse) + com.google.devicesandservices.health.v4.ListDataPointsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_ListDataPointsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_ListDataPointsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.ListDataPointsResponse.class, + com.google.devicesandservices.health.v4.ListDataPointsResponse.Builder.class); + } + + // Construct using com.google.devicesandservices.health.v4.ListDataPointsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (dataPointsBuilder_ == null) { + dataPoints_ = java.util.Collections.emptyList(); + } else { + dataPoints_ = null; + dataPointsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_ListDataPointsResponse_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.ListDataPointsResponse + getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.ListDataPointsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.ListDataPointsResponse build() { + com.google.devicesandservices.health.v4.ListDataPointsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.ListDataPointsResponse buildPartial() { + com.google.devicesandservices.health.v4.ListDataPointsResponse result = + new com.google.devicesandservices.health.v4.ListDataPointsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.devicesandservices.health.v4.ListDataPointsResponse result) { + if (dataPointsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + dataPoints_ = java.util.Collections.unmodifiableList(dataPoints_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.dataPoints_ = dataPoints_; + } else { + result.dataPoints_ = dataPointsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.devicesandservices.health.v4.ListDataPointsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.ListDataPointsResponse) { + return mergeFrom((com.google.devicesandservices.health.v4.ListDataPointsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.devicesandservices.health.v4.ListDataPointsResponse other) { + if (other + == com.google.devicesandservices.health.v4.ListDataPointsResponse.getDefaultInstance()) + return this; + if (dataPointsBuilder_ == null) { + if (!other.dataPoints_.isEmpty()) { + if (dataPoints_.isEmpty()) { + dataPoints_ = other.dataPoints_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDataPointsIsMutable(); + dataPoints_.addAll(other.dataPoints_); + } + onChanged(); + } + } else { + if (!other.dataPoints_.isEmpty()) { + if (dataPointsBuilder_.isEmpty()) { + dataPointsBuilder_.dispose(); + dataPointsBuilder_ = null; + dataPoints_ = other.dataPoints_; + bitField0_ = (bitField0_ & ~0x00000001); + dataPointsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetDataPointsFieldBuilder() + : null; + } else { + dataPointsBuilder_.addAllMessages(other.dataPoints_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.devicesandservices.health.v4.DataPoint m = + input.readMessage( + com.google.devicesandservices.health.v4.DataPoint.parser(), + extensionRegistry); + if (dataPointsBuilder_ == null) { + ensureDataPointsIsMutable(); + dataPoints_.add(m); + } else { + dataPointsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List dataPoints_ = + java.util.Collections.emptyList(); + + private void ensureDataPointsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + dataPoints_ = + new java.util.ArrayList(dataPoints_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.devicesandservices.health.v4.DataPoint, + com.google.devicesandservices.health.v4.DataPoint.Builder, + com.google.devicesandservices.health.v4.DataPointOrBuilder> + dataPointsBuilder_; + + /** + * + * + *
+     * Data points matching the query
+     * 
+ * + * repeated .google.devicesandservices.health.v4.DataPoint data_points = 1; + */ + public java.util.List getDataPointsList() { + if (dataPointsBuilder_ == null) { + return java.util.Collections.unmodifiableList(dataPoints_); + } else { + return dataPointsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Data points matching the query
+     * 
+ * + * repeated .google.devicesandservices.health.v4.DataPoint data_points = 1; + */ + public int getDataPointsCount() { + if (dataPointsBuilder_ == null) { + return dataPoints_.size(); + } else { + return dataPointsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Data points matching the query
+     * 
+ * + * repeated .google.devicesandservices.health.v4.DataPoint data_points = 1; + */ + public com.google.devicesandservices.health.v4.DataPoint getDataPoints(int index) { + if (dataPointsBuilder_ == null) { + return dataPoints_.get(index); + } else { + return dataPointsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Data points matching the query
+     * 
+ * + * repeated .google.devicesandservices.health.v4.DataPoint data_points = 1; + */ + public Builder setDataPoints( + int index, com.google.devicesandservices.health.v4.DataPoint value) { + if (dataPointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataPointsIsMutable(); + dataPoints_.set(index, value); + onChanged(); + } else { + dataPointsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Data points matching the query
+     * 
+ * + * repeated .google.devicesandservices.health.v4.DataPoint data_points = 1; + */ + public Builder setDataPoints( + int index, com.google.devicesandservices.health.v4.DataPoint.Builder builderForValue) { + if (dataPointsBuilder_ == null) { + ensureDataPointsIsMutable(); + dataPoints_.set(index, builderForValue.build()); + onChanged(); + } else { + dataPointsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Data points matching the query
+     * 
+ * + * repeated .google.devicesandservices.health.v4.DataPoint data_points = 1; + */ + public Builder addDataPoints(com.google.devicesandservices.health.v4.DataPoint value) { + if (dataPointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataPointsIsMutable(); + dataPoints_.add(value); + onChanged(); + } else { + dataPointsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Data points matching the query
+     * 
+ * + * repeated .google.devicesandservices.health.v4.DataPoint data_points = 1; + */ + public Builder addDataPoints( + int index, com.google.devicesandservices.health.v4.DataPoint value) { + if (dataPointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataPointsIsMutable(); + dataPoints_.add(index, value); + onChanged(); + } else { + dataPointsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Data points matching the query
+     * 
+ * + * repeated .google.devicesandservices.health.v4.DataPoint data_points = 1; + */ + public Builder addDataPoints( + com.google.devicesandservices.health.v4.DataPoint.Builder builderForValue) { + if (dataPointsBuilder_ == null) { + ensureDataPointsIsMutable(); + dataPoints_.add(builderForValue.build()); + onChanged(); + } else { + dataPointsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Data points matching the query
+     * 
+ * + * repeated .google.devicesandservices.health.v4.DataPoint data_points = 1; + */ + public Builder addDataPoints( + int index, com.google.devicesandservices.health.v4.DataPoint.Builder builderForValue) { + if (dataPointsBuilder_ == null) { + ensureDataPointsIsMutable(); + dataPoints_.add(index, builderForValue.build()); + onChanged(); + } else { + dataPointsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Data points matching the query
+     * 
+ * + * repeated .google.devicesandservices.health.v4.DataPoint data_points = 1; + */ + public Builder addAllDataPoints( + java.lang.Iterable values) { + if (dataPointsBuilder_ == null) { + ensureDataPointsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, dataPoints_); + onChanged(); + } else { + dataPointsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Data points matching the query
+     * 
+ * + * repeated .google.devicesandservices.health.v4.DataPoint data_points = 1; + */ + public Builder clearDataPoints() { + if (dataPointsBuilder_ == null) { + dataPoints_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + dataPointsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Data points matching the query
+     * 
+ * + * repeated .google.devicesandservices.health.v4.DataPoint data_points = 1; + */ + public Builder removeDataPoints(int index) { + if (dataPointsBuilder_ == null) { + ensureDataPointsIsMutable(); + dataPoints_.remove(index); + onChanged(); + } else { + dataPointsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Data points matching the query
+     * 
+ * + * repeated .google.devicesandservices.health.v4.DataPoint data_points = 1; + */ + public com.google.devicesandservices.health.v4.DataPoint.Builder getDataPointsBuilder( + int index) { + return internalGetDataPointsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Data points matching the query
+     * 
+ * + * repeated .google.devicesandservices.health.v4.DataPoint data_points = 1; + */ + public com.google.devicesandservices.health.v4.DataPointOrBuilder getDataPointsOrBuilder( + int index) { + if (dataPointsBuilder_ == null) { + return dataPoints_.get(index); + } else { + return dataPointsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Data points matching the query
+     * 
+ * + * repeated .google.devicesandservices.health.v4.DataPoint data_points = 1; + */ + public java.util.List + getDataPointsOrBuilderList() { + if (dataPointsBuilder_ != null) { + return dataPointsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(dataPoints_); + } + } + + /** + * + * + *
+     * Data points matching the query
+     * 
+ * + * repeated .google.devicesandservices.health.v4.DataPoint data_points = 1; + */ + public com.google.devicesandservices.health.v4.DataPoint.Builder addDataPointsBuilder() { + return internalGetDataPointsFieldBuilder() + .addBuilder(com.google.devicesandservices.health.v4.DataPoint.getDefaultInstance()); + } + + /** + * + * + *
+     * Data points matching the query
+     * 
+ * + * repeated .google.devicesandservices.health.v4.DataPoint data_points = 1; + */ + public com.google.devicesandservices.health.v4.DataPoint.Builder addDataPointsBuilder( + int index) { + return internalGetDataPointsFieldBuilder() + .addBuilder( + index, com.google.devicesandservices.health.v4.DataPoint.getDefaultInstance()); + } + + /** + * + * + *
+     * Data points matching the query
+     * 
+ * + * repeated .google.devicesandservices.health.v4.DataPoint data_points = 1; + */ + public java.util.List + getDataPointsBuilderList() { + return internalGetDataPointsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.devicesandservices.health.v4.DataPoint, + com.google.devicesandservices.health.v4.DataPoint.Builder, + com.google.devicesandservices.health.v4.DataPointOrBuilder> + internalGetDataPointsFieldBuilder() { + if (dataPointsBuilder_ == null) { + dataPointsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.devicesandservices.health.v4.DataPoint, + com.google.devicesandservices.health.v4.DataPoint.Builder, + com.google.devicesandservices.health.v4.DataPointOrBuilder>( + dataPoints_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + dataPoints_ = null; + } + return dataPointsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * Next page token, empty if the response is complete
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Next page token, empty if the response is complete
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Next page token, empty if the response is complete
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Next page token, empty if the response is complete
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Next page token, empty if the response is complete
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.ListDataPointsResponse) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.ListDataPointsResponse) + private static final com.google.devicesandservices.health.v4.ListDataPointsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.ListDataPointsResponse(); + } + + public static com.google.devicesandservices.health.v4.ListDataPointsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListDataPointsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.ListDataPointsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ListDataPointsResponseOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ListDataPointsResponseOrBuilder.java new file mode 100644 index 000000000000..0a5dc5f0b46f --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ListDataPointsResponseOrBuilder.java @@ -0,0 +1,110 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_points.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface ListDataPointsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.ListDataPointsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Data points matching the query
+   * 
+ * + * repeated .google.devicesandservices.health.v4.DataPoint data_points = 1; + */ + java.util.List getDataPointsList(); + + /** + * + * + *
+   * Data points matching the query
+   * 
+ * + * repeated .google.devicesandservices.health.v4.DataPoint data_points = 1; + */ + com.google.devicesandservices.health.v4.DataPoint getDataPoints(int index); + + /** + * + * + *
+   * Data points matching the query
+   * 
+ * + * repeated .google.devicesandservices.health.v4.DataPoint data_points = 1; + */ + int getDataPointsCount(); + + /** + * + * + *
+   * Data points matching the query
+   * 
+ * + * repeated .google.devicesandservices.health.v4.DataPoint data_points = 1; + */ + java.util.List + getDataPointsOrBuilderList(); + + /** + * + * + *
+   * Data points matching the query
+   * 
+ * + * repeated .google.devicesandservices.health.v4.DataPoint data_points = 1; + */ + com.google.devicesandservices.health.v4.DataPointOrBuilder getDataPointsOrBuilder(int index); + + /** + * + * + *
+   * Next page token, empty if the response is complete
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * Next page token, empty if the response is complete
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/MetricsSummary.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/MetricsSummary.java new file mode 100644 index 000000000000..7e4faf9e9d48 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/MetricsSummary.java @@ -0,0 +1,5844 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * Summary metrics for an exercise.
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.MetricsSummary} + */ +@com.google.protobuf.Generated +public final class MetricsSummary extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.MetricsSummary) + MetricsSummaryOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "MetricsSummary"); + } + + // Use MetricsSummary.newBuilder() to construct. + private MetricsSummary(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private MetricsSummary() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_MetricsSummary_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_MetricsSummary_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.MetricsSummary.class, + com.google.devicesandservices.health.v4.MetricsSummary.Builder.class); + } + + public interface TimeInHeartRateZonesOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZones) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Optional. Time spent in light heart rate zone.
+     * 
+ * + * .google.protobuf.Duration light_time = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the lightTime field is set. + */ + boolean hasLightTime(); + + /** + * + * + *
+     * Optional. Time spent in light heart rate zone.
+     * 
+ * + * .google.protobuf.Duration light_time = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The lightTime. + */ + com.google.protobuf.Duration getLightTime(); + + /** + * + * + *
+     * Optional. Time spent in light heart rate zone.
+     * 
+ * + * .google.protobuf.Duration light_time = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.DurationOrBuilder getLightTimeOrBuilder(); + + /** + * + * + *
+     * Optional. Time spent in moderate heart rate zone.
+     * 
+ * + * .google.protobuf.Duration moderate_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the moderateTime field is set. + */ + boolean hasModerateTime(); + + /** + * + * + *
+     * Optional. Time spent in moderate heart rate zone.
+     * 
+ * + * .google.protobuf.Duration moderate_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The moderateTime. + */ + com.google.protobuf.Duration getModerateTime(); + + /** + * + * + *
+     * Optional. Time spent in moderate heart rate zone.
+     * 
+ * + * .google.protobuf.Duration moderate_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.DurationOrBuilder getModerateTimeOrBuilder(); + + /** + * + * + *
+     * Optional. Time spent in vigorous heart rate zone.
+     * 
+ * + * .google.protobuf.Duration vigorous_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the vigorousTime field is set. + */ + boolean hasVigorousTime(); + + /** + * + * + *
+     * Optional. Time spent in vigorous heart rate zone.
+     * 
+ * + * .google.protobuf.Duration vigorous_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The vigorousTime. + */ + com.google.protobuf.Duration getVigorousTime(); + + /** + * + * + *
+     * Optional. Time spent in vigorous heart rate zone.
+     * 
+ * + * .google.protobuf.Duration vigorous_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.DurationOrBuilder getVigorousTimeOrBuilder(); + + /** + * + * + *
+     * Optional. Time spent in peak heart rate zone.
+     * 
+ * + * .google.protobuf.Duration peak_time = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the peakTime field is set. + */ + boolean hasPeakTime(); + + /** + * + * + *
+     * Optional. Time spent in peak heart rate zone.
+     * 
+ * + * .google.protobuf.Duration peak_time = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The peakTime. + */ + com.google.protobuf.Duration getPeakTime(); + + /** + * + * + *
+     * Optional. Time spent in peak heart rate zone.
+     * 
+ * + * .google.protobuf.Duration peak_time = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.DurationOrBuilder getPeakTimeOrBuilder(); + } + + /** + * + * + *
+   * Time spent in each heart rate zone.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZones} + */ + public static final class TimeInHeartRateZones extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZones) + TimeInHeartRateZonesOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "TimeInHeartRateZones"); + } + + // Use TimeInHeartRateZones.newBuilder() to construct. + private TimeInHeartRateZones(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private TimeInHeartRateZones() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_MetricsSummary_TimeInHeartRateZones_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_MetricsSummary_TimeInHeartRateZones_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZones.class, + com.google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZones.Builder + .class); + } + + private int bitField0_; + public static final int LIGHT_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Duration lightTime_; + + /** + * + * + *
+     * Optional. Time spent in light heart rate zone.
+     * 
+ * + * .google.protobuf.Duration light_time = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the lightTime field is set. + */ + @java.lang.Override + public boolean hasLightTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Optional. Time spent in light heart rate zone.
+     * 
+ * + * .google.protobuf.Duration light_time = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The lightTime. + */ + @java.lang.Override + public com.google.protobuf.Duration getLightTime() { + return lightTime_ == null ? com.google.protobuf.Duration.getDefaultInstance() : lightTime_; + } + + /** + * + * + *
+     * Optional. Time spent in light heart rate zone.
+     * 
+ * + * .google.protobuf.Duration light_time = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getLightTimeOrBuilder() { + return lightTime_ == null ? com.google.protobuf.Duration.getDefaultInstance() : lightTime_; + } + + public static final int MODERATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Duration moderateTime_; + + /** + * + * + *
+     * Optional. Time spent in moderate heart rate zone.
+     * 
+ * + * .google.protobuf.Duration moderate_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the moderateTime field is set. + */ + @java.lang.Override + public boolean hasModerateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Optional. Time spent in moderate heart rate zone.
+     * 
+ * + * .google.protobuf.Duration moderate_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The moderateTime. + */ + @java.lang.Override + public com.google.protobuf.Duration getModerateTime() { + return moderateTime_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : moderateTime_; + } + + /** + * + * + *
+     * Optional. Time spent in moderate heart rate zone.
+     * 
+ * + * .google.protobuf.Duration moderate_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getModerateTimeOrBuilder() { + return moderateTime_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : moderateTime_; + } + + public static final int VIGOROUS_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Duration vigorousTime_; + + /** + * + * + *
+     * Optional. Time spent in vigorous heart rate zone.
+     * 
+ * + * .google.protobuf.Duration vigorous_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the vigorousTime field is set. + */ + @java.lang.Override + public boolean hasVigorousTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Optional. Time spent in vigorous heart rate zone.
+     * 
+ * + * .google.protobuf.Duration vigorous_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The vigorousTime. + */ + @java.lang.Override + public com.google.protobuf.Duration getVigorousTime() { + return vigorousTime_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : vigorousTime_; + } + + /** + * + * + *
+     * Optional. Time spent in vigorous heart rate zone.
+     * 
+ * + * .google.protobuf.Duration vigorous_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getVigorousTimeOrBuilder() { + return vigorousTime_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : vigorousTime_; + } + + public static final int PEAK_TIME_FIELD_NUMBER = 4; + private com.google.protobuf.Duration peakTime_; + + /** + * + * + *
+     * Optional. Time spent in peak heart rate zone.
+     * 
+ * + * .google.protobuf.Duration peak_time = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the peakTime field is set. + */ + @java.lang.Override + public boolean hasPeakTime() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+     * Optional. Time spent in peak heart rate zone.
+     * 
+ * + * .google.protobuf.Duration peak_time = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The peakTime. + */ + @java.lang.Override + public com.google.protobuf.Duration getPeakTime() { + return peakTime_ == null ? com.google.protobuf.Duration.getDefaultInstance() : peakTime_; + } + + /** + * + * + *
+     * Optional. Time spent in peak heart rate zone.
+     * 
+ * + * .google.protobuf.Duration peak_time = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getPeakTimeOrBuilder() { + return peakTime_ == null ? com.google.protobuf.Duration.getDefaultInstance() : peakTime_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getLightTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getModerateTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(3, getVigorousTime()); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(4, getPeakTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getLightTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getModerateTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getVigorousTime()); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getPeakTime()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZones)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZones other = + (com.google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZones) obj; + + if (hasLightTime() != other.hasLightTime()) return false; + if (hasLightTime()) { + if (!getLightTime().equals(other.getLightTime())) return false; + } + if (hasModerateTime() != other.hasModerateTime()) return false; + if (hasModerateTime()) { + if (!getModerateTime().equals(other.getModerateTime())) return false; + } + if (hasVigorousTime() != other.hasVigorousTime()) return false; + if (hasVigorousTime()) { + if (!getVigorousTime().equals(other.getVigorousTime())) return false; + } + if (hasPeakTime() != other.hasPeakTime()) return false; + if (hasPeakTime()) { + if (!getPeakTime().equals(other.getPeakTime())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasLightTime()) { + hash = (37 * hash) + LIGHT_TIME_FIELD_NUMBER; + hash = (53 * hash) + getLightTime().hashCode(); + } + if (hasModerateTime()) { + hash = (37 * hash) + MODERATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getModerateTime().hashCode(); + } + if (hasVigorousTime()) { + hash = (37 * hash) + VIGOROUS_TIME_FIELD_NUMBER; + hash = (53 * hash) + getVigorousTime().hashCode(); + } + if (hasPeakTime()) { + hash = (37 * hash) + PEAK_TIME_FIELD_NUMBER; + hash = (53 * hash) + getPeakTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZones + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZones + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZones + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZones + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZones + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZones + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZones + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZones + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZones + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZones + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZones + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZones + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZones prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+     * Time spent in each heart rate zone.
+     * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZones} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZones) + com.google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZonesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_MetricsSummary_TimeInHeartRateZones_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_MetricsSummary_TimeInHeartRateZones_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZones.class, + com.google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZones.Builder + .class); + } + + // Construct using + // com.google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZones.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetLightTimeFieldBuilder(); + internalGetModerateTimeFieldBuilder(); + internalGetVigorousTimeFieldBuilder(); + internalGetPeakTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + lightTime_ = null; + if (lightTimeBuilder_ != null) { + lightTimeBuilder_.dispose(); + lightTimeBuilder_ = null; + } + moderateTime_ = null; + if (moderateTimeBuilder_ != null) { + moderateTimeBuilder_.dispose(); + moderateTimeBuilder_ = null; + } + vigorousTime_ = null; + if (vigorousTimeBuilder_ != null) { + vigorousTimeBuilder_.dispose(); + vigorousTimeBuilder_ = null; + } + peakTime_ = null; + if (peakTimeBuilder_ != null) { + peakTimeBuilder_.dispose(); + peakTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_MetricsSummary_TimeInHeartRateZones_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZones + getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZones + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZones build() { + com.google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZones result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZones + buildPartial() { + com.google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZones result = + new com.google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZones(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZones result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.lightTime_ = lightTimeBuilder_ == null ? lightTime_ : lightTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.moderateTime_ = + moderateTimeBuilder_ == null ? moderateTime_ : moderateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.vigorousTime_ = + vigorousTimeBuilder_ == null ? vigorousTime_ : vigorousTimeBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.peakTime_ = peakTimeBuilder_ == null ? peakTime_ : peakTimeBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZones) { + return mergeFrom( + (com.google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZones) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZones other) { + if (other + == com.google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZones + .getDefaultInstance()) return this; + if (other.hasLightTime()) { + mergeLightTime(other.getLightTime()); + } + if (other.hasModerateTime()) { + mergeModerateTime(other.getModerateTime()); + } + if (other.hasVigorousTime()) { + mergeVigorousTime(other.getVigorousTime()); + } + if (other.hasPeakTime()) { + mergePeakTime(other.getPeakTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetLightTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetModerateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetVigorousTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage( + internalGetPeakTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.Duration lightTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + lightTimeBuilder_; + + /** + * + * + *
+       * Optional. Time spent in light heart rate zone.
+       * 
+ * + * .google.protobuf.Duration light_time = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the lightTime field is set. + */ + public boolean hasLightTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+       * Optional. Time spent in light heart rate zone.
+       * 
+ * + * .google.protobuf.Duration light_time = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The lightTime. + */ + public com.google.protobuf.Duration getLightTime() { + if (lightTimeBuilder_ == null) { + return lightTime_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : lightTime_; + } else { + return lightTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+       * Optional. Time spent in light heart rate zone.
+       * 
+ * + * .google.protobuf.Duration light_time = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setLightTime(com.google.protobuf.Duration value) { + if (lightTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + lightTime_ = value; + } else { + lightTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. Time spent in light heart rate zone.
+       * 
+ * + * .google.protobuf.Duration light_time = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setLightTime(com.google.protobuf.Duration.Builder builderForValue) { + if (lightTimeBuilder_ == null) { + lightTime_ = builderForValue.build(); + } else { + lightTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. Time spent in light heart rate zone.
+       * 
+ * + * .google.protobuf.Duration light_time = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeLightTime(com.google.protobuf.Duration value) { + if (lightTimeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && lightTime_ != null + && lightTime_ != com.google.protobuf.Duration.getDefaultInstance()) { + getLightTimeBuilder().mergeFrom(value); + } else { + lightTime_ = value; + } + } else { + lightTimeBuilder_.mergeFrom(value); + } + if (lightTime_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * Optional. Time spent in light heart rate zone.
+       * 
+ * + * .google.protobuf.Duration light_time = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearLightTime() { + bitField0_ = (bitField0_ & ~0x00000001); + lightTime_ = null; + if (lightTimeBuilder_ != null) { + lightTimeBuilder_.dispose(); + lightTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. Time spent in light heart rate zone.
+       * 
+ * + * .google.protobuf.Duration light_time = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Duration.Builder getLightTimeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetLightTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * Optional. Time spent in light heart rate zone.
+       * 
+ * + * .google.protobuf.Duration light_time = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.DurationOrBuilder getLightTimeOrBuilder() { + if (lightTimeBuilder_ != null) { + return lightTimeBuilder_.getMessageOrBuilder(); + } else { + return lightTime_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : lightTime_; + } + } + + /** + * + * + *
+       * Optional. Time spent in light heart rate zone.
+       * 
+ * + * .google.protobuf.Duration light_time = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + internalGetLightTimeFieldBuilder() { + if (lightTimeBuilder_ == null) { + lightTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getLightTime(), getParentForChildren(), isClean()); + lightTime_ = null; + } + return lightTimeBuilder_; + } + + private com.google.protobuf.Duration moderateTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + moderateTimeBuilder_; + + /** + * + * + *
+       * Optional. Time spent in moderate heart rate zone.
+       * 
+ * + * + * .google.protobuf.Duration moderate_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the moderateTime field is set. + */ + public boolean hasModerateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+       * Optional. Time spent in moderate heart rate zone.
+       * 
+ * + * + * .google.protobuf.Duration moderate_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The moderateTime. + */ + public com.google.protobuf.Duration getModerateTime() { + if (moderateTimeBuilder_ == null) { + return moderateTime_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : moderateTime_; + } else { + return moderateTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+       * Optional. Time spent in moderate heart rate zone.
+       * 
+ * + * + * .google.protobuf.Duration moderate_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setModerateTime(com.google.protobuf.Duration value) { + if (moderateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + moderateTime_ = value; + } else { + moderateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. Time spent in moderate heart rate zone.
+       * 
+ * + * + * .google.protobuf.Duration moderate_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setModerateTime(com.google.protobuf.Duration.Builder builderForValue) { + if (moderateTimeBuilder_ == null) { + moderateTime_ = builderForValue.build(); + } else { + moderateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. Time spent in moderate heart rate zone.
+       * 
+ * + * + * .google.protobuf.Duration moderate_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeModerateTime(com.google.protobuf.Duration value) { + if (moderateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && moderateTime_ != null + && moderateTime_ != com.google.protobuf.Duration.getDefaultInstance()) { + getModerateTimeBuilder().mergeFrom(value); + } else { + moderateTime_ = value; + } + } else { + moderateTimeBuilder_.mergeFrom(value); + } + if (moderateTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * Optional. Time spent in moderate heart rate zone.
+       * 
+ * + * + * .google.protobuf.Duration moderate_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearModerateTime() { + bitField0_ = (bitField0_ & ~0x00000002); + moderateTime_ = null; + if (moderateTimeBuilder_ != null) { + moderateTimeBuilder_.dispose(); + moderateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. Time spent in moderate heart rate zone.
+       * 
+ * + * + * .google.protobuf.Duration moderate_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Duration.Builder getModerateTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetModerateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * Optional. Time spent in moderate heart rate zone.
+       * 
+ * + * + * .google.protobuf.Duration moderate_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.DurationOrBuilder getModerateTimeOrBuilder() { + if (moderateTimeBuilder_ != null) { + return moderateTimeBuilder_.getMessageOrBuilder(); + } else { + return moderateTime_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : moderateTime_; + } + } + + /** + * + * + *
+       * Optional. Time spent in moderate heart rate zone.
+       * 
+ * + * + * .google.protobuf.Duration moderate_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + internalGetModerateTimeFieldBuilder() { + if (moderateTimeBuilder_ == null) { + moderateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getModerateTime(), getParentForChildren(), isClean()); + moderateTime_ = null; + } + return moderateTimeBuilder_; + } + + private com.google.protobuf.Duration vigorousTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + vigorousTimeBuilder_; + + /** + * + * + *
+       * Optional. Time spent in vigorous heart rate zone.
+       * 
+ * + * + * .google.protobuf.Duration vigorous_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the vigorousTime field is set. + */ + public boolean hasVigorousTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+       * Optional. Time spent in vigorous heart rate zone.
+       * 
+ * + * + * .google.protobuf.Duration vigorous_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The vigorousTime. + */ + public com.google.protobuf.Duration getVigorousTime() { + if (vigorousTimeBuilder_ == null) { + return vigorousTime_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : vigorousTime_; + } else { + return vigorousTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+       * Optional. Time spent in vigorous heart rate zone.
+       * 
+ * + * + * .google.protobuf.Duration vigorous_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setVigorousTime(com.google.protobuf.Duration value) { + if (vigorousTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + vigorousTime_ = value; + } else { + vigorousTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. Time spent in vigorous heart rate zone.
+       * 
+ * + * + * .google.protobuf.Duration vigorous_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setVigorousTime(com.google.protobuf.Duration.Builder builderForValue) { + if (vigorousTimeBuilder_ == null) { + vigorousTime_ = builderForValue.build(); + } else { + vigorousTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. Time spent in vigorous heart rate zone.
+       * 
+ * + * + * .google.protobuf.Duration vigorous_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeVigorousTime(com.google.protobuf.Duration value) { + if (vigorousTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && vigorousTime_ != null + && vigorousTime_ != com.google.protobuf.Duration.getDefaultInstance()) { + getVigorousTimeBuilder().mergeFrom(value); + } else { + vigorousTime_ = value; + } + } else { + vigorousTimeBuilder_.mergeFrom(value); + } + if (vigorousTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * Optional. Time spent in vigorous heart rate zone.
+       * 
+ * + * + * .google.protobuf.Duration vigorous_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearVigorousTime() { + bitField0_ = (bitField0_ & ~0x00000004); + vigorousTime_ = null; + if (vigorousTimeBuilder_ != null) { + vigorousTimeBuilder_.dispose(); + vigorousTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. Time spent in vigorous heart rate zone.
+       * 
+ * + * + * .google.protobuf.Duration vigorous_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Duration.Builder getVigorousTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetVigorousTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * Optional. Time spent in vigorous heart rate zone.
+       * 
+ * + * + * .google.protobuf.Duration vigorous_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.DurationOrBuilder getVigorousTimeOrBuilder() { + if (vigorousTimeBuilder_ != null) { + return vigorousTimeBuilder_.getMessageOrBuilder(); + } else { + return vigorousTime_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : vigorousTime_; + } + } + + /** + * + * + *
+       * Optional. Time spent in vigorous heart rate zone.
+       * 
+ * + * + * .google.protobuf.Duration vigorous_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + internalGetVigorousTimeFieldBuilder() { + if (vigorousTimeBuilder_ == null) { + vigorousTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getVigorousTime(), getParentForChildren(), isClean()); + vigorousTime_ = null; + } + return vigorousTimeBuilder_; + } + + private com.google.protobuf.Duration peakTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + peakTimeBuilder_; + + /** + * + * + *
+       * Optional. Time spent in peak heart rate zone.
+       * 
+ * + * .google.protobuf.Duration peak_time = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the peakTime field is set. + */ + public boolean hasPeakTime() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+       * Optional. Time spent in peak heart rate zone.
+       * 
+ * + * .google.protobuf.Duration peak_time = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The peakTime. + */ + public com.google.protobuf.Duration getPeakTime() { + if (peakTimeBuilder_ == null) { + return peakTime_ == null ? com.google.protobuf.Duration.getDefaultInstance() : peakTime_; + } else { + return peakTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+       * Optional. Time spent in peak heart rate zone.
+       * 
+ * + * .google.protobuf.Duration peak_time = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPeakTime(com.google.protobuf.Duration value) { + if (peakTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + peakTime_ = value; + } else { + peakTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. Time spent in peak heart rate zone.
+       * 
+ * + * .google.protobuf.Duration peak_time = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPeakTime(com.google.protobuf.Duration.Builder builderForValue) { + if (peakTimeBuilder_ == null) { + peakTime_ = builderForValue.build(); + } else { + peakTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. Time spent in peak heart rate zone.
+       * 
+ * + * .google.protobuf.Duration peak_time = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergePeakTime(com.google.protobuf.Duration value) { + if (peakTimeBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && peakTime_ != null + && peakTime_ != com.google.protobuf.Duration.getDefaultInstance()) { + getPeakTimeBuilder().mergeFrom(value); + } else { + peakTime_ = value; + } + } else { + peakTimeBuilder_.mergeFrom(value); + } + if (peakTime_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * Optional. Time spent in peak heart rate zone.
+       * 
+ * + * .google.protobuf.Duration peak_time = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearPeakTime() { + bitField0_ = (bitField0_ & ~0x00000008); + peakTime_ = null; + if (peakTimeBuilder_ != null) { + peakTimeBuilder_.dispose(); + peakTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. Time spent in peak heart rate zone.
+       * 
+ * + * .google.protobuf.Duration peak_time = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Duration.Builder getPeakTimeBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return internalGetPeakTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * Optional. Time spent in peak heart rate zone.
+       * 
+ * + * .google.protobuf.Duration peak_time = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.DurationOrBuilder getPeakTimeOrBuilder() { + if (peakTimeBuilder_ != null) { + return peakTimeBuilder_.getMessageOrBuilder(); + } else { + return peakTime_ == null ? com.google.protobuf.Duration.getDefaultInstance() : peakTime_; + } + } + + /** + * + * + *
+       * Optional. Time spent in peak heart rate zone.
+       * 
+ * + * .google.protobuf.Duration peak_time = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + internalGetPeakTimeFieldBuilder() { + if (peakTimeBuilder_ == null) { + peakTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getPeakTime(), getParentForChildren(), isClean()); + peakTime_ = null; + } + return peakTimeBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZones) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZones) + private static final com.google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZones + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZones(); + } + + public static com.google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZones + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TimeInHeartRateZones parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZones + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface MobilityMetricsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.MetricsSummary.MobilityMetrics) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Optional. Cadence is a measure of the frequency of your foot strikes.
+     * Steps / min in real time during workout.
+     * 
+ * + * + * optional double avg_cadence_steps_per_minute = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the avgCadenceStepsPerMinute field is set. + */ + boolean hasAvgCadenceStepsPerMinute(); + + /** + * + * + *
+     * Optional. Cadence is a measure of the frequency of your foot strikes.
+     * Steps / min in real time during workout.
+     * 
+ * + * + * optional double avg_cadence_steps_per_minute = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The avgCadenceStepsPerMinute. + */ + double getAvgCadenceStepsPerMinute(); + + /** + * + * + *
+     * Optional. Stride length is a measure of the distance covered by a single
+     * stride
+     * 
+ * + * + * optional int64 avg_stride_length_millimeters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the avgStrideLengthMillimeters field is set. + */ + boolean hasAvgStrideLengthMillimeters(); + + /** + * + * + *
+     * Optional. Stride length is a measure of the distance covered by a single
+     * stride
+     * 
+ * + * + * optional int64 avg_stride_length_millimeters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The avgStrideLengthMillimeters. + */ + long getAvgStrideLengthMillimeters(); + + /** + * + * + *
+     * Optional. Distance off the ground your center of mass moves with each
+     * stride while running
+     * 
+ * + * + * optional int64 avg_vertical_oscillation_millimeters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the avgVerticalOscillationMillimeters field is set. + */ + boolean hasAvgVerticalOscillationMillimeters(); + + /** + * + * + *
+     * Optional. Distance off the ground your center of mass moves with each
+     * stride while running
+     * 
+ * + * + * optional int64 avg_vertical_oscillation_millimeters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The avgVerticalOscillationMillimeters. + */ + long getAvgVerticalOscillationMillimeters(); + + /** + * + * + *
+     * Optional. Vertical oscillation/stride length between [5.0, 11.0].
+     * 
+ * + * optional double avg_vertical_ratio = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the avgVerticalRatio field is set. + */ + boolean hasAvgVerticalRatio(); + + /** + * + * + *
+     * Optional. Vertical oscillation/stride length between [5.0, 11.0].
+     * 
+ * + * optional double avg_vertical_ratio = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The avgVerticalRatio. + */ + double getAvgVerticalRatio(); + + /** + * + * + *
+     * Optional. The ground contact time for a particular stride is the amount
+     * of time for which the foot was in contact with the ground on that stride
+     * 
+ * + * + * .google.protobuf.Duration avg_ground_contact_time_duration = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the avgGroundContactTimeDuration field is set. + */ + boolean hasAvgGroundContactTimeDuration(); + + /** + * + * + *
+     * Optional. The ground contact time for a particular stride is the amount
+     * of time for which the foot was in contact with the ground on that stride
+     * 
+ * + * + * .google.protobuf.Duration avg_ground_contact_time_duration = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The avgGroundContactTimeDuration. + */ + com.google.protobuf.Duration getAvgGroundContactTimeDuration(); + + /** + * + * + *
+     * Optional. The ground contact time for a particular stride is the amount
+     * of time for which the foot was in contact with the ground on that stride
+     * 
+ * + * + * .google.protobuf.Duration avg_ground_contact_time_duration = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.DurationOrBuilder getAvgGroundContactTimeDurationOrBuilder(); + } + + /** + * + * + *
+   * Mobility workouts specific metrics
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.MetricsSummary.MobilityMetrics} + */ + public static final class MobilityMetrics extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.MetricsSummary.MobilityMetrics) + MobilityMetricsOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "MobilityMetrics"); + } + + // Use MobilityMetrics.newBuilder() to construct. + private MobilityMetrics(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private MobilityMetrics() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_MetricsSummary_MobilityMetrics_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_MetricsSummary_MobilityMetrics_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.MetricsSummary.MobilityMetrics.class, + com.google.devicesandservices.health.v4.MetricsSummary.MobilityMetrics.Builder.class); + } + + private int bitField0_; + public static final int AVG_CADENCE_STEPS_PER_MINUTE_FIELD_NUMBER = 1; + private double avgCadenceStepsPerMinute_ = 0D; + + /** + * + * + *
+     * Optional. Cadence is a measure of the frequency of your foot strikes.
+     * Steps / min in real time during workout.
+     * 
+ * + * + * optional double avg_cadence_steps_per_minute = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the avgCadenceStepsPerMinute field is set. + */ + @java.lang.Override + public boolean hasAvgCadenceStepsPerMinute() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Optional. Cadence is a measure of the frequency of your foot strikes.
+     * Steps / min in real time during workout.
+     * 
+ * + * + * optional double avg_cadence_steps_per_minute = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The avgCadenceStepsPerMinute. + */ + @java.lang.Override + public double getAvgCadenceStepsPerMinute() { + return avgCadenceStepsPerMinute_; + } + + public static final int AVG_STRIDE_LENGTH_MILLIMETERS_FIELD_NUMBER = 2; + private long avgStrideLengthMillimeters_ = 0L; + + /** + * + * + *
+     * Optional. Stride length is a measure of the distance covered by a single
+     * stride
+     * 
+ * + * + * optional int64 avg_stride_length_millimeters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the avgStrideLengthMillimeters field is set. + */ + @java.lang.Override + public boolean hasAvgStrideLengthMillimeters() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Optional. Stride length is a measure of the distance covered by a single
+     * stride
+     * 
+ * + * + * optional int64 avg_stride_length_millimeters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The avgStrideLengthMillimeters. + */ + @java.lang.Override + public long getAvgStrideLengthMillimeters() { + return avgStrideLengthMillimeters_; + } + + public static final int AVG_VERTICAL_OSCILLATION_MILLIMETERS_FIELD_NUMBER = 3; + private long avgVerticalOscillationMillimeters_ = 0L; + + /** + * + * + *
+     * Optional. Distance off the ground your center of mass moves with each
+     * stride while running
+     * 
+ * + * + * optional int64 avg_vertical_oscillation_millimeters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the avgVerticalOscillationMillimeters field is set. + */ + @java.lang.Override + public boolean hasAvgVerticalOscillationMillimeters() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Optional. Distance off the ground your center of mass moves with each
+     * stride while running
+     * 
+ * + * + * optional int64 avg_vertical_oscillation_millimeters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The avgVerticalOscillationMillimeters. + */ + @java.lang.Override + public long getAvgVerticalOscillationMillimeters() { + return avgVerticalOscillationMillimeters_; + } + + public static final int AVG_VERTICAL_RATIO_FIELD_NUMBER = 4; + private double avgVerticalRatio_ = 0D; + + /** + * + * + *
+     * Optional. Vertical oscillation/stride length between [5.0, 11.0].
+     * 
+ * + * optional double avg_vertical_ratio = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the avgVerticalRatio field is set. + */ + @java.lang.Override + public boolean hasAvgVerticalRatio() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+     * Optional. Vertical oscillation/stride length between [5.0, 11.0].
+     * 
+ * + * optional double avg_vertical_ratio = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The avgVerticalRatio. + */ + @java.lang.Override + public double getAvgVerticalRatio() { + return avgVerticalRatio_; + } + + public static final int AVG_GROUND_CONTACT_TIME_DURATION_FIELD_NUMBER = 5; + private com.google.protobuf.Duration avgGroundContactTimeDuration_; + + /** + * + * + *
+     * Optional. The ground contact time for a particular stride is the amount
+     * of time for which the foot was in contact with the ground on that stride
+     * 
+ * + * + * .google.protobuf.Duration avg_ground_contact_time_duration = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the avgGroundContactTimeDuration field is set. + */ + @java.lang.Override + public boolean hasAvgGroundContactTimeDuration() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+     * Optional. The ground contact time for a particular stride is the amount
+     * of time for which the foot was in contact with the ground on that stride
+     * 
+ * + * + * .google.protobuf.Duration avg_ground_contact_time_duration = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The avgGroundContactTimeDuration. + */ + @java.lang.Override + public com.google.protobuf.Duration getAvgGroundContactTimeDuration() { + return avgGroundContactTimeDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : avgGroundContactTimeDuration_; + } + + /** + * + * + *
+     * Optional. The ground contact time for a particular stride is the amount
+     * of time for which the foot was in contact with the ground on that stride
+     * 
+ * + * + * .google.protobuf.Duration avg_ground_contact_time_duration = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getAvgGroundContactTimeDurationOrBuilder() { + return avgGroundContactTimeDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : avgGroundContactTimeDuration_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeDouble(1, avgCadenceStepsPerMinute_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeInt64(2, avgStrideLengthMillimeters_); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeInt64(3, avgVerticalOscillationMillimeters_); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeDouble(4, avgVerticalRatio_); + } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeMessage(5, getAvgGroundContactTimeDuration()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeDoubleSize(1, avgCadenceStepsPerMinute_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeInt64Size(2, avgStrideLengthMillimeters_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeInt64Size( + 3, avgVerticalOscillationMillimeters_); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(4, avgVerticalRatio_); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, getAvgGroundContactTimeDuration()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.devicesandservices.health.v4.MetricsSummary.MobilityMetrics)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.MetricsSummary.MobilityMetrics other = + (com.google.devicesandservices.health.v4.MetricsSummary.MobilityMetrics) obj; + + if (hasAvgCadenceStepsPerMinute() != other.hasAvgCadenceStepsPerMinute()) return false; + if (hasAvgCadenceStepsPerMinute()) { + if (java.lang.Double.doubleToLongBits(getAvgCadenceStepsPerMinute()) + != java.lang.Double.doubleToLongBits(other.getAvgCadenceStepsPerMinute())) return false; + } + if (hasAvgStrideLengthMillimeters() != other.hasAvgStrideLengthMillimeters()) return false; + if (hasAvgStrideLengthMillimeters()) { + if (getAvgStrideLengthMillimeters() != other.getAvgStrideLengthMillimeters()) return false; + } + if (hasAvgVerticalOscillationMillimeters() != other.hasAvgVerticalOscillationMillimeters()) + return false; + if (hasAvgVerticalOscillationMillimeters()) { + if (getAvgVerticalOscillationMillimeters() != other.getAvgVerticalOscillationMillimeters()) + return false; + } + if (hasAvgVerticalRatio() != other.hasAvgVerticalRatio()) return false; + if (hasAvgVerticalRatio()) { + if (java.lang.Double.doubleToLongBits(getAvgVerticalRatio()) + != java.lang.Double.doubleToLongBits(other.getAvgVerticalRatio())) return false; + } + if (hasAvgGroundContactTimeDuration() != other.hasAvgGroundContactTimeDuration()) + return false; + if (hasAvgGroundContactTimeDuration()) { + if (!getAvgGroundContactTimeDuration().equals(other.getAvgGroundContactTimeDuration())) + return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAvgCadenceStepsPerMinute()) { + hash = (37 * hash) + AVG_CADENCE_STEPS_PER_MINUTE_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getAvgCadenceStepsPerMinute())); + } + if (hasAvgStrideLengthMillimeters()) { + hash = (37 * hash) + AVG_STRIDE_LENGTH_MILLIMETERS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getAvgStrideLengthMillimeters()); + } + if (hasAvgVerticalOscillationMillimeters()) { + hash = (37 * hash) + AVG_VERTICAL_OSCILLATION_MILLIMETERS_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong(getAvgVerticalOscillationMillimeters()); + } + if (hasAvgVerticalRatio()) { + hash = (37 * hash) + AVG_VERTICAL_RATIO_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getAvgVerticalRatio())); + } + if (hasAvgGroundContactTimeDuration()) { + hash = (37 * hash) + AVG_GROUND_CONTACT_TIME_DURATION_FIELD_NUMBER; + hash = (53 * hash) + getAvgGroundContactTimeDuration().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.MetricsSummary.MobilityMetrics parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.MetricsSummary.MobilityMetrics parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.MetricsSummary.MobilityMetrics parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.MetricsSummary.MobilityMetrics parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.MetricsSummary.MobilityMetrics parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.MetricsSummary.MobilityMetrics parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.MetricsSummary.MobilityMetrics parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.MetricsSummary.MobilityMetrics parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.MetricsSummary.MobilityMetrics + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.MetricsSummary.MobilityMetrics + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.MetricsSummary.MobilityMetrics parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.MetricsSummary.MobilityMetrics parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.MetricsSummary.MobilityMetrics prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+     * Mobility workouts specific metrics
+     * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.MetricsSummary.MobilityMetrics} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.MetricsSummary.MobilityMetrics) + com.google.devicesandservices.health.v4.MetricsSummary.MobilityMetricsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_MetricsSummary_MobilityMetrics_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_MetricsSummary_MobilityMetrics_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.MetricsSummary.MobilityMetrics.class, + com.google.devicesandservices.health.v4.MetricsSummary.MobilityMetrics.Builder + .class); + } + + // Construct using + // com.google.devicesandservices.health.v4.MetricsSummary.MobilityMetrics.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetAvgGroundContactTimeDurationFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + avgCadenceStepsPerMinute_ = 0D; + avgStrideLengthMillimeters_ = 0L; + avgVerticalOscillationMillimeters_ = 0L; + avgVerticalRatio_ = 0D; + avgGroundContactTimeDuration_ = null; + if (avgGroundContactTimeDurationBuilder_ != null) { + avgGroundContactTimeDurationBuilder_.dispose(); + avgGroundContactTimeDurationBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_MetricsSummary_MobilityMetrics_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.MetricsSummary.MobilityMetrics + getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.MetricsSummary.MobilityMetrics + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.MetricsSummary.MobilityMetrics build() { + com.google.devicesandservices.health.v4.MetricsSummary.MobilityMetrics result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.MetricsSummary.MobilityMetrics buildPartial() { + com.google.devicesandservices.health.v4.MetricsSummary.MobilityMetrics result = + new com.google.devicesandservices.health.v4.MetricsSummary.MobilityMetrics(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.devicesandservices.health.v4.MetricsSummary.MobilityMetrics result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.avgCadenceStepsPerMinute_ = avgCadenceStepsPerMinute_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.avgStrideLengthMillimeters_ = avgStrideLengthMillimeters_; + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.avgVerticalOscillationMillimeters_ = avgVerticalOscillationMillimeters_; + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.avgVerticalRatio_ = avgVerticalRatio_; + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.avgGroundContactTimeDuration_ = + avgGroundContactTimeDurationBuilder_ == null + ? avgGroundContactTimeDuration_ + : avgGroundContactTimeDurationBuilder_.build(); + to_bitField0_ |= 0x00000010; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.devicesandservices.health.v4.MetricsSummary.MobilityMetrics) { + return mergeFrom( + (com.google.devicesandservices.health.v4.MetricsSummary.MobilityMetrics) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.devicesandservices.health.v4.MetricsSummary.MobilityMetrics other) { + if (other + == com.google.devicesandservices.health.v4.MetricsSummary.MobilityMetrics + .getDefaultInstance()) return this; + if (other.hasAvgCadenceStepsPerMinute()) { + setAvgCadenceStepsPerMinute(other.getAvgCadenceStepsPerMinute()); + } + if (other.hasAvgStrideLengthMillimeters()) { + setAvgStrideLengthMillimeters(other.getAvgStrideLengthMillimeters()); + } + if (other.hasAvgVerticalOscillationMillimeters()) { + setAvgVerticalOscillationMillimeters(other.getAvgVerticalOscillationMillimeters()); + } + if (other.hasAvgVerticalRatio()) { + setAvgVerticalRatio(other.getAvgVerticalRatio()); + } + if (other.hasAvgGroundContactTimeDuration()) { + mergeAvgGroundContactTimeDuration(other.getAvgGroundContactTimeDuration()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 9: + { + avgCadenceStepsPerMinute_ = input.readDouble(); + bitField0_ |= 0x00000001; + break; + } // case 9 + case 16: + { + avgStrideLengthMillimeters_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + avgVerticalOscillationMillimeters_ = input.readInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 33: + { + avgVerticalRatio_ = input.readDouble(); + bitField0_ |= 0x00000008; + break; + } // case 33 + case 42: + { + input.readMessage( + internalGetAvgGroundContactTimeDurationFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private double avgCadenceStepsPerMinute_; + + /** + * + * + *
+       * Optional. Cadence is a measure of the frequency of your foot strikes.
+       * Steps / min in real time during workout.
+       * 
+ * + * + * optional double avg_cadence_steps_per_minute = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the avgCadenceStepsPerMinute field is set. + */ + @java.lang.Override + public boolean hasAvgCadenceStepsPerMinute() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+       * Optional. Cadence is a measure of the frequency of your foot strikes.
+       * Steps / min in real time during workout.
+       * 
+ * + * + * optional double avg_cadence_steps_per_minute = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The avgCadenceStepsPerMinute. + */ + @java.lang.Override + public double getAvgCadenceStepsPerMinute() { + return avgCadenceStepsPerMinute_; + } + + /** + * + * + *
+       * Optional. Cadence is a measure of the frequency of your foot strikes.
+       * Steps / min in real time during workout.
+       * 
+ * + * + * optional double avg_cadence_steps_per_minute = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The avgCadenceStepsPerMinute to set. + * @return This builder for chaining. + */ + public Builder setAvgCadenceStepsPerMinute(double value) { + + avgCadenceStepsPerMinute_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. Cadence is a measure of the frequency of your foot strikes.
+       * Steps / min in real time during workout.
+       * 
+ * + * + * optional double avg_cadence_steps_per_minute = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearAvgCadenceStepsPerMinute() { + bitField0_ = (bitField0_ & ~0x00000001); + avgCadenceStepsPerMinute_ = 0D; + onChanged(); + return this; + } + + private long avgStrideLengthMillimeters_; + + /** + * + * + *
+       * Optional. Stride length is a measure of the distance covered by a single
+       * stride
+       * 
+ * + * + * optional int64 avg_stride_length_millimeters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the avgStrideLengthMillimeters field is set. + */ + @java.lang.Override + public boolean hasAvgStrideLengthMillimeters() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+       * Optional. Stride length is a measure of the distance covered by a single
+       * stride
+       * 
+ * + * + * optional int64 avg_stride_length_millimeters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The avgStrideLengthMillimeters. + */ + @java.lang.Override + public long getAvgStrideLengthMillimeters() { + return avgStrideLengthMillimeters_; + } + + /** + * + * + *
+       * Optional. Stride length is a measure of the distance covered by a single
+       * stride
+       * 
+ * + * + * optional int64 avg_stride_length_millimeters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The avgStrideLengthMillimeters to set. + * @return This builder for chaining. + */ + public Builder setAvgStrideLengthMillimeters(long value) { + + avgStrideLengthMillimeters_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. Stride length is a measure of the distance covered by a single
+       * stride
+       * 
+ * + * + * optional int64 avg_stride_length_millimeters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearAvgStrideLengthMillimeters() { + bitField0_ = (bitField0_ & ~0x00000002); + avgStrideLengthMillimeters_ = 0L; + onChanged(); + return this; + } + + private long avgVerticalOscillationMillimeters_; + + /** + * + * + *
+       * Optional. Distance off the ground your center of mass moves with each
+       * stride while running
+       * 
+ * + * + * optional int64 avg_vertical_oscillation_millimeters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the avgVerticalOscillationMillimeters field is set. + */ + @java.lang.Override + public boolean hasAvgVerticalOscillationMillimeters() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+       * Optional. Distance off the ground your center of mass moves with each
+       * stride while running
+       * 
+ * + * + * optional int64 avg_vertical_oscillation_millimeters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The avgVerticalOscillationMillimeters. + */ + @java.lang.Override + public long getAvgVerticalOscillationMillimeters() { + return avgVerticalOscillationMillimeters_; + } + + /** + * + * + *
+       * Optional. Distance off the ground your center of mass moves with each
+       * stride while running
+       * 
+ * + * + * optional int64 avg_vertical_oscillation_millimeters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The avgVerticalOscillationMillimeters to set. + * @return This builder for chaining. + */ + public Builder setAvgVerticalOscillationMillimeters(long value) { + + avgVerticalOscillationMillimeters_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. Distance off the ground your center of mass moves with each
+       * stride while running
+       * 
+ * + * + * optional int64 avg_vertical_oscillation_millimeters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearAvgVerticalOscillationMillimeters() { + bitField0_ = (bitField0_ & ~0x00000004); + avgVerticalOscillationMillimeters_ = 0L; + onChanged(); + return this; + } + + private double avgVerticalRatio_; + + /** + * + * + *
+       * Optional. Vertical oscillation/stride length between [5.0, 11.0].
+       * 
+ * + * optional double avg_vertical_ratio = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the avgVerticalRatio field is set. + */ + @java.lang.Override + public boolean hasAvgVerticalRatio() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+       * Optional. Vertical oscillation/stride length between [5.0, 11.0].
+       * 
+ * + * optional double avg_vertical_ratio = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The avgVerticalRatio. + */ + @java.lang.Override + public double getAvgVerticalRatio() { + return avgVerticalRatio_; + } + + /** + * + * + *
+       * Optional. Vertical oscillation/stride length between [5.0, 11.0].
+       * 
+ * + * optional double avg_vertical_ratio = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The avgVerticalRatio to set. + * @return This builder for chaining. + */ + public Builder setAvgVerticalRatio(double value) { + + avgVerticalRatio_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. Vertical oscillation/stride length between [5.0, 11.0].
+       * 
+ * + * optional double avg_vertical_ratio = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearAvgVerticalRatio() { + bitField0_ = (bitField0_ & ~0x00000008); + avgVerticalRatio_ = 0D; + onChanged(); + return this; + } + + private com.google.protobuf.Duration avgGroundContactTimeDuration_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + avgGroundContactTimeDurationBuilder_; + + /** + * + * + *
+       * Optional. The ground contact time for a particular stride is the amount
+       * of time for which the foot was in contact with the ground on that stride
+       * 
+ * + * + * .google.protobuf.Duration avg_ground_contact_time_duration = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the avgGroundContactTimeDuration field is set. + */ + public boolean hasAvgGroundContactTimeDuration() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+       * Optional. The ground contact time for a particular stride is the amount
+       * of time for which the foot was in contact with the ground on that stride
+       * 
+ * + * + * .google.protobuf.Duration avg_ground_contact_time_duration = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The avgGroundContactTimeDuration. + */ + public com.google.protobuf.Duration getAvgGroundContactTimeDuration() { + if (avgGroundContactTimeDurationBuilder_ == null) { + return avgGroundContactTimeDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : avgGroundContactTimeDuration_; + } else { + return avgGroundContactTimeDurationBuilder_.getMessage(); + } + } + + /** + * + * + *
+       * Optional. The ground contact time for a particular stride is the amount
+       * of time for which the foot was in contact with the ground on that stride
+       * 
+ * + * + * .google.protobuf.Duration avg_ground_contact_time_duration = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAvgGroundContactTimeDuration(com.google.protobuf.Duration value) { + if (avgGroundContactTimeDurationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + avgGroundContactTimeDuration_ = value; + } else { + avgGroundContactTimeDurationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. The ground contact time for a particular stride is the amount
+       * of time for which the foot was in contact with the ground on that stride
+       * 
+ * + * + * .google.protobuf.Duration avg_ground_contact_time_duration = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAvgGroundContactTimeDuration( + com.google.protobuf.Duration.Builder builderForValue) { + if (avgGroundContactTimeDurationBuilder_ == null) { + avgGroundContactTimeDuration_ = builderForValue.build(); + } else { + avgGroundContactTimeDurationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. The ground contact time for a particular stride is the amount
+       * of time for which the foot was in contact with the ground on that stride
+       * 
+ * + * + * .google.protobuf.Duration avg_ground_contact_time_duration = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeAvgGroundContactTimeDuration(com.google.protobuf.Duration value) { + if (avgGroundContactTimeDurationBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && avgGroundContactTimeDuration_ != null + && avgGroundContactTimeDuration_ + != com.google.protobuf.Duration.getDefaultInstance()) { + getAvgGroundContactTimeDurationBuilder().mergeFrom(value); + } else { + avgGroundContactTimeDuration_ = value; + } + } else { + avgGroundContactTimeDurationBuilder_.mergeFrom(value); + } + if (avgGroundContactTimeDuration_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * Optional. The ground contact time for a particular stride is the amount
+       * of time for which the foot was in contact with the ground on that stride
+       * 
+ * + * + * .google.protobuf.Duration avg_ground_contact_time_duration = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearAvgGroundContactTimeDuration() { + bitField0_ = (bitField0_ & ~0x00000010); + avgGroundContactTimeDuration_ = null; + if (avgGroundContactTimeDurationBuilder_ != null) { + avgGroundContactTimeDurationBuilder_.dispose(); + avgGroundContactTimeDurationBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. The ground contact time for a particular stride is the amount
+       * of time for which the foot was in contact with the ground on that stride
+       * 
+ * + * + * .google.protobuf.Duration avg_ground_contact_time_duration = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Duration.Builder getAvgGroundContactTimeDurationBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return internalGetAvgGroundContactTimeDurationFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * Optional. The ground contact time for a particular stride is the amount
+       * of time for which the foot was in contact with the ground on that stride
+       * 
+ * + * + * .google.protobuf.Duration avg_ground_contact_time_duration = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.DurationOrBuilder getAvgGroundContactTimeDurationOrBuilder() { + if (avgGroundContactTimeDurationBuilder_ != null) { + return avgGroundContactTimeDurationBuilder_.getMessageOrBuilder(); + } else { + return avgGroundContactTimeDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : avgGroundContactTimeDuration_; + } + } + + /** + * + * + *
+       * Optional. The ground contact time for a particular stride is the amount
+       * of time for which the foot was in contact with the ground on that stride
+       * 
+ * + * + * .google.protobuf.Duration avg_ground_contact_time_duration = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + internalGetAvgGroundContactTimeDurationFieldBuilder() { + if (avgGroundContactTimeDurationBuilder_ == null) { + avgGroundContactTimeDurationBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getAvgGroundContactTimeDuration(), getParentForChildren(), isClean()); + avgGroundContactTimeDuration_ = null; + } + return avgGroundContactTimeDurationBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.MetricsSummary.MobilityMetrics) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.MetricsSummary.MobilityMetrics) + private static final com.google.devicesandservices.health.v4.MetricsSummary.MobilityMetrics + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.devicesandservices.health.v4.MetricsSummary.MobilityMetrics(); + } + + public static com.google.devicesandservices.health.v4.MetricsSummary.MobilityMetrics + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MobilityMetrics parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.MetricsSummary.MobilityMetrics + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int CALORIES_KCAL_FIELD_NUMBER = 1; + private double caloriesKcal_ = 0D; + + /** + * + * + *
+   * Optional. Total calories burned by the user during the exercise.
+   * 
+ * + * optional double calories_kcal = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the caloriesKcal field is set. + */ + @java.lang.Override + public boolean hasCaloriesKcal() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Optional. Total calories burned by the user during the exercise.
+   * 
+ * + * optional double calories_kcal = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The caloriesKcal. + */ + @java.lang.Override + public double getCaloriesKcal() { + return caloriesKcal_; + } + + public static final int DISTANCE_MILLIMETERS_FIELD_NUMBER = 2; + private double distanceMillimeters_ = 0D; + + /** + * + * + *
+   * Optional. Total distance covered by the user during the exercise.
+   * 
+ * + * optional double distance_millimeters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the distanceMillimeters field is set. + */ + @java.lang.Override + public boolean hasDistanceMillimeters() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Optional. Total distance covered by the user during the exercise.
+   * 
+ * + * optional double distance_millimeters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The distanceMillimeters. + */ + @java.lang.Override + public double getDistanceMillimeters() { + return distanceMillimeters_; + } + + public static final int STEPS_FIELD_NUMBER = 3; + private long steps_ = 0L; + + /** + * + * + *
+   * Optional. Total steps taken during the exercise.
+   * 
+ * + * optional int64 steps = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the steps field is set. + */ + @java.lang.Override + public boolean hasSteps() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Optional. Total steps taken during the exercise.
+   * 
+ * + * optional int64 steps = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The steps. + */ + @java.lang.Override + public long getSteps() { + return steps_; + } + + public static final int AVERAGE_SPEED_MILLIMETERS_PER_SECOND_FIELD_NUMBER = 4; + private double averageSpeedMillimetersPerSecond_ = 0D; + + /** + * + * + *
+   * Optional. Average speed in millimeters per second.
+   * 
+ * + * + * optional double average_speed_millimeters_per_second = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the averageSpeedMillimetersPerSecond field is set. + */ + @java.lang.Override + public boolean hasAverageSpeedMillimetersPerSecond() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+   * Optional. Average speed in millimeters per second.
+   * 
+ * + * + * optional double average_speed_millimeters_per_second = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The averageSpeedMillimetersPerSecond. + */ + @java.lang.Override + public double getAverageSpeedMillimetersPerSecond() { + return averageSpeedMillimetersPerSecond_; + } + + public static final int AVERAGE_PACE_SECONDS_PER_METER_FIELD_NUMBER = 5; + private double averagePaceSecondsPerMeter_ = 0D; + + /** + * + * + *
+   * Optional. Average pace in seconds per meter.
+   * 
+ * + * + * optional double average_pace_seconds_per_meter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the averagePaceSecondsPerMeter field is set. + */ + @java.lang.Override + public boolean hasAveragePaceSecondsPerMeter() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+   * Optional. Average pace in seconds per meter.
+   * 
+ * + * + * optional double average_pace_seconds_per_meter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The averagePaceSecondsPerMeter. + */ + @java.lang.Override + public double getAveragePaceSecondsPerMeter() { + return averagePaceSecondsPerMeter_; + } + + public static final int AVERAGE_HEART_RATE_BEATS_PER_MINUTE_FIELD_NUMBER = 6; + private long averageHeartRateBeatsPerMinute_ = 0L; + + /** + * + * + *
+   * Optional. Average heart rate during the exercise.
+   * 
+ * + * + * optional int64 average_heart_rate_beats_per_minute = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the averageHeartRateBeatsPerMinute field is set. + */ + @java.lang.Override + public boolean hasAverageHeartRateBeatsPerMinute() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+   * Optional. Average heart rate during the exercise.
+   * 
+ * + * + * optional int64 average_heart_rate_beats_per_minute = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The averageHeartRateBeatsPerMinute. + */ + @java.lang.Override + public long getAverageHeartRateBeatsPerMinute() { + return averageHeartRateBeatsPerMinute_; + } + + public static final int ELEVATION_GAIN_MILLIMETERS_FIELD_NUMBER = 7; + private double elevationGainMillimeters_ = 0D; + + /** + * + * + *
+   * Optional. Total elevation gain during the exercise.
+   * 
+ * + * optional double elevation_gain_millimeters = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the elevationGainMillimeters field is set. + */ + @java.lang.Override + public boolean hasElevationGainMillimeters() { + return ((bitField0_ & 0x00000040) != 0); + } + + /** + * + * + *
+   * Optional. Total elevation gain during the exercise.
+   * 
+ * + * optional double elevation_gain_millimeters = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The elevationGainMillimeters. + */ + @java.lang.Override + public double getElevationGainMillimeters() { + return elevationGainMillimeters_; + } + + public static final int ACTIVE_ZONE_MINUTES_FIELD_NUMBER = 9; + private long activeZoneMinutes_ = 0L; + + /** + * + * + *
+   * Optional. Total active zone minutes for the exercise.
+   * 
+ * + * optional int64 active_zone_minutes = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the activeZoneMinutes field is set. + */ + @java.lang.Override + public boolean hasActiveZoneMinutes() { + return ((bitField0_ & 0x00000080) != 0); + } + + /** + * + * + *
+   * Optional. Total active zone minutes for the exercise.
+   * 
+ * + * optional int64 active_zone_minutes = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The activeZoneMinutes. + */ + @java.lang.Override + public long getActiveZoneMinutes() { + return activeZoneMinutes_; + } + + public static final int RUN_VO2_MAX_FIELD_NUMBER = 10; + private double runVo2Max_ = 0D; + + /** + * + * + *
+   * Optional. Run VO2 max value for the exercise. Only present in the running
+   * exercises at the top level as in the summary of the whole exercise.
+   * 
+ * + * optional double run_vo2_max = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the runVo2Max field is set. + */ + @java.lang.Override + public boolean hasRunVo2Max() { + return ((bitField0_ & 0x00000100) != 0); + } + + /** + * + * + *
+   * Optional. Run VO2 max value for the exercise. Only present in the running
+   * exercises at the top level as in the summary of the whole exercise.
+   * 
+ * + * optional double run_vo2_max = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The runVo2Max. + */ + @java.lang.Override + public double getRunVo2Max() { + return runVo2Max_; + } + + public static final int TOTAL_SWIM_LENGTHS_FIELD_NUMBER = 11; + private double totalSwimLengths_ = 0D; + + /** + * + * + *
+   * Optional. Number of full pool lengths completed during the exercise. Only
+   * present in the swimming exercises at the top level as in the summary of the
+   * whole exercise.
+   * 
+ * + * optional double total_swim_lengths = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the totalSwimLengths field is set. + */ + @java.lang.Override + public boolean hasTotalSwimLengths() { + return ((bitField0_ & 0x00000200) != 0); + } + + /** + * + * + *
+   * Optional. Number of full pool lengths completed during the exercise. Only
+   * present in the swimming exercises at the top level as in the summary of the
+   * whole exercise.
+   * 
+ * + * optional double total_swim_lengths = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The totalSwimLengths. + */ + @java.lang.Override + public double getTotalSwimLengths() { + return totalSwimLengths_; + } + + public static final int HEART_RATE_ZONE_DURATIONS_FIELD_NUMBER = 12; + private com.google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZones + heartRateZoneDurations_; + + /** + * + * + *
+   * Optional. Time spent in each heart rate zone.
+   * 
+ * + * + * .google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZones heart_rate_zone_durations = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the heartRateZoneDurations field is set. + */ + @java.lang.Override + public boolean hasHeartRateZoneDurations() { + return ((bitField0_ & 0x00000400) != 0); + } + + /** + * + * + *
+   * Optional. Time spent in each heart rate zone.
+   * 
+ * + * + * .google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZones heart_rate_zone_durations = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The heartRateZoneDurations. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZones + getHeartRateZoneDurations() { + return heartRateZoneDurations_ == null + ? com.google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZones + .getDefaultInstance() + : heartRateZoneDurations_; + } + + /** + * + * + *
+   * Optional. Time spent in each heart rate zone.
+   * 
+ * + * + * .google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZones heart_rate_zone_durations = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZonesOrBuilder + getHeartRateZoneDurationsOrBuilder() { + return heartRateZoneDurations_ == null + ? com.google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZones + .getDefaultInstance() + : heartRateZoneDurations_; + } + + public static final int MOBILITY_METRICS_FIELD_NUMBER = 13; + private com.google.devicesandservices.health.v4.MetricsSummary.MobilityMetrics mobilityMetrics_; + + /** + * + * + *
+   * Optional. Mobility workouts specific metrics. Only present in the advanced
+   * running exercises.
+   * 
+ * + * + * .google.devicesandservices.health.v4.MetricsSummary.MobilityMetrics mobility_metrics = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the mobilityMetrics field is set. + */ + @java.lang.Override + public boolean hasMobilityMetrics() { + return ((bitField0_ & 0x00000800) != 0); + } + + /** + * + * + *
+   * Optional. Mobility workouts specific metrics. Only present in the advanced
+   * running exercises.
+   * 
+ * + * + * .google.devicesandservices.health.v4.MetricsSummary.MobilityMetrics mobility_metrics = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The mobilityMetrics. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.MetricsSummary.MobilityMetrics + getMobilityMetrics() { + return mobilityMetrics_ == null + ? com.google.devicesandservices.health.v4.MetricsSummary.MobilityMetrics + .getDefaultInstance() + : mobilityMetrics_; + } + + /** + * + * + *
+   * Optional. Mobility workouts specific metrics. Only present in the advanced
+   * running exercises.
+   * 
+ * + * + * .google.devicesandservices.health.v4.MetricsSummary.MobilityMetrics mobility_metrics = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.MetricsSummary.MobilityMetricsOrBuilder + getMobilityMetricsOrBuilder() { + return mobilityMetrics_ == null + ? com.google.devicesandservices.health.v4.MetricsSummary.MobilityMetrics + .getDefaultInstance() + : mobilityMetrics_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeDouble(1, caloriesKcal_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeDouble(2, distanceMillimeters_); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeInt64(3, steps_); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeDouble(4, averageSpeedMillimetersPerSecond_); + } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeDouble(5, averagePaceSecondsPerMeter_); + } + if (((bitField0_ & 0x00000020) != 0)) { + output.writeInt64(6, averageHeartRateBeatsPerMinute_); + } + if (((bitField0_ & 0x00000040) != 0)) { + output.writeDouble(7, elevationGainMillimeters_); + } + if (((bitField0_ & 0x00000080) != 0)) { + output.writeInt64(9, activeZoneMinutes_); + } + if (((bitField0_ & 0x00000100) != 0)) { + output.writeDouble(10, runVo2Max_); + } + if (((bitField0_ & 0x00000200) != 0)) { + output.writeDouble(11, totalSwimLengths_); + } + if (((bitField0_ & 0x00000400) != 0)) { + output.writeMessage(12, getHeartRateZoneDurations()); + } + if (((bitField0_ & 0x00000800) != 0)) { + output.writeMessage(13, getMobilityMetrics()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(1, caloriesKcal_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(2, distanceMillimeters_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, steps_); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeDoubleSize( + 4, averageSpeedMillimetersPerSecond_); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeDoubleSize(5, averagePaceSecondsPerMeter_); + } + if (((bitField0_ & 0x00000020) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeInt64Size( + 6, averageHeartRateBeatsPerMinute_); + } + if (((bitField0_ & 0x00000040) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(7, elevationGainMillimeters_); + } + if (((bitField0_ & 0x00000080) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(9, activeZoneMinutes_); + } + if (((bitField0_ & 0x00000100) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(10, runVo2Max_); + } + if (((bitField0_ & 0x00000200) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(11, totalSwimLengths_); + } + if (((bitField0_ & 0x00000400) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(12, getHeartRateZoneDurations()); + } + if (((bitField0_ & 0x00000800) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, getMobilityMetrics()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.MetricsSummary)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.MetricsSummary other = + (com.google.devicesandservices.health.v4.MetricsSummary) obj; + + if (hasCaloriesKcal() != other.hasCaloriesKcal()) return false; + if (hasCaloriesKcal()) { + if (java.lang.Double.doubleToLongBits(getCaloriesKcal()) + != java.lang.Double.doubleToLongBits(other.getCaloriesKcal())) return false; + } + if (hasDistanceMillimeters() != other.hasDistanceMillimeters()) return false; + if (hasDistanceMillimeters()) { + if (java.lang.Double.doubleToLongBits(getDistanceMillimeters()) + != java.lang.Double.doubleToLongBits(other.getDistanceMillimeters())) return false; + } + if (hasSteps() != other.hasSteps()) return false; + if (hasSteps()) { + if (getSteps() != other.getSteps()) return false; + } + if (hasAverageSpeedMillimetersPerSecond() != other.hasAverageSpeedMillimetersPerSecond()) + return false; + if (hasAverageSpeedMillimetersPerSecond()) { + if (java.lang.Double.doubleToLongBits(getAverageSpeedMillimetersPerSecond()) + != java.lang.Double.doubleToLongBits(other.getAverageSpeedMillimetersPerSecond())) + return false; + } + if (hasAveragePaceSecondsPerMeter() != other.hasAveragePaceSecondsPerMeter()) return false; + if (hasAveragePaceSecondsPerMeter()) { + if (java.lang.Double.doubleToLongBits(getAveragePaceSecondsPerMeter()) + != java.lang.Double.doubleToLongBits(other.getAveragePaceSecondsPerMeter())) return false; + } + if (hasAverageHeartRateBeatsPerMinute() != other.hasAverageHeartRateBeatsPerMinute()) + return false; + if (hasAverageHeartRateBeatsPerMinute()) { + if (getAverageHeartRateBeatsPerMinute() != other.getAverageHeartRateBeatsPerMinute()) + return false; + } + if (hasElevationGainMillimeters() != other.hasElevationGainMillimeters()) return false; + if (hasElevationGainMillimeters()) { + if (java.lang.Double.doubleToLongBits(getElevationGainMillimeters()) + != java.lang.Double.doubleToLongBits(other.getElevationGainMillimeters())) return false; + } + if (hasActiveZoneMinutes() != other.hasActiveZoneMinutes()) return false; + if (hasActiveZoneMinutes()) { + if (getActiveZoneMinutes() != other.getActiveZoneMinutes()) return false; + } + if (hasRunVo2Max() != other.hasRunVo2Max()) return false; + if (hasRunVo2Max()) { + if (java.lang.Double.doubleToLongBits(getRunVo2Max()) + != java.lang.Double.doubleToLongBits(other.getRunVo2Max())) return false; + } + if (hasTotalSwimLengths() != other.hasTotalSwimLengths()) return false; + if (hasTotalSwimLengths()) { + if (java.lang.Double.doubleToLongBits(getTotalSwimLengths()) + != java.lang.Double.doubleToLongBits(other.getTotalSwimLengths())) return false; + } + if (hasHeartRateZoneDurations() != other.hasHeartRateZoneDurations()) return false; + if (hasHeartRateZoneDurations()) { + if (!getHeartRateZoneDurations().equals(other.getHeartRateZoneDurations())) return false; + } + if (hasMobilityMetrics() != other.hasMobilityMetrics()) return false; + if (hasMobilityMetrics()) { + if (!getMobilityMetrics().equals(other.getMobilityMetrics())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCaloriesKcal()) { + hash = (37 * hash) + CALORIES_KCAL_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getCaloriesKcal())); + } + if (hasDistanceMillimeters()) { + hash = (37 * hash) + DISTANCE_MILLIMETERS_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getDistanceMillimeters())); + } + if (hasSteps()) { + hash = (37 * hash) + STEPS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getSteps()); + } + if (hasAverageSpeedMillimetersPerSecond()) { + hash = (37 * hash) + AVERAGE_SPEED_MILLIMETERS_PER_SECOND_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getAverageSpeedMillimetersPerSecond())); + } + if (hasAveragePaceSecondsPerMeter()) { + hash = (37 * hash) + AVERAGE_PACE_SECONDS_PER_METER_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getAveragePaceSecondsPerMeter())); + } + if (hasAverageHeartRateBeatsPerMinute()) { + hash = (37 * hash) + AVERAGE_HEART_RATE_BEATS_PER_MINUTE_FIELD_NUMBER; + hash = + (53 * hash) + com.google.protobuf.Internal.hashLong(getAverageHeartRateBeatsPerMinute()); + } + if (hasElevationGainMillimeters()) { + hash = (37 * hash) + ELEVATION_GAIN_MILLIMETERS_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getElevationGainMillimeters())); + } + if (hasActiveZoneMinutes()) { + hash = (37 * hash) + ACTIVE_ZONE_MINUTES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getActiveZoneMinutes()); + } + if (hasRunVo2Max()) { + hash = (37 * hash) + RUN_VO2_MAX_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getRunVo2Max())); + } + if (hasTotalSwimLengths()) { + hash = (37 * hash) + TOTAL_SWIM_LENGTHS_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getTotalSwimLengths())); + } + if (hasHeartRateZoneDurations()) { + hash = (37 * hash) + HEART_RATE_ZONE_DURATIONS_FIELD_NUMBER; + hash = (53 * hash) + getHeartRateZoneDurations().hashCode(); + } + if (hasMobilityMetrics()) { + hash = (37 * hash) + MOBILITY_METRICS_FIELD_NUMBER; + hash = (53 * hash) + getMobilityMetrics().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.MetricsSummary parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.MetricsSummary parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.MetricsSummary parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.MetricsSummary parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.MetricsSummary parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.MetricsSummary parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.MetricsSummary parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.MetricsSummary parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.MetricsSummary parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.MetricsSummary parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.MetricsSummary parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.MetricsSummary parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.MetricsSummary prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Summary metrics for an exercise.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.MetricsSummary} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.MetricsSummary) + com.google.devicesandservices.health.v4.MetricsSummaryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_MetricsSummary_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_MetricsSummary_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.MetricsSummary.class, + com.google.devicesandservices.health.v4.MetricsSummary.Builder.class); + } + + // Construct using com.google.devicesandservices.health.v4.MetricsSummary.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetHeartRateZoneDurationsFieldBuilder(); + internalGetMobilityMetricsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + caloriesKcal_ = 0D; + distanceMillimeters_ = 0D; + steps_ = 0L; + averageSpeedMillimetersPerSecond_ = 0D; + averagePaceSecondsPerMeter_ = 0D; + averageHeartRateBeatsPerMinute_ = 0L; + elevationGainMillimeters_ = 0D; + activeZoneMinutes_ = 0L; + runVo2Max_ = 0D; + totalSwimLengths_ = 0D; + heartRateZoneDurations_ = null; + if (heartRateZoneDurationsBuilder_ != null) { + heartRateZoneDurationsBuilder_.dispose(); + heartRateZoneDurationsBuilder_ = null; + } + mobilityMetrics_ = null; + if (mobilityMetricsBuilder_ != null) { + mobilityMetricsBuilder_.dispose(); + mobilityMetricsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_MetricsSummary_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.MetricsSummary getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.MetricsSummary.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.MetricsSummary build() { + com.google.devicesandservices.health.v4.MetricsSummary result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.MetricsSummary buildPartial() { + com.google.devicesandservices.health.v4.MetricsSummary result = + new com.google.devicesandservices.health.v4.MetricsSummary(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.devicesandservices.health.v4.MetricsSummary result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.caloriesKcal_ = caloriesKcal_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.distanceMillimeters_ = distanceMillimeters_; + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.steps_ = steps_; + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.averageSpeedMillimetersPerSecond_ = averageSpeedMillimetersPerSecond_; + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.averagePaceSecondsPerMeter_ = averagePaceSecondsPerMeter_; + to_bitField0_ |= 0x00000010; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.averageHeartRateBeatsPerMinute_ = averageHeartRateBeatsPerMinute_; + to_bitField0_ |= 0x00000020; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.elevationGainMillimeters_ = elevationGainMillimeters_; + to_bitField0_ |= 0x00000040; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.activeZoneMinutes_ = activeZoneMinutes_; + to_bitField0_ |= 0x00000080; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.runVo2Max_ = runVo2Max_; + to_bitField0_ |= 0x00000100; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.totalSwimLengths_ = totalSwimLengths_; + to_bitField0_ |= 0x00000200; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.heartRateZoneDurations_ = + heartRateZoneDurationsBuilder_ == null + ? heartRateZoneDurations_ + : heartRateZoneDurationsBuilder_.build(); + to_bitField0_ |= 0x00000400; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.mobilityMetrics_ = + mobilityMetricsBuilder_ == null ? mobilityMetrics_ : mobilityMetricsBuilder_.build(); + to_bitField0_ |= 0x00000800; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.MetricsSummary) { + return mergeFrom((com.google.devicesandservices.health.v4.MetricsSummary) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.devicesandservices.health.v4.MetricsSummary other) { + if (other == com.google.devicesandservices.health.v4.MetricsSummary.getDefaultInstance()) + return this; + if (other.hasCaloriesKcal()) { + setCaloriesKcal(other.getCaloriesKcal()); + } + if (other.hasDistanceMillimeters()) { + setDistanceMillimeters(other.getDistanceMillimeters()); + } + if (other.hasSteps()) { + setSteps(other.getSteps()); + } + if (other.hasAverageSpeedMillimetersPerSecond()) { + setAverageSpeedMillimetersPerSecond(other.getAverageSpeedMillimetersPerSecond()); + } + if (other.hasAveragePaceSecondsPerMeter()) { + setAveragePaceSecondsPerMeter(other.getAveragePaceSecondsPerMeter()); + } + if (other.hasAverageHeartRateBeatsPerMinute()) { + setAverageHeartRateBeatsPerMinute(other.getAverageHeartRateBeatsPerMinute()); + } + if (other.hasElevationGainMillimeters()) { + setElevationGainMillimeters(other.getElevationGainMillimeters()); + } + if (other.hasActiveZoneMinutes()) { + setActiveZoneMinutes(other.getActiveZoneMinutes()); + } + if (other.hasRunVo2Max()) { + setRunVo2Max(other.getRunVo2Max()); + } + if (other.hasTotalSwimLengths()) { + setTotalSwimLengths(other.getTotalSwimLengths()); + } + if (other.hasHeartRateZoneDurations()) { + mergeHeartRateZoneDurations(other.getHeartRateZoneDurations()); + } + if (other.hasMobilityMetrics()) { + mergeMobilityMetrics(other.getMobilityMetrics()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 9: + { + caloriesKcal_ = input.readDouble(); + bitField0_ |= 0x00000001; + break; + } // case 9 + case 17: + { + distanceMillimeters_ = input.readDouble(); + bitField0_ |= 0x00000002; + break; + } // case 17 + case 24: + { + steps_ = input.readInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 33: + { + averageSpeedMillimetersPerSecond_ = input.readDouble(); + bitField0_ |= 0x00000008; + break; + } // case 33 + case 41: + { + averagePaceSecondsPerMeter_ = input.readDouble(); + bitField0_ |= 0x00000010; + break; + } // case 41 + case 48: + { + averageHeartRateBeatsPerMinute_ = input.readInt64(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 57: + { + elevationGainMillimeters_ = input.readDouble(); + bitField0_ |= 0x00000040; + break; + } // case 57 + case 72: + { + activeZoneMinutes_ = input.readInt64(); + bitField0_ |= 0x00000080; + break; + } // case 72 + case 81: + { + runVo2Max_ = input.readDouble(); + bitField0_ |= 0x00000100; + break; + } // case 81 + case 89: + { + totalSwimLengths_ = input.readDouble(); + bitField0_ |= 0x00000200; + break; + } // case 89 + case 98: + { + input.readMessage( + internalGetHeartRateZoneDurationsFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000400; + break; + } // case 98 + case 106: + { + input.readMessage( + internalGetMobilityMetricsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000800; + break; + } // case 106 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private double caloriesKcal_; + + /** + * + * + *
+     * Optional. Total calories burned by the user during the exercise.
+     * 
+ * + * optional double calories_kcal = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the caloriesKcal field is set. + */ + @java.lang.Override + public boolean hasCaloriesKcal() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Optional. Total calories burned by the user during the exercise.
+     * 
+ * + * optional double calories_kcal = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The caloriesKcal. + */ + @java.lang.Override + public double getCaloriesKcal() { + return caloriesKcal_; + } + + /** + * + * + *
+     * Optional. Total calories burned by the user during the exercise.
+     * 
+ * + * optional double calories_kcal = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The caloriesKcal to set. + * @return This builder for chaining. + */ + public Builder setCaloriesKcal(double value) { + + caloriesKcal_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Total calories burned by the user during the exercise.
+     * 
+ * + * optional double calories_kcal = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearCaloriesKcal() { + bitField0_ = (bitField0_ & ~0x00000001); + caloriesKcal_ = 0D; + onChanged(); + return this; + } + + private double distanceMillimeters_; + + /** + * + * + *
+     * Optional. Total distance covered by the user during the exercise.
+     * 
+ * + * optional double distance_millimeters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the distanceMillimeters field is set. + */ + @java.lang.Override + public boolean hasDistanceMillimeters() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Optional. Total distance covered by the user during the exercise.
+     * 
+ * + * optional double distance_millimeters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The distanceMillimeters. + */ + @java.lang.Override + public double getDistanceMillimeters() { + return distanceMillimeters_; + } + + /** + * + * + *
+     * Optional. Total distance covered by the user during the exercise.
+     * 
+ * + * optional double distance_millimeters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The distanceMillimeters to set. + * @return This builder for chaining. + */ + public Builder setDistanceMillimeters(double value) { + + distanceMillimeters_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Total distance covered by the user during the exercise.
+     * 
+ * + * optional double distance_millimeters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearDistanceMillimeters() { + bitField0_ = (bitField0_ & ~0x00000002); + distanceMillimeters_ = 0D; + onChanged(); + return this; + } + + private long steps_; + + /** + * + * + *
+     * Optional. Total steps taken during the exercise.
+     * 
+ * + * optional int64 steps = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the steps field is set. + */ + @java.lang.Override + public boolean hasSteps() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Optional. Total steps taken during the exercise.
+     * 
+ * + * optional int64 steps = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The steps. + */ + @java.lang.Override + public long getSteps() { + return steps_; + } + + /** + * + * + *
+     * Optional. Total steps taken during the exercise.
+     * 
+ * + * optional int64 steps = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The steps to set. + * @return This builder for chaining. + */ + public Builder setSteps(long value) { + + steps_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Total steps taken during the exercise.
+     * 
+ * + * optional int64 steps = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearSteps() { + bitField0_ = (bitField0_ & ~0x00000004); + steps_ = 0L; + onChanged(); + return this; + } + + private double averageSpeedMillimetersPerSecond_; + + /** + * + * + *
+     * Optional. Average speed in millimeters per second.
+     * 
+ * + * + * optional double average_speed_millimeters_per_second = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the averageSpeedMillimetersPerSecond field is set. + */ + @java.lang.Override + public boolean hasAverageSpeedMillimetersPerSecond() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+     * Optional. Average speed in millimeters per second.
+     * 
+ * + * + * optional double average_speed_millimeters_per_second = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The averageSpeedMillimetersPerSecond. + */ + @java.lang.Override + public double getAverageSpeedMillimetersPerSecond() { + return averageSpeedMillimetersPerSecond_; + } + + /** + * + * + *
+     * Optional. Average speed in millimeters per second.
+     * 
+ * + * + * optional double average_speed_millimeters_per_second = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The averageSpeedMillimetersPerSecond to set. + * @return This builder for chaining. + */ + public Builder setAverageSpeedMillimetersPerSecond(double value) { + + averageSpeedMillimetersPerSecond_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Average speed in millimeters per second.
+     * 
+ * + * + * optional double average_speed_millimeters_per_second = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearAverageSpeedMillimetersPerSecond() { + bitField0_ = (bitField0_ & ~0x00000008); + averageSpeedMillimetersPerSecond_ = 0D; + onChanged(); + return this; + } + + private double averagePaceSecondsPerMeter_; + + /** + * + * + *
+     * Optional. Average pace in seconds per meter.
+     * 
+ * + * + * optional double average_pace_seconds_per_meter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the averagePaceSecondsPerMeter field is set. + */ + @java.lang.Override + public boolean hasAveragePaceSecondsPerMeter() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+     * Optional. Average pace in seconds per meter.
+     * 
+ * + * + * optional double average_pace_seconds_per_meter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The averagePaceSecondsPerMeter. + */ + @java.lang.Override + public double getAveragePaceSecondsPerMeter() { + return averagePaceSecondsPerMeter_; + } + + /** + * + * + *
+     * Optional. Average pace in seconds per meter.
+     * 
+ * + * + * optional double average_pace_seconds_per_meter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The averagePaceSecondsPerMeter to set. + * @return This builder for chaining. + */ + public Builder setAveragePaceSecondsPerMeter(double value) { + + averagePaceSecondsPerMeter_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Average pace in seconds per meter.
+     * 
+ * + * + * optional double average_pace_seconds_per_meter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearAveragePaceSecondsPerMeter() { + bitField0_ = (bitField0_ & ~0x00000010); + averagePaceSecondsPerMeter_ = 0D; + onChanged(); + return this; + } + + private long averageHeartRateBeatsPerMinute_; + + /** + * + * + *
+     * Optional. Average heart rate during the exercise.
+     * 
+ * + * + * optional int64 average_heart_rate_beats_per_minute = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the averageHeartRateBeatsPerMinute field is set. + */ + @java.lang.Override + public boolean hasAverageHeartRateBeatsPerMinute() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+     * Optional. Average heart rate during the exercise.
+     * 
+ * + * + * optional int64 average_heart_rate_beats_per_minute = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The averageHeartRateBeatsPerMinute. + */ + @java.lang.Override + public long getAverageHeartRateBeatsPerMinute() { + return averageHeartRateBeatsPerMinute_; + } + + /** + * + * + *
+     * Optional. Average heart rate during the exercise.
+     * 
+ * + * + * optional int64 average_heart_rate_beats_per_minute = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The averageHeartRateBeatsPerMinute to set. + * @return This builder for chaining. + */ + public Builder setAverageHeartRateBeatsPerMinute(long value) { + + averageHeartRateBeatsPerMinute_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Average heart rate during the exercise.
+     * 
+ * + * + * optional int64 average_heart_rate_beats_per_minute = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearAverageHeartRateBeatsPerMinute() { + bitField0_ = (bitField0_ & ~0x00000020); + averageHeartRateBeatsPerMinute_ = 0L; + onChanged(); + return this; + } + + private double elevationGainMillimeters_; + + /** + * + * + *
+     * Optional. Total elevation gain during the exercise.
+     * 
+ * + * + * optional double elevation_gain_millimeters = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the elevationGainMillimeters field is set. + */ + @java.lang.Override + public boolean hasElevationGainMillimeters() { + return ((bitField0_ & 0x00000040) != 0); + } + + /** + * + * + *
+     * Optional. Total elevation gain during the exercise.
+     * 
+ * + * + * optional double elevation_gain_millimeters = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The elevationGainMillimeters. + */ + @java.lang.Override + public double getElevationGainMillimeters() { + return elevationGainMillimeters_; + } + + /** + * + * + *
+     * Optional. Total elevation gain during the exercise.
+     * 
+ * + * + * optional double elevation_gain_millimeters = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The elevationGainMillimeters to set. + * @return This builder for chaining. + */ + public Builder setElevationGainMillimeters(double value) { + + elevationGainMillimeters_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Total elevation gain during the exercise.
+     * 
+ * + * + * optional double elevation_gain_millimeters = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearElevationGainMillimeters() { + bitField0_ = (bitField0_ & ~0x00000040); + elevationGainMillimeters_ = 0D; + onChanged(); + return this; + } + + private long activeZoneMinutes_; + + /** + * + * + *
+     * Optional. Total active zone minutes for the exercise.
+     * 
+ * + * optional int64 active_zone_minutes = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the activeZoneMinutes field is set. + */ + @java.lang.Override + public boolean hasActiveZoneMinutes() { + return ((bitField0_ & 0x00000080) != 0); + } + + /** + * + * + *
+     * Optional. Total active zone minutes for the exercise.
+     * 
+ * + * optional int64 active_zone_minutes = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The activeZoneMinutes. + */ + @java.lang.Override + public long getActiveZoneMinutes() { + return activeZoneMinutes_; + } + + /** + * + * + *
+     * Optional. Total active zone minutes for the exercise.
+     * 
+ * + * optional int64 active_zone_minutes = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The activeZoneMinutes to set. + * @return This builder for chaining. + */ + public Builder setActiveZoneMinutes(long value) { + + activeZoneMinutes_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Total active zone minutes for the exercise.
+     * 
+ * + * optional int64 active_zone_minutes = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearActiveZoneMinutes() { + bitField0_ = (bitField0_ & ~0x00000080); + activeZoneMinutes_ = 0L; + onChanged(); + return this; + } + + private double runVo2Max_; + + /** + * + * + *
+     * Optional. Run VO2 max value for the exercise. Only present in the running
+     * exercises at the top level as in the summary of the whole exercise.
+     * 
+ * + * optional double run_vo2_max = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the runVo2Max field is set. + */ + @java.lang.Override + public boolean hasRunVo2Max() { + return ((bitField0_ & 0x00000100) != 0); + } + + /** + * + * + *
+     * Optional. Run VO2 max value for the exercise. Only present in the running
+     * exercises at the top level as in the summary of the whole exercise.
+     * 
+ * + * optional double run_vo2_max = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The runVo2Max. + */ + @java.lang.Override + public double getRunVo2Max() { + return runVo2Max_; + } + + /** + * + * + *
+     * Optional. Run VO2 max value for the exercise. Only present in the running
+     * exercises at the top level as in the summary of the whole exercise.
+     * 
+ * + * optional double run_vo2_max = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The runVo2Max to set. + * @return This builder for chaining. + */ + public Builder setRunVo2Max(double value) { + + runVo2Max_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Run VO2 max value for the exercise. Only present in the running
+     * exercises at the top level as in the summary of the whole exercise.
+     * 
+ * + * optional double run_vo2_max = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRunVo2Max() { + bitField0_ = (bitField0_ & ~0x00000100); + runVo2Max_ = 0D; + onChanged(); + return this; + } + + private double totalSwimLengths_; + + /** + * + * + *
+     * Optional. Number of full pool lengths completed during the exercise. Only
+     * present in the swimming exercises at the top level as in the summary of the
+     * whole exercise.
+     * 
+ * + * optional double total_swim_lengths = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the totalSwimLengths field is set. + */ + @java.lang.Override + public boolean hasTotalSwimLengths() { + return ((bitField0_ & 0x00000200) != 0); + } + + /** + * + * + *
+     * Optional. Number of full pool lengths completed during the exercise. Only
+     * present in the swimming exercises at the top level as in the summary of the
+     * whole exercise.
+     * 
+ * + * optional double total_swim_lengths = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The totalSwimLengths. + */ + @java.lang.Override + public double getTotalSwimLengths() { + return totalSwimLengths_; + } + + /** + * + * + *
+     * Optional. Number of full pool lengths completed during the exercise. Only
+     * present in the swimming exercises at the top level as in the summary of the
+     * whole exercise.
+     * 
+ * + * optional double total_swim_lengths = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The totalSwimLengths to set. + * @return This builder for chaining. + */ + public Builder setTotalSwimLengths(double value) { + + totalSwimLengths_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Number of full pool lengths completed during the exercise. Only
+     * present in the swimming exercises at the top level as in the summary of the
+     * whole exercise.
+     * 
+ * + * optional double total_swim_lengths = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearTotalSwimLengths() { + bitField0_ = (bitField0_ & ~0x00000200); + totalSwimLengths_ = 0D; + onChanged(); + return this; + } + + private com.google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZones + heartRateZoneDurations_; + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZones, + com.google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZones.Builder, + com.google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZonesOrBuilder> + heartRateZoneDurationsBuilder_; + + /** + * + * + *
+     * Optional. Time spent in each heart rate zone.
+     * 
+ * + * + * .google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZones heart_rate_zone_durations = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the heartRateZoneDurations field is set. + */ + public boolean hasHeartRateZoneDurations() { + return ((bitField0_ & 0x00000400) != 0); + } + + /** + * + * + *
+     * Optional. Time spent in each heart rate zone.
+     * 
+ * + * + * .google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZones heart_rate_zone_durations = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The heartRateZoneDurations. + */ + public com.google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZones + getHeartRateZoneDurations() { + if (heartRateZoneDurationsBuilder_ == null) { + return heartRateZoneDurations_ == null + ? com.google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZones + .getDefaultInstance() + : heartRateZoneDurations_; + } else { + return heartRateZoneDurationsBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. Time spent in each heart rate zone.
+     * 
+ * + * + * .google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZones heart_rate_zone_durations = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setHeartRateZoneDurations( + com.google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZones value) { + if (heartRateZoneDurationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + heartRateZoneDurations_ = value; + } else { + heartRateZoneDurationsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Time spent in each heart rate zone.
+     * 
+ * + * + * .google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZones heart_rate_zone_durations = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setHeartRateZoneDurations( + com.google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZones.Builder + builderForValue) { + if (heartRateZoneDurationsBuilder_ == null) { + heartRateZoneDurations_ = builderForValue.build(); + } else { + heartRateZoneDurationsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Time spent in each heart rate zone.
+     * 
+ * + * + * .google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZones heart_rate_zone_durations = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeHeartRateZoneDurations( + com.google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZones value) { + if (heartRateZoneDurationsBuilder_ == null) { + if (((bitField0_ & 0x00000400) != 0) + && heartRateZoneDurations_ != null + && heartRateZoneDurations_ + != com.google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZones + .getDefaultInstance()) { + getHeartRateZoneDurationsBuilder().mergeFrom(value); + } else { + heartRateZoneDurations_ = value; + } + } else { + heartRateZoneDurationsBuilder_.mergeFrom(value); + } + if (heartRateZoneDurations_ != null) { + bitField0_ |= 0x00000400; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. Time spent in each heart rate zone.
+     * 
+ * + * + * .google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZones heart_rate_zone_durations = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearHeartRateZoneDurations() { + bitField0_ = (bitField0_ & ~0x00000400); + heartRateZoneDurations_ = null; + if (heartRateZoneDurationsBuilder_ != null) { + heartRateZoneDurationsBuilder_.dispose(); + heartRateZoneDurationsBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Time spent in each heart rate zone.
+     * 
+ * + * + * .google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZones heart_rate_zone_durations = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZones.Builder + getHeartRateZoneDurationsBuilder() { + bitField0_ |= 0x00000400; + onChanged(); + return internalGetHeartRateZoneDurationsFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Time spent in each heart rate zone.
+     * 
+ * + * + * .google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZones heart_rate_zone_durations = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZonesOrBuilder + getHeartRateZoneDurationsOrBuilder() { + if (heartRateZoneDurationsBuilder_ != null) { + return heartRateZoneDurationsBuilder_.getMessageOrBuilder(); + } else { + return heartRateZoneDurations_ == null + ? com.google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZones + .getDefaultInstance() + : heartRateZoneDurations_; + } + } + + /** + * + * + *
+     * Optional. Time spent in each heart rate zone.
+     * 
+ * + * + * .google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZones heart_rate_zone_durations = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZones, + com.google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZones.Builder, + com.google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZonesOrBuilder> + internalGetHeartRateZoneDurationsFieldBuilder() { + if (heartRateZoneDurationsBuilder_ == null) { + heartRateZoneDurationsBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZones, + com.google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZones.Builder, + com.google.devicesandservices.health.v4.MetricsSummary + .TimeInHeartRateZonesOrBuilder>( + getHeartRateZoneDurations(), getParentForChildren(), isClean()); + heartRateZoneDurations_ = null; + } + return heartRateZoneDurationsBuilder_; + } + + private com.google.devicesandservices.health.v4.MetricsSummary.MobilityMetrics mobilityMetrics_; + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.MetricsSummary.MobilityMetrics, + com.google.devicesandservices.health.v4.MetricsSummary.MobilityMetrics.Builder, + com.google.devicesandservices.health.v4.MetricsSummary.MobilityMetricsOrBuilder> + mobilityMetricsBuilder_; + + /** + * + * + *
+     * Optional. Mobility workouts specific metrics. Only present in the advanced
+     * running exercises.
+     * 
+ * + * + * .google.devicesandservices.health.v4.MetricsSummary.MobilityMetrics mobility_metrics = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the mobilityMetrics field is set. + */ + public boolean hasMobilityMetrics() { + return ((bitField0_ & 0x00000800) != 0); + } + + /** + * + * + *
+     * Optional. Mobility workouts specific metrics. Only present in the advanced
+     * running exercises.
+     * 
+ * + * + * .google.devicesandservices.health.v4.MetricsSummary.MobilityMetrics mobility_metrics = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The mobilityMetrics. + */ + public com.google.devicesandservices.health.v4.MetricsSummary.MobilityMetrics + getMobilityMetrics() { + if (mobilityMetricsBuilder_ == null) { + return mobilityMetrics_ == null + ? com.google.devicesandservices.health.v4.MetricsSummary.MobilityMetrics + .getDefaultInstance() + : mobilityMetrics_; + } else { + return mobilityMetricsBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. Mobility workouts specific metrics. Only present in the advanced
+     * running exercises.
+     * 
+ * + * + * .google.devicesandservices.health.v4.MetricsSummary.MobilityMetrics mobility_metrics = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setMobilityMetrics( + com.google.devicesandservices.health.v4.MetricsSummary.MobilityMetrics value) { + if (mobilityMetricsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + mobilityMetrics_ = value; + } else { + mobilityMetricsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Mobility workouts specific metrics. Only present in the advanced
+     * running exercises.
+     * 
+ * + * + * .google.devicesandservices.health.v4.MetricsSummary.MobilityMetrics mobility_metrics = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setMobilityMetrics( + com.google.devicesandservices.health.v4.MetricsSummary.MobilityMetrics.Builder + builderForValue) { + if (mobilityMetricsBuilder_ == null) { + mobilityMetrics_ = builderForValue.build(); + } else { + mobilityMetricsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Mobility workouts specific metrics. Only present in the advanced
+     * running exercises.
+     * 
+ * + * + * .google.devicesandservices.health.v4.MetricsSummary.MobilityMetrics mobility_metrics = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeMobilityMetrics( + com.google.devicesandservices.health.v4.MetricsSummary.MobilityMetrics value) { + if (mobilityMetricsBuilder_ == null) { + if (((bitField0_ & 0x00000800) != 0) + && mobilityMetrics_ != null + && mobilityMetrics_ + != com.google.devicesandservices.health.v4.MetricsSummary.MobilityMetrics + .getDefaultInstance()) { + getMobilityMetricsBuilder().mergeFrom(value); + } else { + mobilityMetrics_ = value; + } + } else { + mobilityMetricsBuilder_.mergeFrom(value); + } + if (mobilityMetrics_ != null) { + bitField0_ |= 0x00000800; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. Mobility workouts specific metrics. Only present in the advanced
+     * running exercises.
+     * 
+ * + * + * .google.devicesandservices.health.v4.MetricsSummary.MobilityMetrics mobility_metrics = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearMobilityMetrics() { + bitField0_ = (bitField0_ & ~0x00000800); + mobilityMetrics_ = null; + if (mobilityMetricsBuilder_ != null) { + mobilityMetricsBuilder_.dispose(); + mobilityMetricsBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Mobility workouts specific metrics. Only present in the advanced
+     * running exercises.
+     * 
+ * + * + * .google.devicesandservices.health.v4.MetricsSummary.MobilityMetrics mobility_metrics = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.devicesandservices.health.v4.MetricsSummary.MobilityMetrics.Builder + getMobilityMetricsBuilder() { + bitField0_ |= 0x00000800; + onChanged(); + return internalGetMobilityMetricsFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Mobility workouts specific metrics. Only present in the advanced
+     * running exercises.
+     * 
+ * + * + * .google.devicesandservices.health.v4.MetricsSummary.MobilityMetrics mobility_metrics = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.devicesandservices.health.v4.MetricsSummary.MobilityMetricsOrBuilder + getMobilityMetricsOrBuilder() { + if (mobilityMetricsBuilder_ != null) { + return mobilityMetricsBuilder_.getMessageOrBuilder(); + } else { + return mobilityMetrics_ == null + ? com.google.devicesandservices.health.v4.MetricsSummary.MobilityMetrics + .getDefaultInstance() + : mobilityMetrics_; + } + } + + /** + * + * + *
+     * Optional. Mobility workouts specific metrics. Only present in the advanced
+     * running exercises.
+     * 
+ * + * + * .google.devicesandservices.health.v4.MetricsSummary.MobilityMetrics mobility_metrics = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.MetricsSummary.MobilityMetrics, + com.google.devicesandservices.health.v4.MetricsSummary.MobilityMetrics.Builder, + com.google.devicesandservices.health.v4.MetricsSummary.MobilityMetricsOrBuilder> + internalGetMobilityMetricsFieldBuilder() { + if (mobilityMetricsBuilder_ == null) { + mobilityMetricsBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.MetricsSummary.MobilityMetrics, + com.google.devicesandservices.health.v4.MetricsSummary.MobilityMetrics.Builder, + com.google.devicesandservices.health.v4.MetricsSummary.MobilityMetricsOrBuilder>( + getMobilityMetrics(), getParentForChildren(), isClean()); + mobilityMetrics_ = null; + } + return mobilityMetricsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.MetricsSummary) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.MetricsSummary) + private static final com.google.devicesandservices.health.v4.MetricsSummary DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.MetricsSummary(); + } + + public static com.google.devicesandservices.health.v4.MetricsSummary getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MetricsSummary parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.MetricsSummary getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/MetricsSummaryOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/MetricsSummaryOrBuilder.java new file mode 100644 index 000000000000..4d323e435e77 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/MetricsSummaryOrBuilder.java @@ -0,0 +1,402 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface MetricsSummaryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.MetricsSummary) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Total calories burned by the user during the exercise.
+   * 
+ * + * optional double calories_kcal = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the caloriesKcal field is set. + */ + boolean hasCaloriesKcal(); + + /** + * + * + *
+   * Optional. Total calories burned by the user during the exercise.
+   * 
+ * + * optional double calories_kcal = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The caloriesKcal. + */ + double getCaloriesKcal(); + + /** + * + * + *
+   * Optional. Total distance covered by the user during the exercise.
+   * 
+ * + * optional double distance_millimeters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the distanceMillimeters field is set. + */ + boolean hasDistanceMillimeters(); + + /** + * + * + *
+   * Optional. Total distance covered by the user during the exercise.
+   * 
+ * + * optional double distance_millimeters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The distanceMillimeters. + */ + double getDistanceMillimeters(); + + /** + * + * + *
+   * Optional. Total steps taken during the exercise.
+   * 
+ * + * optional int64 steps = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the steps field is set. + */ + boolean hasSteps(); + + /** + * + * + *
+   * Optional. Total steps taken during the exercise.
+   * 
+ * + * optional int64 steps = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The steps. + */ + long getSteps(); + + /** + * + * + *
+   * Optional. Average speed in millimeters per second.
+   * 
+ * + * + * optional double average_speed_millimeters_per_second = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the averageSpeedMillimetersPerSecond field is set. + */ + boolean hasAverageSpeedMillimetersPerSecond(); + + /** + * + * + *
+   * Optional. Average speed in millimeters per second.
+   * 
+ * + * + * optional double average_speed_millimeters_per_second = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The averageSpeedMillimetersPerSecond. + */ + double getAverageSpeedMillimetersPerSecond(); + + /** + * + * + *
+   * Optional. Average pace in seconds per meter.
+   * 
+ * + * + * optional double average_pace_seconds_per_meter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the averagePaceSecondsPerMeter field is set. + */ + boolean hasAveragePaceSecondsPerMeter(); + + /** + * + * + *
+   * Optional. Average pace in seconds per meter.
+   * 
+ * + * + * optional double average_pace_seconds_per_meter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The averagePaceSecondsPerMeter. + */ + double getAveragePaceSecondsPerMeter(); + + /** + * + * + *
+   * Optional. Average heart rate during the exercise.
+   * 
+ * + * + * optional int64 average_heart_rate_beats_per_minute = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the averageHeartRateBeatsPerMinute field is set. + */ + boolean hasAverageHeartRateBeatsPerMinute(); + + /** + * + * + *
+   * Optional. Average heart rate during the exercise.
+   * 
+ * + * + * optional int64 average_heart_rate_beats_per_minute = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The averageHeartRateBeatsPerMinute. + */ + long getAverageHeartRateBeatsPerMinute(); + + /** + * + * + *
+   * Optional. Total elevation gain during the exercise.
+   * 
+ * + * optional double elevation_gain_millimeters = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the elevationGainMillimeters field is set. + */ + boolean hasElevationGainMillimeters(); + + /** + * + * + *
+   * Optional. Total elevation gain during the exercise.
+   * 
+ * + * optional double elevation_gain_millimeters = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The elevationGainMillimeters. + */ + double getElevationGainMillimeters(); + + /** + * + * + *
+   * Optional. Total active zone minutes for the exercise.
+   * 
+ * + * optional int64 active_zone_minutes = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the activeZoneMinutes field is set. + */ + boolean hasActiveZoneMinutes(); + + /** + * + * + *
+   * Optional. Total active zone minutes for the exercise.
+   * 
+ * + * optional int64 active_zone_minutes = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The activeZoneMinutes. + */ + long getActiveZoneMinutes(); + + /** + * + * + *
+   * Optional. Run VO2 max value for the exercise. Only present in the running
+   * exercises at the top level as in the summary of the whole exercise.
+   * 
+ * + * optional double run_vo2_max = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the runVo2Max field is set. + */ + boolean hasRunVo2Max(); + + /** + * + * + *
+   * Optional. Run VO2 max value for the exercise. Only present in the running
+   * exercises at the top level as in the summary of the whole exercise.
+   * 
+ * + * optional double run_vo2_max = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The runVo2Max. + */ + double getRunVo2Max(); + + /** + * + * + *
+   * Optional. Number of full pool lengths completed during the exercise. Only
+   * present in the swimming exercises at the top level as in the summary of the
+   * whole exercise.
+   * 
+ * + * optional double total_swim_lengths = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the totalSwimLengths field is set. + */ + boolean hasTotalSwimLengths(); + + /** + * + * + *
+   * Optional. Number of full pool lengths completed during the exercise. Only
+   * present in the swimming exercises at the top level as in the summary of the
+   * whole exercise.
+   * 
+ * + * optional double total_swim_lengths = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The totalSwimLengths. + */ + double getTotalSwimLengths(); + + /** + * + * + *
+   * Optional. Time spent in each heart rate zone.
+   * 
+ * + * + * .google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZones heart_rate_zone_durations = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the heartRateZoneDurations field is set. + */ + boolean hasHeartRateZoneDurations(); + + /** + * + * + *
+   * Optional. Time spent in each heart rate zone.
+   * 
+ * + * + * .google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZones heart_rate_zone_durations = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The heartRateZoneDurations. + */ + com.google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZones + getHeartRateZoneDurations(); + + /** + * + * + *
+   * Optional. Time spent in each heart rate zone.
+   * 
+ * + * + * .google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZones heart_rate_zone_durations = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.devicesandservices.health.v4.MetricsSummary.TimeInHeartRateZonesOrBuilder + getHeartRateZoneDurationsOrBuilder(); + + /** + * + * + *
+   * Optional. Mobility workouts specific metrics. Only present in the advanced
+   * running exercises.
+   * 
+ * + * + * .google.devicesandservices.health.v4.MetricsSummary.MobilityMetrics mobility_metrics = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the mobilityMetrics field is set. + */ + boolean hasMobilityMetrics(); + + /** + * + * + *
+   * Optional. Mobility workouts specific metrics. Only present in the advanced
+   * running exercises.
+   * 
+ * + * + * .google.devicesandservices.health.v4.MetricsSummary.MobilityMetrics mobility_metrics = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The mobilityMetrics. + */ + com.google.devicesandservices.health.v4.MetricsSummary.MobilityMetrics getMobilityMetrics(); + + /** + * + * + *
+   * Optional. Mobility workouts specific metrics. Only present in the advanced
+   * running exercises.
+   * 
+ * + * + * .google.devicesandservices.health.v4.MetricsSummary.MobilityMetrics mobility_metrics = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.devicesandservices.health.v4.MetricsSummary.MobilityMetricsOrBuilder + getMobilityMetricsOrBuilder(); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ObservationSampleTime.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ObservationSampleTime.java new file mode 100644 index 000000000000..87b684e0e9c9 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ObservationSampleTime.java @@ -0,0 +1,1332 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_coordinates.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * Represents a sample time of an observed data point.
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.ObservationSampleTime} + */ +@com.google.protobuf.Generated +public final class ObservationSampleTime extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.ObservationSampleTime) + ObservationSampleTimeOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ObservationSampleTime"); + } + + // Use ObservationSampleTime.newBuilder() to construct. + private ObservationSampleTime(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ObservationSampleTime() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataCoordinatesProto + .internal_static_google_devicesandservices_health_v4_ObservationSampleTime_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataCoordinatesProto + .internal_static_google_devicesandservices_health_v4_ObservationSampleTime_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.ObservationSampleTime.class, + com.google.devicesandservices.health.v4.ObservationSampleTime.Builder.class); + } + + private int bitField0_; + public static final int PHYSICAL_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp physicalTime_; + + /** + * + * + *
+   * Required. The time of the observation.
+   * 
+ * + * .google.protobuf.Timestamp physical_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the physicalTime field is set. + */ + @java.lang.Override + public boolean hasPhysicalTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The time of the observation.
+   * 
+ * + * .google.protobuf.Timestamp physical_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The physicalTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getPhysicalTime() { + return physicalTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : physicalTime_; + } + + /** + * + * + *
+   * Required. The time of the observation.
+   * 
+ * + * .google.protobuf.Timestamp physical_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getPhysicalTimeOrBuilder() { + return physicalTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : physicalTime_; + } + + public static final int UTC_OFFSET_FIELD_NUMBER = 2; + private com.google.protobuf.Duration utcOffset_; + + /** + * + * + *
+   * Required. The offset of the user's local time during the observation
+   * relative to the Coordinated Universal Time (UTC).
+   * 
+ * + * .google.protobuf.Duration utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the utcOffset field is set. + */ + @java.lang.Override + public boolean hasUtcOffset() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Required. The offset of the user's local time during the observation
+   * relative to the Coordinated Universal Time (UTC).
+   * 
+ * + * .google.protobuf.Duration utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The utcOffset. + */ + @java.lang.Override + public com.google.protobuf.Duration getUtcOffset() { + return utcOffset_ == null ? com.google.protobuf.Duration.getDefaultInstance() : utcOffset_; + } + + /** + * + * + *
+   * Required. The offset of the user's local time during the observation
+   * relative to the Coordinated Universal Time (UTC).
+   * 
+ * + * .google.protobuf.Duration utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getUtcOffsetOrBuilder() { + return utcOffset_ == null ? com.google.protobuf.Duration.getDefaultInstance() : utcOffset_; + } + + public static final int CIVIL_TIME_FIELD_NUMBER = 3; + private com.google.devicesandservices.health.v4.CivilDateTime civilTime_; + + /** + * + * + *
+   * Output only. The civil time in the timezone the subject is in
+   * at the time of the observation.
+   * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime civil_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the civilTime field is set. + */ + @java.lang.Override + public boolean hasCivilTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Output only. The civil time in the timezone the subject is in
+   * at the time of the observation.
+   * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime civil_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The civilTime. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.CivilDateTime getCivilTime() { + return civilTime_ == null + ? com.google.devicesandservices.health.v4.CivilDateTime.getDefaultInstance() + : civilTime_; + } + + /** + * + * + *
+   * Output only. The civil time in the timezone the subject is in
+   * at the time of the observation.
+   * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime civil_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.CivilDateTimeOrBuilder getCivilTimeOrBuilder() { + return civilTime_ == null + ? com.google.devicesandservices.health.v4.CivilDateTime.getDefaultInstance() + : civilTime_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getPhysicalTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getUtcOffset()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(3, getCivilTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getPhysicalTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUtcOffset()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCivilTime()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.ObservationSampleTime)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.ObservationSampleTime other = + (com.google.devicesandservices.health.v4.ObservationSampleTime) obj; + + if (hasPhysicalTime() != other.hasPhysicalTime()) return false; + if (hasPhysicalTime()) { + if (!getPhysicalTime().equals(other.getPhysicalTime())) return false; + } + if (hasUtcOffset() != other.hasUtcOffset()) return false; + if (hasUtcOffset()) { + if (!getUtcOffset().equals(other.getUtcOffset())) return false; + } + if (hasCivilTime() != other.hasCivilTime()) return false; + if (hasCivilTime()) { + if (!getCivilTime().equals(other.getCivilTime())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasPhysicalTime()) { + hash = (37 * hash) + PHYSICAL_TIME_FIELD_NUMBER; + hash = (53 * hash) + getPhysicalTime().hashCode(); + } + if (hasUtcOffset()) { + hash = (37 * hash) + UTC_OFFSET_FIELD_NUMBER; + hash = (53 * hash) + getUtcOffset().hashCode(); + } + if (hasCivilTime()) { + hash = (37 * hash) + CIVIL_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCivilTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.ObservationSampleTime parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.ObservationSampleTime parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ObservationSampleTime parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.ObservationSampleTime parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ObservationSampleTime parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.ObservationSampleTime parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ObservationSampleTime parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.ObservationSampleTime parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ObservationSampleTime parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.ObservationSampleTime parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ObservationSampleTime parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.ObservationSampleTime parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.ObservationSampleTime prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Represents a sample time of an observed data point.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.ObservationSampleTime} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.ObservationSampleTime) + com.google.devicesandservices.health.v4.ObservationSampleTimeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataCoordinatesProto + .internal_static_google_devicesandservices_health_v4_ObservationSampleTime_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataCoordinatesProto + .internal_static_google_devicesandservices_health_v4_ObservationSampleTime_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.ObservationSampleTime.class, + com.google.devicesandservices.health.v4.ObservationSampleTime.Builder.class); + } + + // Construct using com.google.devicesandservices.health.v4.ObservationSampleTime.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetPhysicalTimeFieldBuilder(); + internalGetUtcOffsetFieldBuilder(); + internalGetCivilTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + physicalTime_ = null; + if (physicalTimeBuilder_ != null) { + physicalTimeBuilder_.dispose(); + physicalTimeBuilder_ = null; + } + utcOffset_ = null; + if (utcOffsetBuilder_ != null) { + utcOffsetBuilder_.dispose(); + utcOffsetBuilder_ = null; + } + civilTime_ = null; + if (civilTimeBuilder_ != null) { + civilTimeBuilder_.dispose(); + civilTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataCoordinatesProto + .internal_static_google_devicesandservices_health_v4_ObservationSampleTime_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.ObservationSampleTime + getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.ObservationSampleTime.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.ObservationSampleTime build() { + com.google.devicesandservices.health.v4.ObservationSampleTime result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.ObservationSampleTime buildPartial() { + com.google.devicesandservices.health.v4.ObservationSampleTime result = + new com.google.devicesandservices.health.v4.ObservationSampleTime(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.devicesandservices.health.v4.ObservationSampleTime result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.physicalTime_ = + physicalTimeBuilder_ == null ? physicalTime_ : physicalTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.utcOffset_ = utcOffsetBuilder_ == null ? utcOffset_ : utcOffsetBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.civilTime_ = civilTimeBuilder_ == null ? civilTime_ : civilTimeBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.ObservationSampleTime) { + return mergeFrom((com.google.devicesandservices.health.v4.ObservationSampleTime) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.devicesandservices.health.v4.ObservationSampleTime other) { + if (other + == com.google.devicesandservices.health.v4.ObservationSampleTime.getDefaultInstance()) + return this; + if (other.hasPhysicalTime()) { + mergePhysicalTime(other.getPhysicalTime()); + } + if (other.hasUtcOffset()) { + mergeUtcOffset(other.getUtcOffset()); + } + if (other.hasCivilTime()) { + mergeCivilTime(other.getCivilTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetPhysicalTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetUtcOffsetFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetCivilTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.Timestamp physicalTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + physicalTimeBuilder_; + + /** + * + * + *
+     * Required. The time of the observation.
+     * 
+ * + * .google.protobuf.Timestamp physical_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the physicalTime field is set. + */ + public boolean hasPhysicalTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. The time of the observation.
+     * 
+ * + * .google.protobuf.Timestamp physical_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The physicalTime. + */ + public com.google.protobuf.Timestamp getPhysicalTime() { + if (physicalTimeBuilder_ == null) { + return physicalTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : physicalTime_; + } else { + return physicalTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The time of the observation.
+     * 
+ * + * .google.protobuf.Timestamp physical_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setPhysicalTime(com.google.protobuf.Timestamp value) { + if (physicalTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + physicalTime_ = value; + } else { + physicalTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The time of the observation.
+     * 
+ * + * .google.protobuf.Timestamp physical_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setPhysicalTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (physicalTimeBuilder_ == null) { + physicalTime_ = builderForValue.build(); + } else { + physicalTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The time of the observation.
+     * 
+ * + * .google.protobuf.Timestamp physical_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergePhysicalTime(com.google.protobuf.Timestamp value) { + if (physicalTimeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && physicalTime_ != null + && physicalTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getPhysicalTimeBuilder().mergeFrom(value); + } else { + physicalTime_ = value; + } + } else { + physicalTimeBuilder_.mergeFrom(value); + } + if (physicalTime_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The time of the observation.
+     * 
+ * + * .google.protobuf.Timestamp physical_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearPhysicalTime() { + bitField0_ = (bitField0_ & ~0x00000001); + physicalTime_ = null; + if (physicalTimeBuilder_ != null) { + physicalTimeBuilder_.dispose(); + physicalTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The time of the observation.
+     * 
+ * + * .google.protobuf.Timestamp physical_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.Timestamp.Builder getPhysicalTimeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetPhysicalTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The time of the observation.
+     * 
+ * + * .google.protobuf.Timestamp physical_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.TimestampOrBuilder getPhysicalTimeOrBuilder() { + if (physicalTimeBuilder_ != null) { + return physicalTimeBuilder_.getMessageOrBuilder(); + } else { + return physicalTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : physicalTime_; + } + } + + /** + * + * + *
+     * Required. The time of the observation.
+     * 
+ * + * .google.protobuf.Timestamp physical_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetPhysicalTimeFieldBuilder() { + if (physicalTimeBuilder_ == null) { + physicalTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getPhysicalTime(), getParentForChildren(), isClean()); + physicalTime_ = null; + } + return physicalTimeBuilder_; + } + + private com.google.protobuf.Duration utcOffset_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + utcOffsetBuilder_; + + /** + * + * + *
+     * Required. The offset of the user's local time during the observation
+     * relative to the Coordinated Universal Time (UTC).
+     * 
+ * + * .google.protobuf.Duration utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the utcOffset field is set. + */ + public boolean hasUtcOffset() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Required. The offset of the user's local time during the observation
+     * relative to the Coordinated Universal Time (UTC).
+     * 
+ * + * .google.protobuf.Duration utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The utcOffset. + */ + public com.google.protobuf.Duration getUtcOffset() { + if (utcOffsetBuilder_ == null) { + return utcOffset_ == null ? com.google.protobuf.Duration.getDefaultInstance() : utcOffset_; + } else { + return utcOffsetBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The offset of the user's local time during the observation
+     * relative to the Coordinated Universal Time (UTC).
+     * 
+ * + * .google.protobuf.Duration utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUtcOffset(com.google.protobuf.Duration value) { + if (utcOffsetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + utcOffset_ = value; + } else { + utcOffsetBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The offset of the user's local time during the observation
+     * relative to the Coordinated Universal Time (UTC).
+     * 
+ * + * .google.protobuf.Duration utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUtcOffset(com.google.protobuf.Duration.Builder builderForValue) { + if (utcOffsetBuilder_ == null) { + utcOffset_ = builderForValue.build(); + } else { + utcOffsetBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The offset of the user's local time during the observation
+     * relative to the Coordinated Universal Time (UTC).
+     * 
+ * + * .google.protobuf.Duration utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeUtcOffset(com.google.protobuf.Duration value) { + if (utcOffsetBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && utcOffset_ != null + && utcOffset_ != com.google.protobuf.Duration.getDefaultInstance()) { + getUtcOffsetBuilder().mergeFrom(value); + } else { + utcOffset_ = value; + } + } else { + utcOffsetBuilder_.mergeFrom(value); + } + if (utcOffset_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The offset of the user's local time during the observation
+     * relative to the Coordinated Universal Time (UTC).
+     * 
+ * + * .google.protobuf.Duration utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUtcOffset() { + bitField0_ = (bitField0_ & ~0x00000002); + utcOffset_ = null; + if (utcOffsetBuilder_ != null) { + utcOffsetBuilder_.dispose(); + utcOffsetBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The offset of the user's local time during the observation
+     * relative to the Coordinated Universal Time (UTC).
+     * 
+ * + * .google.protobuf.Duration utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.Duration.Builder getUtcOffsetBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetUtcOffsetFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The offset of the user's local time during the observation
+     * relative to the Coordinated Universal Time (UTC).
+     * 
+ * + * .google.protobuf.Duration utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.DurationOrBuilder getUtcOffsetOrBuilder() { + if (utcOffsetBuilder_ != null) { + return utcOffsetBuilder_.getMessageOrBuilder(); + } else { + return utcOffset_ == null ? com.google.protobuf.Duration.getDefaultInstance() : utcOffset_; + } + } + + /** + * + * + *
+     * Required. The offset of the user's local time during the observation
+     * relative to the Coordinated Universal Time (UTC).
+     * 
+ * + * .google.protobuf.Duration utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + internalGetUtcOffsetFieldBuilder() { + if (utcOffsetBuilder_ == null) { + utcOffsetBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getUtcOffset(), getParentForChildren(), isClean()); + utcOffset_ = null; + } + return utcOffsetBuilder_; + } + + private com.google.devicesandservices.health.v4.CivilDateTime civilTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.CivilDateTime, + com.google.devicesandservices.health.v4.CivilDateTime.Builder, + com.google.devicesandservices.health.v4.CivilDateTimeOrBuilder> + civilTimeBuilder_; + + /** + * + * + *
+     * Output only. The civil time in the timezone the subject is in
+     * at the time of the observation.
+     * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime civil_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the civilTime field is set. + */ + public boolean hasCivilTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Output only. The civil time in the timezone the subject is in
+     * at the time of the observation.
+     * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime civil_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The civilTime. + */ + public com.google.devicesandservices.health.v4.CivilDateTime getCivilTime() { + if (civilTimeBuilder_ == null) { + return civilTime_ == null + ? com.google.devicesandservices.health.v4.CivilDateTime.getDefaultInstance() + : civilTime_; + } else { + return civilTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The civil time in the timezone the subject is in
+     * at the time of the observation.
+     * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime civil_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCivilTime(com.google.devicesandservices.health.v4.CivilDateTime value) { + if (civilTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + civilTime_ = value; + } else { + civilTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The civil time in the timezone the subject is in
+     * at the time of the observation.
+     * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime civil_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCivilTime( + com.google.devicesandservices.health.v4.CivilDateTime.Builder builderForValue) { + if (civilTimeBuilder_ == null) { + civilTime_ = builderForValue.build(); + } else { + civilTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The civil time in the timezone the subject is in
+     * at the time of the observation.
+     * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime civil_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCivilTime(com.google.devicesandservices.health.v4.CivilDateTime value) { + if (civilTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && civilTime_ != null + && civilTime_ + != com.google.devicesandservices.health.v4.CivilDateTime.getDefaultInstance()) { + getCivilTimeBuilder().mergeFrom(value); + } else { + civilTime_ = value; + } + } else { + civilTimeBuilder_.mergeFrom(value); + } + if (civilTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The civil time in the timezone the subject is in
+     * at the time of the observation.
+     * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime civil_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCivilTime() { + bitField0_ = (bitField0_ & ~0x00000004); + civilTime_ = null; + if (civilTimeBuilder_ != null) { + civilTimeBuilder_.dispose(); + civilTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The civil time in the timezone the subject is in
+     * at the time of the observation.
+     * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime civil_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.devicesandservices.health.v4.CivilDateTime.Builder getCivilTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetCivilTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The civil time in the timezone the subject is in
+     * at the time of the observation.
+     * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime civil_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.devicesandservices.health.v4.CivilDateTimeOrBuilder getCivilTimeOrBuilder() { + if (civilTimeBuilder_ != null) { + return civilTimeBuilder_.getMessageOrBuilder(); + } else { + return civilTime_ == null + ? com.google.devicesandservices.health.v4.CivilDateTime.getDefaultInstance() + : civilTime_; + } + } + + /** + * + * + *
+     * Output only. The civil time in the timezone the subject is in
+     * at the time of the observation.
+     * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime civil_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.CivilDateTime, + com.google.devicesandservices.health.v4.CivilDateTime.Builder, + com.google.devicesandservices.health.v4.CivilDateTimeOrBuilder> + internalGetCivilTimeFieldBuilder() { + if (civilTimeBuilder_ == null) { + civilTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.CivilDateTime, + com.google.devicesandservices.health.v4.CivilDateTime.Builder, + com.google.devicesandservices.health.v4.CivilDateTimeOrBuilder>( + getCivilTime(), getParentForChildren(), isClean()); + civilTime_ = null; + } + return civilTimeBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.ObservationSampleTime) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.ObservationSampleTime) + private static final com.google.devicesandservices.health.v4.ObservationSampleTime + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.ObservationSampleTime(); + } + + public static com.google.devicesandservices.health.v4.ObservationSampleTime getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ObservationSampleTime parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.ObservationSampleTime getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ObservationSampleTimeOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ObservationSampleTimeOrBuilder.java new file mode 100644 index 000000000000..677e4ea8cec7 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ObservationSampleTimeOrBuilder.java @@ -0,0 +1,157 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_coordinates.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface ObservationSampleTimeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.ObservationSampleTime) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The time of the observation.
+   * 
+ * + * .google.protobuf.Timestamp physical_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the physicalTime field is set. + */ + boolean hasPhysicalTime(); + + /** + * + * + *
+   * Required. The time of the observation.
+   * 
+ * + * .google.protobuf.Timestamp physical_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The physicalTime. + */ + com.google.protobuf.Timestamp getPhysicalTime(); + + /** + * + * + *
+   * Required. The time of the observation.
+   * 
+ * + * .google.protobuf.Timestamp physical_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.TimestampOrBuilder getPhysicalTimeOrBuilder(); + + /** + * + * + *
+   * Required. The offset of the user's local time during the observation
+   * relative to the Coordinated Universal Time (UTC).
+   * 
+ * + * .google.protobuf.Duration utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the utcOffset field is set. + */ + boolean hasUtcOffset(); + + /** + * + * + *
+   * Required. The offset of the user's local time during the observation
+   * relative to the Coordinated Universal Time (UTC).
+   * 
+ * + * .google.protobuf.Duration utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The utcOffset. + */ + com.google.protobuf.Duration getUtcOffset(); + + /** + * + * + *
+   * Required. The offset of the user's local time during the observation
+   * relative to the Coordinated Universal Time (UTC).
+   * 
+ * + * .google.protobuf.Duration utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.DurationOrBuilder getUtcOffsetOrBuilder(); + + /** + * + * + *
+   * Output only. The civil time in the timezone the subject is in
+   * at the time of the observation.
+   * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime civil_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the civilTime field is set. + */ + boolean hasCivilTime(); + + /** + * + * + *
+   * Output only. The civil time in the timezone the subject is in
+   * at the time of the observation.
+   * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime civil_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The civilTime. + */ + com.google.devicesandservices.health.v4.CivilDateTime getCivilTime(); + + /** + * + * + *
+   * Output only. The civil time in the timezone the subject is in
+   * at the time of the observation.
+   * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime civil_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.devicesandservices.health.v4.CivilDateTimeOrBuilder getCivilTimeOrBuilder(); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ObservationTimeInterval.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ObservationTimeInterval.java new file mode 100644 index 000000000000..44d79d00d093 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ObservationTimeInterval.java @@ -0,0 +1,2257 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_coordinates.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * Represents a time interval of an observed data point.
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.ObservationTimeInterval} + */ +@com.google.protobuf.Generated +public final class ObservationTimeInterval extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.ObservationTimeInterval) + ObservationTimeIntervalOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ObservationTimeInterval"); + } + + // Use ObservationTimeInterval.newBuilder() to construct. + private ObservationTimeInterval(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ObservationTimeInterval() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataCoordinatesProto + .internal_static_google_devicesandservices_health_v4_ObservationTimeInterval_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataCoordinatesProto + .internal_static_google_devicesandservices_health_v4_ObservationTimeInterval_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.ObservationTimeInterval.class, + com.google.devicesandservices.health.v4.ObservationTimeInterval.Builder.class); + } + + private int bitField0_; + public static final int START_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp startTime_; + + /** + * + * + *
+   * Required. Observed interval start time.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the startTime field is set. + */ + @java.lang.Override + public boolean hasStartTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. Observed interval start time.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The startTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + + /** + * + * + *
+   * Required. Observed interval start time.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + + public static final int START_UTC_OFFSET_FIELD_NUMBER = 2; + private com.google.protobuf.Duration startUtcOffset_; + + /** + * + * + *
+   * Required. The offset of the user's local time at the start of the
+   * observation relative to the Coordinated Universal Time (UTC).
+   * 
+ * + * .google.protobuf.Duration start_utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the startUtcOffset field is set. + */ + @java.lang.Override + public boolean hasStartUtcOffset() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Required. The offset of the user's local time at the start of the
+   * observation relative to the Coordinated Universal Time (UTC).
+   * 
+ * + * .google.protobuf.Duration start_utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The startUtcOffset. + */ + @java.lang.Override + public com.google.protobuf.Duration getStartUtcOffset() { + return startUtcOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : startUtcOffset_; + } + + /** + * + * + *
+   * Required. The offset of the user's local time at the start of the
+   * observation relative to the Coordinated Universal Time (UTC).
+   * 
+ * + * .google.protobuf.Duration start_utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getStartUtcOffsetOrBuilder() { + return startUtcOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : startUtcOffset_; + } + + public static final int END_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp endTime_; + + /** + * + * + *
+   * Required. Observed interval end time.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Required. Observed interval end time.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + /** + * + * + *
+   * Required. Observed interval end time.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + public static final int END_UTC_OFFSET_FIELD_NUMBER = 4; + private com.google.protobuf.Duration endUtcOffset_; + + /** + * + * + *
+   * Required. The offset of the user's local time at the end of the observation
+   * relative to the Coordinated Universal Time (UTC).
+   * 
+ * + * .google.protobuf.Duration end_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the endUtcOffset field is set. + */ + @java.lang.Override + public boolean hasEndUtcOffset() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+   * Required. The offset of the user's local time at the end of the observation
+   * relative to the Coordinated Universal Time (UTC).
+   * 
+ * + * .google.protobuf.Duration end_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The endUtcOffset. + */ + @java.lang.Override + public com.google.protobuf.Duration getEndUtcOffset() { + return endUtcOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : endUtcOffset_; + } + + /** + * + * + *
+   * Required. The offset of the user's local time at the end of the observation
+   * relative to the Coordinated Universal Time (UTC).
+   * 
+ * + * .google.protobuf.Duration end_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getEndUtcOffsetOrBuilder() { + return endUtcOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : endUtcOffset_; + } + + public static final int CIVIL_START_TIME_FIELD_NUMBER = 5; + private com.google.devicesandservices.health.v4.CivilDateTime civilStartTime_; + + /** + * + * + *
+   * Output only. Observed interval start time in civil time in the timezone the
+   * subject is in at the start of the observed interval
+   * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime civil_start_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the civilStartTime field is set. + */ + @java.lang.Override + public boolean hasCivilStartTime() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+   * Output only. Observed interval start time in civil time in the timezone the
+   * subject is in at the start of the observed interval
+   * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime civil_start_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The civilStartTime. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.CivilDateTime getCivilStartTime() { + return civilStartTime_ == null + ? com.google.devicesandservices.health.v4.CivilDateTime.getDefaultInstance() + : civilStartTime_; + } + + /** + * + * + *
+   * Output only. Observed interval start time in civil time in the timezone the
+   * subject is in at the start of the observed interval
+   * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime civil_start_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.CivilDateTimeOrBuilder + getCivilStartTimeOrBuilder() { + return civilStartTime_ == null + ? com.google.devicesandservices.health.v4.CivilDateTime.getDefaultInstance() + : civilStartTime_; + } + + public static final int CIVIL_END_TIME_FIELD_NUMBER = 6; + private com.google.devicesandservices.health.v4.CivilDateTime civilEndTime_; + + /** + * + * + *
+   * Output only. Observed interval end time in civil time in the timezone the
+   * subject is in at the end of the observed interval
+   * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime civil_end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the civilEndTime field is set. + */ + @java.lang.Override + public boolean hasCivilEndTime() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+   * Output only. Observed interval end time in civil time in the timezone the
+   * subject is in at the end of the observed interval
+   * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime civil_end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The civilEndTime. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.CivilDateTime getCivilEndTime() { + return civilEndTime_ == null + ? com.google.devicesandservices.health.v4.CivilDateTime.getDefaultInstance() + : civilEndTime_; + } + + /** + * + * + *
+   * Output only. Observed interval end time in civil time in the timezone the
+   * subject is in at the end of the observed interval
+   * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime civil_end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.CivilDateTimeOrBuilder getCivilEndTimeOrBuilder() { + return civilEndTime_ == null + ? com.google.devicesandservices.health.v4.CivilDateTime.getDefaultInstance() + : civilEndTime_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getStartTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getStartUtcOffset()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(3, getEndTime()); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(4, getEndUtcOffset()); + } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeMessage(5, getCivilStartTime()); + } + if (((bitField0_ & 0x00000020) != 0)) { + output.writeMessage(6, getCivilEndTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getStartTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getStartUtcOffset()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getEndTime()); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getEndUtcOffset()); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getCivilStartTime()); + } + if (((bitField0_ & 0x00000020) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getCivilEndTime()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.ObservationTimeInterval)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.ObservationTimeInterval other = + (com.google.devicesandservices.health.v4.ObservationTimeInterval) obj; + + if (hasStartTime() != other.hasStartTime()) return false; + if (hasStartTime()) { + if (!getStartTime().equals(other.getStartTime())) return false; + } + if (hasStartUtcOffset() != other.hasStartUtcOffset()) return false; + if (hasStartUtcOffset()) { + if (!getStartUtcOffset().equals(other.getStartUtcOffset())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime().equals(other.getEndTime())) return false; + } + if (hasEndUtcOffset() != other.hasEndUtcOffset()) return false; + if (hasEndUtcOffset()) { + if (!getEndUtcOffset().equals(other.getEndUtcOffset())) return false; + } + if (hasCivilStartTime() != other.hasCivilStartTime()) return false; + if (hasCivilStartTime()) { + if (!getCivilStartTime().equals(other.getCivilStartTime())) return false; + } + if (hasCivilEndTime() != other.hasCivilEndTime()) return false; + if (hasCivilEndTime()) { + if (!getCivilEndTime().equals(other.getCivilEndTime())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasStartTime()) { + hash = (37 * hash) + START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getStartTime().hashCode(); + } + if (hasStartUtcOffset()) { + hash = (37 * hash) + START_UTC_OFFSET_FIELD_NUMBER; + hash = (53 * hash) + getStartUtcOffset().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + if (hasEndUtcOffset()) { + hash = (37 * hash) + END_UTC_OFFSET_FIELD_NUMBER; + hash = (53 * hash) + getEndUtcOffset().hashCode(); + } + if (hasCivilStartTime()) { + hash = (37 * hash) + CIVIL_START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCivilStartTime().hashCode(); + } + if (hasCivilEndTime()) { + hash = (37 * hash) + CIVIL_END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCivilEndTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.ObservationTimeInterval parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.ObservationTimeInterval parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ObservationTimeInterval parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.ObservationTimeInterval parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ObservationTimeInterval parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.ObservationTimeInterval parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ObservationTimeInterval parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.ObservationTimeInterval parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ObservationTimeInterval parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.ObservationTimeInterval parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ObservationTimeInterval parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.ObservationTimeInterval parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.ObservationTimeInterval prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Represents a time interval of an observed data point.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.ObservationTimeInterval} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.ObservationTimeInterval) + com.google.devicesandservices.health.v4.ObservationTimeIntervalOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataCoordinatesProto + .internal_static_google_devicesandservices_health_v4_ObservationTimeInterval_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataCoordinatesProto + .internal_static_google_devicesandservices_health_v4_ObservationTimeInterval_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.ObservationTimeInterval.class, + com.google.devicesandservices.health.v4.ObservationTimeInterval.Builder.class); + } + + // Construct using com.google.devicesandservices.health.v4.ObservationTimeInterval.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetStartTimeFieldBuilder(); + internalGetStartUtcOffsetFieldBuilder(); + internalGetEndTimeFieldBuilder(); + internalGetEndUtcOffsetFieldBuilder(); + internalGetCivilStartTimeFieldBuilder(); + internalGetCivilEndTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + startUtcOffset_ = null; + if (startUtcOffsetBuilder_ != null) { + startUtcOffsetBuilder_.dispose(); + startUtcOffsetBuilder_ = null; + } + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + endUtcOffset_ = null; + if (endUtcOffsetBuilder_ != null) { + endUtcOffsetBuilder_.dispose(); + endUtcOffsetBuilder_ = null; + } + civilStartTime_ = null; + if (civilStartTimeBuilder_ != null) { + civilStartTimeBuilder_.dispose(); + civilStartTimeBuilder_ = null; + } + civilEndTime_ = null; + if (civilEndTimeBuilder_ != null) { + civilEndTimeBuilder_.dispose(); + civilEndTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataCoordinatesProto + .internal_static_google_devicesandservices_health_v4_ObservationTimeInterval_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.ObservationTimeInterval + getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.ObservationTimeInterval.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.ObservationTimeInterval build() { + com.google.devicesandservices.health.v4.ObservationTimeInterval result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.ObservationTimeInterval buildPartial() { + com.google.devicesandservices.health.v4.ObservationTimeInterval result = + new com.google.devicesandservices.health.v4.ObservationTimeInterval(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.devicesandservices.health.v4.ObservationTimeInterval result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.startTime_ = startTimeBuilder_ == null ? startTime_ : startTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.startUtcOffset_ = + startUtcOffsetBuilder_ == null ? startUtcOffset_ : startUtcOffsetBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.endTime_ = endTimeBuilder_ == null ? endTime_ : endTimeBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.endUtcOffset_ = + endUtcOffsetBuilder_ == null ? endUtcOffset_ : endUtcOffsetBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.civilStartTime_ = + civilStartTimeBuilder_ == null ? civilStartTime_ : civilStartTimeBuilder_.build(); + to_bitField0_ |= 0x00000010; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.civilEndTime_ = + civilEndTimeBuilder_ == null ? civilEndTime_ : civilEndTimeBuilder_.build(); + to_bitField0_ |= 0x00000020; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.ObservationTimeInterval) { + return mergeFrom((com.google.devicesandservices.health.v4.ObservationTimeInterval) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.devicesandservices.health.v4.ObservationTimeInterval other) { + if (other + == com.google.devicesandservices.health.v4.ObservationTimeInterval.getDefaultInstance()) + return this; + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.hasStartUtcOffset()) { + mergeStartUtcOffset(other.getStartUtcOffset()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (other.hasEndUtcOffset()) { + mergeEndUtcOffset(other.getEndUtcOffset()); + } + if (other.hasCivilStartTime()) { + mergeCivilStartTime(other.getCivilStartTime()); + } + if (other.hasCivilEndTime()) { + mergeCivilEndTime(other.getCivilEndTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetStartTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetStartUtcOffsetFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(internalGetEndTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage( + internalGetEndUtcOffsetFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + input.readMessage( + internalGetCivilStartTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + input.readMessage( + internalGetCivilEndTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.Timestamp startTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + startTimeBuilder_; + + /** + * + * + *
+     * Required. Observed interval start time.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. Observed interval start time.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The startTime. + */ + public com.google.protobuf.Timestamp getStartTime() { + if (startTimeBuilder_ == null) { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } else { + return startTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. Observed interval start time.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + } else { + startTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Observed interval start time.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Observed interval start time.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && startTime_ != null + && startTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getStartTimeBuilder().mergeFrom(value); + } else { + startTime_ = value; + } + } else { + startTimeBuilder_.mergeFrom(value); + } + if (startTime_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. Observed interval start time.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearStartTime() { + bitField0_ = (bitField0_ & ~0x00000001); + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Observed interval start time.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetStartTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. Observed interval start time.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + } + + /** + * + * + *
+     * Required. Observed interval start time.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getStartTime(), getParentForChildren(), isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + private com.google.protobuf.Duration startUtcOffset_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + startUtcOffsetBuilder_; + + /** + * + * + *
+     * Required. The offset of the user's local time at the start of the
+     * observation relative to the Coordinated Universal Time (UTC).
+     * 
+ * + * + * .google.protobuf.Duration start_utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the startUtcOffset field is set. + */ + public boolean hasStartUtcOffset() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Required. The offset of the user's local time at the start of the
+     * observation relative to the Coordinated Universal Time (UTC).
+     * 
+ * + * + * .google.protobuf.Duration start_utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The startUtcOffset. + */ + public com.google.protobuf.Duration getStartUtcOffset() { + if (startUtcOffsetBuilder_ == null) { + return startUtcOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : startUtcOffset_; + } else { + return startUtcOffsetBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The offset of the user's local time at the start of the
+     * observation relative to the Coordinated Universal Time (UTC).
+     * 
+ * + * + * .google.protobuf.Duration start_utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setStartUtcOffset(com.google.protobuf.Duration value) { + if (startUtcOffsetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startUtcOffset_ = value; + } else { + startUtcOffsetBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The offset of the user's local time at the start of the
+     * observation relative to the Coordinated Universal Time (UTC).
+     * 
+ * + * + * .google.protobuf.Duration start_utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setStartUtcOffset(com.google.protobuf.Duration.Builder builderForValue) { + if (startUtcOffsetBuilder_ == null) { + startUtcOffset_ = builderForValue.build(); + } else { + startUtcOffsetBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The offset of the user's local time at the start of the
+     * observation relative to the Coordinated Universal Time (UTC).
+     * 
+ * + * + * .google.protobuf.Duration start_utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeStartUtcOffset(com.google.protobuf.Duration value) { + if (startUtcOffsetBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && startUtcOffset_ != null + && startUtcOffset_ != com.google.protobuf.Duration.getDefaultInstance()) { + getStartUtcOffsetBuilder().mergeFrom(value); + } else { + startUtcOffset_ = value; + } + } else { + startUtcOffsetBuilder_.mergeFrom(value); + } + if (startUtcOffset_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The offset of the user's local time at the start of the
+     * observation relative to the Coordinated Universal Time (UTC).
+     * 
+ * + * + * .google.protobuf.Duration start_utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearStartUtcOffset() { + bitField0_ = (bitField0_ & ~0x00000002); + startUtcOffset_ = null; + if (startUtcOffsetBuilder_ != null) { + startUtcOffsetBuilder_.dispose(); + startUtcOffsetBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The offset of the user's local time at the start of the
+     * observation relative to the Coordinated Universal Time (UTC).
+     * 
+ * + * + * .google.protobuf.Duration start_utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.Duration.Builder getStartUtcOffsetBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetStartUtcOffsetFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The offset of the user's local time at the start of the
+     * observation relative to the Coordinated Universal Time (UTC).
+     * 
+ * + * + * .google.protobuf.Duration start_utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.DurationOrBuilder getStartUtcOffsetOrBuilder() { + if (startUtcOffsetBuilder_ != null) { + return startUtcOffsetBuilder_.getMessageOrBuilder(); + } else { + return startUtcOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : startUtcOffset_; + } + } + + /** + * + * + *
+     * Required. The offset of the user's local time at the start of the
+     * observation relative to the Coordinated Universal Time (UTC).
+     * 
+ * + * + * .google.protobuf.Duration start_utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + internalGetStartUtcOffsetFieldBuilder() { + if (startUtcOffsetBuilder_ == null) { + startUtcOffsetBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getStartUtcOffset(), getParentForChildren(), isClean()); + startUtcOffset_ = null; + } + return startUtcOffsetBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + + /** + * + * + *
+     * Required. Observed interval end time.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Required. Observed interval end time.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. Observed interval end time.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + } else { + endTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Observed interval end time.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Observed interval end time.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && endTime_ != null + && endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEndTimeBuilder().mergeFrom(value); + } else { + endTime_ = value; + } + } else { + endTimeBuilder_.mergeFrom(value); + } + if (endTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. Observed interval end time.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearEndTime() { + bitField0_ = (bitField0_ & ~0x00000004); + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Observed interval end time.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetEndTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. Observed interval end time.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + + /** + * + * + *
+     * Required. Observed interval end time.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + private com.google.protobuf.Duration endUtcOffset_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + endUtcOffsetBuilder_; + + /** + * + * + *
+     * Required. The offset of the user's local time at the end of the observation
+     * relative to the Coordinated Universal Time (UTC).
+     * 
+ * + * .google.protobuf.Duration end_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the endUtcOffset field is set. + */ + public boolean hasEndUtcOffset() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+     * Required. The offset of the user's local time at the end of the observation
+     * relative to the Coordinated Universal Time (UTC).
+     * 
+ * + * .google.protobuf.Duration end_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The endUtcOffset. + */ + public com.google.protobuf.Duration getEndUtcOffset() { + if (endUtcOffsetBuilder_ == null) { + return endUtcOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : endUtcOffset_; + } else { + return endUtcOffsetBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The offset of the user's local time at the end of the observation
+     * relative to the Coordinated Universal Time (UTC).
+     * 
+ * + * .google.protobuf.Duration end_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setEndUtcOffset(com.google.protobuf.Duration value) { + if (endUtcOffsetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endUtcOffset_ = value; + } else { + endUtcOffsetBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The offset of the user's local time at the end of the observation
+     * relative to the Coordinated Universal Time (UTC).
+     * 
+ * + * .google.protobuf.Duration end_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setEndUtcOffset(com.google.protobuf.Duration.Builder builderForValue) { + if (endUtcOffsetBuilder_ == null) { + endUtcOffset_ = builderForValue.build(); + } else { + endUtcOffsetBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The offset of the user's local time at the end of the observation
+     * relative to the Coordinated Universal Time (UTC).
+     * 
+ * + * .google.protobuf.Duration end_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeEndUtcOffset(com.google.protobuf.Duration value) { + if (endUtcOffsetBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && endUtcOffset_ != null + && endUtcOffset_ != com.google.protobuf.Duration.getDefaultInstance()) { + getEndUtcOffsetBuilder().mergeFrom(value); + } else { + endUtcOffset_ = value; + } + } else { + endUtcOffsetBuilder_.mergeFrom(value); + } + if (endUtcOffset_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The offset of the user's local time at the end of the observation
+     * relative to the Coordinated Universal Time (UTC).
+     * 
+ * + * .google.protobuf.Duration end_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearEndUtcOffset() { + bitField0_ = (bitField0_ & ~0x00000008); + endUtcOffset_ = null; + if (endUtcOffsetBuilder_ != null) { + endUtcOffsetBuilder_.dispose(); + endUtcOffsetBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The offset of the user's local time at the end of the observation
+     * relative to the Coordinated Universal Time (UTC).
+     * 
+ * + * .google.protobuf.Duration end_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.Duration.Builder getEndUtcOffsetBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return internalGetEndUtcOffsetFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The offset of the user's local time at the end of the observation
+     * relative to the Coordinated Universal Time (UTC).
+     * 
+ * + * .google.protobuf.Duration end_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.DurationOrBuilder getEndUtcOffsetOrBuilder() { + if (endUtcOffsetBuilder_ != null) { + return endUtcOffsetBuilder_.getMessageOrBuilder(); + } else { + return endUtcOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : endUtcOffset_; + } + } + + /** + * + * + *
+     * Required. The offset of the user's local time at the end of the observation
+     * relative to the Coordinated Universal Time (UTC).
+     * 
+ * + * .google.protobuf.Duration end_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + internalGetEndUtcOffsetFieldBuilder() { + if (endUtcOffsetBuilder_ == null) { + endUtcOffsetBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getEndUtcOffset(), getParentForChildren(), isClean()); + endUtcOffset_ = null; + } + return endUtcOffsetBuilder_; + } + + private com.google.devicesandservices.health.v4.CivilDateTime civilStartTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.CivilDateTime, + com.google.devicesandservices.health.v4.CivilDateTime.Builder, + com.google.devicesandservices.health.v4.CivilDateTimeOrBuilder> + civilStartTimeBuilder_; + + /** + * + * + *
+     * Output only. Observed interval start time in civil time in the timezone the
+     * subject is in at the start of the observed interval
+     * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime civil_start_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the civilStartTime field is set. + */ + public boolean hasCivilStartTime() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+     * Output only. Observed interval start time in civil time in the timezone the
+     * subject is in at the start of the observed interval
+     * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime civil_start_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The civilStartTime. + */ + public com.google.devicesandservices.health.v4.CivilDateTime getCivilStartTime() { + if (civilStartTimeBuilder_ == null) { + return civilStartTime_ == null + ? com.google.devicesandservices.health.v4.CivilDateTime.getDefaultInstance() + : civilStartTime_; + } else { + return civilStartTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. Observed interval start time in civil time in the timezone the
+     * subject is in at the start of the observed interval
+     * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime civil_start_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCivilStartTime(com.google.devicesandservices.health.v4.CivilDateTime value) { + if (civilStartTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + civilStartTime_ = value; + } else { + civilStartTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Observed interval start time in civil time in the timezone the
+     * subject is in at the start of the observed interval
+     * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime civil_start_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCivilStartTime( + com.google.devicesandservices.health.v4.CivilDateTime.Builder builderForValue) { + if (civilStartTimeBuilder_ == null) { + civilStartTime_ = builderForValue.build(); + } else { + civilStartTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Observed interval start time in civil time in the timezone the
+     * subject is in at the start of the observed interval
+     * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime civil_start_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCivilStartTime( + com.google.devicesandservices.health.v4.CivilDateTime value) { + if (civilStartTimeBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && civilStartTime_ != null + && civilStartTime_ + != com.google.devicesandservices.health.v4.CivilDateTime.getDefaultInstance()) { + getCivilStartTimeBuilder().mergeFrom(value); + } else { + civilStartTime_ = value; + } + } else { + civilStartTimeBuilder_.mergeFrom(value); + } + if (civilStartTime_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. Observed interval start time in civil time in the timezone the
+     * subject is in at the start of the observed interval
+     * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime civil_start_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCivilStartTime() { + bitField0_ = (bitField0_ & ~0x00000010); + civilStartTime_ = null; + if (civilStartTimeBuilder_ != null) { + civilStartTimeBuilder_.dispose(); + civilStartTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Observed interval start time in civil time in the timezone the
+     * subject is in at the start of the observed interval
+     * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime civil_start_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.devicesandservices.health.v4.CivilDateTime.Builder + getCivilStartTimeBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return internalGetCivilStartTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Observed interval start time in civil time in the timezone the
+     * subject is in at the start of the observed interval
+     * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime civil_start_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.devicesandservices.health.v4.CivilDateTimeOrBuilder + getCivilStartTimeOrBuilder() { + if (civilStartTimeBuilder_ != null) { + return civilStartTimeBuilder_.getMessageOrBuilder(); + } else { + return civilStartTime_ == null + ? com.google.devicesandservices.health.v4.CivilDateTime.getDefaultInstance() + : civilStartTime_; + } + } + + /** + * + * + *
+     * Output only. Observed interval start time in civil time in the timezone the
+     * subject is in at the start of the observed interval
+     * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime civil_start_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.CivilDateTime, + com.google.devicesandservices.health.v4.CivilDateTime.Builder, + com.google.devicesandservices.health.v4.CivilDateTimeOrBuilder> + internalGetCivilStartTimeFieldBuilder() { + if (civilStartTimeBuilder_ == null) { + civilStartTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.CivilDateTime, + com.google.devicesandservices.health.v4.CivilDateTime.Builder, + com.google.devicesandservices.health.v4.CivilDateTimeOrBuilder>( + getCivilStartTime(), getParentForChildren(), isClean()); + civilStartTime_ = null; + } + return civilStartTimeBuilder_; + } + + private com.google.devicesandservices.health.v4.CivilDateTime civilEndTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.CivilDateTime, + com.google.devicesandservices.health.v4.CivilDateTime.Builder, + com.google.devicesandservices.health.v4.CivilDateTimeOrBuilder> + civilEndTimeBuilder_; + + /** + * + * + *
+     * Output only. Observed interval end time in civil time in the timezone the
+     * subject is in at the end of the observed interval
+     * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime civil_end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the civilEndTime field is set. + */ + public boolean hasCivilEndTime() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+     * Output only. Observed interval end time in civil time in the timezone the
+     * subject is in at the end of the observed interval
+     * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime civil_end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The civilEndTime. + */ + public com.google.devicesandservices.health.v4.CivilDateTime getCivilEndTime() { + if (civilEndTimeBuilder_ == null) { + return civilEndTime_ == null + ? com.google.devicesandservices.health.v4.CivilDateTime.getDefaultInstance() + : civilEndTime_; + } else { + return civilEndTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. Observed interval end time in civil time in the timezone the
+     * subject is in at the end of the observed interval
+     * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime civil_end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCivilEndTime(com.google.devicesandservices.health.v4.CivilDateTime value) { + if (civilEndTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + civilEndTime_ = value; + } else { + civilEndTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Observed interval end time in civil time in the timezone the
+     * subject is in at the end of the observed interval
+     * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime civil_end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCivilEndTime( + com.google.devicesandservices.health.v4.CivilDateTime.Builder builderForValue) { + if (civilEndTimeBuilder_ == null) { + civilEndTime_ = builderForValue.build(); + } else { + civilEndTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Observed interval end time in civil time in the timezone the
+     * subject is in at the end of the observed interval
+     * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime civil_end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCivilEndTime(com.google.devicesandservices.health.v4.CivilDateTime value) { + if (civilEndTimeBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && civilEndTime_ != null + && civilEndTime_ + != com.google.devicesandservices.health.v4.CivilDateTime.getDefaultInstance()) { + getCivilEndTimeBuilder().mergeFrom(value); + } else { + civilEndTime_ = value; + } + } else { + civilEndTimeBuilder_.mergeFrom(value); + } + if (civilEndTime_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. Observed interval end time in civil time in the timezone the
+     * subject is in at the end of the observed interval
+     * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime civil_end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCivilEndTime() { + bitField0_ = (bitField0_ & ~0x00000020); + civilEndTime_ = null; + if (civilEndTimeBuilder_ != null) { + civilEndTimeBuilder_.dispose(); + civilEndTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Observed interval end time in civil time in the timezone the
+     * subject is in at the end of the observed interval
+     * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime civil_end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.devicesandservices.health.v4.CivilDateTime.Builder getCivilEndTimeBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return internalGetCivilEndTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Observed interval end time in civil time in the timezone the
+     * subject is in at the end of the observed interval
+     * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime civil_end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.devicesandservices.health.v4.CivilDateTimeOrBuilder + getCivilEndTimeOrBuilder() { + if (civilEndTimeBuilder_ != null) { + return civilEndTimeBuilder_.getMessageOrBuilder(); + } else { + return civilEndTime_ == null + ? com.google.devicesandservices.health.v4.CivilDateTime.getDefaultInstance() + : civilEndTime_; + } + } + + /** + * + * + *
+     * Output only. Observed interval end time in civil time in the timezone the
+     * subject is in at the end of the observed interval
+     * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime civil_end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.CivilDateTime, + com.google.devicesandservices.health.v4.CivilDateTime.Builder, + com.google.devicesandservices.health.v4.CivilDateTimeOrBuilder> + internalGetCivilEndTimeFieldBuilder() { + if (civilEndTimeBuilder_ == null) { + civilEndTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.CivilDateTime, + com.google.devicesandservices.health.v4.CivilDateTime.Builder, + com.google.devicesandservices.health.v4.CivilDateTimeOrBuilder>( + getCivilEndTime(), getParentForChildren(), isClean()); + civilEndTime_ = null; + } + return civilEndTimeBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.ObservationTimeInterval) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.ObservationTimeInterval) + private static final com.google.devicesandservices.health.v4.ObservationTimeInterval + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.ObservationTimeInterval(); + } + + public static com.google.devicesandservices.health.v4.ObservationTimeInterval + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ObservationTimeInterval parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.ObservationTimeInterval + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ObservationTimeIntervalOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ObservationTimeIntervalOrBuilder.java new file mode 100644 index 000000000000..b68b4e15ed1d --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ObservationTimeIntervalOrBuilder.java @@ -0,0 +1,283 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_coordinates.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface ObservationTimeIntervalOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.ObservationTimeInterval) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Observed interval start time.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + + /** + * + * + *
+   * Required. Observed interval start time.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The startTime. + */ + com.google.protobuf.Timestamp getStartTime(); + + /** + * + * + *
+   * Required. Observed interval start time.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + + /** + * + * + *
+   * Required. The offset of the user's local time at the start of the
+   * observation relative to the Coordinated Universal Time (UTC).
+   * 
+ * + * .google.protobuf.Duration start_utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the startUtcOffset field is set. + */ + boolean hasStartUtcOffset(); + + /** + * + * + *
+   * Required. The offset of the user's local time at the start of the
+   * observation relative to the Coordinated Universal Time (UTC).
+   * 
+ * + * .google.protobuf.Duration start_utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The startUtcOffset. + */ + com.google.protobuf.Duration getStartUtcOffset(); + + /** + * + * + *
+   * Required. The offset of the user's local time at the start of the
+   * observation relative to the Coordinated Universal Time (UTC).
+   * 
+ * + * .google.protobuf.Duration start_utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.DurationOrBuilder getStartUtcOffsetOrBuilder(); + + /** + * + * + *
+   * Required. Observed interval end time.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + + /** + * + * + *
+   * Required. Observed interval end time.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + + /** + * + * + *
+   * Required. Observed interval end time.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + * + * + *
+   * Required. The offset of the user's local time at the end of the observation
+   * relative to the Coordinated Universal Time (UTC).
+   * 
+ * + * .google.protobuf.Duration end_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the endUtcOffset field is set. + */ + boolean hasEndUtcOffset(); + + /** + * + * + *
+   * Required. The offset of the user's local time at the end of the observation
+   * relative to the Coordinated Universal Time (UTC).
+   * 
+ * + * .google.protobuf.Duration end_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The endUtcOffset. + */ + com.google.protobuf.Duration getEndUtcOffset(); + + /** + * + * + *
+   * Required. The offset of the user's local time at the end of the observation
+   * relative to the Coordinated Universal Time (UTC).
+   * 
+ * + * .google.protobuf.Duration end_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.DurationOrBuilder getEndUtcOffsetOrBuilder(); + + /** + * + * + *
+   * Output only. Observed interval start time in civil time in the timezone the
+   * subject is in at the start of the observed interval
+   * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime civil_start_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the civilStartTime field is set. + */ + boolean hasCivilStartTime(); + + /** + * + * + *
+   * Output only. Observed interval start time in civil time in the timezone the
+   * subject is in at the start of the observed interval
+   * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime civil_start_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The civilStartTime. + */ + com.google.devicesandservices.health.v4.CivilDateTime getCivilStartTime(); + + /** + * + * + *
+   * Output only. Observed interval start time in civil time in the timezone the
+   * subject is in at the start of the observed interval
+   * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime civil_start_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.devicesandservices.health.v4.CivilDateTimeOrBuilder getCivilStartTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Observed interval end time in civil time in the timezone the
+   * subject is in at the end of the observed interval
+   * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime civil_end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the civilEndTime field is set. + */ + boolean hasCivilEndTime(); + + /** + * + * + *
+   * Output only. Observed interval end time in civil time in the timezone the
+   * subject is in at the end of the observed interval
+   * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime civil_end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The civilEndTime. + */ + com.google.devicesandservices.health.v4.CivilDateTime getCivilEndTime(); + + /** + * + * + *
+   * Output only. Observed interval end time in civil time in the timezone the
+   * subject is in at the end of the observed interval
+   * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime civil_end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.devicesandservices.health.v4.CivilDateTimeOrBuilder getCivilEndTimeOrBuilder(); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/OxygenSaturation.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/OxygenSaturation.java new file mode 100644 index 000000000000..62ecca31c63d --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/OxygenSaturation.java @@ -0,0 +1,832 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * Captures the user's instantaneous oxygen saturation percentage (SpO2).
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.OxygenSaturation} + */ +@com.google.protobuf.Generated +public final class OxygenSaturation extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.OxygenSaturation) + OxygenSaturationOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "OxygenSaturation"); + } + + // Use OxygenSaturation.newBuilder() to construct. + private OxygenSaturation(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private OxygenSaturation() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_OxygenSaturation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_OxygenSaturation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.OxygenSaturation.class, + com.google.devicesandservices.health.v4.OxygenSaturation.Builder.class); + } + + private int bitField0_; + public static final int SAMPLE_TIME_FIELD_NUMBER = 1; + private com.google.devicesandservices.health.v4.ObservationSampleTime sampleTime_; + + /** + * + * + *
+   * Required. The time at which oxygen saturation was measured.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the sampleTime field is set. + */ + @java.lang.Override + public boolean hasSampleTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The time at which oxygen saturation was measured.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The sampleTime. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ObservationSampleTime getSampleTime() { + return sampleTime_ == null + ? com.google.devicesandservices.health.v4.ObservationSampleTime.getDefaultInstance() + : sampleTime_; + } + + /** + * + * + *
+   * Required. The time at which oxygen saturation was measured.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ObservationSampleTimeOrBuilder + getSampleTimeOrBuilder() { + return sampleTime_ == null + ? com.google.devicesandservices.health.v4.ObservationSampleTime.getDefaultInstance() + : sampleTime_; + } + + public static final int PERCENTAGE_FIELD_NUMBER = 2; + private double percentage_ = 0D; + + /** + * + * + *
+   * Required. The oxygen saturation percentage. Valid values are from 0 to 100.
+   * 
+ * + * double percentage = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The percentage. + */ + @java.lang.Override + public double getPercentage() { + return percentage_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getSampleTime()); + } + if (java.lang.Double.doubleToRawLongBits(percentage_) != 0) { + output.writeDouble(2, percentage_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getSampleTime()); + } + if (java.lang.Double.doubleToRawLongBits(percentage_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(2, percentage_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.OxygenSaturation)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.OxygenSaturation other = + (com.google.devicesandservices.health.v4.OxygenSaturation) obj; + + if (hasSampleTime() != other.hasSampleTime()) return false; + if (hasSampleTime()) { + if (!getSampleTime().equals(other.getSampleTime())) return false; + } + if (java.lang.Double.doubleToLongBits(getPercentage()) + != java.lang.Double.doubleToLongBits(other.getPercentage())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasSampleTime()) { + hash = (37 * hash) + SAMPLE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getSampleTime().hashCode(); + } + hash = (37 * hash) + PERCENTAGE_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getPercentage())); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.OxygenSaturation parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.OxygenSaturation parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.OxygenSaturation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.OxygenSaturation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.OxygenSaturation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.OxygenSaturation parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.OxygenSaturation parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.OxygenSaturation parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.OxygenSaturation parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.OxygenSaturation parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.OxygenSaturation parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.OxygenSaturation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.OxygenSaturation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Captures the user's instantaneous oxygen saturation percentage (SpO2).
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.OxygenSaturation} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.OxygenSaturation) + com.google.devicesandservices.health.v4.OxygenSaturationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_OxygenSaturation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_OxygenSaturation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.OxygenSaturation.class, + com.google.devicesandservices.health.v4.OxygenSaturation.Builder.class); + } + + // Construct using com.google.devicesandservices.health.v4.OxygenSaturation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetSampleTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + sampleTime_ = null; + if (sampleTimeBuilder_ != null) { + sampleTimeBuilder_.dispose(); + sampleTimeBuilder_ = null; + } + percentage_ = 0D; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_OxygenSaturation_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.OxygenSaturation getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.OxygenSaturation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.OxygenSaturation build() { + com.google.devicesandservices.health.v4.OxygenSaturation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.OxygenSaturation buildPartial() { + com.google.devicesandservices.health.v4.OxygenSaturation result = + new com.google.devicesandservices.health.v4.OxygenSaturation(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.devicesandservices.health.v4.OxygenSaturation result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.sampleTime_ = sampleTimeBuilder_ == null ? sampleTime_ : sampleTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.percentage_ = percentage_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.OxygenSaturation) { + return mergeFrom((com.google.devicesandservices.health.v4.OxygenSaturation) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.devicesandservices.health.v4.OxygenSaturation other) { + if (other == com.google.devicesandservices.health.v4.OxygenSaturation.getDefaultInstance()) + return this; + if (other.hasSampleTime()) { + mergeSampleTime(other.getSampleTime()); + } + if (java.lang.Double.doubleToRawLongBits(other.getPercentage()) != 0) { + setPercentage(other.getPercentage()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetSampleTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 17: + { + percentage_ = input.readDouble(); + bitField0_ |= 0x00000002; + break; + } // case 17 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.devicesandservices.health.v4.ObservationSampleTime sampleTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ObservationSampleTime, + com.google.devicesandservices.health.v4.ObservationSampleTime.Builder, + com.google.devicesandservices.health.v4.ObservationSampleTimeOrBuilder> + sampleTimeBuilder_; + + /** + * + * + *
+     * Required. The time at which oxygen saturation was measured.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the sampleTime field is set. + */ + public boolean hasSampleTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. The time at which oxygen saturation was measured.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The sampleTime. + */ + public com.google.devicesandservices.health.v4.ObservationSampleTime getSampleTime() { + if (sampleTimeBuilder_ == null) { + return sampleTime_ == null + ? com.google.devicesandservices.health.v4.ObservationSampleTime.getDefaultInstance() + : sampleTime_; + } else { + return sampleTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The time at which oxygen saturation was measured.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSampleTime( + com.google.devicesandservices.health.v4.ObservationSampleTime value) { + if (sampleTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sampleTime_ = value; + } else { + sampleTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The time at which oxygen saturation was measured.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSampleTime( + com.google.devicesandservices.health.v4.ObservationSampleTime.Builder builderForValue) { + if (sampleTimeBuilder_ == null) { + sampleTime_ = builderForValue.build(); + } else { + sampleTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The time at which oxygen saturation was measured.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeSampleTime( + com.google.devicesandservices.health.v4.ObservationSampleTime value) { + if (sampleTimeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && sampleTime_ != null + && sampleTime_ + != com.google.devicesandservices.health.v4.ObservationSampleTime + .getDefaultInstance()) { + getSampleTimeBuilder().mergeFrom(value); + } else { + sampleTime_ = value; + } + } else { + sampleTimeBuilder_.mergeFrom(value); + } + if (sampleTime_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The time at which oxygen saturation was measured.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearSampleTime() { + bitField0_ = (bitField0_ & ~0x00000001); + sampleTime_ = null; + if (sampleTimeBuilder_ != null) { + sampleTimeBuilder_.dispose(); + sampleTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The time at which oxygen saturation was measured.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.devicesandservices.health.v4.ObservationSampleTime.Builder + getSampleTimeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetSampleTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The time at which oxygen saturation was measured.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.devicesandservices.health.v4.ObservationSampleTimeOrBuilder + getSampleTimeOrBuilder() { + if (sampleTimeBuilder_ != null) { + return sampleTimeBuilder_.getMessageOrBuilder(); + } else { + return sampleTime_ == null + ? com.google.devicesandservices.health.v4.ObservationSampleTime.getDefaultInstance() + : sampleTime_; + } + } + + /** + * + * + *
+     * Required. The time at which oxygen saturation was measured.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ObservationSampleTime, + com.google.devicesandservices.health.v4.ObservationSampleTime.Builder, + com.google.devicesandservices.health.v4.ObservationSampleTimeOrBuilder> + internalGetSampleTimeFieldBuilder() { + if (sampleTimeBuilder_ == null) { + sampleTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ObservationSampleTime, + com.google.devicesandservices.health.v4.ObservationSampleTime.Builder, + com.google.devicesandservices.health.v4.ObservationSampleTimeOrBuilder>( + getSampleTime(), getParentForChildren(), isClean()); + sampleTime_ = null; + } + return sampleTimeBuilder_; + } + + private double percentage_; + + /** + * + * + *
+     * Required. The oxygen saturation percentage. Valid values are from 0 to 100.
+     * 
+ * + * double percentage = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The percentage. + */ + @java.lang.Override + public double getPercentage() { + return percentage_; + } + + /** + * + * + *
+     * Required. The oxygen saturation percentage. Valid values are from 0 to 100.
+     * 
+ * + * double percentage = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The percentage to set. + * @return This builder for chaining. + */ + public Builder setPercentage(double value) { + + percentage_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The oxygen saturation percentage. Valid values are from 0 to 100.
+     * 
+ * + * double percentage = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearPercentage() { + bitField0_ = (bitField0_ & ~0x00000002); + percentage_ = 0D; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.OxygenSaturation) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.OxygenSaturation) + private static final com.google.devicesandservices.health.v4.OxygenSaturation DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.OxygenSaturation(); + } + + public static com.google.devicesandservices.health.v4.OxygenSaturation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OxygenSaturation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.OxygenSaturation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/OxygenSaturationOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/OxygenSaturationOrBuilder.java new file mode 100644 index 000000000000..275e67505eae --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/OxygenSaturationOrBuilder.java @@ -0,0 +1,84 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface OxygenSaturationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.OxygenSaturation) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The time at which oxygen saturation was measured.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the sampleTime field is set. + */ + boolean hasSampleTime(); + + /** + * + * + *
+   * Required. The time at which oxygen saturation was measured.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The sampleTime. + */ + com.google.devicesandservices.health.v4.ObservationSampleTime getSampleTime(); + + /** + * + * + *
+   * Required. The time at which oxygen saturation was measured.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.devicesandservices.health.v4.ObservationSampleTimeOrBuilder getSampleTimeOrBuilder(); + + /** + * + * + *
+   * Required. The oxygen saturation percentage. Valid values are from 0 to 100.
+   * 
+ * + * double percentage = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The percentage. + */ + double getPercentage(); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/Profile.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/Profile.java new file mode 100644 index 000000000000..8669ccba9d41 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/Profile.java @@ -0,0 +1,1862 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/health_profile.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * Profile details.
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.Profile} + */ +@com.google.protobuf.Generated +public final class Profile extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.Profile) + ProfileOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Profile"); + } + + // Use Profile.newBuilder() to construct. + private Profile(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Profile() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.HealthProfileProto + .internal_static_google_devicesandservices_health_v4_Profile_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.HealthProfileProto + .internal_static_google_devicesandservices_health_v4_Profile_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.Profile.class, + com.google.devicesandservices.health.v4.Profile.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Identifier. The resource name of this Profile resource.
+   *
+   * Format: `users/{user}/profile`
+   * Example: `users/1234567890/profile` or `users/me/profile`
+   * The {user} ID is a system-generated Google Health API user ID, a string of
+   * 1-63 characters consisting of lowercase and uppercase letters, numbers, and
+   * hyphens. The literal `me` can also be used to refer to the authenticated
+   * user.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Identifier. The resource name of this Profile resource.
+   *
+   * Format: `users/{user}/profile`
+   * Example: `users/1234567890/profile` or `users/me/profile`
+   * The {user} ID is a system-generated Google Health API user ID, a string of
+   * 1-63 characters consisting of lowercase and uppercase letters, numbers, and
+   * hyphens. The literal `me` can also be used to refer to the authenticated
+   * user.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AGE_FIELD_NUMBER = 6; + private int age_ = 0; + + /** + * + * + *
+   * Optional. The age in years based on the user's birth date.
+   *
+   * Updates to this field are currently not supported.
+   * 
+ * + * int32 age = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The age. + */ + @java.lang.Override + public int getAge() { + return age_; + } + + public static final int MEMBERSHIP_START_DATE_FIELD_NUMBER = 9; + private com.google.type.Date membershipStartDate_; + + /** + * + * + *
+   * Output only. The date the user created their account.
+   *
+   * Updates to this field are currently not supported.
+   * 
+ * + * .google.type.Date membership_start_date = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the membershipStartDate field is set. + */ + @java.lang.Override + public boolean hasMembershipStartDate() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. The date the user created their account.
+   *
+   * Updates to this field are currently not supported.
+   * 
+ * + * .google.type.Date membership_start_date = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The membershipStartDate. + */ + @java.lang.Override + public com.google.type.Date getMembershipStartDate() { + return membershipStartDate_ == null + ? com.google.type.Date.getDefaultInstance() + : membershipStartDate_; + } + + /** + * + * + *
+   * Output only. The date the user created their account.
+   *
+   * Updates to this field are currently not supported.
+   * 
+ * + * .google.type.Date membership_start_date = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.type.DateOrBuilder getMembershipStartDateOrBuilder() { + return membershipStartDate_ == null + ? com.google.type.Date.getDefaultInstance() + : membershipStartDate_; + } + + public static final int USER_CONFIGURED_WALKING_STRIDE_LENGTH_MM_FIELD_NUMBER = 13; + private int userConfiguredWalkingStrideLengthMm_ = 0; + + /** + * + * + *
+   * Optional. The user's user configured walking stride length, in millimeters.
+   *
+   * The user must consent to
+   * one of the following access scopes to access this field:
+   *
+   * -
+   * `https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly`
+   * - `https://www.googleapis.com/auth/googlehealth.activity_and_fitness`
+   * 
+ * + * + * optional int32 user_configured_walking_stride_length_mm = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the userConfiguredWalkingStrideLengthMm field is set. + */ + @java.lang.Override + public boolean hasUserConfiguredWalkingStrideLengthMm() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Optional. The user's user configured walking stride length, in millimeters.
+   *
+   * The user must consent to
+   * one of the following access scopes to access this field:
+   *
+   * -
+   * `https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly`
+   * - `https://www.googleapis.com/auth/googlehealth.activity_and_fitness`
+   * 
+ * + * + * optional int32 user_configured_walking_stride_length_mm = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The userConfiguredWalkingStrideLengthMm. + */ + @java.lang.Override + public int getUserConfiguredWalkingStrideLengthMm() { + return userConfiguredWalkingStrideLengthMm_; + } + + public static final int USER_CONFIGURED_RUNNING_STRIDE_LENGTH_MM_FIELD_NUMBER = 14; + private int userConfiguredRunningStrideLengthMm_ = 0; + + /** + * + * + *
+   * Optional. The user's user configured running stride length, in millimeters.
+   *
+   * The user must consent to
+   * one of the following access scopes to access this field:
+   *
+   * -
+   * `https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly`
+   * - `https://www.googleapis.com/auth/googlehealth.activity_and_fitness`
+   * 
+ * + * + * optional int32 user_configured_running_stride_length_mm = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the userConfiguredRunningStrideLengthMm field is set. + */ + @java.lang.Override + public boolean hasUserConfiguredRunningStrideLengthMm() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Optional. The user's user configured running stride length, in millimeters.
+   *
+   * The user must consent to
+   * one of the following access scopes to access this field:
+   *
+   * -
+   * `https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly`
+   * - `https://www.googleapis.com/auth/googlehealth.activity_and_fitness`
+   * 
+ * + * + * optional int32 user_configured_running_stride_length_mm = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The userConfiguredRunningStrideLengthMm. + */ + @java.lang.Override + public int getUserConfiguredRunningStrideLengthMm() { + return userConfiguredRunningStrideLengthMm_; + } + + public static final int AUTO_WALKING_STRIDE_LENGTH_MM_FIELD_NUMBER = 15; + private int autoWalkingStrideLengthMm_ = 0; + + /** + * + * + *
+   * Output only. The automatically calculated walking stride length, in
+   * millimeters.
+   *
+   * The user must consent to
+   * one of the following access scopes to access this field:
+   *
+   * -
+   * `https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly`
+   * - `https://www.googleapis.com/auth/googlehealth.activity_and_fitness`
+   * 
+ * + * + * optional int32 auto_walking_stride_length_mm = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the autoWalkingStrideLengthMm field is set. + */ + @java.lang.Override + public boolean hasAutoWalkingStrideLengthMm() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+   * Output only. The automatically calculated walking stride length, in
+   * millimeters.
+   *
+   * The user must consent to
+   * one of the following access scopes to access this field:
+   *
+   * -
+   * `https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly`
+   * - `https://www.googleapis.com/auth/googlehealth.activity_and_fitness`
+   * 
+ * + * + * optional int32 auto_walking_stride_length_mm = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The autoWalkingStrideLengthMm. + */ + @java.lang.Override + public int getAutoWalkingStrideLengthMm() { + return autoWalkingStrideLengthMm_; + } + + public static final int AUTO_RUNNING_STRIDE_LENGTH_MM_FIELD_NUMBER = 16; + private int autoRunningStrideLengthMm_ = 0; + + /** + * + * + *
+   * Output only. The automatically calculated running stride length, in
+   * millimeters.
+   *
+   * The user must consent to
+   * one of the following access scopes to access this field:
+   *
+   * -
+   * `https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly`
+   * - `https://www.googleapis.com/auth/googlehealth.activity_and_fitness`
+   * 
+ * + * + * optional int32 auto_running_stride_length_mm = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the autoRunningStrideLengthMm field is set. + */ + @java.lang.Override + public boolean hasAutoRunningStrideLengthMm() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+   * Output only. The automatically calculated running stride length, in
+   * millimeters.
+   *
+   * The user must consent to
+   * one of the following access scopes to access this field:
+   *
+   * -
+   * `https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly`
+   * - `https://www.googleapis.com/auth/googlehealth.activity_and_fitness`
+   * 
+ * + * + * optional int32 auto_running_stride_length_mm = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The autoRunningStrideLengthMm. + */ + @java.lang.Override + public int getAutoRunningStrideLengthMm() { + return autoRunningStrideLengthMm_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (age_ != 0) { + output.writeInt32(6, age_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(9, getMembershipStartDate()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeInt32(13, userConfiguredWalkingStrideLengthMm_); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeInt32(14, userConfiguredRunningStrideLengthMm_); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeInt32(15, autoWalkingStrideLengthMm_); + } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeInt32(16, autoRunningStrideLengthMm_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (age_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(6, age_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getMembershipStartDate()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeInt32Size( + 13, userConfiguredWalkingStrideLengthMm_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeInt32Size( + 14, userConfiguredRunningStrideLengthMm_); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeInt32Size(15, autoWalkingStrideLengthMm_); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeInt32Size(16, autoRunningStrideLengthMm_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.Profile)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.Profile other = + (com.google.devicesandservices.health.v4.Profile) obj; + + if (!getName().equals(other.getName())) return false; + if (getAge() != other.getAge()) return false; + if (hasMembershipStartDate() != other.hasMembershipStartDate()) return false; + if (hasMembershipStartDate()) { + if (!getMembershipStartDate().equals(other.getMembershipStartDate())) return false; + } + if (hasUserConfiguredWalkingStrideLengthMm() != other.hasUserConfiguredWalkingStrideLengthMm()) + return false; + if (hasUserConfiguredWalkingStrideLengthMm()) { + if (getUserConfiguredWalkingStrideLengthMm() + != other.getUserConfiguredWalkingStrideLengthMm()) return false; + } + if (hasUserConfiguredRunningStrideLengthMm() != other.hasUserConfiguredRunningStrideLengthMm()) + return false; + if (hasUserConfiguredRunningStrideLengthMm()) { + if (getUserConfiguredRunningStrideLengthMm() + != other.getUserConfiguredRunningStrideLengthMm()) return false; + } + if (hasAutoWalkingStrideLengthMm() != other.hasAutoWalkingStrideLengthMm()) return false; + if (hasAutoWalkingStrideLengthMm()) { + if (getAutoWalkingStrideLengthMm() != other.getAutoWalkingStrideLengthMm()) return false; + } + if (hasAutoRunningStrideLengthMm() != other.hasAutoRunningStrideLengthMm()) return false; + if (hasAutoRunningStrideLengthMm()) { + if (getAutoRunningStrideLengthMm() != other.getAutoRunningStrideLengthMm()) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + AGE_FIELD_NUMBER; + hash = (53 * hash) + getAge(); + if (hasMembershipStartDate()) { + hash = (37 * hash) + MEMBERSHIP_START_DATE_FIELD_NUMBER; + hash = (53 * hash) + getMembershipStartDate().hashCode(); + } + if (hasUserConfiguredWalkingStrideLengthMm()) { + hash = (37 * hash) + USER_CONFIGURED_WALKING_STRIDE_LENGTH_MM_FIELD_NUMBER; + hash = (53 * hash) + getUserConfiguredWalkingStrideLengthMm(); + } + if (hasUserConfiguredRunningStrideLengthMm()) { + hash = (37 * hash) + USER_CONFIGURED_RUNNING_STRIDE_LENGTH_MM_FIELD_NUMBER; + hash = (53 * hash) + getUserConfiguredRunningStrideLengthMm(); + } + if (hasAutoWalkingStrideLengthMm()) { + hash = (37 * hash) + AUTO_WALKING_STRIDE_LENGTH_MM_FIELD_NUMBER; + hash = (53 * hash) + getAutoWalkingStrideLengthMm(); + } + if (hasAutoRunningStrideLengthMm()) { + hash = (37 * hash) + AUTO_RUNNING_STRIDE_LENGTH_MM_FIELD_NUMBER; + hash = (53 * hash) + getAutoRunningStrideLengthMm(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.Profile parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.Profile parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Profile parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.Profile parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Profile parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.Profile parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Profile parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.Profile parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Profile parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.Profile parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Profile parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.Profile parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.devicesandservices.health.v4.Profile prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Profile details.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.Profile} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.Profile) + com.google.devicesandservices.health.v4.ProfileOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.HealthProfileProto + .internal_static_google_devicesandservices_health_v4_Profile_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.HealthProfileProto + .internal_static_google_devicesandservices_health_v4_Profile_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.Profile.class, + com.google.devicesandservices.health.v4.Profile.Builder.class); + } + + // Construct using com.google.devicesandservices.health.v4.Profile.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetMembershipStartDateFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + age_ = 0; + membershipStartDate_ = null; + if (membershipStartDateBuilder_ != null) { + membershipStartDateBuilder_.dispose(); + membershipStartDateBuilder_ = null; + } + userConfiguredWalkingStrideLengthMm_ = 0; + userConfiguredRunningStrideLengthMm_ = 0; + autoWalkingStrideLengthMm_ = 0; + autoRunningStrideLengthMm_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.HealthProfileProto + .internal_static_google_devicesandservices_health_v4_Profile_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.Profile getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.Profile.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.Profile build() { + com.google.devicesandservices.health.v4.Profile result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.Profile buildPartial() { + com.google.devicesandservices.health.v4.Profile result = + new com.google.devicesandservices.health.v4.Profile(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.devicesandservices.health.v4.Profile result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.age_ = age_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.membershipStartDate_ = + membershipStartDateBuilder_ == null + ? membershipStartDate_ + : membershipStartDateBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.userConfiguredWalkingStrideLengthMm_ = userConfiguredWalkingStrideLengthMm_; + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.userConfiguredRunningStrideLengthMm_ = userConfiguredRunningStrideLengthMm_; + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.autoWalkingStrideLengthMm_ = autoWalkingStrideLengthMm_; + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.autoRunningStrideLengthMm_ = autoRunningStrideLengthMm_; + to_bitField0_ |= 0x00000010; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.Profile) { + return mergeFrom((com.google.devicesandservices.health.v4.Profile) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.devicesandservices.health.v4.Profile other) { + if (other == com.google.devicesandservices.health.v4.Profile.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getAge() != 0) { + setAge(other.getAge()); + } + if (other.hasMembershipStartDate()) { + mergeMembershipStartDate(other.getMembershipStartDate()); + } + if (other.hasUserConfiguredWalkingStrideLengthMm()) { + setUserConfiguredWalkingStrideLengthMm(other.getUserConfiguredWalkingStrideLengthMm()); + } + if (other.hasUserConfiguredRunningStrideLengthMm()) { + setUserConfiguredRunningStrideLengthMm(other.getUserConfiguredRunningStrideLengthMm()); + } + if (other.hasAutoWalkingStrideLengthMm()) { + setAutoWalkingStrideLengthMm(other.getAutoWalkingStrideLengthMm()); + } + if (other.hasAutoRunningStrideLengthMm()) { + setAutoRunningStrideLengthMm(other.getAutoRunningStrideLengthMm()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 48: + { + age_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 48 + case 74: + { + input.readMessage( + internalGetMembershipStartDateFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 74 + case 104: + { + userConfiguredWalkingStrideLengthMm_ = input.readInt32(); + bitField0_ |= 0x00000008; + break; + } // case 104 + case 112: + { + userConfiguredRunningStrideLengthMm_ = input.readInt32(); + bitField0_ |= 0x00000010; + break; + } // case 112 + case 120: + { + autoWalkingStrideLengthMm_ = input.readInt32(); + bitField0_ |= 0x00000020; + break; + } // case 120 + case 128: + { + autoRunningStrideLengthMm_ = input.readInt32(); + bitField0_ |= 0x00000040; + break; + } // case 128 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Identifier. The resource name of this Profile resource.
+     *
+     * Format: `users/{user}/profile`
+     * Example: `users/1234567890/profile` or `users/me/profile`
+     * The {user} ID is a system-generated Google Health API user ID, a string of
+     * 1-63 characters consisting of lowercase and uppercase letters, numbers, and
+     * hyphens. The literal `me` can also be used to refer to the authenticated
+     * user.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Identifier. The resource name of this Profile resource.
+     *
+     * Format: `users/{user}/profile`
+     * Example: `users/1234567890/profile` or `users/me/profile`
+     * The {user} ID is a system-generated Google Health API user ID, a string of
+     * 1-63 characters consisting of lowercase and uppercase letters, numbers, and
+     * hyphens. The literal `me` can also be used to refer to the authenticated
+     * user.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Identifier. The resource name of this Profile resource.
+     *
+     * Format: `users/{user}/profile`
+     * Example: `users/1234567890/profile` or `users/me/profile`
+     * The {user} ID is a system-generated Google Health API user ID, a string of
+     * 1-63 characters consisting of lowercase and uppercase letters, numbers, and
+     * hyphens. The literal `me` can also be used to refer to the authenticated
+     * user.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. The resource name of this Profile resource.
+     *
+     * Format: `users/{user}/profile`
+     * Example: `users/1234567890/profile` or `users/me/profile`
+     * The {user} ID is a system-generated Google Health API user ID, a string of
+     * 1-63 characters consisting of lowercase and uppercase letters, numbers, and
+     * hyphens. The literal `me` can also be used to refer to the authenticated
+     * user.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. The resource name of this Profile resource.
+     *
+     * Format: `users/{user}/profile`
+     * Example: `users/1234567890/profile` or `users/me/profile`
+     * The {user} ID is a system-generated Google Health API user ID, a string of
+     * 1-63 characters consisting of lowercase and uppercase letters, numbers, and
+     * hyphens. The literal `me` can also be used to refer to the authenticated
+     * user.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int age_; + + /** + * + * + *
+     * Optional. The age in years based on the user's birth date.
+     *
+     * Updates to this field are currently not supported.
+     * 
+ * + * int32 age = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The age. + */ + @java.lang.Override + public int getAge() { + return age_; + } + + /** + * + * + *
+     * Optional. The age in years based on the user's birth date.
+     *
+     * Updates to this field are currently not supported.
+     * 
+ * + * int32 age = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The age to set. + * @return This builder for chaining. + */ + public Builder setAge(int value) { + + age_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The age in years based on the user's birth date.
+     *
+     * Updates to this field are currently not supported.
+     * 
+ * + * int32 age = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearAge() { + bitField0_ = (bitField0_ & ~0x00000002); + age_ = 0; + onChanged(); + return this; + } + + private com.google.type.Date membershipStartDate_; + private com.google.protobuf.SingleFieldBuilder< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> + membershipStartDateBuilder_; + + /** + * + * + *
+     * Output only. The date the user created their account.
+     *
+     * Updates to this field are currently not supported.
+     * 
+ * + * + * .google.type.Date membership_start_date = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the membershipStartDate field is set. + */ + public boolean hasMembershipStartDate() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Output only. The date the user created their account.
+     *
+     * Updates to this field are currently not supported.
+     * 
+ * + * + * .google.type.Date membership_start_date = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The membershipStartDate. + */ + public com.google.type.Date getMembershipStartDate() { + if (membershipStartDateBuilder_ == null) { + return membershipStartDate_ == null + ? com.google.type.Date.getDefaultInstance() + : membershipStartDate_; + } else { + return membershipStartDateBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The date the user created their account.
+     *
+     * Updates to this field are currently not supported.
+     * 
+ * + * + * .google.type.Date membership_start_date = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setMembershipStartDate(com.google.type.Date value) { + if (membershipStartDateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + membershipStartDate_ = value; + } else { + membershipStartDateBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The date the user created their account.
+     *
+     * Updates to this field are currently not supported.
+     * 
+ * + * + * .google.type.Date membership_start_date = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setMembershipStartDate(com.google.type.Date.Builder builderForValue) { + if (membershipStartDateBuilder_ == null) { + membershipStartDate_ = builderForValue.build(); + } else { + membershipStartDateBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The date the user created their account.
+     *
+     * Updates to this field are currently not supported.
+     * 
+ * + * + * .google.type.Date membership_start_date = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeMembershipStartDate(com.google.type.Date value) { + if (membershipStartDateBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && membershipStartDate_ != null + && membershipStartDate_ != com.google.type.Date.getDefaultInstance()) { + getMembershipStartDateBuilder().mergeFrom(value); + } else { + membershipStartDate_ = value; + } + } else { + membershipStartDateBuilder_.mergeFrom(value); + } + if (membershipStartDate_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The date the user created their account.
+     *
+     * Updates to this field are currently not supported.
+     * 
+ * + * + * .google.type.Date membership_start_date = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearMembershipStartDate() { + bitField0_ = (bitField0_ & ~0x00000004); + membershipStartDate_ = null; + if (membershipStartDateBuilder_ != null) { + membershipStartDateBuilder_.dispose(); + membershipStartDateBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The date the user created their account.
+     *
+     * Updates to this field are currently not supported.
+     * 
+ * + * + * .google.type.Date membership_start_date = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.type.Date.Builder getMembershipStartDateBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetMembershipStartDateFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The date the user created their account.
+     *
+     * Updates to this field are currently not supported.
+     * 
+ * + * + * .google.type.Date membership_start_date = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.type.DateOrBuilder getMembershipStartDateOrBuilder() { + if (membershipStartDateBuilder_ != null) { + return membershipStartDateBuilder_.getMessageOrBuilder(); + } else { + return membershipStartDate_ == null + ? com.google.type.Date.getDefaultInstance() + : membershipStartDate_; + } + } + + /** + * + * + *
+     * Output only. The date the user created their account.
+     *
+     * Updates to this field are currently not supported.
+     * 
+ * + * + * .google.type.Date membership_start_date = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> + internalGetMembershipStartDateFieldBuilder() { + if (membershipStartDateBuilder_ == null) { + membershipStartDateBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder>( + getMembershipStartDate(), getParentForChildren(), isClean()); + membershipStartDate_ = null; + } + return membershipStartDateBuilder_; + } + + private int userConfiguredWalkingStrideLengthMm_; + + /** + * + * + *
+     * Optional. The user's user configured walking stride length, in millimeters.
+     *
+     * The user must consent to
+     * one of the following access scopes to access this field:
+     *
+     * -
+     * `https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly`
+     * - `https://www.googleapis.com/auth/googlehealth.activity_and_fitness`
+     * 
+ * + * + * optional int32 user_configured_walking_stride_length_mm = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the userConfiguredWalkingStrideLengthMm field is set. + */ + @java.lang.Override + public boolean hasUserConfiguredWalkingStrideLengthMm() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+     * Optional. The user's user configured walking stride length, in millimeters.
+     *
+     * The user must consent to
+     * one of the following access scopes to access this field:
+     *
+     * -
+     * `https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly`
+     * - `https://www.googleapis.com/auth/googlehealth.activity_and_fitness`
+     * 
+ * + * + * optional int32 user_configured_walking_stride_length_mm = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The userConfiguredWalkingStrideLengthMm. + */ + @java.lang.Override + public int getUserConfiguredWalkingStrideLengthMm() { + return userConfiguredWalkingStrideLengthMm_; + } + + /** + * + * + *
+     * Optional. The user's user configured walking stride length, in millimeters.
+     *
+     * The user must consent to
+     * one of the following access scopes to access this field:
+     *
+     * -
+     * `https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly`
+     * - `https://www.googleapis.com/auth/googlehealth.activity_and_fitness`
+     * 
+ * + * + * optional int32 user_configured_walking_stride_length_mm = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The userConfiguredWalkingStrideLengthMm to set. + * @return This builder for chaining. + */ + public Builder setUserConfiguredWalkingStrideLengthMm(int value) { + + userConfiguredWalkingStrideLengthMm_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The user's user configured walking stride length, in millimeters.
+     *
+     * The user must consent to
+     * one of the following access scopes to access this field:
+     *
+     * -
+     * `https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly`
+     * - `https://www.googleapis.com/auth/googlehealth.activity_and_fitness`
+     * 
+ * + * + * optional int32 user_configured_walking_stride_length_mm = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearUserConfiguredWalkingStrideLengthMm() { + bitField0_ = (bitField0_ & ~0x00000008); + userConfiguredWalkingStrideLengthMm_ = 0; + onChanged(); + return this; + } + + private int userConfiguredRunningStrideLengthMm_; + + /** + * + * + *
+     * Optional. The user's user configured running stride length, in millimeters.
+     *
+     * The user must consent to
+     * one of the following access scopes to access this field:
+     *
+     * -
+     * `https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly`
+     * - `https://www.googleapis.com/auth/googlehealth.activity_and_fitness`
+     * 
+ * + * + * optional int32 user_configured_running_stride_length_mm = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the userConfiguredRunningStrideLengthMm field is set. + */ + @java.lang.Override + public boolean hasUserConfiguredRunningStrideLengthMm() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+     * Optional. The user's user configured running stride length, in millimeters.
+     *
+     * The user must consent to
+     * one of the following access scopes to access this field:
+     *
+     * -
+     * `https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly`
+     * - `https://www.googleapis.com/auth/googlehealth.activity_and_fitness`
+     * 
+ * + * + * optional int32 user_configured_running_stride_length_mm = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The userConfiguredRunningStrideLengthMm. + */ + @java.lang.Override + public int getUserConfiguredRunningStrideLengthMm() { + return userConfiguredRunningStrideLengthMm_; + } + + /** + * + * + *
+     * Optional. The user's user configured running stride length, in millimeters.
+     *
+     * The user must consent to
+     * one of the following access scopes to access this field:
+     *
+     * -
+     * `https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly`
+     * - `https://www.googleapis.com/auth/googlehealth.activity_and_fitness`
+     * 
+ * + * + * optional int32 user_configured_running_stride_length_mm = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The userConfiguredRunningStrideLengthMm to set. + * @return This builder for chaining. + */ + public Builder setUserConfiguredRunningStrideLengthMm(int value) { + + userConfiguredRunningStrideLengthMm_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The user's user configured running stride length, in millimeters.
+     *
+     * The user must consent to
+     * one of the following access scopes to access this field:
+     *
+     * -
+     * `https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly`
+     * - `https://www.googleapis.com/auth/googlehealth.activity_and_fitness`
+     * 
+ * + * + * optional int32 user_configured_running_stride_length_mm = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearUserConfiguredRunningStrideLengthMm() { + bitField0_ = (bitField0_ & ~0x00000010); + userConfiguredRunningStrideLengthMm_ = 0; + onChanged(); + return this; + } + + private int autoWalkingStrideLengthMm_; + + /** + * + * + *
+     * Output only. The automatically calculated walking stride length, in
+     * millimeters.
+     *
+     * The user must consent to
+     * one of the following access scopes to access this field:
+     *
+     * -
+     * `https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly`
+     * - `https://www.googleapis.com/auth/googlehealth.activity_and_fitness`
+     * 
+ * + * + * optional int32 auto_walking_stride_length_mm = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the autoWalkingStrideLengthMm field is set. + */ + @java.lang.Override + public boolean hasAutoWalkingStrideLengthMm() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+     * Output only. The automatically calculated walking stride length, in
+     * millimeters.
+     *
+     * The user must consent to
+     * one of the following access scopes to access this field:
+     *
+     * -
+     * `https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly`
+     * - `https://www.googleapis.com/auth/googlehealth.activity_and_fitness`
+     * 
+ * + * + * optional int32 auto_walking_stride_length_mm = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The autoWalkingStrideLengthMm. + */ + @java.lang.Override + public int getAutoWalkingStrideLengthMm() { + return autoWalkingStrideLengthMm_; + } + + /** + * + * + *
+     * Output only. The automatically calculated walking stride length, in
+     * millimeters.
+     *
+     * The user must consent to
+     * one of the following access scopes to access this field:
+     *
+     * -
+     * `https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly`
+     * - `https://www.googleapis.com/auth/googlehealth.activity_and_fitness`
+     * 
+ * + * + * optional int32 auto_walking_stride_length_mm = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The autoWalkingStrideLengthMm to set. + * @return This builder for chaining. + */ + public Builder setAutoWalkingStrideLengthMm(int value) { + + autoWalkingStrideLengthMm_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The automatically calculated walking stride length, in
+     * millimeters.
+     *
+     * The user must consent to
+     * one of the following access scopes to access this field:
+     *
+     * -
+     * `https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly`
+     * - `https://www.googleapis.com/auth/googlehealth.activity_and_fitness`
+     * 
+ * + * + * optional int32 auto_walking_stride_length_mm = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearAutoWalkingStrideLengthMm() { + bitField0_ = (bitField0_ & ~0x00000020); + autoWalkingStrideLengthMm_ = 0; + onChanged(); + return this; + } + + private int autoRunningStrideLengthMm_; + + /** + * + * + *
+     * Output only. The automatically calculated running stride length, in
+     * millimeters.
+     *
+     * The user must consent to
+     * one of the following access scopes to access this field:
+     *
+     * -
+     * `https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly`
+     * - `https://www.googleapis.com/auth/googlehealth.activity_and_fitness`
+     * 
+ * + * + * optional int32 auto_running_stride_length_mm = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the autoRunningStrideLengthMm field is set. + */ + @java.lang.Override + public boolean hasAutoRunningStrideLengthMm() { + return ((bitField0_ & 0x00000040) != 0); + } + + /** + * + * + *
+     * Output only. The automatically calculated running stride length, in
+     * millimeters.
+     *
+     * The user must consent to
+     * one of the following access scopes to access this field:
+     *
+     * -
+     * `https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly`
+     * - `https://www.googleapis.com/auth/googlehealth.activity_and_fitness`
+     * 
+ * + * + * optional int32 auto_running_stride_length_mm = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The autoRunningStrideLengthMm. + */ + @java.lang.Override + public int getAutoRunningStrideLengthMm() { + return autoRunningStrideLengthMm_; + } + + /** + * + * + *
+     * Output only. The automatically calculated running stride length, in
+     * millimeters.
+     *
+     * The user must consent to
+     * one of the following access scopes to access this field:
+     *
+     * -
+     * `https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly`
+     * - `https://www.googleapis.com/auth/googlehealth.activity_and_fitness`
+     * 
+ * + * + * optional int32 auto_running_stride_length_mm = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The autoRunningStrideLengthMm to set. + * @return This builder for chaining. + */ + public Builder setAutoRunningStrideLengthMm(int value) { + + autoRunningStrideLengthMm_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The automatically calculated running stride length, in
+     * millimeters.
+     *
+     * The user must consent to
+     * one of the following access scopes to access this field:
+     *
+     * -
+     * `https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly`
+     * - `https://www.googleapis.com/auth/googlehealth.activity_and_fitness`
+     * 
+ * + * + * optional int32 auto_running_stride_length_mm = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearAutoRunningStrideLengthMm() { + bitField0_ = (bitField0_ & ~0x00000040); + autoRunningStrideLengthMm_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.Profile) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.Profile) + private static final com.google.devicesandservices.health.v4.Profile DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.Profile(); + } + + public static com.google.devicesandservices.health.v4.Profile getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Profile parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.Profile getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ProfileName.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ProfileName.java new file mode 100644 index 000000000000..cb7f3e32e524 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ProfileName.java @@ -0,0 +1,168 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class ProfileName implements ResourceName { + private static final PathTemplate USER = + PathTemplate.createWithoutUrlEncoding("users/{user}/profile"); + private volatile Map fieldValuesMap; + private final String user; + + @Deprecated + protected ProfileName() { + user = null; + } + + private ProfileName(Builder builder) { + user = Preconditions.checkNotNull(builder.getUser()); + } + + public String getUser() { + return user; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static ProfileName of(String user) { + return newBuilder().setUser(user).build(); + } + + public static String format(String user) { + return newBuilder().setUser(user).build().toString(); + } + + public static ProfileName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + USER.validatedMatch( + formattedString, "ProfileName.parse: formattedString not in valid format"); + return of(matchMap.get("user")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (ProfileName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return USER.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (user != null) { + fieldMapBuilder.put("user", user); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return USER.instantiate("user", user); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + ProfileName that = ((ProfileName) o); + return Objects.equals(this.user, that.user); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(user); + return h; + } + + /** Builder for users/{user}/profile. */ + public static class Builder { + private String user; + + protected Builder() {} + + public String getUser() { + return user; + } + + public Builder setUser(String user) { + this.user = user; + return this; + } + + private Builder(ProfileName profileName) { + this.user = profileName.user; + } + + public ProfileName build() { + return new ProfileName(this); + } + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ProfileOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ProfileOrBuilder.java new file mode 100644 index 000000000000..0a45daa4b1e9 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ProfileOrBuilder.java @@ -0,0 +1,309 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/health_profile.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface ProfileOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.Profile) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Identifier. The resource name of this Profile resource.
+   *
+   * Format: `users/{user}/profile`
+   * Example: `users/1234567890/profile` or `users/me/profile`
+   * The {user} ID is a system-generated Google Health API user ID, a string of
+   * 1-63 characters consisting of lowercase and uppercase letters, numbers, and
+   * hyphens. The literal `me` can also be used to refer to the authenticated
+   * user.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Identifier. The resource name of this Profile resource.
+   *
+   * Format: `users/{user}/profile`
+   * Example: `users/1234567890/profile` or `users/me/profile`
+   * The {user} ID is a system-generated Google Health API user ID, a string of
+   * 1-63 characters consisting of lowercase and uppercase letters, numbers, and
+   * hyphens. The literal `me` can also be used to refer to the authenticated
+   * user.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. The age in years based on the user's birth date.
+   *
+   * Updates to this field are currently not supported.
+   * 
+ * + * int32 age = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The age. + */ + int getAge(); + + /** + * + * + *
+   * Output only. The date the user created their account.
+   *
+   * Updates to this field are currently not supported.
+   * 
+ * + * .google.type.Date membership_start_date = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the membershipStartDate field is set. + */ + boolean hasMembershipStartDate(); + + /** + * + * + *
+   * Output only. The date the user created their account.
+   *
+   * Updates to this field are currently not supported.
+   * 
+ * + * .google.type.Date membership_start_date = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The membershipStartDate. + */ + com.google.type.Date getMembershipStartDate(); + + /** + * + * + *
+   * Output only. The date the user created their account.
+   *
+   * Updates to this field are currently not supported.
+   * 
+ * + * .google.type.Date membership_start_date = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.type.DateOrBuilder getMembershipStartDateOrBuilder(); + + /** + * + * + *
+   * Optional. The user's user configured walking stride length, in millimeters.
+   *
+   * The user must consent to
+   * one of the following access scopes to access this field:
+   *
+   * -
+   * `https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly`
+   * - `https://www.googleapis.com/auth/googlehealth.activity_and_fitness`
+   * 
+ * + * + * optional int32 user_configured_walking_stride_length_mm = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the userConfiguredWalkingStrideLengthMm field is set. + */ + boolean hasUserConfiguredWalkingStrideLengthMm(); + + /** + * + * + *
+   * Optional. The user's user configured walking stride length, in millimeters.
+   *
+   * The user must consent to
+   * one of the following access scopes to access this field:
+   *
+   * -
+   * `https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly`
+   * - `https://www.googleapis.com/auth/googlehealth.activity_and_fitness`
+   * 
+ * + * + * optional int32 user_configured_walking_stride_length_mm = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The userConfiguredWalkingStrideLengthMm. + */ + int getUserConfiguredWalkingStrideLengthMm(); + + /** + * + * + *
+   * Optional. The user's user configured running stride length, in millimeters.
+   *
+   * The user must consent to
+   * one of the following access scopes to access this field:
+   *
+   * -
+   * `https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly`
+   * - `https://www.googleapis.com/auth/googlehealth.activity_and_fitness`
+   * 
+ * + * + * optional int32 user_configured_running_stride_length_mm = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the userConfiguredRunningStrideLengthMm field is set. + */ + boolean hasUserConfiguredRunningStrideLengthMm(); + + /** + * + * + *
+   * Optional. The user's user configured running stride length, in millimeters.
+   *
+   * The user must consent to
+   * one of the following access scopes to access this field:
+   *
+   * -
+   * `https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly`
+   * - `https://www.googleapis.com/auth/googlehealth.activity_and_fitness`
+   * 
+ * + * + * optional int32 user_configured_running_stride_length_mm = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The userConfiguredRunningStrideLengthMm. + */ + int getUserConfiguredRunningStrideLengthMm(); + + /** + * + * + *
+   * Output only. The automatically calculated walking stride length, in
+   * millimeters.
+   *
+   * The user must consent to
+   * one of the following access scopes to access this field:
+   *
+   * -
+   * `https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly`
+   * - `https://www.googleapis.com/auth/googlehealth.activity_and_fitness`
+   * 
+ * + * + * optional int32 auto_walking_stride_length_mm = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the autoWalkingStrideLengthMm field is set. + */ + boolean hasAutoWalkingStrideLengthMm(); + + /** + * + * + *
+   * Output only. The automatically calculated walking stride length, in
+   * millimeters.
+   *
+   * The user must consent to
+   * one of the following access scopes to access this field:
+   *
+   * -
+   * `https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly`
+   * - `https://www.googleapis.com/auth/googlehealth.activity_and_fitness`
+   * 
+ * + * + * optional int32 auto_walking_stride_length_mm = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The autoWalkingStrideLengthMm. + */ + int getAutoWalkingStrideLengthMm(); + + /** + * + * + *
+   * Output only. The automatically calculated running stride length, in
+   * millimeters.
+   *
+   * The user must consent to
+   * one of the following access scopes to access this field:
+   *
+   * -
+   * `https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly`
+   * - `https://www.googleapis.com/auth/googlehealth.activity_and_fitness`
+   * 
+ * + * + * optional int32 auto_running_stride_length_mm = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the autoRunningStrideLengthMm field is set. + */ + boolean hasAutoRunningStrideLengthMm(); + + /** + * + * + *
+   * Output only. The automatically calculated running stride length, in
+   * millimeters.
+   *
+   * The user must consent to
+   * one of the following access scopes to access this field:
+   *
+   * -
+   * `https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly`
+   * - `https://www.googleapis.com/auth/googlehealth.activity_and_fitness`
+   * 
+ * + * + * optional int32 auto_running_stride_length_mm = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The autoRunningStrideLengthMm. + */ + int getAutoRunningStrideLengthMm(); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ReconcileDataPointsRequest.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ReconcileDataPointsRequest.java new file mode 100644 index 000000000000..ef6094949adf --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ReconcileDataPointsRequest.java @@ -0,0 +1,1474 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_points.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * Request to reconcile data points from multiple data sources.
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.ReconcileDataPointsRequest} + */ +@com.google.protobuf.Generated +public final class ReconcileDataPointsRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.ReconcileDataPointsRequest) + ReconcileDataPointsRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ReconcileDataPointsRequest"); + } + + // Use ReconcileDataPointsRequest.newBuilder() to construct. + private ReconcileDataPointsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ReconcileDataPointsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + dataSourceFamily_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_ReconcileDataPointsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_ReconcileDataPointsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.ReconcileDataPointsRequest.class, + com.google.devicesandservices.health.v4.ReconcileDataPointsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. Parent data type of the Data Point collection.
+   *
+   * Format: `users/me/dataTypes/{data_type}`, e.g.:
+   *
+   * - `users/me/dataTypes/steps`
+   * - `users/me/dataTypes/heart-rate`
+   *
+   * For a list of the supported data types see the
+   * [DataPoint
+   * data][google.devicesandservices.health.v4.DataPoint] union
+   * field.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Parent data type of the Data Point collection.
+   *
+   * Format: `users/me/dataTypes/{data_type}`, e.g.:
+   *
+   * - `users/me/dataTypes/steps`
+   * - `users/me/dataTypes/heart-rate`
+   *
+   * For a list of the supported data types see the
+   * [DataPoint
+   * data][google.devicesandservices.health.v4.DataPoint] union
+   * field.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + + /** + * + * + *
+   * Optional. The maximum number of data points to return.
+   * If unspecified, at most 1440 data points will be returned.
+   * The maximum page size is 10000; values above that will be truncated
+   * accordingly.
+   * For `exercise` and `sleep` the default page size is 25.
+   * The maximum page size for `exercise` and `sleep` is 25.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + + /** + * + * + *
+   * Optional. The `next_page_token` from a previous request, if any.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The `next_page_token` from a previous request, if any.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + + /** + * + * + *
+   * Optional. Filter expression based on https://aip.dev/160.
+   *
+   * A time range, either physical or civil, can be specified.
+   * See the
+   * [ListDataPointsRequest.filter][google.devicesandservices.health.v4.ListDataPointsRequest.filter]
+   * for the supported fields and syntax.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Filter expression based on https://aip.dev/160.
+   *
+   * A time range, either physical or civil, can be specified.
+   * See the
+   * [ListDataPointsRequest.filter][google.devicesandservices.health.v4.ListDataPointsRequest.filter]
+   * for the supported fields and syntax.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATA_SOURCE_FAMILY_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object dataSourceFamily_ = ""; + + /** + * + * + *
+   * Optional. The data source family name to reconcile.
+   *
+   * If empty, data points from all data sources will be reconciled.
+   *
+   * Format: `users/me/dataSourceFamilies/{data_source_family}`
+   *
+   * The supported values are:
+   *
+   * - `users/me/dataSourceFamilies/all-sources` - default value
+   * - `users/me/dataSourceFamilies/google-wearables` - tracker devices
+   * - `users/me/dataSourceFamilies/google-sources` - Google first party
+   * sources
+   * 
+ * + * string data_source_family = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The dataSourceFamily. + */ + @java.lang.Override + public java.lang.String getDataSourceFamily() { + java.lang.Object ref = dataSourceFamily_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dataSourceFamily_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The data source family name to reconcile.
+   *
+   * If empty, data points from all data sources will be reconciled.
+   *
+   * Format: `users/me/dataSourceFamilies/{data_source_family}`
+   *
+   * The supported values are:
+   *
+   * - `users/me/dataSourceFamilies/all-sources` - default value
+   * - `users/me/dataSourceFamilies/google-wearables` - tracker devices
+   * - `users/me/dataSourceFamilies/google-sources` - Google first party
+   * sources
+   * 
+ * + * string data_source_family = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for dataSourceFamily. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDataSourceFamilyBytes() { + java.lang.Object ref = dataSourceFamily_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataSourceFamily_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(dataSourceFamily_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, dataSourceFamily_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(dataSourceFamily_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, dataSourceFamily_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.ReconcileDataPointsRequest)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.ReconcileDataPointsRequest other = + (com.google.devicesandservices.health.v4.ReconcileDataPointsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getDataSourceFamily().equals(other.getDataSourceFamily())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + DATA_SOURCE_FAMILY_FIELD_NUMBER; + hash = (53 * hash) + getDataSourceFamily().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.ReconcileDataPointsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.ReconcileDataPointsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ReconcileDataPointsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.ReconcileDataPointsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ReconcileDataPointsRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.ReconcileDataPointsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ReconcileDataPointsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.ReconcileDataPointsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ReconcileDataPointsRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.ReconcileDataPointsRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ReconcileDataPointsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.ReconcileDataPointsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.ReconcileDataPointsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request to reconcile data points from multiple data sources.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.ReconcileDataPointsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.ReconcileDataPointsRequest) + com.google.devicesandservices.health.v4.ReconcileDataPointsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_ReconcileDataPointsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_ReconcileDataPointsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.ReconcileDataPointsRequest.class, + com.google.devicesandservices.health.v4.ReconcileDataPointsRequest.Builder.class); + } + + // Construct using + // com.google.devicesandservices.health.v4.ReconcileDataPointsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + dataSourceFamily_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_ReconcileDataPointsRequest_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.ReconcileDataPointsRequest + getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.ReconcileDataPointsRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.ReconcileDataPointsRequest build() { + com.google.devicesandservices.health.v4.ReconcileDataPointsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.ReconcileDataPointsRequest buildPartial() { + com.google.devicesandservices.health.v4.ReconcileDataPointsRequest result = + new com.google.devicesandservices.health.v4.ReconcileDataPointsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.devicesandservices.health.v4.ReconcileDataPointsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.dataSourceFamily_ = dataSourceFamily_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.ReconcileDataPointsRequest) { + return mergeFrom( + (com.google.devicesandservices.health.v4.ReconcileDataPointsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.devicesandservices.health.v4.ReconcileDataPointsRequest other) { + if (other + == com.google.devicesandservices.health.v4.ReconcileDataPointsRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getDataSourceFamily().isEmpty()) { + dataSourceFamily_ = other.dataSourceFamily_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + dataSourceFamily_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. Parent data type of the Data Point collection.
+     *
+     * Format: `users/me/dataTypes/{data_type}`, e.g.:
+     *
+     * - `users/me/dataTypes/steps`
+     * - `users/me/dataTypes/heart-rate`
+     *
+     * For a list of the supported data types see the
+     * [DataPoint
+     * data][google.devicesandservices.health.v4.DataPoint] union
+     * field.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Parent data type of the Data Point collection.
+     *
+     * Format: `users/me/dataTypes/{data_type}`, e.g.:
+     *
+     * - `users/me/dataTypes/steps`
+     * - `users/me/dataTypes/heart-rate`
+     *
+     * For a list of the supported data types see the
+     * [DataPoint
+     * data][google.devicesandservices.health.v4.DataPoint] union
+     * field.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Parent data type of the Data Point collection.
+     *
+     * Format: `users/me/dataTypes/{data_type}`, e.g.:
+     *
+     * - `users/me/dataTypes/steps`
+     * - `users/me/dataTypes/heart-rate`
+     *
+     * For a list of the supported data types see the
+     * [DataPoint
+     * data][google.devicesandservices.health.v4.DataPoint] union
+     * field.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Parent data type of the Data Point collection.
+     *
+     * Format: `users/me/dataTypes/{data_type}`, e.g.:
+     *
+     * - `users/me/dataTypes/steps`
+     * - `users/me/dataTypes/heart-rate`
+     *
+     * For a list of the supported data types see the
+     * [DataPoint
+     * data][google.devicesandservices.health.v4.DataPoint] union
+     * field.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Parent data type of the Data Point collection.
+     *
+     * Format: `users/me/dataTypes/{data_type}`, e.g.:
+     *
+     * - `users/me/dataTypes/steps`
+     * - `users/me/dataTypes/heart-rate`
+     *
+     * For a list of the supported data types see the
+     * [DataPoint
+     * data][google.devicesandservices.health.v4.DataPoint] union
+     * field.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + + /** + * + * + *
+     * Optional. The maximum number of data points to return.
+     * If unspecified, at most 1440 data points will be returned.
+     * The maximum page size is 10000; values above that will be truncated
+     * accordingly.
+     * For `exercise` and `sleep` the default page size is 25.
+     * The maximum page size for `exercise` and `sleep` is 25.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. The maximum number of data points to return.
+     * If unspecified, at most 1440 data points will be returned.
+     * The maximum page size is 10000; values above that will be truncated
+     * accordingly.
+     * For `exercise` and `sleep` the default page size is 25.
+     * The maximum page size for `exercise` and `sleep` is 25.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The maximum number of data points to return.
+     * If unspecified, at most 1440 data points will be returned.
+     * The maximum page size is 10000; values above that will be truncated
+     * accordingly.
+     * For `exercise` and `sleep` the default page size is 25.
+     * The maximum page size for `exercise` and `sleep` is 25.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
+     * Optional. The `next_page_token` from a previous request, if any.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The `next_page_token` from a previous request, if any.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The `next_page_token` from a previous request, if any.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The `next_page_token` from a previous request, if any.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The `next_page_token` from a previous request, if any.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + + /** + * + * + *
+     * Optional. Filter expression based on https://aip.dev/160.
+     *
+     * A time range, either physical or civil, can be specified.
+     * See the
+     * [ListDataPointsRequest.filter][google.devicesandservices.health.v4.ListDataPointsRequest.filter]
+     * for the supported fields and syntax.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Filter expression based on https://aip.dev/160.
+     *
+     * A time range, either physical or civil, can be specified.
+     * See the
+     * [ListDataPointsRequest.filter][google.devicesandservices.health.v4.ListDataPointsRequest.filter]
+     * for the supported fields and syntax.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Filter expression based on https://aip.dev/160.
+     *
+     * A time range, either physical or civil, can be specified.
+     * See the
+     * [ListDataPointsRequest.filter][google.devicesandservices.health.v4.ListDataPointsRequest.filter]
+     * for the supported fields and syntax.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Filter expression based on https://aip.dev/160.
+     *
+     * A time range, either physical or civil, can be specified.
+     * See the
+     * [ListDataPointsRequest.filter][google.devicesandservices.health.v4.ListDataPointsRequest.filter]
+     * for the supported fields and syntax.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Filter expression based on https://aip.dev/160.
+     *
+     * A time range, either physical or civil, can be specified.
+     * See the
+     * [ListDataPointsRequest.filter][google.devicesandservices.health.v4.ListDataPointsRequest.filter]
+     * for the supported fields and syntax.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object dataSourceFamily_ = ""; + + /** + * + * + *
+     * Optional. The data source family name to reconcile.
+     *
+     * If empty, data points from all data sources will be reconciled.
+     *
+     * Format: `users/me/dataSourceFamilies/{data_source_family}`
+     *
+     * The supported values are:
+     *
+     * - `users/me/dataSourceFamilies/all-sources` - default value
+     * - `users/me/dataSourceFamilies/google-wearables` - tracker devices
+     * - `users/me/dataSourceFamilies/google-sources` - Google first party
+     * sources
+     * 
+ * + * string data_source_family = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The dataSourceFamily. + */ + public java.lang.String getDataSourceFamily() { + java.lang.Object ref = dataSourceFamily_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dataSourceFamily_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The data source family name to reconcile.
+     *
+     * If empty, data points from all data sources will be reconciled.
+     *
+     * Format: `users/me/dataSourceFamilies/{data_source_family}`
+     *
+     * The supported values are:
+     *
+     * - `users/me/dataSourceFamilies/all-sources` - default value
+     * - `users/me/dataSourceFamilies/google-wearables` - tracker devices
+     * - `users/me/dataSourceFamilies/google-sources` - Google first party
+     * sources
+     * 
+ * + * string data_source_family = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for dataSourceFamily. + */ + public com.google.protobuf.ByteString getDataSourceFamilyBytes() { + java.lang.Object ref = dataSourceFamily_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataSourceFamily_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The data source family name to reconcile.
+     *
+     * If empty, data points from all data sources will be reconciled.
+     *
+     * Format: `users/me/dataSourceFamilies/{data_source_family}`
+     *
+     * The supported values are:
+     *
+     * - `users/me/dataSourceFamilies/all-sources` - default value
+     * - `users/me/dataSourceFamilies/google-wearables` - tracker devices
+     * - `users/me/dataSourceFamilies/google-sources` - Google first party
+     * sources
+     * 
+ * + * string data_source_family = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The dataSourceFamily to set. + * @return This builder for chaining. + */ + public Builder setDataSourceFamily(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + dataSourceFamily_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The data source family name to reconcile.
+     *
+     * If empty, data points from all data sources will be reconciled.
+     *
+     * Format: `users/me/dataSourceFamilies/{data_source_family}`
+     *
+     * The supported values are:
+     *
+     * - `users/me/dataSourceFamilies/all-sources` - default value
+     * - `users/me/dataSourceFamilies/google-wearables` - tracker devices
+     * - `users/me/dataSourceFamilies/google-sources` - Google first party
+     * sources
+     * 
+ * + * string data_source_family = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDataSourceFamily() { + dataSourceFamily_ = getDefaultInstance().getDataSourceFamily(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The data source family name to reconcile.
+     *
+     * If empty, data points from all data sources will be reconciled.
+     *
+     * Format: `users/me/dataSourceFamilies/{data_source_family}`
+     *
+     * The supported values are:
+     *
+     * - `users/me/dataSourceFamilies/all-sources` - default value
+     * - `users/me/dataSourceFamilies/google-wearables` - tracker devices
+     * - `users/me/dataSourceFamilies/google-sources` - Google first party
+     * sources
+     * 
+ * + * string data_source_family = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for dataSourceFamily to set. + * @return This builder for chaining. + */ + public Builder setDataSourceFamilyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + dataSourceFamily_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.ReconcileDataPointsRequest) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.ReconcileDataPointsRequest) + private static final com.google.devicesandservices.health.v4.ReconcileDataPointsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.ReconcileDataPointsRequest(); + } + + public static com.google.devicesandservices.health.v4.ReconcileDataPointsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ReconcileDataPointsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.ReconcileDataPointsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ReconcileDataPointsRequestOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ReconcileDataPointsRequestOrBuilder.java new file mode 100644 index 000000000000..0b33e8acbfb8 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ReconcileDataPointsRequestOrBuilder.java @@ -0,0 +1,202 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_points.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface ReconcileDataPointsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.ReconcileDataPointsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Parent data type of the Data Point collection.
+   *
+   * Format: `users/me/dataTypes/{data_type}`, e.g.:
+   *
+   * - `users/me/dataTypes/steps`
+   * - `users/me/dataTypes/heart-rate`
+   *
+   * For a list of the supported data types see the
+   * [DataPoint
+   * data][google.devicesandservices.health.v4.DataPoint] union
+   * field.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. Parent data type of the Data Point collection.
+   *
+   * Format: `users/me/dataTypes/{data_type}`, e.g.:
+   *
+   * - `users/me/dataTypes/steps`
+   * - `users/me/dataTypes/heart-rate`
+   *
+   * For a list of the supported data types see the
+   * [DataPoint
+   * data][google.devicesandservices.health.v4.DataPoint] union
+   * field.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. The maximum number of data points to return.
+   * If unspecified, at most 1440 data points will be returned.
+   * The maximum page size is 10000; values above that will be truncated
+   * accordingly.
+   * For `exercise` and `sleep` the default page size is 25.
+   * The maximum page size for `exercise` and `sleep` is 25.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. The `next_page_token` from a previous request, if any.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. The `next_page_token` from a previous request, if any.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. Filter expression based on https://aip.dev/160.
+   *
+   * A time range, either physical or civil, can be specified.
+   * See the
+   * [ListDataPointsRequest.filter][google.devicesandservices.health.v4.ListDataPointsRequest.filter]
+   * for the supported fields and syntax.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + + /** + * + * + *
+   * Optional. Filter expression based on https://aip.dev/160.
+   *
+   * A time range, either physical or civil, can be specified.
+   * See the
+   * [ListDataPointsRequest.filter][google.devicesandservices.health.v4.ListDataPointsRequest.filter]
+   * for the supported fields and syntax.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Optional. The data source family name to reconcile.
+   *
+   * If empty, data points from all data sources will be reconciled.
+   *
+   * Format: `users/me/dataSourceFamilies/{data_source_family}`
+   *
+   * The supported values are:
+   *
+   * - `users/me/dataSourceFamilies/all-sources` - default value
+   * - `users/me/dataSourceFamilies/google-wearables` - tracker devices
+   * - `users/me/dataSourceFamilies/google-sources` - Google first party
+   * sources
+   * 
+ * + * string data_source_family = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The dataSourceFamily. + */ + java.lang.String getDataSourceFamily(); + + /** + * + * + *
+   * Optional. The data source family name to reconcile.
+   *
+   * If empty, data points from all data sources will be reconciled.
+   *
+   * Format: `users/me/dataSourceFamilies/{data_source_family}`
+   *
+   * The supported values are:
+   *
+   * - `users/me/dataSourceFamilies/all-sources` - default value
+   * - `users/me/dataSourceFamilies/google-wearables` - tracker devices
+   * - `users/me/dataSourceFamilies/google-sources` - Google first party
+   * sources
+   * 
+ * + * string data_source_family = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for dataSourceFamily. + */ + com.google.protobuf.ByteString getDataSourceFamilyBytes(); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ReconcileDataPointsResponse.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ReconcileDataPointsResponse.java new file mode 100644 index 000000000000..9f331f98740d --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ReconcileDataPointsResponse.java @@ -0,0 +1,1163 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_points.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * Response containing the list of reconciled DataPoints.
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.ReconcileDataPointsResponse} + */ +@com.google.protobuf.Generated +public final class ReconcileDataPointsResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.ReconcileDataPointsResponse) + ReconcileDataPointsResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ReconcileDataPointsResponse"); + } + + // Use ReconcileDataPointsResponse.newBuilder() to construct. + private ReconcileDataPointsResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ReconcileDataPointsResponse() { + dataPoints_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_ReconcileDataPointsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_ReconcileDataPointsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.ReconcileDataPointsResponse.class, + com.google.devicesandservices.health.v4.ReconcileDataPointsResponse.Builder.class); + } + + public static final int DATA_POINTS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List dataPoints_; + + /** + * + * + *
+   * Data points matching the query
+   * 
+ * + * repeated .google.devicesandservices.health.v4.ReconciledDataPoint data_points = 1; + */ + @java.lang.Override + public java.util.List + getDataPointsList() { + return dataPoints_; + } + + /** + * + * + *
+   * Data points matching the query
+   * 
+ * + * repeated .google.devicesandservices.health.v4.ReconciledDataPoint data_points = 1; + */ + @java.lang.Override + public java.util.List< + ? extends com.google.devicesandservices.health.v4.ReconciledDataPointOrBuilder> + getDataPointsOrBuilderList() { + return dataPoints_; + } + + /** + * + * + *
+   * Data points matching the query
+   * 
+ * + * repeated .google.devicesandservices.health.v4.ReconciledDataPoint data_points = 1; + */ + @java.lang.Override + public int getDataPointsCount() { + return dataPoints_.size(); + } + + /** + * + * + *
+   * Data points matching the query
+   * 
+ * + * repeated .google.devicesandservices.health.v4.ReconciledDataPoint data_points = 1; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ReconciledDataPoint getDataPoints(int index) { + return dataPoints_.get(index); + } + + /** + * + * + *
+   * Data points matching the query
+   * 
+ * + * repeated .google.devicesandservices.health.v4.ReconciledDataPoint data_points = 1; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ReconciledDataPointOrBuilder + getDataPointsOrBuilder(int index) { + return dataPoints_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * Next page token, empty if the response is complete
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * Next page token, empty if the response is complete
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < dataPoints_.size(); i++) { + output.writeMessage(1, dataPoints_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < dataPoints_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, dataPoints_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.ReconcileDataPointsResponse)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.ReconcileDataPointsResponse other = + (com.google.devicesandservices.health.v4.ReconcileDataPointsResponse) obj; + + if (!getDataPointsList().equals(other.getDataPointsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getDataPointsCount() > 0) { + hash = (37 * hash) + DATA_POINTS_FIELD_NUMBER; + hash = (53 * hash) + getDataPointsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.ReconcileDataPointsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.ReconcileDataPointsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ReconcileDataPointsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.ReconcileDataPointsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ReconcileDataPointsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.ReconcileDataPointsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ReconcileDataPointsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.ReconcileDataPointsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ReconcileDataPointsResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.ReconcileDataPointsResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ReconcileDataPointsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.ReconcileDataPointsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.ReconcileDataPointsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Response containing the list of reconciled DataPoints.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.ReconcileDataPointsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.ReconcileDataPointsResponse) + com.google.devicesandservices.health.v4.ReconcileDataPointsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_ReconcileDataPointsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_ReconcileDataPointsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.ReconcileDataPointsResponse.class, + com.google.devicesandservices.health.v4.ReconcileDataPointsResponse.Builder.class); + } + + // Construct using + // com.google.devicesandservices.health.v4.ReconcileDataPointsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (dataPointsBuilder_ == null) { + dataPoints_ = java.util.Collections.emptyList(); + } else { + dataPoints_ = null; + dataPointsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_ReconcileDataPointsResponse_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.ReconcileDataPointsResponse + getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.ReconcileDataPointsResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.ReconcileDataPointsResponse build() { + com.google.devicesandservices.health.v4.ReconcileDataPointsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.ReconcileDataPointsResponse buildPartial() { + com.google.devicesandservices.health.v4.ReconcileDataPointsResponse result = + new com.google.devicesandservices.health.v4.ReconcileDataPointsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.devicesandservices.health.v4.ReconcileDataPointsResponse result) { + if (dataPointsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + dataPoints_ = java.util.Collections.unmodifiableList(dataPoints_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.dataPoints_ = dataPoints_; + } else { + result.dataPoints_ = dataPointsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.devicesandservices.health.v4.ReconcileDataPointsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.ReconcileDataPointsResponse) { + return mergeFrom( + (com.google.devicesandservices.health.v4.ReconcileDataPointsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.devicesandservices.health.v4.ReconcileDataPointsResponse other) { + if (other + == com.google.devicesandservices.health.v4.ReconcileDataPointsResponse + .getDefaultInstance()) return this; + if (dataPointsBuilder_ == null) { + if (!other.dataPoints_.isEmpty()) { + if (dataPoints_.isEmpty()) { + dataPoints_ = other.dataPoints_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDataPointsIsMutable(); + dataPoints_.addAll(other.dataPoints_); + } + onChanged(); + } + } else { + if (!other.dataPoints_.isEmpty()) { + if (dataPointsBuilder_.isEmpty()) { + dataPointsBuilder_.dispose(); + dataPointsBuilder_ = null; + dataPoints_ = other.dataPoints_; + bitField0_ = (bitField0_ & ~0x00000001); + dataPointsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetDataPointsFieldBuilder() + : null; + } else { + dataPointsBuilder_.addAllMessages(other.dataPoints_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.devicesandservices.health.v4.ReconciledDataPoint m = + input.readMessage( + com.google.devicesandservices.health.v4.ReconciledDataPoint.parser(), + extensionRegistry); + if (dataPointsBuilder_ == null) { + ensureDataPointsIsMutable(); + dataPoints_.add(m); + } else { + dataPointsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List + dataPoints_ = java.util.Collections.emptyList(); + + private void ensureDataPointsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + dataPoints_ = + new java.util.ArrayList( + dataPoints_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.devicesandservices.health.v4.ReconciledDataPoint, + com.google.devicesandservices.health.v4.ReconciledDataPoint.Builder, + com.google.devicesandservices.health.v4.ReconciledDataPointOrBuilder> + dataPointsBuilder_; + + /** + * + * + *
+     * Data points matching the query
+     * 
+ * + * repeated .google.devicesandservices.health.v4.ReconciledDataPoint data_points = 1; + * + */ + public java.util.List + getDataPointsList() { + if (dataPointsBuilder_ == null) { + return java.util.Collections.unmodifiableList(dataPoints_); + } else { + return dataPointsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Data points matching the query
+     * 
+ * + * repeated .google.devicesandservices.health.v4.ReconciledDataPoint data_points = 1; + * + */ + public int getDataPointsCount() { + if (dataPointsBuilder_ == null) { + return dataPoints_.size(); + } else { + return dataPointsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Data points matching the query
+     * 
+ * + * repeated .google.devicesandservices.health.v4.ReconciledDataPoint data_points = 1; + * + */ + public com.google.devicesandservices.health.v4.ReconciledDataPoint getDataPoints(int index) { + if (dataPointsBuilder_ == null) { + return dataPoints_.get(index); + } else { + return dataPointsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Data points matching the query
+     * 
+ * + * repeated .google.devicesandservices.health.v4.ReconciledDataPoint data_points = 1; + * + */ + public Builder setDataPoints( + int index, com.google.devicesandservices.health.v4.ReconciledDataPoint value) { + if (dataPointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataPointsIsMutable(); + dataPoints_.set(index, value); + onChanged(); + } else { + dataPointsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Data points matching the query
+     * 
+ * + * repeated .google.devicesandservices.health.v4.ReconciledDataPoint data_points = 1; + * + */ + public Builder setDataPoints( + int index, + com.google.devicesandservices.health.v4.ReconciledDataPoint.Builder builderForValue) { + if (dataPointsBuilder_ == null) { + ensureDataPointsIsMutable(); + dataPoints_.set(index, builderForValue.build()); + onChanged(); + } else { + dataPointsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Data points matching the query
+     * 
+ * + * repeated .google.devicesandservices.health.v4.ReconciledDataPoint data_points = 1; + * + */ + public Builder addDataPoints( + com.google.devicesandservices.health.v4.ReconciledDataPoint value) { + if (dataPointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataPointsIsMutable(); + dataPoints_.add(value); + onChanged(); + } else { + dataPointsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Data points matching the query
+     * 
+ * + * repeated .google.devicesandservices.health.v4.ReconciledDataPoint data_points = 1; + * + */ + public Builder addDataPoints( + int index, com.google.devicesandservices.health.v4.ReconciledDataPoint value) { + if (dataPointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataPointsIsMutable(); + dataPoints_.add(index, value); + onChanged(); + } else { + dataPointsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Data points matching the query
+     * 
+ * + * repeated .google.devicesandservices.health.v4.ReconciledDataPoint data_points = 1; + * + */ + public Builder addDataPoints( + com.google.devicesandservices.health.v4.ReconciledDataPoint.Builder builderForValue) { + if (dataPointsBuilder_ == null) { + ensureDataPointsIsMutable(); + dataPoints_.add(builderForValue.build()); + onChanged(); + } else { + dataPointsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Data points matching the query
+     * 
+ * + * repeated .google.devicesandservices.health.v4.ReconciledDataPoint data_points = 1; + * + */ + public Builder addDataPoints( + int index, + com.google.devicesandservices.health.v4.ReconciledDataPoint.Builder builderForValue) { + if (dataPointsBuilder_ == null) { + ensureDataPointsIsMutable(); + dataPoints_.add(index, builderForValue.build()); + onChanged(); + } else { + dataPointsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Data points matching the query
+     * 
+ * + * repeated .google.devicesandservices.health.v4.ReconciledDataPoint data_points = 1; + * + */ + public Builder addAllDataPoints( + java.lang.Iterable + values) { + if (dataPointsBuilder_ == null) { + ensureDataPointsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, dataPoints_); + onChanged(); + } else { + dataPointsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Data points matching the query
+     * 
+ * + * repeated .google.devicesandservices.health.v4.ReconciledDataPoint data_points = 1; + * + */ + public Builder clearDataPoints() { + if (dataPointsBuilder_ == null) { + dataPoints_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + dataPointsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Data points matching the query
+     * 
+ * + * repeated .google.devicesandservices.health.v4.ReconciledDataPoint data_points = 1; + * + */ + public Builder removeDataPoints(int index) { + if (dataPointsBuilder_ == null) { + ensureDataPointsIsMutable(); + dataPoints_.remove(index); + onChanged(); + } else { + dataPointsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Data points matching the query
+     * 
+ * + * repeated .google.devicesandservices.health.v4.ReconciledDataPoint data_points = 1; + * + */ + public com.google.devicesandservices.health.v4.ReconciledDataPoint.Builder getDataPointsBuilder( + int index) { + return internalGetDataPointsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Data points matching the query
+     * 
+ * + * repeated .google.devicesandservices.health.v4.ReconciledDataPoint data_points = 1; + * + */ + public com.google.devicesandservices.health.v4.ReconciledDataPointOrBuilder + getDataPointsOrBuilder(int index) { + if (dataPointsBuilder_ == null) { + return dataPoints_.get(index); + } else { + return dataPointsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Data points matching the query
+     * 
+ * + * repeated .google.devicesandservices.health.v4.ReconciledDataPoint data_points = 1; + * + */ + public java.util.List< + ? extends com.google.devicesandservices.health.v4.ReconciledDataPointOrBuilder> + getDataPointsOrBuilderList() { + if (dataPointsBuilder_ != null) { + return dataPointsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(dataPoints_); + } + } + + /** + * + * + *
+     * Data points matching the query
+     * 
+ * + * repeated .google.devicesandservices.health.v4.ReconciledDataPoint data_points = 1; + * + */ + public com.google.devicesandservices.health.v4.ReconciledDataPoint.Builder + addDataPointsBuilder() { + return internalGetDataPointsFieldBuilder() + .addBuilder( + com.google.devicesandservices.health.v4.ReconciledDataPoint.getDefaultInstance()); + } + + /** + * + * + *
+     * Data points matching the query
+     * 
+ * + * repeated .google.devicesandservices.health.v4.ReconciledDataPoint data_points = 1; + * + */ + public com.google.devicesandservices.health.v4.ReconciledDataPoint.Builder addDataPointsBuilder( + int index) { + return internalGetDataPointsFieldBuilder() + .addBuilder( + index, + com.google.devicesandservices.health.v4.ReconciledDataPoint.getDefaultInstance()); + } + + /** + * + * + *
+     * Data points matching the query
+     * 
+ * + * repeated .google.devicesandservices.health.v4.ReconciledDataPoint data_points = 1; + * + */ + public java.util.List + getDataPointsBuilderList() { + return internalGetDataPointsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.devicesandservices.health.v4.ReconciledDataPoint, + com.google.devicesandservices.health.v4.ReconciledDataPoint.Builder, + com.google.devicesandservices.health.v4.ReconciledDataPointOrBuilder> + internalGetDataPointsFieldBuilder() { + if (dataPointsBuilder_ == null) { + dataPointsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.devicesandservices.health.v4.ReconciledDataPoint, + com.google.devicesandservices.health.v4.ReconciledDataPoint.Builder, + com.google.devicesandservices.health.v4.ReconciledDataPointOrBuilder>( + dataPoints_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + dataPoints_ = null; + } + return dataPointsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * Next page token, empty if the response is complete
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Next page token, empty if the response is complete
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Next page token, empty if the response is complete
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Next page token, empty if the response is complete
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Next page token, empty if the response is complete
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.ReconcileDataPointsResponse) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.ReconcileDataPointsResponse) + private static final com.google.devicesandservices.health.v4.ReconcileDataPointsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.ReconcileDataPointsResponse(); + } + + public static com.google.devicesandservices.health.v4.ReconcileDataPointsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ReconcileDataPointsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.ReconcileDataPointsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ReconcileDataPointsResponseOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ReconcileDataPointsResponseOrBuilder.java new file mode 100644 index 000000000000..9e86a437f375 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ReconcileDataPointsResponseOrBuilder.java @@ -0,0 +1,111 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_points.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface ReconcileDataPointsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.ReconcileDataPointsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Data points matching the query
+   * 
+ * + * repeated .google.devicesandservices.health.v4.ReconciledDataPoint data_points = 1; + */ + java.util.List getDataPointsList(); + + /** + * + * + *
+   * Data points matching the query
+   * 
+ * + * repeated .google.devicesandservices.health.v4.ReconciledDataPoint data_points = 1; + */ + com.google.devicesandservices.health.v4.ReconciledDataPoint getDataPoints(int index); + + /** + * + * + *
+   * Data points matching the query
+   * 
+ * + * repeated .google.devicesandservices.health.v4.ReconciledDataPoint data_points = 1; + */ + int getDataPointsCount(); + + /** + * + * + *
+   * Data points matching the query
+   * 
+ * + * repeated .google.devicesandservices.health.v4.ReconciledDataPoint data_points = 1; + */ + java.util.List + getDataPointsOrBuilderList(); + + /** + * + * + *
+   * Data points matching the query
+   * 
+ * + * repeated .google.devicesandservices.health.v4.ReconciledDataPoint data_points = 1; + */ + com.google.devicesandservices.health.v4.ReconciledDataPointOrBuilder getDataPointsOrBuilder( + int index); + + /** + * + * + *
+   * Next page token, empty if the response is complete
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * Next page token, empty if the response is complete
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ReconciledDataPoint.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ReconciledDataPoint.java new file mode 100644 index 000000000000..3ea07f7f2013 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ReconciledDataPoint.java @@ -0,0 +1,10477 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_points.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * A reconciled computed or recorded metric.
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.ReconciledDataPoint} + */ +@com.google.protobuf.Generated +public final class ReconciledDataPoint extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.ReconciledDataPoint) + ReconciledDataPointOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ReconciledDataPoint"); + } + + // Use ReconciledDataPoint.newBuilder() to construct. + private ReconciledDataPoint(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ReconciledDataPoint() { + dataPointName_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_ReconciledDataPoint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_ReconciledDataPoint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.ReconciledDataPoint.class, + com.google.devicesandservices.health.v4.ReconciledDataPoint.Builder.class); + } + + private int dataCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object data_; + + public enum DataCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + STEPS(4), + FLOORS(5), + HEART_RATE(6), + SLEEP(8), + DAILY_RESTING_HEART_RATE(9), + DAILY_HEART_RATE_VARIABILITY(10), + EXERCISE(11), + WEIGHT(12), + ALTITUDE(13), + DISTANCE(14), + BODY_FAT(15), + ACTIVE_ZONE_MINUTES(17), + HEART_RATE_VARIABILITY(19), + DAILY_SLEEP_TEMPERATURE_DERIVATIONS(20), + SEDENTARY_PERIOD(21), + RUN_VO2_MAX(22), + OXYGEN_SATURATION(24), + DAILY_OXYGEN_SATURATION(25), + ACTIVITY_LEVEL(26), + VO2_MAX(27), + DAILY_VO2_MAX(28), + DAILY_HEART_RATE_ZONES(32), + HYDRATION_LOG(33), + TIME_IN_HEART_RATE_ZONE(35), + ACTIVE_MINUTES(36), + RESPIRATORY_RATE_SLEEP_SUMMARY(37), + DAILY_RESPIRATORY_RATE(38), + SWIM_LENGTHS_DATA(39), + HEIGHT(40), + BASAL_ENERGY_BURNED(41), + DATA_NOT_SET(0); + private final int value; + + private DataCase(int value) { + this.value = value; + } + + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DataCase valueOf(int value) { + return forNumber(value); + } + + public static DataCase forNumber(int value) { + switch (value) { + case 4: + return STEPS; + case 5: + return FLOORS; + case 6: + return HEART_RATE; + case 8: + return SLEEP; + case 9: + return DAILY_RESTING_HEART_RATE; + case 10: + return DAILY_HEART_RATE_VARIABILITY; + case 11: + return EXERCISE; + case 12: + return WEIGHT; + case 13: + return ALTITUDE; + case 14: + return DISTANCE; + case 15: + return BODY_FAT; + case 17: + return ACTIVE_ZONE_MINUTES; + case 19: + return HEART_RATE_VARIABILITY; + case 20: + return DAILY_SLEEP_TEMPERATURE_DERIVATIONS; + case 21: + return SEDENTARY_PERIOD; + case 22: + return RUN_VO2_MAX; + case 24: + return OXYGEN_SATURATION; + case 25: + return DAILY_OXYGEN_SATURATION; + case 26: + return ACTIVITY_LEVEL; + case 27: + return VO2_MAX; + case 28: + return DAILY_VO2_MAX; + case 32: + return DAILY_HEART_RATE_ZONES; + case 33: + return HYDRATION_LOG; + case 35: + return TIME_IN_HEART_RATE_ZONE; + case 36: + return ACTIVE_MINUTES; + case 37: + return RESPIRATORY_RATE_SLEEP_SUMMARY; + case 38: + return DAILY_RESPIRATORY_RATE; + case 39: + return SWIM_LENGTHS_DATA; + case 40: + return HEIGHT; + case 41: + return BASAL_ENERGY_BURNED; + case 0: + return DATA_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public DataCase getDataCase() { + return DataCase.forNumber(dataCase_); + } + + public static final int STEPS_FIELD_NUMBER = 4; + + /** + * + * + *
+   * Data for points in the `steps` interval data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.Steps steps = 4; + * + * @return Whether the steps field is set. + */ + @java.lang.Override + public boolean hasSteps() { + return dataCase_ == 4; + } + + /** + * + * + *
+   * Data for points in the `steps` interval data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.Steps steps = 4; + * + * @return The steps. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Steps getSteps() { + if (dataCase_ == 4) { + return (com.google.devicesandservices.health.v4.Steps) data_; + } + return com.google.devicesandservices.health.v4.Steps.getDefaultInstance(); + } + + /** + * + * + *
+   * Data for points in the `steps` interval data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.Steps steps = 4; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.StepsOrBuilder getStepsOrBuilder() { + if (dataCase_ == 4) { + return (com.google.devicesandservices.health.v4.Steps) data_; + } + return com.google.devicesandservices.health.v4.Steps.getDefaultInstance(); + } + + public static final int FLOORS_FIELD_NUMBER = 5; + + /** + * + * + *
+   * Data for points in the `floors` interval data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.Floors floors = 5; + * + * @return Whether the floors field is set. + */ + @java.lang.Override + public boolean hasFloors() { + return dataCase_ == 5; + } + + /** + * + * + *
+   * Data for points in the `floors` interval data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.Floors floors = 5; + * + * @return The floors. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Floors getFloors() { + if (dataCase_ == 5) { + return (com.google.devicesandservices.health.v4.Floors) data_; + } + return com.google.devicesandservices.health.v4.Floors.getDefaultInstance(); + } + + /** + * + * + *
+   * Data for points in the `floors` interval data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.Floors floors = 5; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.FloorsOrBuilder getFloorsOrBuilder() { + if (dataCase_ == 5) { + return (com.google.devicesandservices.health.v4.Floors) data_; + } + return com.google.devicesandservices.health.v4.Floors.getDefaultInstance(); + } + + public static final int HEART_RATE_FIELD_NUMBER = 6; + + /** + * + * + *
+   * Data for points in the `heart-rate` sample data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.HeartRate heart_rate = 6; + * + * @return Whether the heartRate field is set. + */ + @java.lang.Override + public boolean hasHeartRate() { + return dataCase_ == 6; + } + + /** + * + * + *
+   * Data for points in the `heart-rate` sample data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.HeartRate heart_rate = 6; + * + * @return The heartRate. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.HeartRate getHeartRate() { + if (dataCase_ == 6) { + return (com.google.devicesandservices.health.v4.HeartRate) data_; + } + return com.google.devicesandservices.health.v4.HeartRate.getDefaultInstance(); + } + + /** + * + * + *
+   * Data for points in the `heart-rate` sample data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.HeartRate heart_rate = 6; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.HeartRateOrBuilder getHeartRateOrBuilder() { + if (dataCase_ == 6) { + return (com.google.devicesandservices.health.v4.HeartRate) data_; + } + return com.google.devicesandservices.health.v4.HeartRate.getDefaultInstance(); + } + + public static final int SLEEP_FIELD_NUMBER = 8; + + /** + * + * + *
+   * Data for points in the `sleep` session data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.Sleep sleep = 8; + * + * @return Whether the sleep field is set. + */ + @java.lang.Override + public boolean hasSleep() { + return dataCase_ == 8; + } + + /** + * + * + *
+   * Data for points in the `sleep` session data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.Sleep sleep = 8; + * + * @return The sleep. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Sleep getSleep() { + if (dataCase_ == 8) { + return (com.google.devicesandservices.health.v4.Sleep) data_; + } + return com.google.devicesandservices.health.v4.Sleep.getDefaultInstance(); + } + + /** + * + * + *
+   * Data for points in the `sleep` session data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.Sleep sleep = 8; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.SleepOrBuilder getSleepOrBuilder() { + if (dataCase_ == 8) { + return (com.google.devicesandservices.health.v4.Sleep) data_; + } + return com.google.devicesandservices.health.v4.Sleep.getDefaultInstance(); + } + + public static final int DAILY_RESTING_HEART_RATE_FIELD_NUMBER = 9; + + /** + * + * + *
+   * Data for points in the `daily-resting-heart-rate` daily data type
+   * collection.
+   * 
+ * + * .google.devicesandservices.health.v4.DailyRestingHeartRate daily_resting_heart_rate = 9; + * + * + * @return Whether the dailyRestingHeartRate field is set. + */ + @java.lang.Override + public boolean hasDailyRestingHeartRate() { + return dataCase_ == 9; + } + + /** + * + * + *
+   * Data for points in the `daily-resting-heart-rate` daily data type
+   * collection.
+   * 
+ * + * .google.devicesandservices.health.v4.DailyRestingHeartRate daily_resting_heart_rate = 9; + * + * + * @return The dailyRestingHeartRate. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyRestingHeartRate getDailyRestingHeartRate() { + if (dataCase_ == 9) { + return (com.google.devicesandservices.health.v4.DailyRestingHeartRate) data_; + } + return com.google.devicesandservices.health.v4.DailyRestingHeartRate.getDefaultInstance(); + } + + /** + * + * + *
+   * Data for points in the `daily-resting-heart-rate` daily data type
+   * collection.
+   * 
+ * + * .google.devicesandservices.health.v4.DailyRestingHeartRate daily_resting_heart_rate = 9; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyRestingHeartRateOrBuilder + getDailyRestingHeartRateOrBuilder() { + if (dataCase_ == 9) { + return (com.google.devicesandservices.health.v4.DailyRestingHeartRate) data_; + } + return com.google.devicesandservices.health.v4.DailyRestingHeartRate.getDefaultInstance(); + } + + public static final int DAILY_HEART_RATE_VARIABILITY_FIELD_NUMBER = 10; + + /** + * + * + *
+   * Data for points in the `daily-heart-rate-variability` daily data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.DailyHeartRateVariability daily_heart_rate_variability = 10; + * + * + * @return Whether the dailyHeartRateVariability field is set. + */ + @java.lang.Override + public boolean hasDailyHeartRateVariability() { + return dataCase_ == 10; + } + + /** + * + * + *
+   * Data for points in the `daily-heart-rate-variability` daily data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.DailyHeartRateVariability daily_heart_rate_variability = 10; + * + * + * @return The dailyHeartRateVariability. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyHeartRateVariability + getDailyHeartRateVariability() { + if (dataCase_ == 10) { + return (com.google.devicesandservices.health.v4.DailyHeartRateVariability) data_; + } + return com.google.devicesandservices.health.v4.DailyHeartRateVariability.getDefaultInstance(); + } + + /** + * + * + *
+   * Data for points in the `daily-heart-rate-variability` daily data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.DailyHeartRateVariability daily_heart_rate_variability = 10; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyHeartRateVariabilityOrBuilder + getDailyHeartRateVariabilityOrBuilder() { + if (dataCase_ == 10) { + return (com.google.devicesandservices.health.v4.DailyHeartRateVariability) data_; + } + return com.google.devicesandservices.health.v4.DailyHeartRateVariability.getDefaultInstance(); + } + + public static final int EXERCISE_FIELD_NUMBER = 11; + + /** + * + * + *
+   * Data for points in the `exercise` session data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.Exercise exercise = 11; + * + * @return Whether the exercise field is set. + */ + @java.lang.Override + public boolean hasExercise() { + return dataCase_ == 11; + } + + /** + * + * + *
+   * Data for points in the `exercise` session data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.Exercise exercise = 11; + * + * @return The exercise. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Exercise getExercise() { + if (dataCase_ == 11) { + return (com.google.devicesandservices.health.v4.Exercise) data_; + } + return com.google.devicesandservices.health.v4.Exercise.getDefaultInstance(); + } + + /** + * + * + *
+   * Data for points in the `exercise` session data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.Exercise exercise = 11; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ExerciseOrBuilder getExerciseOrBuilder() { + if (dataCase_ == 11) { + return (com.google.devicesandservices.health.v4.Exercise) data_; + } + return com.google.devicesandservices.health.v4.Exercise.getDefaultInstance(); + } + + public static final int WEIGHT_FIELD_NUMBER = 12; + + /** + * + * + *
+   * Data for points in the `weight` sample data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.Weight weight = 12; + * + * @return Whether the weight field is set. + */ + @java.lang.Override + public boolean hasWeight() { + return dataCase_ == 12; + } + + /** + * + * + *
+   * Data for points in the `weight` sample data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.Weight weight = 12; + * + * @return The weight. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Weight getWeight() { + if (dataCase_ == 12) { + return (com.google.devicesandservices.health.v4.Weight) data_; + } + return com.google.devicesandservices.health.v4.Weight.getDefaultInstance(); + } + + /** + * + * + *
+   * Data for points in the `weight` sample data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.Weight weight = 12; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.WeightOrBuilder getWeightOrBuilder() { + if (dataCase_ == 12) { + return (com.google.devicesandservices.health.v4.Weight) data_; + } + return com.google.devicesandservices.health.v4.Weight.getDefaultInstance(); + } + + public static final int ALTITUDE_FIELD_NUMBER = 13; + + /** + * + * + *
+   * Data for points in the `altitude` interval data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.Altitude altitude = 13; + * + * @return Whether the altitude field is set. + */ + @java.lang.Override + public boolean hasAltitude() { + return dataCase_ == 13; + } + + /** + * + * + *
+   * Data for points in the `altitude` interval data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.Altitude altitude = 13; + * + * @return The altitude. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Altitude getAltitude() { + if (dataCase_ == 13) { + return (com.google.devicesandservices.health.v4.Altitude) data_; + } + return com.google.devicesandservices.health.v4.Altitude.getDefaultInstance(); + } + + /** + * + * + *
+   * Data for points in the `altitude` interval data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.Altitude altitude = 13; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.AltitudeOrBuilder getAltitudeOrBuilder() { + if (dataCase_ == 13) { + return (com.google.devicesandservices.health.v4.Altitude) data_; + } + return com.google.devicesandservices.health.v4.Altitude.getDefaultInstance(); + } + + public static final int DISTANCE_FIELD_NUMBER = 14; + + /** + * + * + *
+   * Data for points in the `distance` interval data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.Distance distance = 14; + * + * @return Whether the distance field is set. + */ + @java.lang.Override + public boolean hasDistance() { + return dataCase_ == 14; + } + + /** + * + * + *
+   * Data for points in the `distance` interval data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.Distance distance = 14; + * + * @return The distance. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Distance getDistance() { + if (dataCase_ == 14) { + return (com.google.devicesandservices.health.v4.Distance) data_; + } + return com.google.devicesandservices.health.v4.Distance.getDefaultInstance(); + } + + /** + * + * + *
+   * Data for points in the `distance` interval data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.Distance distance = 14; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DistanceOrBuilder getDistanceOrBuilder() { + if (dataCase_ == 14) { + return (com.google.devicesandservices.health.v4.Distance) data_; + } + return com.google.devicesandservices.health.v4.Distance.getDefaultInstance(); + } + + public static final int BODY_FAT_FIELD_NUMBER = 15; + + /** + * + * + *
+   * Data for points in the `body-fat` sample data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.BodyFat body_fat = 15; + * + * @return Whether the bodyFat field is set. + */ + @java.lang.Override + public boolean hasBodyFat() { + return dataCase_ == 15; + } + + /** + * + * + *
+   * Data for points in the `body-fat` sample data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.BodyFat body_fat = 15; + * + * @return The bodyFat. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.BodyFat getBodyFat() { + if (dataCase_ == 15) { + return (com.google.devicesandservices.health.v4.BodyFat) data_; + } + return com.google.devicesandservices.health.v4.BodyFat.getDefaultInstance(); + } + + /** + * + * + *
+   * Data for points in the `body-fat` sample data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.BodyFat body_fat = 15; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.BodyFatOrBuilder getBodyFatOrBuilder() { + if (dataCase_ == 15) { + return (com.google.devicesandservices.health.v4.BodyFat) data_; + } + return com.google.devicesandservices.health.v4.BodyFat.getDefaultInstance(); + } + + public static final int ACTIVE_ZONE_MINUTES_FIELD_NUMBER = 17; + + /** + * + * + *
+   * Data for points in the `active-zone-minutes` interval data type
+   * collection, measured in minutes.
+   * 
+ * + * .google.devicesandservices.health.v4.ActiveZoneMinutes active_zone_minutes = 17; + * + * @return Whether the activeZoneMinutes field is set. + */ + @java.lang.Override + public boolean hasActiveZoneMinutes() { + return dataCase_ == 17; + } + + /** + * + * + *
+   * Data for points in the `active-zone-minutes` interval data type
+   * collection, measured in minutes.
+   * 
+ * + * .google.devicesandservices.health.v4.ActiveZoneMinutes active_zone_minutes = 17; + * + * @return The activeZoneMinutes. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ActiveZoneMinutes getActiveZoneMinutes() { + if (dataCase_ == 17) { + return (com.google.devicesandservices.health.v4.ActiveZoneMinutes) data_; + } + return com.google.devicesandservices.health.v4.ActiveZoneMinutes.getDefaultInstance(); + } + + /** + * + * + *
+   * Data for points in the `active-zone-minutes` interval data type
+   * collection, measured in minutes.
+   * 
+ * + * .google.devicesandservices.health.v4.ActiveZoneMinutes active_zone_minutes = 17; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ActiveZoneMinutesOrBuilder + getActiveZoneMinutesOrBuilder() { + if (dataCase_ == 17) { + return (com.google.devicesandservices.health.v4.ActiveZoneMinutes) data_; + } + return com.google.devicesandservices.health.v4.ActiveZoneMinutes.getDefaultInstance(); + } + + public static final int HEART_RATE_VARIABILITY_FIELD_NUMBER = 19; + + /** + * + * + *
+   * Data for points in the `heart-rate-variability` sample data type
+   * collection.
+   * 
+ * + * .google.devicesandservices.health.v4.HeartRateVariability heart_rate_variability = 19; + * + * + * @return Whether the heartRateVariability field is set. + */ + @java.lang.Override + public boolean hasHeartRateVariability() { + return dataCase_ == 19; + } + + /** + * + * + *
+   * Data for points in the `heart-rate-variability` sample data type
+   * collection.
+   * 
+ * + * .google.devicesandservices.health.v4.HeartRateVariability heart_rate_variability = 19; + * + * + * @return The heartRateVariability. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.HeartRateVariability getHeartRateVariability() { + if (dataCase_ == 19) { + return (com.google.devicesandservices.health.v4.HeartRateVariability) data_; + } + return com.google.devicesandservices.health.v4.HeartRateVariability.getDefaultInstance(); + } + + /** + * + * + *
+   * Data for points in the `heart-rate-variability` sample data type
+   * collection.
+   * 
+ * + * .google.devicesandservices.health.v4.HeartRateVariability heart_rate_variability = 19; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.HeartRateVariabilityOrBuilder + getHeartRateVariabilityOrBuilder() { + if (dataCase_ == 19) { + return (com.google.devicesandservices.health.v4.HeartRateVariability) data_; + } + return com.google.devicesandservices.health.v4.HeartRateVariability.getDefaultInstance(); + } + + public static final int DAILY_SLEEP_TEMPERATURE_DERIVATIONS_FIELD_NUMBER = 20; + + /** + * + * + *
+   * Data for points in the `daily-sleep-temperature-derivations` daily data
+   * type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.DailySleepTemperatureDerivations daily_sleep_temperature_derivations = 20; + * + * + * @return Whether the dailySleepTemperatureDerivations field is set. + */ + @java.lang.Override + public boolean hasDailySleepTemperatureDerivations() { + return dataCase_ == 20; + } + + /** + * + * + *
+   * Data for points in the `daily-sleep-temperature-derivations` daily data
+   * type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.DailySleepTemperatureDerivations daily_sleep_temperature_derivations = 20; + * + * + * @return The dailySleepTemperatureDerivations. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations + getDailySleepTemperatureDerivations() { + if (dataCase_ == 20) { + return (com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations) data_; + } + return com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations + .getDefaultInstance(); + } + + /** + * + * + *
+   * Data for points in the `daily-sleep-temperature-derivations` daily data
+   * type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.DailySleepTemperatureDerivations daily_sleep_temperature_derivations = 20; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DailySleepTemperatureDerivationsOrBuilder + getDailySleepTemperatureDerivationsOrBuilder() { + if (dataCase_ == 20) { + return (com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations) data_; + } + return com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations + .getDefaultInstance(); + } + + public static final int SEDENTARY_PERIOD_FIELD_NUMBER = 21; + + /** + * + * + *
+   * Data for points in the `sedentary-period` interval data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.SedentaryPeriod sedentary_period = 21; + * + * @return Whether the sedentaryPeriod field is set. + */ + @java.lang.Override + public boolean hasSedentaryPeriod() { + return dataCase_ == 21; + } + + /** + * + * + *
+   * Data for points in the `sedentary-period` interval data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.SedentaryPeriod sedentary_period = 21; + * + * @return The sedentaryPeriod. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.SedentaryPeriod getSedentaryPeriod() { + if (dataCase_ == 21) { + return (com.google.devicesandservices.health.v4.SedentaryPeriod) data_; + } + return com.google.devicesandservices.health.v4.SedentaryPeriod.getDefaultInstance(); + } + + /** + * + * + *
+   * Data for points in the `sedentary-period` interval data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.SedentaryPeriod sedentary_period = 21; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.SedentaryPeriodOrBuilder + getSedentaryPeriodOrBuilder() { + if (dataCase_ == 21) { + return (com.google.devicesandservices.health.v4.SedentaryPeriod) data_; + } + return com.google.devicesandservices.health.v4.SedentaryPeriod.getDefaultInstance(); + } + + public static final int RUN_VO2_MAX_FIELD_NUMBER = 22; + + /** + * + * + *
+   * Data for points in the `run-vo2-max` sample data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.RunVO2Max run_vo2_max = 22; + * + * @return Whether the runVo2Max field is set. + */ + @java.lang.Override + public boolean hasRunVo2Max() { + return dataCase_ == 22; + } + + /** + * + * + *
+   * Data for points in the `run-vo2-max` sample data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.RunVO2Max run_vo2_max = 22; + * + * @return The runVo2Max. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.RunVO2Max getRunVo2Max() { + if (dataCase_ == 22) { + return (com.google.devicesandservices.health.v4.RunVO2Max) data_; + } + return com.google.devicesandservices.health.v4.RunVO2Max.getDefaultInstance(); + } + + /** + * + * + *
+   * Data for points in the `run-vo2-max` sample data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.RunVO2Max run_vo2_max = 22; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.RunVO2MaxOrBuilder getRunVo2MaxOrBuilder() { + if (dataCase_ == 22) { + return (com.google.devicesandservices.health.v4.RunVO2Max) data_; + } + return com.google.devicesandservices.health.v4.RunVO2Max.getDefaultInstance(); + } + + public static final int OXYGEN_SATURATION_FIELD_NUMBER = 24; + + /** + * + * + *
+   * Data for points in the `oxygen-saturation` sample data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.OxygenSaturation oxygen_saturation = 24; + * + * @return Whether the oxygenSaturation field is set. + */ + @java.lang.Override + public boolean hasOxygenSaturation() { + return dataCase_ == 24; + } + + /** + * + * + *
+   * Data for points in the `oxygen-saturation` sample data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.OxygenSaturation oxygen_saturation = 24; + * + * @return The oxygenSaturation. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.OxygenSaturation getOxygenSaturation() { + if (dataCase_ == 24) { + return (com.google.devicesandservices.health.v4.OxygenSaturation) data_; + } + return com.google.devicesandservices.health.v4.OxygenSaturation.getDefaultInstance(); + } + + /** + * + * + *
+   * Data for points in the `oxygen-saturation` sample data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.OxygenSaturation oxygen_saturation = 24; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.OxygenSaturationOrBuilder + getOxygenSaturationOrBuilder() { + if (dataCase_ == 24) { + return (com.google.devicesandservices.health.v4.OxygenSaturation) data_; + } + return com.google.devicesandservices.health.v4.OxygenSaturation.getDefaultInstance(); + } + + public static final int DAILY_OXYGEN_SATURATION_FIELD_NUMBER = 25; + + /** + * + * + *
+   * Data for points in the `daily-oxygen-saturation` daily data type
+   * collection.
+   * 
+ * + * .google.devicesandservices.health.v4.DailyOxygenSaturation daily_oxygen_saturation = 25; + * + * + * @return Whether the dailyOxygenSaturation field is set. + */ + @java.lang.Override + public boolean hasDailyOxygenSaturation() { + return dataCase_ == 25; + } + + /** + * + * + *
+   * Data for points in the `daily-oxygen-saturation` daily data type
+   * collection.
+   * 
+ * + * .google.devicesandservices.health.v4.DailyOxygenSaturation daily_oxygen_saturation = 25; + * + * + * @return The dailyOxygenSaturation. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyOxygenSaturation getDailyOxygenSaturation() { + if (dataCase_ == 25) { + return (com.google.devicesandservices.health.v4.DailyOxygenSaturation) data_; + } + return com.google.devicesandservices.health.v4.DailyOxygenSaturation.getDefaultInstance(); + } + + /** + * + * + *
+   * Data for points in the `daily-oxygen-saturation` daily data type
+   * collection.
+   * 
+ * + * .google.devicesandservices.health.v4.DailyOxygenSaturation daily_oxygen_saturation = 25; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyOxygenSaturationOrBuilder + getDailyOxygenSaturationOrBuilder() { + if (dataCase_ == 25) { + return (com.google.devicesandservices.health.v4.DailyOxygenSaturation) data_; + } + return com.google.devicesandservices.health.v4.DailyOxygenSaturation.getDefaultInstance(); + } + + public static final int ACTIVITY_LEVEL_FIELD_NUMBER = 26; + + /** + * + * + *
+   * Data for points in the `activity-level` daily data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.ActivityLevel activity_level = 26; + * + * @return Whether the activityLevel field is set. + */ + @java.lang.Override + public boolean hasActivityLevel() { + return dataCase_ == 26; + } + + /** + * + * + *
+   * Data for points in the `activity-level` daily data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.ActivityLevel activity_level = 26; + * + * @return The activityLevel. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ActivityLevel getActivityLevel() { + if (dataCase_ == 26) { + return (com.google.devicesandservices.health.v4.ActivityLevel) data_; + } + return com.google.devicesandservices.health.v4.ActivityLevel.getDefaultInstance(); + } + + /** + * + * + *
+   * Data for points in the `activity-level` daily data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.ActivityLevel activity_level = 26; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ActivityLevelOrBuilder + getActivityLevelOrBuilder() { + if (dataCase_ == 26) { + return (com.google.devicesandservices.health.v4.ActivityLevel) data_; + } + return com.google.devicesandservices.health.v4.ActivityLevel.getDefaultInstance(); + } + + public static final int VO2_MAX_FIELD_NUMBER = 27; + + /** + * + * + *
+   * Data for points in the `vo2-max` sample data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.VO2Max vo2_max = 27; + * + * @return Whether the vo2Max field is set. + */ + @java.lang.Override + public boolean hasVo2Max() { + return dataCase_ == 27; + } + + /** + * + * + *
+   * Data for points in the `vo2-max` sample data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.VO2Max vo2_max = 27; + * + * @return The vo2Max. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.VO2Max getVo2Max() { + if (dataCase_ == 27) { + return (com.google.devicesandservices.health.v4.VO2Max) data_; + } + return com.google.devicesandservices.health.v4.VO2Max.getDefaultInstance(); + } + + /** + * + * + *
+   * Data for points in the `vo2-max` sample data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.VO2Max vo2_max = 27; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.VO2MaxOrBuilder getVo2MaxOrBuilder() { + if (dataCase_ == 27) { + return (com.google.devicesandservices.health.v4.VO2Max) data_; + } + return com.google.devicesandservices.health.v4.VO2Max.getDefaultInstance(); + } + + public static final int DAILY_VO2_MAX_FIELD_NUMBER = 28; + + /** + * + * + *
+   * Data for points in the `daily-vo2-max` daily data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.DailyVO2Max daily_vo2_max = 28; + * + * @return Whether the dailyVo2Max field is set. + */ + @java.lang.Override + public boolean hasDailyVo2Max() { + return dataCase_ == 28; + } + + /** + * + * + *
+   * Data for points in the `daily-vo2-max` daily data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.DailyVO2Max daily_vo2_max = 28; + * + * @return The dailyVo2Max. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyVO2Max getDailyVo2Max() { + if (dataCase_ == 28) { + return (com.google.devicesandservices.health.v4.DailyVO2Max) data_; + } + return com.google.devicesandservices.health.v4.DailyVO2Max.getDefaultInstance(); + } + + /** + * + * + *
+   * Data for points in the `daily-vo2-max` daily data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.DailyVO2Max daily_vo2_max = 28; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyVO2MaxOrBuilder getDailyVo2MaxOrBuilder() { + if (dataCase_ == 28) { + return (com.google.devicesandservices.health.v4.DailyVO2Max) data_; + } + return com.google.devicesandservices.health.v4.DailyVO2Max.getDefaultInstance(); + } + + public static final int DAILY_HEART_RATE_ZONES_FIELD_NUMBER = 32; + + /** + * + * + *
+   * Data for points in the `daily-heart-rate-zones` daily data type
+   * collection.
+   * 
+ * + * .google.devicesandservices.health.v4.DailyHeartRateZones daily_heart_rate_zones = 32; + * + * + * @return Whether the dailyHeartRateZones field is set. + */ + @java.lang.Override + public boolean hasDailyHeartRateZones() { + return dataCase_ == 32; + } + + /** + * + * + *
+   * Data for points in the `daily-heart-rate-zones` daily data type
+   * collection.
+   * 
+ * + * .google.devicesandservices.health.v4.DailyHeartRateZones daily_heart_rate_zones = 32; + * + * + * @return The dailyHeartRateZones. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyHeartRateZones getDailyHeartRateZones() { + if (dataCase_ == 32) { + return (com.google.devicesandservices.health.v4.DailyHeartRateZones) data_; + } + return com.google.devicesandservices.health.v4.DailyHeartRateZones.getDefaultInstance(); + } + + /** + * + * + *
+   * Data for points in the `daily-heart-rate-zones` daily data type
+   * collection.
+   * 
+ * + * .google.devicesandservices.health.v4.DailyHeartRateZones daily_heart_rate_zones = 32; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyHeartRateZonesOrBuilder + getDailyHeartRateZonesOrBuilder() { + if (dataCase_ == 32) { + return (com.google.devicesandservices.health.v4.DailyHeartRateZones) data_; + } + return com.google.devicesandservices.health.v4.DailyHeartRateZones.getDefaultInstance(); + } + + public static final int HYDRATION_LOG_FIELD_NUMBER = 33; + + /** + * + * + *
+   * Data for points in the `hydration-log` session data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.HydrationLog hydration_log = 33; + * + * @return Whether the hydrationLog field is set. + */ + @java.lang.Override + public boolean hasHydrationLog() { + return dataCase_ == 33; + } + + /** + * + * + *
+   * Data for points in the `hydration-log` session data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.HydrationLog hydration_log = 33; + * + * @return The hydrationLog. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.HydrationLog getHydrationLog() { + if (dataCase_ == 33) { + return (com.google.devicesandservices.health.v4.HydrationLog) data_; + } + return com.google.devicesandservices.health.v4.HydrationLog.getDefaultInstance(); + } + + /** + * + * + *
+   * Data for points in the `hydration-log` session data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.HydrationLog hydration_log = 33; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.HydrationLogOrBuilder getHydrationLogOrBuilder() { + if (dataCase_ == 33) { + return (com.google.devicesandservices.health.v4.HydrationLog) data_; + } + return com.google.devicesandservices.health.v4.HydrationLog.getDefaultInstance(); + } + + public static final int TIME_IN_HEART_RATE_ZONE_FIELD_NUMBER = 35; + + /** + * + * + *
+   * Data for points in the `time-in-heart-rate-zone` interval data type
+   * collection.
+   * 
+ * + * .google.devicesandservices.health.v4.TimeInHeartRateZone time_in_heart_rate_zone = 35; + * + * + * @return Whether the timeInHeartRateZone field is set. + */ + @java.lang.Override + public boolean hasTimeInHeartRateZone() { + return dataCase_ == 35; + } + + /** + * + * + *
+   * Data for points in the `time-in-heart-rate-zone` interval data type
+   * collection.
+   * 
+ * + * .google.devicesandservices.health.v4.TimeInHeartRateZone time_in_heart_rate_zone = 35; + * + * + * @return The timeInHeartRateZone. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.TimeInHeartRateZone getTimeInHeartRateZone() { + if (dataCase_ == 35) { + return (com.google.devicesandservices.health.v4.TimeInHeartRateZone) data_; + } + return com.google.devicesandservices.health.v4.TimeInHeartRateZone.getDefaultInstance(); + } + + /** + * + * + *
+   * Data for points in the `time-in-heart-rate-zone` interval data type
+   * collection.
+   * 
+ * + * .google.devicesandservices.health.v4.TimeInHeartRateZone time_in_heart_rate_zone = 35; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.TimeInHeartRateZoneOrBuilder + getTimeInHeartRateZoneOrBuilder() { + if (dataCase_ == 35) { + return (com.google.devicesandservices.health.v4.TimeInHeartRateZone) data_; + } + return com.google.devicesandservices.health.v4.TimeInHeartRateZone.getDefaultInstance(); + } + + public static final int ACTIVE_MINUTES_FIELD_NUMBER = 36; + + /** + * + * + *
+   * Data for points in the `active-minutes` interval data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.ActiveMinutes active_minutes = 36; + * + * @return Whether the activeMinutes field is set. + */ + @java.lang.Override + public boolean hasActiveMinutes() { + return dataCase_ == 36; + } + + /** + * + * + *
+   * Data for points in the `active-minutes` interval data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.ActiveMinutes active_minutes = 36; + * + * @return The activeMinutes. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ActiveMinutes getActiveMinutes() { + if (dataCase_ == 36) { + return (com.google.devicesandservices.health.v4.ActiveMinutes) data_; + } + return com.google.devicesandservices.health.v4.ActiveMinutes.getDefaultInstance(); + } + + /** + * + * + *
+   * Data for points in the `active-minutes` interval data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.ActiveMinutes active_minutes = 36; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ActiveMinutesOrBuilder + getActiveMinutesOrBuilder() { + if (dataCase_ == 36) { + return (com.google.devicesandservices.health.v4.ActiveMinutes) data_; + } + return com.google.devicesandservices.health.v4.ActiveMinutes.getDefaultInstance(); + } + + public static final int RESPIRATORY_RATE_SLEEP_SUMMARY_FIELD_NUMBER = 37; + + /** + * + * + *
+   * Data for points in the `respiratory-rate-sleep-summary` sample data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary respiratory_rate_sleep_summary = 37; + * + * + * @return Whether the respiratoryRateSleepSummary field is set. + */ + @java.lang.Override + public boolean hasRespiratoryRateSleepSummary() { + return dataCase_ == 37; + } + + /** + * + * + *
+   * Data for points in the `respiratory-rate-sleep-summary` sample data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary respiratory_rate_sleep_summary = 37; + * + * + * @return The respiratoryRateSleepSummary. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + getRespiratoryRateSleepSummary() { + if (dataCase_ == 37) { + return (com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary) data_; + } + return com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary.getDefaultInstance(); + } + + /** + * + * + *
+   * Data for points in the `respiratory-rate-sleep-summary` sample data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary respiratory_rate_sleep_summary = 37; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.RespiratoryRateSleepSummaryOrBuilder + getRespiratoryRateSleepSummaryOrBuilder() { + if (dataCase_ == 37) { + return (com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary) data_; + } + return com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary.getDefaultInstance(); + } + + public static final int DAILY_RESPIRATORY_RATE_FIELD_NUMBER = 38; + + /** + * + * + *
+   * Data for points in the `daily-respiratory-rate` daily data type
+   * collection.
+   * 
+ * + * .google.devicesandservices.health.v4.DailyRespiratoryRate daily_respiratory_rate = 38; + * + * + * @return Whether the dailyRespiratoryRate field is set. + */ + @java.lang.Override + public boolean hasDailyRespiratoryRate() { + return dataCase_ == 38; + } + + /** + * + * + *
+   * Data for points in the `daily-respiratory-rate` daily data type
+   * collection.
+   * 
+ * + * .google.devicesandservices.health.v4.DailyRespiratoryRate daily_respiratory_rate = 38; + * + * + * @return The dailyRespiratoryRate. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyRespiratoryRate getDailyRespiratoryRate() { + if (dataCase_ == 38) { + return (com.google.devicesandservices.health.v4.DailyRespiratoryRate) data_; + } + return com.google.devicesandservices.health.v4.DailyRespiratoryRate.getDefaultInstance(); + } + + /** + * + * + *
+   * Data for points in the `daily-respiratory-rate` daily data type
+   * collection.
+   * 
+ * + * .google.devicesandservices.health.v4.DailyRespiratoryRate daily_respiratory_rate = 38; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyRespiratoryRateOrBuilder + getDailyRespiratoryRateOrBuilder() { + if (dataCase_ == 38) { + return (com.google.devicesandservices.health.v4.DailyRespiratoryRate) data_; + } + return com.google.devicesandservices.health.v4.DailyRespiratoryRate.getDefaultInstance(); + } + + public static final int SWIM_LENGTHS_DATA_FIELD_NUMBER = 39; + + /** + * + * + *
+   * Data for points in the `swim-lengths-data` interval data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.SwimLengthsData swim_lengths_data = 39; + * + * @return Whether the swimLengthsData field is set. + */ + @java.lang.Override + public boolean hasSwimLengthsData() { + return dataCase_ == 39; + } + + /** + * + * + *
+   * Data for points in the `swim-lengths-data` interval data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.SwimLengthsData swim_lengths_data = 39; + * + * @return The swimLengthsData. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.SwimLengthsData getSwimLengthsData() { + if (dataCase_ == 39) { + return (com.google.devicesandservices.health.v4.SwimLengthsData) data_; + } + return com.google.devicesandservices.health.v4.SwimLengthsData.getDefaultInstance(); + } + + /** + * + * + *
+   * Data for points in the `swim-lengths-data` interval data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.SwimLengthsData swim_lengths_data = 39; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.SwimLengthsDataOrBuilder + getSwimLengthsDataOrBuilder() { + if (dataCase_ == 39) { + return (com.google.devicesandservices.health.v4.SwimLengthsData) data_; + } + return com.google.devicesandservices.health.v4.SwimLengthsData.getDefaultInstance(); + } + + public static final int HEIGHT_FIELD_NUMBER = 40; + + /** + * + * + *
+   * Data for points in the `height` sample data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.Height height = 40; + * + * @return Whether the height field is set. + */ + @java.lang.Override + public boolean hasHeight() { + return dataCase_ == 40; + } + + /** + * + * + *
+   * Data for points in the `height` sample data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.Height height = 40; + * + * @return The height. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Height getHeight() { + if (dataCase_ == 40) { + return (com.google.devicesandservices.health.v4.Height) data_; + } + return com.google.devicesandservices.health.v4.Height.getDefaultInstance(); + } + + /** + * + * + *
+   * Data for points in the `height` sample data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.Height height = 40; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.HeightOrBuilder getHeightOrBuilder() { + if (dataCase_ == 40) { + return (com.google.devicesandservices.health.v4.Height) data_; + } + return com.google.devicesandservices.health.v4.Height.getDefaultInstance(); + } + + public static final int BASAL_ENERGY_BURNED_FIELD_NUMBER = 41; + + /** + * + * + *
+   * Data for points in the `basal-energy-burned` interval data type
+   * collection.
+   * 
+ * + * .google.devicesandservices.health.v4.BasalEnergyBurned basal_energy_burned = 41; + * + * @return Whether the basalEnergyBurned field is set. + */ + @java.lang.Override + public boolean hasBasalEnergyBurned() { + return dataCase_ == 41; + } + + /** + * + * + *
+   * Data for points in the `basal-energy-burned` interval data type
+   * collection.
+   * 
+ * + * .google.devicesandservices.health.v4.BasalEnergyBurned basal_energy_burned = 41; + * + * @return The basalEnergyBurned. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.BasalEnergyBurned getBasalEnergyBurned() { + if (dataCase_ == 41) { + return (com.google.devicesandservices.health.v4.BasalEnergyBurned) data_; + } + return com.google.devicesandservices.health.v4.BasalEnergyBurned.getDefaultInstance(); + } + + /** + * + * + *
+   * Data for points in the `basal-energy-burned` interval data type
+   * collection.
+   * 
+ * + * .google.devicesandservices.health.v4.BasalEnergyBurned basal_energy_burned = 41; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.BasalEnergyBurnedOrBuilder + getBasalEnergyBurnedOrBuilder() { + if (dataCase_ == 41) { + return (com.google.devicesandservices.health.v4.BasalEnergyBurned) data_; + } + return com.google.devicesandservices.health.v4.BasalEnergyBurned.getDefaultInstance(); + } + + public static final int DATA_POINT_NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object dataPointName_ = ""; + + /** + * + * + *
+   * Identifier. Data point name, only supported for the subset of identifiable
+   * data types. For the majority of the data types, individual data points do
+   * not need to be identified and this field would be empty.
+   *
+   * Format: `users/{user}/dataTypes/{data_type}/dataPoints/{data_point}`
+   *
+   * Example:
+   * `users/abcd1234/dataTypes/sleep/dataPoints/a1b2c3d4-e5f6-7890-1234-567890abcdef`
+   *
+   * The `{user}` ID is a system-generated identifier, as described in
+   * [Identity.health_user_id][google.devicesandservices.health.v4.Identity.health_user_id].
+   *
+   * The `{data_type}` ID corresponds to the kebab-case version of the field
+   * names in the [DataPoint
+   * data][google.devicesandservices.health.v4.DataPoint] union
+   * field, e.g. `total-calories` for the `total_calories` field.
+   *
+   * The `{data_point}` ID can be client-provided or system-generated.
+   * If client-provided, it must be a string of 4-63 characters,
+   * containing only lowercase letters, numbers, and hyphens.
+   * 
+ * + * string data_point_name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The dataPointName. + */ + @java.lang.Override + public java.lang.String getDataPointName() { + java.lang.Object ref = dataPointName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dataPointName_ = s; + return s; + } + } + + /** + * + * + *
+   * Identifier. Data point name, only supported for the subset of identifiable
+   * data types. For the majority of the data types, individual data points do
+   * not need to be identified and this field would be empty.
+   *
+   * Format: `users/{user}/dataTypes/{data_type}/dataPoints/{data_point}`
+   *
+   * Example:
+   * `users/abcd1234/dataTypes/sleep/dataPoints/a1b2c3d4-e5f6-7890-1234-567890abcdef`
+   *
+   * The `{user}` ID is a system-generated identifier, as described in
+   * [Identity.health_user_id][google.devicesandservices.health.v4.Identity.health_user_id].
+   *
+   * The `{data_type}` ID corresponds to the kebab-case version of the field
+   * names in the [DataPoint
+   * data][google.devicesandservices.health.v4.DataPoint] union
+   * field, e.g. `total-calories` for the `total_calories` field.
+   *
+   * The `{data_point}` ID can be client-provided or system-generated.
+   * If client-provided, it must be a string of 4-63 characters,
+   * containing only lowercase letters, numbers, and hyphens.
+   * 
+ * + * string data_point_name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for dataPointName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDataPointNameBytes() { + java.lang.Object ref = dataPointName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataPointName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(dataPointName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, dataPointName_); + } + if (dataCase_ == 4) { + output.writeMessage(4, (com.google.devicesandservices.health.v4.Steps) data_); + } + if (dataCase_ == 5) { + output.writeMessage(5, (com.google.devicesandservices.health.v4.Floors) data_); + } + if (dataCase_ == 6) { + output.writeMessage(6, (com.google.devicesandservices.health.v4.HeartRate) data_); + } + if (dataCase_ == 8) { + output.writeMessage(8, (com.google.devicesandservices.health.v4.Sleep) data_); + } + if (dataCase_ == 9) { + output.writeMessage(9, (com.google.devicesandservices.health.v4.DailyRestingHeartRate) data_); + } + if (dataCase_ == 10) { + output.writeMessage( + 10, (com.google.devicesandservices.health.v4.DailyHeartRateVariability) data_); + } + if (dataCase_ == 11) { + output.writeMessage(11, (com.google.devicesandservices.health.v4.Exercise) data_); + } + if (dataCase_ == 12) { + output.writeMessage(12, (com.google.devicesandservices.health.v4.Weight) data_); + } + if (dataCase_ == 13) { + output.writeMessage(13, (com.google.devicesandservices.health.v4.Altitude) data_); + } + if (dataCase_ == 14) { + output.writeMessage(14, (com.google.devicesandservices.health.v4.Distance) data_); + } + if (dataCase_ == 15) { + output.writeMessage(15, (com.google.devicesandservices.health.v4.BodyFat) data_); + } + if (dataCase_ == 17) { + output.writeMessage(17, (com.google.devicesandservices.health.v4.ActiveZoneMinutes) data_); + } + if (dataCase_ == 19) { + output.writeMessage(19, (com.google.devicesandservices.health.v4.HeartRateVariability) data_); + } + if (dataCase_ == 20) { + output.writeMessage( + 20, (com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations) data_); + } + if (dataCase_ == 21) { + output.writeMessage(21, (com.google.devicesandservices.health.v4.SedentaryPeriod) data_); + } + if (dataCase_ == 22) { + output.writeMessage(22, (com.google.devicesandservices.health.v4.RunVO2Max) data_); + } + if (dataCase_ == 24) { + output.writeMessage(24, (com.google.devicesandservices.health.v4.OxygenSaturation) data_); + } + if (dataCase_ == 25) { + output.writeMessage( + 25, (com.google.devicesandservices.health.v4.DailyOxygenSaturation) data_); + } + if (dataCase_ == 26) { + output.writeMessage(26, (com.google.devicesandservices.health.v4.ActivityLevel) data_); + } + if (dataCase_ == 27) { + output.writeMessage(27, (com.google.devicesandservices.health.v4.VO2Max) data_); + } + if (dataCase_ == 28) { + output.writeMessage(28, (com.google.devicesandservices.health.v4.DailyVO2Max) data_); + } + if (dataCase_ == 32) { + output.writeMessage(32, (com.google.devicesandservices.health.v4.DailyHeartRateZones) data_); + } + if (dataCase_ == 33) { + output.writeMessage(33, (com.google.devicesandservices.health.v4.HydrationLog) data_); + } + if (dataCase_ == 35) { + output.writeMessage(35, (com.google.devicesandservices.health.v4.TimeInHeartRateZone) data_); + } + if (dataCase_ == 36) { + output.writeMessage(36, (com.google.devicesandservices.health.v4.ActiveMinutes) data_); + } + if (dataCase_ == 37) { + output.writeMessage( + 37, (com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary) data_); + } + if (dataCase_ == 38) { + output.writeMessage(38, (com.google.devicesandservices.health.v4.DailyRespiratoryRate) data_); + } + if (dataCase_ == 39) { + output.writeMessage(39, (com.google.devicesandservices.health.v4.SwimLengthsData) data_); + } + if (dataCase_ == 40) { + output.writeMessage(40, (com.google.devicesandservices.health.v4.Height) data_); + } + if (dataCase_ == 41) { + output.writeMessage(41, (com.google.devicesandservices.health.v4.BasalEnergyBurned) data_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(dataPointName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, dataPointName_); + } + if (dataCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, (com.google.devicesandservices.health.v4.Steps) data_); + } + if (dataCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, (com.google.devicesandservices.health.v4.Floors) data_); + } + if (dataCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, (com.google.devicesandservices.health.v4.HeartRate) data_); + } + if (dataCase_ == 8) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 8, (com.google.devicesandservices.health.v4.Sleep) data_); + } + if (dataCase_ == 9) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 9, (com.google.devicesandservices.health.v4.DailyRestingHeartRate) data_); + } + if (dataCase_ == 10) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 10, (com.google.devicesandservices.health.v4.DailyHeartRateVariability) data_); + } + if (dataCase_ == 11) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 11, (com.google.devicesandservices.health.v4.Exercise) data_); + } + if (dataCase_ == 12) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 12, (com.google.devicesandservices.health.v4.Weight) data_); + } + if (dataCase_ == 13) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 13, (com.google.devicesandservices.health.v4.Altitude) data_); + } + if (dataCase_ == 14) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 14, (com.google.devicesandservices.health.v4.Distance) data_); + } + if (dataCase_ == 15) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 15, (com.google.devicesandservices.health.v4.BodyFat) data_); + } + if (dataCase_ == 17) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 17, (com.google.devicesandservices.health.v4.ActiveZoneMinutes) data_); + } + if (dataCase_ == 19) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 19, (com.google.devicesandservices.health.v4.HeartRateVariability) data_); + } + if (dataCase_ == 20) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 20, (com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations) data_); + } + if (dataCase_ == 21) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 21, (com.google.devicesandservices.health.v4.SedentaryPeriod) data_); + } + if (dataCase_ == 22) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 22, (com.google.devicesandservices.health.v4.RunVO2Max) data_); + } + if (dataCase_ == 24) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 24, (com.google.devicesandservices.health.v4.OxygenSaturation) data_); + } + if (dataCase_ == 25) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 25, (com.google.devicesandservices.health.v4.DailyOxygenSaturation) data_); + } + if (dataCase_ == 26) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 26, (com.google.devicesandservices.health.v4.ActivityLevel) data_); + } + if (dataCase_ == 27) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 27, (com.google.devicesandservices.health.v4.VO2Max) data_); + } + if (dataCase_ == 28) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 28, (com.google.devicesandservices.health.v4.DailyVO2Max) data_); + } + if (dataCase_ == 32) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 32, (com.google.devicesandservices.health.v4.DailyHeartRateZones) data_); + } + if (dataCase_ == 33) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 33, (com.google.devicesandservices.health.v4.HydrationLog) data_); + } + if (dataCase_ == 35) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 35, (com.google.devicesandservices.health.v4.TimeInHeartRateZone) data_); + } + if (dataCase_ == 36) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 36, (com.google.devicesandservices.health.v4.ActiveMinutes) data_); + } + if (dataCase_ == 37) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 37, (com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary) data_); + } + if (dataCase_ == 38) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 38, (com.google.devicesandservices.health.v4.DailyRespiratoryRate) data_); + } + if (dataCase_ == 39) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 39, (com.google.devicesandservices.health.v4.SwimLengthsData) data_); + } + if (dataCase_ == 40) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 40, (com.google.devicesandservices.health.v4.Height) data_); + } + if (dataCase_ == 41) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 41, (com.google.devicesandservices.health.v4.BasalEnergyBurned) data_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.ReconciledDataPoint)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.ReconciledDataPoint other = + (com.google.devicesandservices.health.v4.ReconciledDataPoint) obj; + + if (!getDataPointName().equals(other.getDataPointName())) return false; + if (!getDataCase().equals(other.getDataCase())) return false; + switch (dataCase_) { + case 4: + if (!getSteps().equals(other.getSteps())) return false; + break; + case 5: + if (!getFloors().equals(other.getFloors())) return false; + break; + case 6: + if (!getHeartRate().equals(other.getHeartRate())) return false; + break; + case 8: + if (!getSleep().equals(other.getSleep())) return false; + break; + case 9: + if (!getDailyRestingHeartRate().equals(other.getDailyRestingHeartRate())) return false; + break; + case 10: + if (!getDailyHeartRateVariability().equals(other.getDailyHeartRateVariability())) + return false; + break; + case 11: + if (!getExercise().equals(other.getExercise())) return false; + break; + case 12: + if (!getWeight().equals(other.getWeight())) return false; + break; + case 13: + if (!getAltitude().equals(other.getAltitude())) return false; + break; + case 14: + if (!getDistance().equals(other.getDistance())) return false; + break; + case 15: + if (!getBodyFat().equals(other.getBodyFat())) return false; + break; + case 17: + if (!getActiveZoneMinutes().equals(other.getActiveZoneMinutes())) return false; + break; + case 19: + if (!getHeartRateVariability().equals(other.getHeartRateVariability())) return false; + break; + case 20: + if (!getDailySleepTemperatureDerivations() + .equals(other.getDailySleepTemperatureDerivations())) return false; + break; + case 21: + if (!getSedentaryPeriod().equals(other.getSedentaryPeriod())) return false; + break; + case 22: + if (!getRunVo2Max().equals(other.getRunVo2Max())) return false; + break; + case 24: + if (!getOxygenSaturation().equals(other.getOxygenSaturation())) return false; + break; + case 25: + if (!getDailyOxygenSaturation().equals(other.getDailyOxygenSaturation())) return false; + break; + case 26: + if (!getActivityLevel().equals(other.getActivityLevel())) return false; + break; + case 27: + if (!getVo2Max().equals(other.getVo2Max())) return false; + break; + case 28: + if (!getDailyVo2Max().equals(other.getDailyVo2Max())) return false; + break; + case 32: + if (!getDailyHeartRateZones().equals(other.getDailyHeartRateZones())) return false; + break; + case 33: + if (!getHydrationLog().equals(other.getHydrationLog())) return false; + break; + case 35: + if (!getTimeInHeartRateZone().equals(other.getTimeInHeartRateZone())) return false; + break; + case 36: + if (!getActiveMinutes().equals(other.getActiveMinutes())) return false; + break; + case 37: + if (!getRespiratoryRateSleepSummary().equals(other.getRespiratoryRateSleepSummary())) + return false; + break; + case 38: + if (!getDailyRespiratoryRate().equals(other.getDailyRespiratoryRate())) return false; + break; + case 39: + if (!getSwimLengthsData().equals(other.getSwimLengthsData())) return false; + break; + case 40: + if (!getHeight().equals(other.getHeight())) return false; + break; + case 41: + if (!getBasalEnergyBurned().equals(other.getBasalEnergyBurned())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DATA_POINT_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDataPointName().hashCode(); + switch (dataCase_) { + case 4: + hash = (37 * hash) + STEPS_FIELD_NUMBER; + hash = (53 * hash) + getSteps().hashCode(); + break; + case 5: + hash = (37 * hash) + FLOORS_FIELD_NUMBER; + hash = (53 * hash) + getFloors().hashCode(); + break; + case 6: + hash = (37 * hash) + HEART_RATE_FIELD_NUMBER; + hash = (53 * hash) + getHeartRate().hashCode(); + break; + case 8: + hash = (37 * hash) + SLEEP_FIELD_NUMBER; + hash = (53 * hash) + getSleep().hashCode(); + break; + case 9: + hash = (37 * hash) + DAILY_RESTING_HEART_RATE_FIELD_NUMBER; + hash = (53 * hash) + getDailyRestingHeartRate().hashCode(); + break; + case 10: + hash = (37 * hash) + DAILY_HEART_RATE_VARIABILITY_FIELD_NUMBER; + hash = (53 * hash) + getDailyHeartRateVariability().hashCode(); + break; + case 11: + hash = (37 * hash) + EXERCISE_FIELD_NUMBER; + hash = (53 * hash) + getExercise().hashCode(); + break; + case 12: + hash = (37 * hash) + WEIGHT_FIELD_NUMBER; + hash = (53 * hash) + getWeight().hashCode(); + break; + case 13: + hash = (37 * hash) + ALTITUDE_FIELD_NUMBER; + hash = (53 * hash) + getAltitude().hashCode(); + break; + case 14: + hash = (37 * hash) + DISTANCE_FIELD_NUMBER; + hash = (53 * hash) + getDistance().hashCode(); + break; + case 15: + hash = (37 * hash) + BODY_FAT_FIELD_NUMBER; + hash = (53 * hash) + getBodyFat().hashCode(); + break; + case 17: + hash = (37 * hash) + ACTIVE_ZONE_MINUTES_FIELD_NUMBER; + hash = (53 * hash) + getActiveZoneMinutes().hashCode(); + break; + case 19: + hash = (37 * hash) + HEART_RATE_VARIABILITY_FIELD_NUMBER; + hash = (53 * hash) + getHeartRateVariability().hashCode(); + break; + case 20: + hash = (37 * hash) + DAILY_SLEEP_TEMPERATURE_DERIVATIONS_FIELD_NUMBER; + hash = (53 * hash) + getDailySleepTemperatureDerivations().hashCode(); + break; + case 21: + hash = (37 * hash) + SEDENTARY_PERIOD_FIELD_NUMBER; + hash = (53 * hash) + getSedentaryPeriod().hashCode(); + break; + case 22: + hash = (37 * hash) + RUN_VO2_MAX_FIELD_NUMBER; + hash = (53 * hash) + getRunVo2Max().hashCode(); + break; + case 24: + hash = (37 * hash) + OXYGEN_SATURATION_FIELD_NUMBER; + hash = (53 * hash) + getOxygenSaturation().hashCode(); + break; + case 25: + hash = (37 * hash) + DAILY_OXYGEN_SATURATION_FIELD_NUMBER; + hash = (53 * hash) + getDailyOxygenSaturation().hashCode(); + break; + case 26: + hash = (37 * hash) + ACTIVITY_LEVEL_FIELD_NUMBER; + hash = (53 * hash) + getActivityLevel().hashCode(); + break; + case 27: + hash = (37 * hash) + VO2_MAX_FIELD_NUMBER; + hash = (53 * hash) + getVo2Max().hashCode(); + break; + case 28: + hash = (37 * hash) + DAILY_VO2_MAX_FIELD_NUMBER; + hash = (53 * hash) + getDailyVo2Max().hashCode(); + break; + case 32: + hash = (37 * hash) + DAILY_HEART_RATE_ZONES_FIELD_NUMBER; + hash = (53 * hash) + getDailyHeartRateZones().hashCode(); + break; + case 33: + hash = (37 * hash) + HYDRATION_LOG_FIELD_NUMBER; + hash = (53 * hash) + getHydrationLog().hashCode(); + break; + case 35: + hash = (37 * hash) + TIME_IN_HEART_RATE_ZONE_FIELD_NUMBER; + hash = (53 * hash) + getTimeInHeartRateZone().hashCode(); + break; + case 36: + hash = (37 * hash) + ACTIVE_MINUTES_FIELD_NUMBER; + hash = (53 * hash) + getActiveMinutes().hashCode(); + break; + case 37: + hash = (37 * hash) + RESPIRATORY_RATE_SLEEP_SUMMARY_FIELD_NUMBER; + hash = (53 * hash) + getRespiratoryRateSleepSummary().hashCode(); + break; + case 38: + hash = (37 * hash) + DAILY_RESPIRATORY_RATE_FIELD_NUMBER; + hash = (53 * hash) + getDailyRespiratoryRate().hashCode(); + break; + case 39: + hash = (37 * hash) + SWIM_LENGTHS_DATA_FIELD_NUMBER; + hash = (53 * hash) + getSwimLengthsData().hashCode(); + break; + case 40: + hash = (37 * hash) + HEIGHT_FIELD_NUMBER; + hash = (53 * hash) + getHeight().hashCode(); + break; + case 41: + hash = (37 * hash) + BASAL_ENERGY_BURNED_FIELD_NUMBER; + hash = (53 * hash) + getBasalEnergyBurned().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.ReconciledDataPoint parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.ReconciledDataPoint parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ReconciledDataPoint parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.ReconciledDataPoint parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ReconciledDataPoint parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.ReconciledDataPoint parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ReconciledDataPoint parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.ReconciledDataPoint parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ReconciledDataPoint parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.ReconciledDataPoint parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.ReconciledDataPoint parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.ReconciledDataPoint parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.ReconciledDataPoint prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A reconciled computed or recorded metric.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.ReconciledDataPoint} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.ReconciledDataPoint) + com.google.devicesandservices.health.v4.ReconciledDataPointOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_ReconciledDataPoint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_ReconciledDataPoint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.ReconciledDataPoint.class, + com.google.devicesandservices.health.v4.ReconciledDataPoint.Builder.class); + } + + // Construct using com.google.devicesandservices.health.v4.ReconciledDataPoint.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (stepsBuilder_ != null) { + stepsBuilder_.clear(); + } + if (floorsBuilder_ != null) { + floorsBuilder_.clear(); + } + if (heartRateBuilder_ != null) { + heartRateBuilder_.clear(); + } + if (sleepBuilder_ != null) { + sleepBuilder_.clear(); + } + if (dailyRestingHeartRateBuilder_ != null) { + dailyRestingHeartRateBuilder_.clear(); + } + if (dailyHeartRateVariabilityBuilder_ != null) { + dailyHeartRateVariabilityBuilder_.clear(); + } + if (exerciseBuilder_ != null) { + exerciseBuilder_.clear(); + } + if (weightBuilder_ != null) { + weightBuilder_.clear(); + } + if (altitudeBuilder_ != null) { + altitudeBuilder_.clear(); + } + if (distanceBuilder_ != null) { + distanceBuilder_.clear(); + } + if (bodyFatBuilder_ != null) { + bodyFatBuilder_.clear(); + } + if (activeZoneMinutesBuilder_ != null) { + activeZoneMinutesBuilder_.clear(); + } + if (heartRateVariabilityBuilder_ != null) { + heartRateVariabilityBuilder_.clear(); + } + if (dailySleepTemperatureDerivationsBuilder_ != null) { + dailySleepTemperatureDerivationsBuilder_.clear(); + } + if (sedentaryPeriodBuilder_ != null) { + sedentaryPeriodBuilder_.clear(); + } + if (runVo2MaxBuilder_ != null) { + runVo2MaxBuilder_.clear(); + } + if (oxygenSaturationBuilder_ != null) { + oxygenSaturationBuilder_.clear(); + } + if (dailyOxygenSaturationBuilder_ != null) { + dailyOxygenSaturationBuilder_.clear(); + } + if (activityLevelBuilder_ != null) { + activityLevelBuilder_.clear(); + } + if (vo2MaxBuilder_ != null) { + vo2MaxBuilder_.clear(); + } + if (dailyVo2MaxBuilder_ != null) { + dailyVo2MaxBuilder_.clear(); + } + if (dailyHeartRateZonesBuilder_ != null) { + dailyHeartRateZonesBuilder_.clear(); + } + if (hydrationLogBuilder_ != null) { + hydrationLogBuilder_.clear(); + } + if (timeInHeartRateZoneBuilder_ != null) { + timeInHeartRateZoneBuilder_.clear(); + } + if (activeMinutesBuilder_ != null) { + activeMinutesBuilder_.clear(); + } + if (respiratoryRateSleepSummaryBuilder_ != null) { + respiratoryRateSleepSummaryBuilder_.clear(); + } + if (dailyRespiratoryRateBuilder_ != null) { + dailyRespiratoryRateBuilder_.clear(); + } + if (swimLengthsDataBuilder_ != null) { + swimLengthsDataBuilder_.clear(); + } + if (heightBuilder_ != null) { + heightBuilder_.clear(); + } + if (basalEnergyBurnedBuilder_ != null) { + basalEnergyBurnedBuilder_.clear(); + } + dataPointName_ = ""; + dataCase_ = 0; + data_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_ReconciledDataPoint_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.ReconciledDataPoint getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.ReconciledDataPoint.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.ReconciledDataPoint build() { + com.google.devicesandservices.health.v4.ReconciledDataPoint result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.ReconciledDataPoint buildPartial() { + com.google.devicesandservices.health.v4.ReconciledDataPoint result = + new com.google.devicesandservices.health.v4.ReconciledDataPoint(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.devicesandservices.health.v4.ReconciledDataPoint result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x40000000) != 0)) { + result.dataPointName_ = dataPointName_; + } + } + + private void buildPartialOneofs( + com.google.devicesandservices.health.v4.ReconciledDataPoint result) { + result.dataCase_ = dataCase_; + result.data_ = this.data_; + if (dataCase_ == 4 && stepsBuilder_ != null) { + result.data_ = stepsBuilder_.build(); + } + if (dataCase_ == 5 && floorsBuilder_ != null) { + result.data_ = floorsBuilder_.build(); + } + if (dataCase_ == 6 && heartRateBuilder_ != null) { + result.data_ = heartRateBuilder_.build(); + } + if (dataCase_ == 8 && sleepBuilder_ != null) { + result.data_ = sleepBuilder_.build(); + } + if (dataCase_ == 9 && dailyRestingHeartRateBuilder_ != null) { + result.data_ = dailyRestingHeartRateBuilder_.build(); + } + if (dataCase_ == 10 && dailyHeartRateVariabilityBuilder_ != null) { + result.data_ = dailyHeartRateVariabilityBuilder_.build(); + } + if (dataCase_ == 11 && exerciseBuilder_ != null) { + result.data_ = exerciseBuilder_.build(); + } + if (dataCase_ == 12 && weightBuilder_ != null) { + result.data_ = weightBuilder_.build(); + } + if (dataCase_ == 13 && altitudeBuilder_ != null) { + result.data_ = altitudeBuilder_.build(); + } + if (dataCase_ == 14 && distanceBuilder_ != null) { + result.data_ = distanceBuilder_.build(); + } + if (dataCase_ == 15 && bodyFatBuilder_ != null) { + result.data_ = bodyFatBuilder_.build(); + } + if (dataCase_ == 17 && activeZoneMinutesBuilder_ != null) { + result.data_ = activeZoneMinutesBuilder_.build(); + } + if (dataCase_ == 19 && heartRateVariabilityBuilder_ != null) { + result.data_ = heartRateVariabilityBuilder_.build(); + } + if (dataCase_ == 20 && dailySleepTemperatureDerivationsBuilder_ != null) { + result.data_ = dailySleepTemperatureDerivationsBuilder_.build(); + } + if (dataCase_ == 21 && sedentaryPeriodBuilder_ != null) { + result.data_ = sedentaryPeriodBuilder_.build(); + } + if (dataCase_ == 22 && runVo2MaxBuilder_ != null) { + result.data_ = runVo2MaxBuilder_.build(); + } + if (dataCase_ == 24 && oxygenSaturationBuilder_ != null) { + result.data_ = oxygenSaturationBuilder_.build(); + } + if (dataCase_ == 25 && dailyOxygenSaturationBuilder_ != null) { + result.data_ = dailyOxygenSaturationBuilder_.build(); + } + if (dataCase_ == 26 && activityLevelBuilder_ != null) { + result.data_ = activityLevelBuilder_.build(); + } + if (dataCase_ == 27 && vo2MaxBuilder_ != null) { + result.data_ = vo2MaxBuilder_.build(); + } + if (dataCase_ == 28 && dailyVo2MaxBuilder_ != null) { + result.data_ = dailyVo2MaxBuilder_.build(); + } + if (dataCase_ == 32 && dailyHeartRateZonesBuilder_ != null) { + result.data_ = dailyHeartRateZonesBuilder_.build(); + } + if (dataCase_ == 33 && hydrationLogBuilder_ != null) { + result.data_ = hydrationLogBuilder_.build(); + } + if (dataCase_ == 35 && timeInHeartRateZoneBuilder_ != null) { + result.data_ = timeInHeartRateZoneBuilder_.build(); + } + if (dataCase_ == 36 && activeMinutesBuilder_ != null) { + result.data_ = activeMinutesBuilder_.build(); + } + if (dataCase_ == 37 && respiratoryRateSleepSummaryBuilder_ != null) { + result.data_ = respiratoryRateSleepSummaryBuilder_.build(); + } + if (dataCase_ == 38 && dailyRespiratoryRateBuilder_ != null) { + result.data_ = dailyRespiratoryRateBuilder_.build(); + } + if (dataCase_ == 39 && swimLengthsDataBuilder_ != null) { + result.data_ = swimLengthsDataBuilder_.build(); + } + if (dataCase_ == 40 && heightBuilder_ != null) { + result.data_ = heightBuilder_.build(); + } + if (dataCase_ == 41 && basalEnergyBurnedBuilder_ != null) { + result.data_ = basalEnergyBurnedBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.ReconciledDataPoint) { + return mergeFrom((com.google.devicesandservices.health.v4.ReconciledDataPoint) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.devicesandservices.health.v4.ReconciledDataPoint other) { + if (other == com.google.devicesandservices.health.v4.ReconciledDataPoint.getDefaultInstance()) + return this; + if (!other.getDataPointName().isEmpty()) { + dataPointName_ = other.dataPointName_; + bitField0_ |= 0x40000000; + onChanged(); + } + switch (other.getDataCase()) { + case STEPS: + { + mergeSteps(other.getSteps()); + break; + } + case FLOORS: + { + mergeFloors(other.getFloors()); + break; + } + case HEART_RATE: + { + mergeHeartRate(other.getHeartRate()); + break; + } + case SLEEP: + { + mergeSleep(other.getSleep()); + break; + } + case DAILY_RESTING_HEART_RATE: + { + mergeDailyRestingHeartRate(other.getDailyRestingHeartRate()); + break; + } + case DAILY_HEART_RATE_VARIABILITY: + { + mergeDailyHeartRateVariability(other.getDailyHeartRateVariability()); + break; + } + case EXERCISE: + { + mergeExercise(other.getExercise()); + break; + } + case WEIGHT: + { + mergeWeight(other.getWeight()); + break; + } + case ALTITUDE: + { + mergeAltitude(other.getAltitude()); + break; + } + case DISTANCE: + { + mergeDistance(other.getDistance()); + break; + } + case BODY_FAT: + { + mergeBodyFat(other.getBodyFat()); + break; + } + case ACTIVE_ZONE_MINUTES: + { + mergeActiveZoneMinutes(other.getActiveZoneMinutes()); + break; + } + case HEART_RATE_VARIABILITY: + { + mergeHeartRateVariability(other.getHeartRateVariability()); + break; + } + case DAILY_SLEEP_TEMPERATURE_DERIVATIONS: + { + mergeDailySleepTemperatureDerivations(other.getDailySleepTemperatureDerivations()); + break; + } + case SEDENTARY_PERIOD: + { + mergeSedentaryPeriod(other.getSedentaryPeriod()); + break; + } + case RUN_VO2_MAX: + { + mergeRunVo2Max(other.getRunVo2Max()); + break; + } + case OXYGEN_SATURATION: + { + mergeOxygenSaturation(other.getOxygenSaturation()); + break; + } + case DAILY_OXYGEN_SATURATION: + { + mergeDailyOxygenSaturation(other.getDailyOxygenSaturation()); + break; + } + case ACTIVITY_LEVEL: + { + mergeActivityLevel(other.getActivityLevel()); + break; + } + case VO2_MAX: + { + mergeVo2Max(other.getVo2Max()); + break; + } + case DAILY_VO2_MAX: + { + mergeDailyVo2Max(other.getDailyVo2Max()); + break; + } + case DAILY_HEART_RATE_ZONES: + { + mergeDailyHeartRateZones(other.getDailyHeartRateZones()); + break; + } + case HYDRATION_LOG: + { + mergeHydrationLog(other.getHydrationLog()); + break; + } + case TIME_IN_HEART_RATE_ZONE: + { + mergeTimeInHeartRateZone(other.getTimeInHeartRateZone()); + break; + } + case ACTIVE_MINUTES: + { + mergeActiveMinutes(other.getActiveMinutes()); + break; + } + case RESPIRATORY_RATE_SLEEP_SUMMARY: + { + mergeRespiratoryRateSleepSummary(other.getRespiratoryRateSleepSummary()); + break; + } + case DAILY_RESPIRATORY_RATE: + { + mergeDailyRespiratoryRate(other.getDailyRespiratoryRate()); + break; + } + case SWIM_LENGTHS_DATA: + { + mergeSwimLengthsData(other.getSwimLengthsData()); + break; + } + case HEIGHT: + { + mergeHeight(other.getHeight()); + break; + } + case BASAL_ENERGY_BURNED: + { + mergeBasalEnergyBurned(other.getBasalEnergyBurned()); + break; + } + case DATA_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + dataPointName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x40000000; + break; + } // case 10 + case 34: + { + input.readMessage(internalGetStepsFieldBuilder().getBuilder(), extensionRegistry); + dataCase_ = 4; + break; + } // case 34 + case 42: + { + input.readMessage(internalGetFloorsFieldBuilder().getBuilder(), extensionRegistry); + dataCase_ = 5; + break; + } // case 42 + case 50: + { + input.readMessage( + internalGetHeartRateFieldBuilder().getBuilder(), extensionRegistry); + dataCase_ = 6; + break; + } // case 50 + case 66: + { + input.readMessage(internalGetSleepFieldBuilder().getBuilder(), extensionRegistry); + dataCase_ = 8; + break; + } // case 66 + case 74: + { + input.readMessage( + internalGetDailyRestingHeartRateFieldBuilder().getBuilder(), extensionRegistry); + dataCase_ = 9; + break; + } // case 74 + case 82: + { + input.readMessage( + internalGetDailyHeartRateVariabilityFieldBuilder().getBuilder(), + extensionRegistry); + dataCase_ = 10; + break; + } // case 82 + case 90: + { + input.readMessage( + internalGetExerciseFieldBuilder().getBuilder(), extensionRegistry); + dataCase_ = 11; + break; + } // case 90 + case 98: + { + input.readMessage(internalGetWeightFieldBuilder().getBuilder(), extensionRegistry); + dataCase_ = 12; + break; + } // case 98 + case 106: + { + input.readMessage( + internalGetAltitudeFieldBuilder().getBuilder(), extensionRegistry); + dataCase_ = 13; + break; + } // case 106 + case 114: + { + input.readMessage( + internalGetDistanceFieldBuilder().getBuilder(), extensionRegistry); + dataCase_ = 14; + break; + } // case 114 + case 122: + { + input.readMessage(internalGetBodyFatFieldBuilder().getBuilder(), extensionRegistry); + dataCase_ = 15; + break; + } // case 122 + case 138: + { + input.readMessage( + internalGetActiveZoneMinutesFieldBuilder().getBuilder(), extensionRegistry); + dataCase_ = 17; + break; + } // case 138 + case 154: + { + input.readMessage( + internalGetHeartRateVariabilityFieldBuilder().getBuilder(), extensionRegistry); + dataCase_ = 19; + break; + } // case 154 + case 162: + { + input.readMessage( + internalGetDailySleepTemperatureDerivationsFieldBuilder().getBuilder(), + extensionRegistry); + dataCase_ = 20; + break; + } // case 162 + case 170: + { + input.readMessage( + internalGetSedentaryPeriodFieldBuilder().getBuilder(), extensionRegistry); + dataCase_ = 21; + break; + } // case 170 + case 178: + { + input.readMessage( + internalGetRunVo2MaxFieldBuilder().getBuilder(), extensionRegistry); + dataCase_ = 22; + break; + } // case 178 + case 194: + { + input.readMessage( + internalGetOxygenSaturationFieldBuilder().getBuilder(), extensionRegistry); + dataCase_ = 24; + break; + } // case 194 + case 202: + { + input.readMessage( + internalGetDailyOxygenSaturationFieldBuilder().getBuilder(), extensionRegistry); + dataCase_ = 25; + break; + } // case 202 + case 210: + { + input.readMessage( + internalGetActivityLevelFieldBuilder().getBuilder(), extensionRegistry); + dataCase_ = 26; + break; + } // case 210 + case 218: + { + input.readMessage(internalGetVo2MaxFieldBuilder().getBuilder(), extensionRegistry); + dataCase_ = 27; + break; + } // case 218 + case 226: + { + input.readMessage( + internalGetDailyVo2MaxFieldBuilder().getBuilder(), extensionRegistry); + dataCase_ = 28; + break; + } // case 226 + case 258: + { + input.readMessage( + internalGetDailyHeartRateZonesFieldBuilder().getBuilder(), extensionRegistry); + dataCase_ = 32; + break; + } // case 258 + case 266: + { + input.readMessage( + internalGetHydrationLogFieldBuilder().getBuilder(), extensionRegistry); + dataCase_ = 33; + break; + } // case 266 + case 282: + { + input.readMessage( + internalGetTimeInHeartRateZoneFieldBuilder().getBuilder(), extensionRegistry); + dataCase_ = 35; + break; + } // case 282 + case 290: + { + input.readMessage( + internalGetActiveMinutesFieldBuilder().getBuilder(), extensionRegistry); + dataCase_ = 36; + break; + } // case 290 + case 298: + { + input.readMessage( + internalGetRespiratoryRateSleepSummaryFieldBuilder().getBuilder(), + extensionRegistry); + dataCase_ = 37; + break; + } // case 298 + case 306: + { + input.readMessage( + internalGetDailyRespiratoryRateFieldBuilder().getBuilder(), extensionRegistry); + dataCase_ = 38; + break; + } // case 306 + case 314: + { + input.readMessage( + internalGetSwimLengthsDataFieldBuilder().getBuilder(), extensionRegistry); + dataCase_ = 39; + break; + } // case 314 + case 322: + { + input.readMessage(internalGetHeightFieldBuilder().getBuilder(), extensionRegistry); + dataCase_ = 40; + break; + } // case 322 + case 330: + { + input.readMessage( + internalGetBasalEnergyBurnedFieldBuilder().getBuilder(), extensionRegistry); + dataCase_ = 41; + break; + } // case 330 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int dataCase_ = 0; + private java.lang.Object data_; + + public DataCase getDataCase() { + return DataCase.forNumber(dataCase_); + } + + public Builder clearData() { + dataCase_ = 0; + data_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.Steps, + com.google.devicesandservices.health.v4.Steps.Builder, + com.google.devicesandservices.health.v4.StepsOrBuilder> + stepsBuilder_; + + /** + * + * + *
+     * Data for points in the `steps` interval data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.Steps steps = 4; + * + * @return Whether the steps field is set. + */ + @java.lang.Override + public boolean hasSteps() { + return dataCase_ == 4; + } + + /** + * + * + *
+     * Data for points in the `steps` interval data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.Steps steps = 4; + * + * @return The steps. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Steps getSteps() { + if (stepsBuilder_ == null) { + if (dataCase_ == 4) { + return (com.google.devicesandservices.health.v4.Steps) data_; + } + return com.google.devicesandservices.health.v4.Steps.getDefaultInstance(); + } else { + if (dataCase_ == 4) { + return stepsBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.Steps.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Data for points in the `steps` interval data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.Steps steps = 4; + */ + public Builder setSteps(com.google.devicesandservices.health.v4.Steps value) { + if (stepsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + onChanged(); + } else { + stepsBuilder_.setMessage(value); + } + dataCase_ = 4; + return this; + } + + /** + * + * + *
+     * Data for points in the `steps` interval data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.Steps steps = 4; + */ + public Builder setSteps(com.google.devicesandservices.health.v4.Steps.Builder builderForValue) { + if (stepsBuilder_ == null) { + data_ = builderForValue.build(); + onChanged(); + } else { + stepsBuilder_.setMessage(builderForValue.build()); + } + dataCase_ = 4; + return this; + } + + /** + * + * + *
+     * Data for points in the `steps` interval data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.Steps steps = 4; + */ + public Builder mergeSteps(com.google.devicesandservices.health.v4.Steps value) { + if (stepsBuilder_ == null) { + if (dataCase_ == 4 + && data_ != com.google.devicesandservices.health.v4.Steps.getDefaultInstance()) { + data_ = + com.google.devicesandservices.health.v4.Steps.newBuilder( + (com.google.devicesandservices.health.v4.Steps) data_) + .mergeFrom(value) + .buildPartial(); + } else { + data_ = value; + } + onChanged(); + } else { + if (dataCase_ == 4) { + stepsBuilder_.mergeFrom(value); + } else { + stepsBuilder_.setMessage(value); + } + } + dataCase_ = 4; + return this; + } + + /** + * + * + *
+     * Data for points in the `steps` interval data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.Steps steps = 4; + */ + public Builder clearSteps() { + if (stepsBuilder_ == null) { + if (dataCase_ == 4) { + dataCase_ = 0; + data_ = null; + onChanged(); + } + } else { + if (dataCase_ == 4) { + dataCase_ = 0; + data_ = null; + } + stepsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Data for points in the `steps` interval data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.Steps steps = 4; + */ + public com.google.devicesandservices.health.v4.Steps.Builder getStepsBuilder() { + return internalGetStepsFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Data for points in the `steps` interval data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.Steps steps = 4; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.StepsOrBuilder getStepsOrBuilder() { + if ((dataCase_ == 4) && (stepsBuilder_ != null)) { + return stepsBuilder_.getMessageOrBuilder(); + } else { + if (dataCase_ == 4) { + return (com.google.devicesandservices.health.v4.Steps) data_; + } + return com.google.devicesandservices.health.v4.Steps.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Data for points in the `steps` interval data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.Steps steps = 4; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.Steps, + com.google.devicesandservices.health.v4.Steps.Builder, + com.google.devicesandservices.health.v4.StepsOrBuilder> + internalGetStepsFieldBuilder() { + if (stepsBuilder_ == null) { + if (!(dataCase_ == 4)) { + data_ = com.google.devicesandservices.health.v4.Steps.getDefaultInstance(); + } + stepsBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.Steps, + com.google.devicesandservices.health.v4.Steps.Builder, + com.google.devicesandservices.health.v4.StepsOrBuilder>( + (com.google.devicesandservices.health.v4.Steps) data_, + getParentForChildren(), + isClean()); + data_ = null; + } + dataCase_ = 4; + onChanged(); + return stepsBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.Floors, + com.google.devicesandservices.health.v4.Floors.Builder, + com.google.devicesandservices.health.v4.FloorsOrBuilder> + floorsBuilder_; + + /** + * + * + *
+     * Data for points in the `floors` interval data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.Floors floors = 5; + * + * @return Whether the floors field is set. + */ + @java.lang.Override + public boolean hasFloors() { + return dataCase_ == 5; + } + + /** + * + * + *
+     * Data for points in the `floors` interval data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.Floors floors = 5; + * + * @return The floors. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Floors getFloors() { + if (floorsBuilder_ == null) { + if (dataCase_ == 5) { + return (com.google.devicesandservices.health.v4.Floors) data_; + } + return com.google.devicesandservices.health.v4.Floors.getDefaultInstance(); + } else { + if (dataCase_ == 5) { + return floorsBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.Floors.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Data for points in the `floors` interval data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.Floors floors = 5; + */ + public Builder setFloors(com.google.devicesandservices.health.v4.Floors value) { + if (floorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + onChanged(); + } else { + floorsBuilder_.setMessage(value); + } + dataCase_ = 5; + return this; + } + + /** + * + * + *
+     * Data for points in the `floors` interval data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.Floors floors = 5; + */ + public Builder setFloors( + com.google.devicesandservices.health.v4.Floors.Builder builderForValue) { + if (floorsBuilder_ == null) { + data_ = builderForValue.build(); + onChanged(); + } else { + floorsBuilder_.setMessage(builderForValue.build()); + } + dataCase_ = 5; + return this; + } + + /** + * + * + *
+     * Data for points in the `floors` interval data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.Floors floors = 5; + */ + public Builder mergeFloors(com.google.devicesandservices.health.v4.Floors value) { + if (floorsBuilder_ == null) { + if (dataCase_ == 5 + && data_ != com.google.devicesandservices.health.v4.Floors.getDefaultInstance()) { + data_ = + com.google.devicesandservices.health.v4.Floors.newBuilder( + (com.google.devicesandservices.health.v4.Floors) data_) + .mergeFrom(value) + .buildPartial(); + } else { + data_ = value; + } + onChanged(); + } else { + if (dataCase_ == 5) { + floorsBuilder_.mergeFrom(value); + } else { + floorsBuilder_.setMessage(value); + } + } + dataCase_ = 5; + return this; + } + + /** + * + * + *
+     * Data for points in the `floors` interval data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.Floors floors = 5; + */ + public Builder clearFloors() { + if (floorsBuilder_ == null) { + if (dataCase_ == 5) { + dataCase_ = 0; + data_ = null; + onChanged(); + } + } else { + if (dataCase_ == 5) { + dataCase_ = 0; + data_ = null; + } + floorsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Data for points in the `floors` interval data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.Floors floors = 5; + */ + public com.google.devicesandservices.health.v4.Floors.Builder getFloorsBuilder() { + return internalGetFloorsFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Data for points in the `floors` interval data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.Floors floors = 5; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.FloorsOrBuilder getFloorsOrBuilder() { + if ((dataCase_ == 5) && (floorsBuilder_ != null)) { + return floorsBuilder_.getMessageOrBuilder(); + } else { + if (dataCase_ == 5) { + return (com.google.devicesandservices.health.v4.Floors) data_; + } + return com.google.devicesandservices.health.v4.Floors.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Data for points in the `floors` interval data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.Floors floors = 5; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.Floors, + com.google.devicesandservices.health.v4.Floors.Builder, + com.google.devicesandservices.health.v4.FloorsOrBuilder> + internalGetFloorsFieldBuilder() { + if (floorsBuilder_ == null) { + if (!(dataCase_ == 5)) { + data_ = com.google.devicesandservices.health.v4.Floors.getDefaultInstance(); + } + floorsBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.Floors, + com.google.devicesandservices.health.v4.Floors.Builder, + com.google.devicesandservices.health.v4.FloorsOrBuilder>( + (com.google.devicesandservices.health.v4.Floors) data_, + getParentForChildren(), + isClean()); + data_ = null; + } + dataCase_ = 5; + onChanged(); + return floorsBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.HeartRate, + com.google.devicesandservices.health.v4.HeartRate.Builder, + com.google.devicesandservices.health.v4.HeartRateOrBuilder> + heartRateBuilder_; + + /** + * + * + *
+     * Data for points in the `heart-rate` sample data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.HeartRate heart_rate = 6; + * + * @return Whether the heartRate field is set. + */ + @java.lang.Override + public boolean hasHeartRate() { + return dataCase_ == 6; + } + + /** + * + * + *
+     * Data for points in the `heart-rate` sample data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.HeartRate heart_rate = 6; + * + * @return The heartRate. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.HeartRate getHeartRate() { + if (heartRateBuilder_ == null) { + if (dataCase_ == 6) { + return (com.google.devicesandservices.health.v4.HeartRate) data_; + } + return com.google.devicesandservices.health.v4.HeartRate.getDefaultInstance(); + } else { + if (dataCase_ == 6) { + return heartRateBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.HeartRate.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Data for points in the `heart-rate` sample data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.HeartRate heart_rate = 6; + */ + public Builder setHeartRate(com.google.devicesandservices.health.v4.HeartRate value) { + if (heartRateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + onChanged(); + } else { + heartRateBuilder_.setMessage(value); + } + dataCase_ = 6; + return this; + } + + /** + * + * + *
+     * Data for points in the `heart-rate` sample data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.HeartRate heart_rate = 6; + */ + public Builder setHeartRate( + com.google.devicesandservices.health.v4.HeartRate.Builder builderForValue) { + if (heartRateBuilder_ == null) { + data_ = builderForValue.build(); + onChanged(); + } else { + heartRateBuilder_.setMessage(builderForValue.build()); + } + dataCase_ = 6; + return this; + } + + /** + * + * + *
+     * Data for points in the `heart-rate` sample data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.HeartRate heart_rate = 6; + */ + public Builder mergeHeartRate(com.google.devicesandservices.health.v4.HeartRate value) { + if (heartRateBuilder_ == null) { + if (dataCase_ == 6 + && data_ != com.google.devicesandservices.health.v4.HeartRate.getDefaultInstance()) { + data_ = + com.google.devicesandservices.health.v4.HeartRate.newBuilder( + (com.google.devicesandservices.health.v4.HeartRate) data_) + .mergeFrom(value) + .buildPartial(); + } else { + data_ = value; + } + onChanged(); + } else { + if (dataCase_ == 6) { + heartRateBuilder_.mergeFrom(value); + } else { + heartRateBuilder_.setMessage(value); + } + } + dataCase_ = 6; + return this; + } + + /** + * + * + *
+     * Data for points in the `heart-rate` sample data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.HeartRate heart_rate = 6; + */ + public Builder clearHeartRate() { + if (heartRateBuilder_ == null) { + if (dataCase_ == 6) { + dataCase_ = 0; + data_ = null; + onChanged(); + } + } else { + if (dataCase_ == 6) { + dataCase_ = 0; + data_ = null; + } + heartRateBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Data for points in the `heart-rate` sample data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.HeartRate heart_rate = 6; + */ + public com.google.devicesandservices.health.v4.HeartRate.Builder getHeartRateBuilder() { + return internalGetHeartRateFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Data for points in the `heart-rate` sample data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.HeartRate heart_rate = 6; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.HeartRateOrBuilder getHeartRateOrBuilder() { + if ((dataCase_ == 6) && (heartRateBuilder_ != null)) { + return heartRateBuilder_.getMessageOrBuilder(); + } else { + if (dataCase_ == 6) { + return (com.google.devicesandservices.health.v4.HeartRate) data_; + } + return com.google.devicesandservices.health.v4.HeartRate.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Data for points in the `heart-rate` sample data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.HeartRate heart_rate = 6; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.HeartRate, + com.google.devicesandservices.health.v4.HeartRate.Builder, + com.google.devicesandservices.health.v4.HeartRateOrBuilder> + internalGetHeartRateFieldBuilder() { + if (heartRateBuilder_ == null) { + if (!(dataCase_ == 6)) { + data_ = com.google.devicesandservices.health.v4.HeartRate.getDefaultInstance(); + } + heartRateBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.HeartRate, + com.google.devicesandservices.health.v4.HeartRate.Builder, + com.google.devicesandservices.health.v4.HeartRateOrBuilder>( + (com.google.devicesandservices.health.v4.HeartRate) data_, + getParentForChildren(), + isClean()); + data_ = null; + } + dataCase_ = 6; + onChanged(); + return heartRateBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.Sleep, + com.google.devicesandservices.health.v4.Sleep.Builder, + com.google.devicesandservices.health.v4.SleepOrBuilder> + sleepBuilder_; + + /** + * + * + *
+     * Data for points in the `sleep` session data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.Sleep sleep = 8; + * + * @return Whether the sleep field is set. + */ + @java.lang.Override + public boolean hasSleep() { + return dataCase_ == 8; + } + + /** + * + * + *
+     * Data for points in the `sleep` session data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.Sleep sleep = 8; + * + * @return The sleep. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Sleep getSleep() { + if (sleepBuilder_ == null) { + if (dataCase_ == 8) { + return (com.google.devicesandservices.health.v4.Sleep) data_; + } + return com.google.devicesandservices.health.v4.Sleep.getDefaultInstance(); + } else { + if (dataCase_ == 8) { + return sleepBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.Sleep.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Data for points in the `sleep` session data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.Sleep sleep = 8; + */ + public Builder setSleep(com.google.devicesandservices.health.v4.Sleep value) { + if (sleepBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + onChanged(); + } else { + sleepBuilder_.setMessage(value); + } + dataCase_ = 8; + return this; + } + + /** + * + * + *
+     * Data for points in the `sleep` session data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.Sleep sleep = 8; + */ + public Builder setSleep(com.google.devicesandservices.health.v4.Sleep.Builder builderForValue) { + if (sleepBuilder_ == null) { + data_ = builderForValue.build(); + onChanged(); + } else { + sleepBuilder_.setMessage(builderForValue.build()); + } + dataCase_ = 8; + return this; + } + + /** + * + * + *
+     * Data for points in the `sleep` session data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.Sleep sleep = 8; + */ + public Builder mergeSleep(com.google.devicesandservices.health.v4.Sleep value) { + if (sleepBuilder_ == null) { + if (dataCase_ == 8 + && data_ != com.google.devicesandservices.health.v4.Sleep.getDefaultInstance()) { + data_ = + com.google.devicesandservices.health.v4.Sleep.newBuilder( + (com.google.devicesandservices.health.v4.Sleep) data_) + .mergeFrom(value) + .buildPartial(); + } else { + data_ = value; + } + onChanged(); + } else { + if (dataCase_ == 8) { + sleepBuilder_.mergeFrom(value); + } else { + sleepBuilder_.setMessage(value); + } + } + dataCase_ = 8; + return this; + } + + /** + * + * + *
+     * Data for points in the `sleep` session data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.Sleep sleep = 8; + */ + public Builder clearSleep() { + if (sleepBuilder_ == null) { + if (dataCase_ == 8) { + dataCase_ = 0; + data_ = null; + onChanged(); + } + } else { + if (dataCase_ == 8) { + dataCase_ = 0; + data_ = null; + } + sleepBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Data for points in the `sleep` session data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.Sleep sleep = 8; + */ + public com.google.devicesandservices.health.v4.Sleep.Builder getSleepBuilder() { + return internalGetSleepFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Data for points in the `sleep` session data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.Sleep sleep = 8; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.SleepOrBuilder getSleepOrBuilder() { + if ((dataCase_ == 8) && (sleepBuilder_ != null)) { + return sleepBuilder_.getMessageOrBuilder(); + } else { + if (dataCase_ == 8) { + return (com.google.devicesandservices.health.v4.Sleep) data_; + } + return com.google.devicesandservices.health.v4.Sleep.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Data for points in the `sleep` session data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.Sleep sleep = 8; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.Sleep, + com.google.devicesandservices.health.v4.Sleep.Builder, + com.google.devicesandservices.health.v4.SleepOrBuilder> + internalGetSleepFieldBuilder() { + if (sleepBuilder_ == null) { + if (!(dataCase_ == 8)) { + data_ = com.google.devicesandservices.health.v4.Sleep.getDefaultInstance(); + } + sleepBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.Sleep, + com.google.devicesandservices.health.v4.Sleep.Builder, + com.google.devicesandservices.health.v4.SleepOrBuilder>( + (com.google.devicesandservices.health.v4.Sleep) data_, + getParentForChildren(), + isClean()); + data_ = null; + } + dataCase_ = 8; + onChanged(); + return sleepBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.DailyRestingHeartRate, + com.google.devicesandservices.health.v4.DailyRestingHeartRate.Builder, + com.google.devicesandservices.health.v4.DailyRestingHeartRateOrBuilder> + dailyRestingHeartRateBuilder_; + + /** + * + * + *
+     * Data for points in the `daily-resting-heart-rate` daily data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyRestingHeartRate daily_resting_heart_rate = 9; + * + * + * @return Whether the dailyRestingHeartRate field is set. + */ + @java.lang.Override + public boolean hasDailyRestingHeartRate() { + return dataCase_ == 9; + } + + /** + * + * + *
+     * Data for points in the `daily-resting-heart-rate` daily data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyRestingHeartRate daily_resting_heart_rate = 9; + * + * + * @return The dailyRestingHeartRate. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyRestingHeartRate + getDailyRestingHeartRate() { + if (dailyRestingHeartRateBuilder_ == null) { + if (dataCase_ == 9) { + return (com.google.devicesandservices.health.v4.DailyRestingHeartRate) data_; + } + return com.google.devicesandservices.health.v4.DailyRestingHeartRate.getDefaultInstance(); + } else { + if (dataCase_ == 9) { + return dailyRestingHeartRateBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.DailyRestingHeartRate.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Data for points in the `daily-resting-heart-rate` daily data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyRestingHeartRate daily_resting_heart_rate = 9; + * + */ + public Builder setDailyRestingHeartRate( + com.google.devicesandservices.health.v4.DailyRestingHeartRate value) { + if (dailyRestingHeartRateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + onChanged(); + } else { + dailyRestingHeartRateBuilder_.setMessage(value); + } + dataCase_ = 9; + return this; + } + + /** + * + * + *
+     * Data for points in the `daily-resting-heart-rate` daily data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyRestingHeartRate daily_resting_heart_rate = 9; + * + */ + public Builder setDailyRestingHeartRate( + com.google.devicesandservices.health.v4.DailyRestingHeartRate.Builder builderForValue) { + if (dailyRestingHeartRateBuilder_ == null) { + data_ = builderForValue.build(); + onChanged(); + } else { + dailyRestingHeartRateBuilder_.setMessage(builderForValue.build()); + } + dataCase_ = 9; + return this; + } + + /** + * + * + *
+     * Data for points in the `daily-resting-heart-rate` daily data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyRestingHeartRate daily_resting_heart_rate = 9; + * + */ + public Builder mergeDailyRestingHeartRate( + com.google.devicesandservices.health.v4.DailyRestingHeartRate value) { + if (dailyRestingHeartRateBuilder_ == null) { + if (dataCase_ == 9 + && data_ + != com.google.devicesandservices.health.v4.DailyRestingHeartRate + .getDefaultInstance()) { + data_ = + com.google.devicesandservices.health.v4.DailyRestingHeartRate.newBuilder( + (com.google.devicesandservices.health.v4.DailyRestingHeartRate) data_) + .mergeFrom(value) + .buildPartial(); + } else { + data_ = value; + } + onChanged(); + } else { + if (dataCase_ == 9) { + dailyRestingHeartRateBuilder_.mergeFrom(value); + } else { + dailyRestingHeartRateBuilder_.setMessage(value); + } + } + dataCase_ = 9; + return this; + } + + /** + * + * + *
+     * Data for points in the `daily-resting-heart-rate` daily data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyRestingHeartRate daily_resting_heart_rate = 9; + * + */ + public Builder clearDailyRestingHeartRate() { + if (dailyRestingHeartRateBuilder_ == null) { + if (dataCase_ == 9) { + dataCase_ = 0; + data_ = null; + onChanged(); + } + } else { + if (dataCase_ == 9) { + dataCase_ = 0; + data_ = null; + } + dailyRestingHeartRateBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Data for points in the `daily-resting-heart-rate` daily data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyRestingHeartRate daily_resting_heart_rate = 9; + * + */ + public com.google.devicesandservices.health.v4.DailyRestingHeartRate.Builder + getDailyRestingHeartRateBuilder() { + return internalGetDailyRestingHeartRateFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Data for points in the `daily-resting-heart-rate` daily data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyRestingHeartRate daily_resting_heart_rate = 9; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyRestingHeartRateOrBuilder + getDailyRestingHeartRateOrBuilder() { + if ((dataCase_ == 9) && (dailyRestingHeartRateBuilder_ != null)) { + return dailyRestingHeartRateBuilder_.getMessageOrBuilder(); + } else { + if (dataCase_ == 9) { + return (com.google.devicesandservices.health.v4.DailyRestingHeartRate) data_; + } + return com.google.devicesandservices.health.v4.DailyRestingHeartRate.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Data for points in the `daily-resting-heart-rate` daily data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyRestingHeartRate daily_resting_heart_rate = 9; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.DailyRestingHeartRate, + com.google.devicesandservices.health.v4.DailyRestingHeartRate.Builder, + com.google.devicesandservices.health.v4.DailyRestingHeartRateOrBuilder> + internalGetDailyRestingHeartRateFieldBuilder() { + if (dailyRestingHeartRateBuilder_ == null) { + if (!(dataCase_ == 9)) { + data_ = + com.google.devicesandservices.health.v4.DailyRestingHeartRate.getDefaultInstance(); + } + dailyRestingHeartRateBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.DailyRestingHeartRate, + com.google.devicesandservices.health.v4.DailyRestingHeartRate.Builder, + com.google.devicesandservices.health.v4.DailyRestingHeartRateOrBuilder>( + (com.google.devicesandservices.health.v4.DailyRestingHeartRate) data_, + getParentForChildren(), + isClean()); + data_ = null; + } + dataCase_ = 9; + onChanged(); + return dailyRestingHeartRateBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.DailyHeartRateVariability, + com.google.devicesandservices.health.v4.DailyHeartRateVariability.Builder, + com.google.devicesandservices.health.v4.DailyHeartRateVariabilityOrBuilder> + dailyHeartRateVariabilityBuilder_; + + /** + * + * + *
+     * Data for points in the `daily-heart-rate-variability` daily data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyHeartRateVariability daily_heart_rate_variability = 10; + * + * + * @return Whether the dailyHeartRateVariability field is set. + */ + @java.lang.Override + public boolean hasDailyHeartRateVariability() { + return dataCase_ == 10; + } + + /** + * + * + *
+     * Data for points in the `daily-heart-rate-variability` daily data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyHeartRateVariability daily_heart_rate_variability = 10; + * + * + * @return The dailyHeartRateVariability. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyHeartRateVariability + getDailyHeartRateVariability() { + if (dailyHeartRateVariabilityBuilder_ == null) { + if (dataCase_ == 10) { + return (com.google.devicesandservices.health.v4.DailyHeartRateVariability) data_; + } + return com.google.devicesandservices.health.v4.DailyHeartRateVariability + .getDefaultInstance(); + } else { + if (dataCase_ == 10) { + return dailyHeartRateVariabilityBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.DailyHeartRateVariability + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Data for points in the `daily-heart-rate-variability` daily data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyHeartRateVariability daily_heart_rate_variability = 10; + * + */ + public Builder setDailyHeartRateVariability( + com.google.devicesandservices.health.v4.DailyHeartRateVariability value) { + if (dailyHeartRateVariabilityBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + onChanged(); + } else { + dailyHeartRateVariabilityBuilder_.setMessage(value); + } + dataCase_ = 10; + return this; + } + + /** + * + * + *
+     * Data for points in the `daily-heart-rate-variability` daily data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyHeartRateVariability daily_heart_rate_variability = 10; + * + */ + public Builder setDailyHeartRateVariability( + com.google.devicesandservices.health.v4.DailyHeartRateVariability.Builder builderForValue) { + if (dailyHeartRateVariabilityBuilder_ == null) { + data_ = builderForValue.build(); + onChanged(); + } else { + dailyHeartRateVariabilityBuilder_.setMessage(builderForValue.build()); + } + dataCase_ = 10; + return this; + } + + /** + * + * + *
+     * Data for points in the `daily-heart-rate-variability` daily data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyHeartRateVariability daily_heart_rate_variability = 10; + * + */ + public Builder mergeDailyHeartRateVariability( + com.google.devicesandservices.health.v4.DailyHeartRateVariability value) { + if (dailyHeartRateVariabilityBuilder_ == null) { + if (dataCase_ == 10 + && data_ + != com.google.devicesandservices.health.v4.DailyHeartRateVariability + .getDefaultInstance()) { + data_ = + com.google.devicesandservices.health.v4.DailyHeartRateVariability.newBuilder( + (com.google.devicesandservices.health.v4.DailyHeartRateVariability) data_) + .mergeFrom(value) + .buildPartial(); + } else { + data_ = value; + } + onChanged(); + } else { + if (dataCase_ == 10) { + dailyHeartRateVariabilityBuilder_.mergeFrom(value); + } else { + dailyHeartRateVariabilityBuilder_.setMessage(value); + } + } + dataCase_ = 10; + return this; + } + + /** + * + * + *
+     * Data for points in the `daily-heart-rate-variability` daily data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyHeartRateVariability daily_heart_rate_variability = 10; + * + */ + public Builder clearDailyHeartRateVariability() { + if (dailyHeartRateVariabilityBuilder_ == null) { + if (dataCase_ == 10) { + dataCase_ = 0; + data_ = null; + onChanged(); + } + } else { + if (dataCase_ == 10) { + dataCase_ = 0; + data_ = null; + } + dailyHeartRateVariabilityBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Data for points in the `daily-heart-rate-variability` daily data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyHeartRateVariability daily_heart_rate_variability = 10; + * + */ + public com.google.devicesandservices.health.v4.DailyHeartRateVariability.Builder + getDailyHeartRateVariabilityBuilder() { + return internalGetDailyHeartRateVariabilityFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Data for points in the `daily-heart-rate-variability` daily data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyHeartRateVariability daily_heart_rate_variability = 10; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyHeartRateVariabilityOrBuilder + getDailyHeartRateVariabilityOrBuilder() { + if ((dataCase_ == 10) && (dailyHeartRateVariabilityBuilder_ != null)) { + return dailyHeartRateVariabilityBuilder_.getMessageOrBuilder(); + } else { + if (dataCase_ == 10) { + return (com.google.devicesandservices.health.v4.DailyHeartRateVariability) data_; + } + return com.google.devicesandservices.health.v4.DailyHeartRateVariability + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Data for points in the `daily-heart-rate-variability` daily data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyHeartRateVariability daily_heart_rate_variability = 10; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.DailyHeartRateVariability, + com.google.devicesandservices.health.v4.DailyHeartRateVariability.Builder, + com.google.devicesandservices.health.v4.DailyHeartRateVariabilityOrBuilder> + internalGetDailyHeartRateVariabilityFieldBuilder() { + if (dailyHeartRateVariabilityBuilder_ == null) { + if (!(dataCase_ == 10)) { + data_ = + com.google.devicesandservices.health.v4.DailyHeartRateVariability + .getDefaultInstance(); + } + dailyHeartRateVariabilityBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.DailyHeartRateVariability, + com.google.devicesandservices.health.v4.DailyHeartRateVariability.Builder, + com.google.devicesandservices.health.v4.DailyHeartRateVariabilityOrBuilder>( + (com.google.devicesandservices.health.v4.DailyHeartRateVariability) data_, + getParentForChildren(), + isClean()); + data_ = null; + } + dataCase_ = 10; + onChanged(); + return dailyHeartRateVariabilityBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.Exercise, + com.google.devicesandservices.health.v4.Exercise.Builder, + com.google.devicesandservices.health.v4.ExerciseOrBuilder> + exerciseBuilder_; + + /** + * + * + *
+     * Data for points in the `exercise` session data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.Exercise exercise = 11; + * + * @return Whether the exercise field is set. + */ + @java.lang.Override + public boolean hasExercise() { + return dataCase_ == 11; + } + + /** + * + * + *
+     * Data for points in the `exercise` session data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.Exercise exercise = 11; + * + * @return The exercise. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Exercise getExercise() { + if (exerciseBuilder_ == null) { + if (dataCase_ == 11) { + return (com.google.devicesandservices.health.v4.Exercise) data_; + } + return com.google.devicesandservices.health.v4.Exercise.getDefaultInstance(); + } else { + if (dataCase_ == 11) { + return exerciseBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.Exercise.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Data for points in the `exercise` session data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.Exercise exercise = 11; + */ + public Builder setExercise(com.google.devicesandservices.health.v4.Exercise value) { + if (exerciseBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + onChanged(); + } else { + exerciseBuilder_.setMessage(value); + } + dataCase_ = 11; + return this; + } + + /** + * + * + *
+     * Data for points in the `exercise` session data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.Exercise exercise = 11; + */ + public Builder setExercise( + com.google.devicesandservices.health.v4.Exercise.Builder builderForValue) { + if (exerciseBuilder_ == null) { + data_ = builderForValue.build(); + onChanged(); + } else { + exerciseBuilder_.setMessage(builderForValue.build()); + } + dataCase_ = 11; + return this; + } + + /** + * + * + *
+     * Data for points in the `exercise` session data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.Exercise exercise = 11; + */ + public Builder mergeExercise(com.google.devicesandservices.health.v4.Exercise value) { + if (exerciseBuilder_ == null) { + if (dataCase_ == 11 + && data_ != com.google.devicesandservices.health.v4.Exercise.getDefaultInstance()) { + data_ = + com.google.devicesandservices.health.v4.Exercise.newBuilder( + (com.google.devicesandservices.health.v4.Exercise) data_) + .mergeFrom(value) + .buildPartial(); + } else { + data_ = value; + } + onChanged(); + } else { + if (dataCase_ == 11) { + exerciseBuilder_.mergeFrom(value); + } else { + exerciseBuilder_.setMessage(value); + } + } + dataCase_ = 11; + return this; + } + + /** + * + * + *
+     * Data for points in the `exercise` session data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.Exercise exercise = 11; + */ + public Builder clearExercise() { + if (exerciseBuilder_ == null) { + if (dataCase_ == 11) { + dataCase_ = 0; + data_ = null; + onChanged(); + } + } else { + if (dataCase_ == 11) { + dataCase_ = 0; + data_ = null; + } + exerciseBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Data for points in the `exercise` session data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.Exercise exercise = 11; + */ + public com.google.devicesandservices.health.v4.Exercise.Builder getExerciseBuilder() { + return internalGetExerciseFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Data for points in the `exercise` session data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.Exercise exercise = 11; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ExerciseOrBuilder getExerciseOrBuilder() { + if ((dataCase_ == 11) && (exerciseBuilder_ != null)) { + return exerciseBuilder_.getMessageOrBuilder(); + } else { + if (dataCase_ == 11) { + return (com.google.devicesandservices.health.v4.Exercise) data_; + } + return com.google.devicesandservices.health.v4.Exercise.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Data for points in the `exercise` session data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.Exercise exercise = 11; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.Exercise, + com.google.devicesandservices.health.v4.Exercise.Builder, + com.google.devicesandservices.health.v4.ExerciseOrBuilder> + internalGetExerciseFieldBuilder() { + if (exerciseBuilder_ == null) { + if (!(dataCase_ == 11)) { + data_ = com.google.devicesandservices.health.v4.Exercise.getDefaultInstance(); + } + exerciseBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.Exercise, + com.google.devicesandservices.health.v4.Exercise.Builder, + com.google.devicesandservices.health.v4.ExerciseOrBuilder>( + (com.google.devicesandservices.health.v4.Exercise) data_, + getParentForChildren(), + isClean()); + data_ = null; + } + dataCase_ = 11; + onChanged(); + return exerciseBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.Weight, + com.google.devicesandservices.health.v4.Weight.Builder, + com.google.devicesandservices.health.v4.WeightOrBuilder> + weightBuilder_; + + /** + * + * + *
+     * Data for points in the `weight` sample data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.Weight weight = 12; + * + * @return Whether the weight field is set. + */ + @java.lang.Override + public boolean hasWeight() { + return dataCase_ == 12; + } + + /** + * + * + *
+     * Data for points in the `weight` sample data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.Weight weight = 12; + * + * @return The weight. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Weight getWeight() { + if (weightBuilder_ == null) { + if (dataCase_ == 12) { + return (com.google.devicesandservices.health.v4.Weight) data_; + } + return com.google.devicesandservices.health.v4.Weight.getDefaultInstance(); + } else { + if (dataCase_ == 12) { + return weightBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.Weight.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Data for points in the `weight` sample data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.Weight weight = 12; + */ + public Builder setWeight(com.google.devicesandservices.health.v4.Weight value) { + if (weightBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + onChanged(); + } else { + weightBuilder_.setMessage(value); + } + dataCase_ = 12; + return this; + } + + /** + * + * + *
+     * Data for points in the `weight` sample data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.Weight weight = 12; + */ + public Builder setWeight( + com.google.devicesandservices.health.v4.Weight.Builder builderForValue) { + if (weightBuilder_ == null) { + data_ = builderForValue.build(); + onChanged(); + } else { + weightBuilder_.setMessage(builderForValue.build()); + } + dataCase_ = 12; + return this; + } + + /** + * + * + *
+     * Data for points in the `weight` sample data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.Weight weight = 12; + */ + public Builder mergeWeight(com.google.devicesandservices.health.v4.Weight value) { + if (weightBuilder_ == null) { + if (dataCase_ == 12 + && data_ != com.google.devicesandservices.health.v4.Weight.getDefaultInstance()) { + data_ = + com.google.devicesandservices.health.v4.Weight.newBuilder( + (com.google.devicesandservices.health.v4.Weight) data_) + .mergeFrom(value) + .buildPartial(); + } else { + data_ = value; + } + onChanged(); + } else { + if (dataCase_ == 12) { + weightBuilder_.mergeFrom(value); + } else { + weightBuilder_.setMessage(value); + } + } + dataCase_ = 12; + return this; + } + + /** + * + * + *
+     * Data for points in the `weight` sample data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.Weight weight = 12; + */ + public Builder clearWeight() { + if (weightBuilder_ == null) { + if (dataCase_ == 12) { + dataCase_ = 0; + data_ = null; + onChanged(); + } + } else { + if (dataCase_ == 12) { + dataCase_ = 0; + data_ = null; + } + weightBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Data for points in the `weight` sample data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.Weight weight = 12; + */ + public com.google.devicesandservices.health.v4.Weight.Builder getWeightBuilder() { + return internalGetWeightFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Data for points in the `weight` sample data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.Weight weight = 12; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.WeightOrBuilder getWeightOrBuilder() { + if ((dataCase_ == 12) && (weightBuilder_ != null)) { + return weightBuilder_.getMessageOrBuilder(); + } else { + if (dataCase_ == 12) { + return (com.google.devicesandservices.health.v4.Weight) data_; + } + return com.google.devicesandservices.health.v4.Weight.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Data for points in the `weight` sample data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.Weight weight = 12; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.Weight, + com.google.devicesandservices.health.v4.Weight.Builder, + com.google.devicesandservices.health.v4.WeightOrBuilder> + internalGetWeightFieldBuilder() { + if (weightBuilder_ == null) { + if (!(dataCase_ == 12)) { + data_ = com.google.devicesandservices.health.v4.Weight.getDefaultInstance(); + } + weightBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.Weight, + com.google.devicesandservices.health.v4.Weight.Builder, + com.google.devicesandservices.health.v4.WeightOrBuilder>( + (com.google.devicesandservices.health.v4.Weight) data_, + getParentForChildren(), + isClean()); + data_ = null; + } + dataCase_ = 12; + onChanged(); + return weightBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.Altitude, + com.google.devicesandservices.health.v4.Altitude.Builder, + com.google.devicesandservices.health.v4.AltitudeOrBuilder> + altitudeBuilder_; + + /** + * + * + *
+     * Data for points in the `altitude` interval data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.Altitude altitude = 13; + * + * @return Whether the altitude field is set. + */ + @java.lang.Override + public boolean hasAltitude() { + return dataCase_ == 13; + } + + /** + * + * + *
+     * Data for points in the `altitude` interval data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.Altitude altitude = 13; + * + * @return The altitude. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Altitude getAltitude() { + if (altitudeBuilder_ == null) { + if (dataCase_ == 13) { + return (com.google.devicesandservices.health.v4.Altitude) data_; + } + return com.google.devicesandservices.health.v4.Altitude.getDefaultInstance(); + } else { + if (dataCase_ == 13) { + return altitudeBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.Altitude.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Data for points in the `altitude` interval data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.Altitude altitude = 13; + */ + public Builder setAltitude(com.google.devicesandservices.health.v4.Altitude value) { + if (altitudeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + onChanged(); + } else { + altitudeBuilder_.setMessage(value); + } + dataCase_ = 13; + return this; + } + + /** + * + * + *
+     * Data for points in the `altitude` interval data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.Altitude altitude = 13; + */ + public Builder setAltitude( + com.google.devicesandservices.health.v4.Altitude.Builder builderForValue) { + if (altitudeBuilder_ == null) { + data_ = builderForValue.build(); + onChanged(); + } else { + altitudeBuilder_.setMessage(builderForValue.build()); + } + dataCase_ = 13; + return this; + } + + /** + * + * + *
+     * Data for points in the `altitude` interval data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.Altitude altitude = 13; + */ + public Builder mergeAltitude(com.google.devicesandservices.health.v4.Altitude value) { + if (altitudeBuilder_ == null) { + if (dataCase_ == 13 + && data_ != com.google.devicesandservices.health.v4.Altitude.getDefaultInstance()) { + data_ = + com.google.devicesandservices.health.v4.Altitude.newBuilder( + (com.google.devicesandservices.health.v4.Altitude) data_) + .mergeFrom(value) + .buildPartial(); + } else { + data_ = value; + } + onChanged(); + } else { + if (dataCase_ == 13) { + altitudeBuilder_.mergeFrom(value); + } else { + altitudeBuilder_.setMessage(value); + } + } + dataCase_ = 13; + return this; + } + + /** + * + * + *
+     * Data for points in the `altitude` interval data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.Altitude altitude = 13; + */ + public Builder clearAltitude() { + if (altitudeBuilder_ == null) { + if (dataCase_ == 13) { + dataCase_ = 0; + data_ = null; + onChanged(); + } + } else { + if (dataCase_ == 13) { + dataCase_ = 0; + data_ = null; + } + altitudeBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Data for points in the `altitude` interval data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.Altitude altitude = 13; + */ + public com.google.devicesandservices.health.v4.Altitude.Builder getAltitudeBuilder() { + return internalGetAltitudeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Data for points in the `altitude` interval data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.Altitude altitude = 13; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.AltitudeOrBuilder getAltitudeOrBuilder() { + if ((dataCase_ == 13) && (altitudeBuilder_ != null)) { + return altitudeBuilder_.getMessageOrBuilder(); + } else { + if (dataCase_ == 13) { + return (com.google.devicesandservices.health.v4.Altitude) data_; + } + return com.google.devicesandservices.health.v4.Altitude.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Data for points in the `altitude` interval data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.Altitude altitude = 13; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.Altitude, + com.google.devicesandservices.health.v4.Altitude.Builder, + com.google.devicesandservices.health.v4.AltitudeOrBuilder> + internalGetAltitudeFieldBuilder() { + if (altitudeBuilder_ == null) { + if (!(dataCase_ == 13)) { + data_ = com.google.devicesandservices.health.v4.Altitude.getDefaultInstance(); + } + altitudeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.Altitude, + com.google.devicesandservices.health.v4.Altitude.Builder, + com.google.devicesandservices.health.v4.AltitudeOrBuilder>( + (com.google.devicesandservices.health.v4.Altitude) data_, + getParentForChildren(), + isClean()); + data_ = null; + } + dataCase_ = 13; + onChanged(); + return altitudeBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.Distance, + com.google.devicesandservices.health.v4.Distance.Builder, + com.google.devicesandservices.health.v4.DistanceOrBuilder> + distanceBuilder_; + + /** + * + * + *
+     * Data for points in the `distance` interval data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.Distance distance = 14; + * + * @return Whether the distance field is set. + */ + @java.lang.Override + public boolean hasDistance() { + return dataCase_ == 14; + } + + /** + * + * + *
+     * Data for points in the `distance` interval data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.Distance distance = 14; + * + * @return The distance. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Distance getDistance() { + if (distanceBuilder_ == null) { + if (dataCase_ == 14) { + return (com.google.devicesandservices.health.v4.Distance) data_; + } + return com.google.devicesandservices.health.v4.Distance.getDefaultInstance(); + } else { + if (dataCase_ == 14) { + return distanceBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.Distance.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Data for points in the `distance` interval data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.Distance distance = 14; + */ + public Builder setDistance(com.google.devicesandservices.health.v4.Distance value) { + if (distanceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + onChanged(); + } else { + distanceBuilder_.setMessage(value); + } + dataCase_ = 14; + return this; + } + + /** + * + * + *
+     * Data for points in the `distance` interval data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.Distance distance = 14; + */ + public Builder setDistance( + com.google.devicesandservices.health.v4.Distance.Builder builderForValue) { + if (distanceBuilder_ == null) { + data_ = builderForValue.build(); + onChanged(); + } else { + distanceBuilder_.setMessage(builderForValue.build()); + } + dataCase_ = 14; + return this; + } + + /** + * + * + *
+     * Data for points in the `distance` interval data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.Distance distance = 14; + */ + public Builder mergeDistance(com.google.devicesandservices.health.v4.Distance value) { + if (distanceBuilder_ == null) { + if (dataCase_ == 14 + && data_ != com.google.devicesandservices.health.v4.Distance.getDefaultInstance()) { + data_ = + com.google.devicesandservices.health.v4.Distance.newBuilder( + (com.google.devicesandservices.health.v4.Distance) data_) + .mergeFrom(value) + .buildPartial(); + } else { + data_ = value; + } + onChanged(); + } else { + if (dataCase_ == 14) { + distanceBuilder_.mergeFrom(value); + } else { + distanceBuilder_.setMessage(value); + } + } + dataCase_ = 14; + return this; + } + + /** + * + * + *
+     * Data for points in the `distance` interval data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.Distance distance = 14; + */ + public Builder clearDistance() { + if (distanceBuilder_ == null) { + if (dataCase_ == 14) { + dataCase_ = 0; + data_ = null; + onChanged(); + } + } else { + if (dataCase_ == 14) { + dataCase_ = 0; + data_ = null; + } + distanceBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Data for points in the `distance` interval data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.Distance distance = 14; + */ + public com.google.devicesandservices.health.v4.Distance.Builder getDistanceBuilder() { + return internalGetDistanceFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Data for points in the `distance` interval data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.Distance distance = 14; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DistanceOrBuilder getDistanceOrBuilder() { + if ((dataCase_ == 14) && (distanceBuilder_ != null)) { + return distanceBuilder_.getMessageOrBuilder(); + } else { + if (dataCase_ == 14) { + return (com.google.devicesandservices.health.v4.Distance) data_; + } + return com.google.devicesandservices.health.v4.Distance.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Data for points in the `distance` interval data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.Distance distance = 14; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.Distance, + com.google.devicesandservices.health.v4.Distance.Builder, + com.google.devicesandservices.health.v4.DistanceOrBuilder> + internalGetDistanceFieldBuilder() { + if (distanceBuilder_ == null) { + if (!(dataCase_ == 14)) { + data_ = com.google.devicesandservices.health.v4.Distance.getDefaultInstance(); + } + distanceBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.Distance, + com.google.devicesandservices.health.v4.Distance.Builder, + com.google.devicesandservices.health.v4.DistanceOrBuilder>( + (com.google.devicesandservices.health.v4.Distance) data_, + getParentForChildren(), + isClean()); + data_ = null; + } + dataCase_ = 14; + onChanged(); + return distanceBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.BodyFat, + com.google.devicesandservices.health.v4.BodyFat.Builder, + com.google.devicesandservices.health.v4.BodyFatOrBuilder> + bodyFatBuilder_; + + /** + * + * + *
+     * Data for points in the `body-fat` sample data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.BodyFat body_fat = 15; + * + * @return Whether the bodyFat field is set. + */ + @java.lang.Override + public boolean hasBodyFat() { + return dataCase_ == 15; + } + + /** + * + * + *
+     * Data for points in the `body-fat` sample data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.BodyFat body_fat = 15; + * + * @return The bodyFat. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.BodyFat getBodyFat() { + if (bodyFatBuilder_ == null) { + if (dataCase_ == 15) { + return (com.google.devicesandservices.health.v4.BodyFat) data_; + } + return com.google.devicesandservices.health.v4.BodyFat.getDefaultInstance(); + } else { + if (dataCase_ == 15) { + return bodyFatBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.BodyFat.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Data for points in the `body-fat` sample data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.BodyFat body_fat = 15; + */ + public Builder setBodyFat(com.google.devicesandservices.health.v4.BodyFat value) { + if (bodyFatBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + onChanged(); + } else { + bodyFatBuilder_.setMessage(value); + } + dataCase_ = 15; + return this; + } + + /** + * + * + *
+     * Data for points in the `body-fat` sample data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.BodyFat body_fat = 15; + */ + public Builder setBodyFat( + com.google.devicesandservices.health.v4.BodyFat.Builder builderForValue) { + if (bodyFatBuilder_ == null) { + data_ = builderForValue.build(); + onChanged(); + } else { + bodyFatBuilder_.setMessage(builderForValue.build()); + } + dataCase_ = 15; + return this; + } + + /** + * + * + *
+     * Data for points in the `body-fat` sample data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.BodyFat body_fat = 15; + */ + public Builder mergeBodyFat(com.google.devicesandservices.health.v4.BodyFat value) { + if (bodyFatBuilder_ == null) { + if (dataCase_ == 15 + && data_ != com.google.devicesandservices.health.v4.BodyFat.getDefaultInstance()) { + data_ = + com.google.devicesandservices.health.v4.BodyFat.newBuilder( + (com.google.devicesandservices.health.v4.BodyFat) data_) + .mergeFrom(value) + .buildPartial(); + } else { + data_ = value; + } + onChanged(); + } else { + if (dataCase_ == 15) { + bodyFatBuilder_.mergeFrom(value); + } else { + bodyFatBuilder_.setMessage(value); + } + } + dataCase_ = 15; + return this; + } + + /** + * + * + *
+     * Data for points in the `body-fat` sample data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.BodyFat body_fat = 15; + */ + public Builder clearBodyFat() { + if (bodyFatBuilder_ == null) { + if (dataCase_ == 15) { + dataCase_ = 0; + data_ = null; + onChanged(); + } + } else { + if (dataCase_ == 15) { + dataCase_ = 0; + data_ = null; + } + bodyFatBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Data for points in the `body-fat` sample data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.BodyFat body_fat = 15; + */ + public com.google.devicesandservices.health.v4.BodyFat.Builder getBodyFatBuilder() { + return internalGetBodyFatFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Data for points in the `body-fat` sample data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.BodyFat body_fat = 15; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.BodyFatOrBuilder getBodyFatOrBuilder() { + if ((dataCase_ == 15) && (bodyFatBuilder_ != null)) { + return bodyFatBuilder_.getMessageOrBuilder(); + } else { + if (dataCase_ == 15) { + return (com.google.devicesandservices.health.v4.BodyFat) data_; + } + return com.google.devicesandservices.health.v4.BodyFat.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Data for points in the `body-fat` sample data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.BodyFat body_fat = 15; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.BodyFat, + com.google.devicesandservices.health.v4.BodyFat.Builder, + com.google.devicesandservices.health.v4.BodyFatOrBuilder> + internalGetBodyFatFieldBuilder() { + if (bodyFatBuilder_ == null) { + if (!(dataCase_ == 15)) { + data_ = com.google.devicesandservices.health.v4.BodyFat.getDefaultInstance(); + } + bodyFatBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.BodyFat, + com.google.devicesandservices.health.v4.BodyFat.Builder, + com.google.devicesandservices.health.v4.BodyFatOrBuilder>( + (com.google.devicesandservices.health.v4.BodyFat) data_, + getParentForChildren(), + isClean()); + data_ = null; + } + dataCase_ = 15; + onChanged(); + return bodyFatBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ActiveZoneMinutes, + com.google.devicesandservices.health.v4.ActiveZoneMinutes.Builder, + com.google.devicesandservices.health.v4.ActiveZoneMinutesOrBuilder> + activeZoneMinutesBuilder_; + + /** + * + * + *
+     * Data for points in the `active-zone-minutes` interval data type
+     * collection, measured in minutes.
+     * 
+ * + * .google.devicesandservices.health.v4.ActiveZoneMinutes active_zone_minutes = 17; + * + * @return Whether the activeZoneMinutes field is set. + */ + @java.lang.Override + public boolean hasActiveZoneMinutes() { + return dataCase_ == 17; + } + + /** + * + * + *
+     * Data for points in the `active-zone-minutes` interval data type
+     * collection, measured in minutes.
+     * 
+ * + * .google.devicesandservices.health.v4.ActiveZoneMinutes active_zone_minutes = 17; + * + * @return The activeZoneMinutes. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ActiveZoneMinutes getActiveZoneMinutes() { + if (activeZoneMinutesBuilder_ == null) { + if (dataCase_ == 17) { + return (com.google.devicesandservices.health.v4.ActiveZoneMinutes) data_; + } + return com.google.devicesandservices.health.v4.ActiveZoneMinutes.getDefaultInstance(); + } else { + if (dataCase_ == 17) { + return activeZoneMinutesBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.ActiveZoneMinutes.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Data for points in the `active-zone-minutes` interval data type
+     * collection, measured in minutes.
+     * 
+ * + * .google.devicesandservices.health.v4.ActiveZoneMinutes active_zone_minutes = 17; + */ + public Builder setActiveZoneMinutes( + com.google.devicesandservices.health.v4.ActiveZoneMinutes value) { + if (activeZoneMinutesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + onChanged(); + } else { + activeZoneMinutesBuilder_.setMessage(value); + } + dataCase_ = 17; + return this; + } + + /** + * + * + *
+     * Data for points in the `active-zone-minutes` interval data type
+     * collection, measured in minutes.
+     * 
+ * + * .google.devicesandservices.health.v4.ActiveZoneMinutes active_zone_minutes = 17; + */ + public Builder setActiveZoneMinutes( + com.google.devicesandservices.health.v4.ActiveZoneMinutes.Builder builderForValue) { + if (activeZoneMinutesBuilder_ == null) { + data_ = builderForValue.build(); + onChanged(); + } else { + activeZoneMinutesBuilder_.setMessage(builderForValue.build()); + } + dataCase_ = 17; + return this; + } + + /** + * + * + *
+     * Data for points in the `active-zone-minutes` interval data type
+     * collection, measured in minutes.
+     * 
+ * + * .google.devicesandservices.health.v4.ActiveZoneMinutes active_zone_minutes = 17; + */ + public Builder mergeActiveZoneMinutes( + com.google.devicesandservices.health.v4.ActiveZoneMinutes value) { + if (activeZoneMinutesBuilder_ == null) { + if (dataCase_ == 17 + && data_ + != com.google.devicesandservices.health.v4.ActiveZoneMinutes.getDefaultInstance()) { + data_ = + com.google.devicesandservices.health.v4.ActiveZoneMinutes.newBuilder( + (com.google.devicesandservices.health.v4.ActiveZoneMinutes) data_) + .mergeFrom(value) + .buildPartial(); + } else { + data_ = value; + } + onChanged(); + } else { + if (dataCase_ == 17) { + activeZoneMinutesBuilder_.mergeFrom(value); + } else { + activeZoneMinutesBuilder_.setMessage(value); + } + } + dataCase_ = 17; + return this; + } + + /** + * + * + *
+     * Data for points in the `active-zone-minutes` interval data type
+     * collection, measured in minutes.
+     * 
+ * + * .google.devicesandservices.health.v4.ActiveZoneMinutes active_zone_minutes = 17; + */ + public Builder clearActiveZoneMinutes() { + if (activeZoneMinutesBuilder_ == null) { + if (dataCase_ == 17) { + dataCase_ = 0; + data_ = null; + onChanged(); + } + } else { + if (dataCase_ == 17) { + dataCase_ = 0; + data_ = null; + } + activeZoneMinutesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Data for points in the `active-zone-minutes` interval data type
+     * collection, measured in minutes.
+     * 
+ * + * .google.devicesandservices.health.v4.ActiveZoneMinutes active_zone_minutes = 17; + */ + public com.google.devicesandservices.health.v4.ActiveZoneMinutes.Builder + getActiveZoneMinutesBuilder() { + return internalGetActiveZoneMinutesFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Data for points in the `active-zone-minutes` interval data type
+     * collection, measured in minutes.
+     * 
+ * + * .google.devicesandservices.health.v4.ActiveZoneMinutes active_zone_minutes = 17; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ActiveZoneMinutesOrBuilder + getActiveZoneMinutesOrBuilder() { + if ((dataCase_ == 17) && (activeZoneMinutesBuilder_ != null)) { + return activeZoneMinutesBuilder_.getMessageOrBuilder(); + } else { + if (dataCase_ == 17) { + return (com.google.devicesandservices.health.v4.ActiveZoneMinutes) data_; + } + return com.google.devicesandservices.health.v4.ActiveZoneMinutes.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Data for points in the `active-zone-minutes` interval data type
+     * collection, measured in minutes.
+     * 
+ * + * .google.devicesandservices.health.v4.ActiveZoneMinutes active_zone_minutes = 17; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ActiveZoneMinutes, + com.google.devicesandservices.health.v4.ActiveZoneMinutes.Builder, + com.google.devicesandservices.health.v4.ActiveZoneMinutesOrBuilder> + internalGetActiveZoneMinutesFieldBuilder() { + if (activeZoneMinutesBuilder_ == null) { + if (!(dataCase_ == 17)) { + data_ = com.google.devicesandservices.health.v4.ActiveZoneMinutes.getDefaultInstance(); + } + activeZoneMinutesBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ActiveZoneMinutes, + com.google.devicesandservices.health.v4.ActiveZoneMinutes.Builder, + com.google.devicesandservices.health.v4.ActiveZoneMinutesOrBuilder>( + (com.google.devicesandservices.health.v4.ActiveZoneMinutes) data_, + getParentForChildren(), + isClean()); + data_ = null; + } + dataCase_ = 17; + onChanged(); + return activeZoneMinutesBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.HeartRateVariability, + com.google.devicesandservices.health.v4.HeartRateVariability.Builder, + com.google.devicesandservices.health.v4.HeartRateVariabilityOrBuilder> + heartRateVariabilityBuilder_; + + /** + * + * + *
+     * Data for points in the `heart-rate-variability` sample data type
+     * collection.
+     * 
+ * + * .google.devicesandservices.health.v4.HeartRateVariability heart_rate_variability = 19; + * + * + * @return Whether the heartRateVariability field is set. + */ + @java.lang.Override + public boolean hasHeartRateVariability() { + return dataCase_ == 19; + } + + /** + * + * + *
+     * Data for points in the `heart-rate-variability` sample data type
+     * collection.
+     * 
+ * + * .google.devicesandservices.health.v4.HeartRateVariability heart_rate_variability = 19; + * + * + * @return The heartRateVariability. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.HeartRateVariability getHeartRateVariability() { + if (heartRateVariabilityBuilder_ == null) { + if (dataCase_ == 19) { + return (com.google.devicesandservices.health.v4.HeartRateVariability) data_; + } + return com.google.devicesandservices.health.v4.HeartRateVariability.getDefaultInstance(); + } else { + if (dataCase_ == 19) { + return heartRateVariabilityBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.HeartRateVariability.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Data for points in the `heart-rate-variability` sample data type
+     * collection.
+     * 
+ * + * .google.devicesandservices.health.v4.HeartRateVariability heart_rate_variability = 19; + * + */ + public Builder setHeartRateVariability( + com.google.devicesandservices.health.v4.HeartRateVariability value) { + if (heartRateVariabilityBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + onChanged(); + } else { + heartRateVariabilityBuilder_.setMessage(value); + } + dataCase_ = 19; + return this; + } + + /** + * + * + *
+     * Data for points in the `heart-rate-variability` sample data type
+     * collection.
+     * 
+ * + * .google.devicesandservices.health.v4.HeartRateVariability heart_rate_variability = 19; + * + */ + public Builder setHeartRateVariability( + com.google.devicesandservices.health.v4.HeartRateVariability.Builder builderForValue) { + if (heartRateVariabilityBuilder_ == null) { + data_ = builderForValue.build(); + onChanged(); + } else { + heartRateVariabilityBuilder_.setMessage(builderForValue.build()); + } + dataCase_ = 19; + return this; + } + + /** + * + * + *
+     * Data for points in the `heart-rate-variability` sample data type
+     * collection.
+     * 
+ * + * .google.devicesandservices.health.v4.HeartRateVariability heart_rate_variability = 19; + * + */ + public Builder mergeHeartRateVariability( + com.google.devicesandservices.health.v4.HeartRateVariability value) { + if (heartRateVariabilityBuilder_ == null) { + if (dataCase_ == 19 + && data_ + != com.google.devicesandservices.health.v4.HeartRateVariability + .getDefaultInstance()) { + data_ = + com.google.devicesandservices.health.v4.HeartRateVariability.newBuilder( + (com.google.devicesandservices.health.v4.HeartRateVariability) data_) + .mergeFrom(value) + .buildPartial(); + } else { + data_ = value; + } + onChanged(); + } else { + if (dataCase_ == 19) { + heartRateVariabilityBuilder_.mergeFrom(value); + } else { + heartRateVariabilityBuilder_.setMessage(value); + } + } + dataCase_ = 19; + return this; + } + + /** + * + * + *
+     * Data for points in the `heart-rate-variability` sample data type
+     * collection.
+     * 
+ * + * .google.devicesandservices.health.v4.HeartRateVariability heart_rate_variability = 19; + * + */ + public Builder clearHeartRateVariability() { + if (heartRateVariabilityBuilder_ == null) { + if (dataCase_ == 19) { + dataCase_ = 0; + data_ = null; + onChanged(); + } + } else { + if (dataCase_ == 19) { + dataCase_ = 0; + data_ = null; + } + heartRateVariabilityBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Data for points in the `heart-rate-variability` sample data type
+     * collection.
+     * 
+ * + * .google.devicesandservices.health.v4.HeartRateVariability heart_rate_variability = 19; + * + */ + public com.google.devicesandservices.health.v4.HeartRateVariability.Builder + getHeartRateVariabilityBuilder() { + return internalGetHeartRateVariabilityFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Data for points in the `heart-rate-variability` sample data type
+     * collection.
+     * 
+ * + * .google.devicesandservices.health.v4.HeartRateVariability heart_rate_variability = 19; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.HeartRateVariabilityOrBuilder + getHeartRateVariabilityOrBuilder() { + if ((dataCase_ == 19) && (heartRateVariabilityBuilder_ != null)) { + return heartRateVariabilityBuilder_.getMessageOrBuilder(); + } else { + if (dataCase_ == 19) { + return (com.google.devicesandservices.health.v4.HeartRateVariability) data_; + } + return com.google.devicesandservices.health.v4.HeartRateVariability.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Data for points in the `heart-rate-variability` sample data type
+     * collection.
+     * 
+ * + * .google.devicesandservices.health.v4.HeartRateVariability heart_rate_variability = 19; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.HeartRateVariability, + com.google.devicesandservices.health.v4.HeartRateVariability.Builder, + com.google.devicesandservices.health.v4.HeartRateVariabilityOrBuilder> + internalGetHeartRateVariabilityFieldBuilder() { + if (heartRateVariabilityBuilder_ == null) { + if (!(dataCase_ == 19)) { + data_ = com.google.devicesandservices.health.v4.HeartRateVariability.getDefaultInstance(); + } + heartRateVariabilityBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.HeartRateVariability, + com.google.devicesandservices.health.v4.HeartRateVariability.Builder, + com.google.devicesandservices.health.v4.HeartRateVariabilityOrBuilder>( + (com.google.devicesandservices.health.v4.HeartRateVariability) data_, + getParentForChildren(), + isClean()); + data_ = null; + } + dataCase_ = 19; + onChanged(); + return heartRateVariabilityBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations, + com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations.Builder, + com.google.devicesandservices.health.v4.DailySleepTemperatureDerivationsOrBuilder> + dailySleepTemperatureDerivationsBuilder_; + + /** + * + * + *
+     * Data for points in the `daily-sleep-temperature-derivations` daily data
+     * type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailySleepTemperatureDerivations daily_sleep_temperature_derivations = 20; + * + * + * @return Whether the dailySleepTemperatureDerivations field is set. + */ + @java.lang.Override + public boolean hasDailySleepTemperatureDerivations() { + return dataCase_ == 20; + } + + /** + * + * + *
+     * Data for points in the `daily-sleep-temperature-derivations` daily data
+     * type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailySleepTemperatureDerivations daily_sleep_temperature_derivations = 20; + * + * + * @return The dailySleepTemperatureDerivations. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations + getDailySleepTemperatureDerivations() { + if (dailySleepTemperatureDerivationsBuilder_ == null) { + if (dataCase_ == 20) { + return (com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations) data_; + } + return com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations + .getDefaultInstance(); + } else { + if (dataCase_ == 20) { + return dailySleepTemperatureDerivationsBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Data for points in the `daily-sleep-temperature-derivations` daily data
+     * type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailySleepTemperatureDerivations daily_sleep_temperature_derivations = 20; + * + */ + public Builder setDailySleepTemperatureDerivations( + com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations value) { + if (dailySleepTemperatureDerivationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + onChanged(); + } else { + dailySleepTemperatureDerivationsBuilder_.setMessage(value); + } + dataCase_ = 20; + return this; + } + + /** + * + * + *
+     * Data for points in the `daily-sleep-temperature-derivations` daily data
+     * type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailySleepTemperatureDerivations daily_sleep_temperature_derivations = 20; + * + */ + public Builder setDailySleepTemperatureDerivations( + com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations.Builder + builderForValue) { + if (dailySleepTemperatureDerivationsBuilder_ == null) { + data_ = builderForValue.build(); + onChanged(); + } else { + dailySleepTemperatureDerivationsBuilder_.setMessage(builderForValue.build()); + } + dataCase_ = 20; + return this; + } + + /** + * + * + *
+     * Data for points in the `daily-sleep-temperature-derivations` daily data
+     * type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailySleepTemperatureDerivations daily_sleep_temperature_derivations = 20; + * + */ + public Builder mergeDailySleepTemperatureDerivations( + com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations value) { + if (dailySleepTemperatureDerivationsBuilder_ == null) { + if (dataCase_ == 20 + && data_ + != com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations + .getDefaultInstance()) { + data_ = + com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations.newBuilder( + (com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations) + data_) + .mergeFrom(value) + .buildPartial(); + } else { + data_ = value; + } + onChanged(); + } else { + if (dataCase_ == 20) { + dailySleepTemperatureDerivationsBuilder_.mergeFrom(value); + } else { + dailySleepTemperatureDerivationsBuilder_.setMessage(value); + } + } + dataCase_ = 20; + return this; + } + + /** + * + * + *
+     * Data for points in the `daily-sleep-temperature-derivations` daily data
+     * type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailySleepTemperatureDerivations daily_sleep_temperature_derivations = 20; + * + */ + public Builder clearDailySleepTemperatureDerivations() { + if (dailySleepTemperatureDerivationsBuilder_ == null) { + if (dataCase_ == 20) { + dataCase_ = 0; + data_ = null; + onChanged(); + } + } else { + if (dataCase_ == 20) { + dataCase_ = 0; + data_ = null; + } + dailySleepTemperatureDerivationsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Data for points in the `daily-sleep-temperature-derivations` daily data
+     * type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailySleepTemperatureDerivations daily_sleep_temperature_derivations = 20; + * + */ + public com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations.Builder + getDailySleepTemperatureDerivationsBuilder() { + return internalGetDailySleepTemperatureDerivationsFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Data for points in the `daily-sleep-temperature-derivations` daily data
+     * type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailySleepTemperatureDerivations daily_sleep_temperature_derivations = 20; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DailySleepTemperatureDerivationsOrBuilder + getDailySleepTemperatureDerivationsOrBuilder() { + if ((dataCase_ == 20) && (dailySleepTemperatureDerivationsBuilder_ != null)) { + return dailySleepTemperatureDerivationsBuilder_.getMessageOrBuilder(); + } else { + if (dataCase_ == 20) { + return (com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations) data_; + } + return com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Data for points in the `daily-sleep-temperature-derivations` daily data
+     * type collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailySleepTemperatureDerivations daily_sleep_temperature_derivations = 20; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations, + com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations.Builder, + com.google.devicesandservices.health.v4.DailySleepTemperatureDerivationsOrBuilder> + internalGetDailySleepTemperatureDerivationsFieldBuilder() { + if (dailySleepTemperatureDerivationsBuilder_ == null) { + if (!(dataCase_ == 20)) { + data_ = + com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations + .getDefaultInstance(); + } + dailySleepTemperatureDerivationsBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations, + com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations.Builder, + com.google.devicesandservices.health.v4.DailySleepTemperatureDerivationsOrBuilder>( + (com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations) data_, + getParentForChildren(), + isClean()); + data_ = null; + } + dataCase_ = 20; + onChanged(); + return dailySleepTemperatureDerivationsBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.SedentaryPeriod, + com.google.devicesandservices.health.v4.SedentaryPeriod.Builder, + com.google.devicesandservices.health.v4.SedentaryPeriodOrBuilder> + sedentaryPeriodBuilder_; + + /** + * + * + *
+     * Data for points in the `sedentary-period` interval data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.SedentaryPeriod sedentary_period = 21; + * + * @return Whether the sedentaryPeriod field is set. + */ + @java.lang.Override + public boolean hasSedentaryPeriod() { + return dataCase_ == 21; + } + + /** + * + * + *
+     * Data for points in the `sedentary-period` interval data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.SedentaryPeriod sedentary_period = 21; + * + * @return The sedentaryPeriod. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.SedentaryPeriod getSedentaryPeriod() { + if (sedentaryPeriodBuilder_ == null) { + if (dataCase_ == 21) { + return (com.google.devicesandservices.health.v4.SedentaryPeriod) data_; + } + return com.google.devicesandservices.health.v4.SedentaryPeriod.getDefaultInstance(); + } else { + if (dataCase_ == 21) { + return sedentaryPeriodBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.SedentaryPeriod.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Data for points in the `sedentary-period` interval data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.SedentaryPeriod sedentary_period = 21; + */ + public Builder setSedentaryPeriod( + com.google.devicesandservices.health.v4.SedentaryPeriod value) { + if (sedentaryPeriodBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + onChanged(); + } else { + sedentaryPeriodBuilder_.setMessage(value); + } + dataCase_ = 21; + return this; + } + + /** + * + * + *
+     * Data for points in the `sedentary-period` interval data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.SedentaryPeriod sedentary_period = 21; + */ + public Builder setSedentaryPeriod( + com.google.devicesandservices.health.v4.SedentaryPeriod.Builder builderForValue) { + if (sedentaryPeriodBuilder_ == null) { + data_ = builderForValue.build(); + onChanged(); + } else { + sedentaryPeriodBuilder_.setMessage(builderForValue.build()); + } + dataCase_ = 21; + return this; + } + + /** + * + * + *
+     * Data for points in the `sedentary-period` interval data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.SedentaryPeriod sedentary_period = 21; + */ + public Builder mergeSedentaryPeriod( + com.google.devicesandservices.health.v4.SedentaryPeriod value) { + if (sedentaryPeriodBuilder_ == null) { + if (dataCase_ == 21 + && data_ + != com.google.devicesandservices.health.v4.SedentaryPeriod.getDefaultInstance()) { + data_ = + com.google.devicesandservices.health.v4.SedentaryPeriod.newBuilder( + (com.google.devicesandservices.health.v4.SedentaryPeriod) data_) + .mergeFrom(value) + .buildPartial(); + } else { + data_ = value; + } + onChanged(); + } else { + if (dataCase_ == 21) { + sedentaryPeriodBuilder_.mergeFrom(value); + } else { + sedentaryPeriodBuilder_.setMessage(value); + } + } + dataCase_ = 21; + return this; + } + + /** + * + * + *
+     * Data for points in the `sedentary-period` interval data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.SedentaryPeriod sedentary_period = 21; + */ + public Builder clearSedentaryPeriod() { + if (sedentaryPeriodBuilder_ == null) { + if (dataCase_ == 21) { + dataCase_ = 0; + data_ = null; + onChanged(); + } + } else { + if (dataCase_ == 21) { + dataCase_ = 0; + data_ = null; + } + sedentaryPeriodBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Data for points in the `sedentary-period` interval data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.SedentaryPeriod sedentary_period = 21; + */ + public com.google.devicesandservices.health.v4.SedentaryPeriod.Builder + getSedentaryPeriodBuilder() { + return internalGetSedentaryPeriodFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Data for points in the `sedentary-period` interval data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.SedentaryPeriod sedentary_period = 21; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.SedentaryPeriodOrBuilder + getSedentaryPeriodOrBuilder() { + if ((dataCase_ == 21) && (sedentaryPeriodBuilder_ != null)) { + return sedentaryPeriodBuilder_.getMessageOrBuilder(); + } else { + if (dataCase_ == 21) { + return (com.google.devicesandservices.health.v4.SedentaryPeriod) data_; + } + return com.google.devicesandservices.health.v4.SedentaryPeriod.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Data for points in the `sedentary-period` interval data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.SedentaryPeriod sedentary_period = 21; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.SedentaryPeriod, + com.google.devicesandservices.health.v4.SedentaryPeriod.Builder, + com.google.devicesandservices.health.v4.SedentaryPeriodOrBuilder> + internalGetSedentaryPeriodFieldBuilder() { + if (sedentaryPeriodBuilder_ == null) { + if (!(dataCase_ == 21)) { + data_ = com.google.devicesandservices.health.v4.SedentaryPeriod.getDefaultInstance(); + } + sedentaryPeriodBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.SedentaryPeriod, + com.google.devicesandservices.health.v4.SedentaryPeriod.Builder, + com.google.devicesandservices.health.v4.SedentaryPeriodOrBuilder>( + (com.google.devicesandservices.health.v4.SedentaryPeriod) data_, + getParentForChildren(), + isClean()); + data_ = null; + } + dataCase_ = 21; + onChanged(); + return sedentaryPeriodBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.RunVO2Max, + com.google.devicesandservices.health.v4.RunVO2Max.Builder, + com.google.devicesandservices.health.v4.RunVO2MaxOrBuilder> + runVo2MaxBuilder_; + + /** + * + * + *
+     * Data for points in the `run-vo2-max` sample data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.RunVO2Max run_vo2_max = 22; + * + * @return Whether the runVo2Max field is set. + */ + @java.lang.Override + public boolean hasRunVo2Max() { + return dataCase_ == 22; + } + + /** + * + * + *
+     * Data for points in the `run-vo2-max` sample data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.RunVO2Max run_vo2_max = 22; + * + * @return The runVo2Max. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.RunVO2Max getRunVo2Max() { + if (runVo2MaxBuilder_ == null) { + if (dataCase_ == 22) { + return (com.google.devicesandservices.health.v4.RunVO2Max) data_; + } + return com.google.devicesandservices.health.v4.RunVO2Max.getDefaultInstance(); + } else { + if (dataCase_ == 22) { + return runVo2MaxBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.RunVO2Max.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Data for points in the `run-vo2-max` sample data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.RunVO2Max run_vo2_max = 22; + */ + public Builder setRunVo2Max(com.google.devicesandservices.health.v4.RunVO2Max value) { + if (runVo2MaxBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + onChanged(); + } else { + runVo2MaxBuilder_.setMessage(value); + } + dataCase_ = 22; + return this; + } + + /** + * + * + *
+     * Data for points in the `run-vo2-max` sample data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.RunVO2Max run_vo2_max = 22; + */ + public Builder setRunVo2Max( + com.google.devicesandservices.health.v4.RunVO2Max.Builder builderForValue) { + if (runVo2MaxBuilder_ == null) { + data_ = builderForValue.build(); + onChanged(); + } else { + runVo2MaxBuilder_.setMessage(builderForValue.build()); + } + dataCase_ = 22; + return this; + } + + /** + * + * + *
+     * Data for points in the `run-vo2-max` sample data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.RunVO2Max run_vo2_max = 22; + */ + public Builder mergeRunVo2Max(com.google.devicesandservices.health.v4.RunVO2Max value) { + if (runVo2MaxBuilder_ == null) { + if (dataCase_ == 22 + && data_ != com.google.devicesandservices.health.v4.RunVO2Max.getDefaultInstance()) { + data_ = + com.google.devicesandservices.health.v4.RunVO2Max.newBuilder( + (com.google.devicesandservices.health.v4.RunVO2Max) data_) + .mergeFrom(value) + .buildPartial(); + } else { + data_ = value; + } + onChanged(); + } else { + if (dataCase_ == 22) { + runVo2MaxBuilder_.mergeFrom(value); + } else { + runVo2MaxBuilder_.setMessage(value); + } + } + dataCase_ = 22; + return this; + } + + /** + * + * + *
+     * Data for points in the `run-vo2-max` sample data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.RunVO2Max run_vo2_max = 22; + */ + public Builder clearRunVo2Max() { + if (runVo2MaxBuilder_ == null) { + if (dataCase_ == 22) { + dataCase_ = 0; + data_ = null; + onChanged(); + } + } else { + if (dataCase_ == 22) { + dataCase_ = 0; + data_ = null; + } + runVo2MaxBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Data for points in the `run-vo2-max` sample data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.RunVO2Max run_vo2_max = 22; + */ + public com.google.devicesandservices.health.v4.RunVO2Max.Builder getRunVo2MaxBuilder() { + return internalGetRunVo2MaxFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Data for points in the `run-vo2-max` sample data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.RunVO2Max run_vo2_max = 22; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.RunVO2MaxOrBuilder getRunVo2MaxOrBuilder() { + if ((dataCase_ == 22) && (runVo2MaxBuilder_ != null)) { + return runVo2MaxBuilder_.getMessageOrBuilder(); + } else { + if (dataCase_ == 22) { + return (com.google.devicesandservices.health.v4.RunVO2Max) data_; + } + return com.google.devicesandservices.health.v4.RunVO2Max.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Data for points in the `run-vo2-max` sample data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.RunVO2Max run_vo2_max = 22; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.RunVO2Max, + com.google.devicesandservices.health.v4.RunVO2Max.Builder, + com.google.devicesandservices.health.v4.RunVO2MaxOrBuilder> + internalGetRunVo2MaxFieldBuilder() { + if (runVo2MaxBuilder_ == null) { + if (!(dataCase_ == 22)) { + data_ = com.google.devicesandservices.health.v4.RunVO2Max.getDefaultInstance(); + } + runVo2MaxBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.RunVO2Max, + com.google.devicesandservices.health.v4.RunVO2Max.Builder, + com.google.devicesandservices.health.v4.RunVO2MaxOrBuilder>( + (com.google.devicesandservices.health.v4.RunVO2Max) data_, + getParentForChildren(), + isClean()); + data_ = null; + } + dataCase_ = 22; + onChanged(); + return runVo2MaxBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.OxygenSaturation, + com.google.devicesandservices.health.v4.OxygenSaturation.Builder, + com.google.devicesandservices.health.v4.OxygenSaturationOrBuilder> + oxygenSaturationBuilder_; + + /** + * + * + *
+     * Data for points in the `oxygen-saturation` sample data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.OxygenSaturation oxygen_saturation = 24; + * + * @return Whether the oxygenSaturation field is set. + */ + @java.lang.Override + public boolean hasOxygenSaturation() { + return dataCase_ == 24; + } + + /** + * + * + *
+     * Data for points in the `oxygen-saturation` sample data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.OxygenSaturation oxygen_saturation = 24; + * + * @return The oxygenSaturation. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.OxygenSaturation getOxygenSaturation() { + if (oxygenSaturationBuilder_ == null) { + if (dataCase_ == 24) { + return (com.google.devicesandservices.health.v4.OxygenSaturation) data_; + } + return com.google.devicesandservices.health.v4.OxygenSaturation.getDefaultInstance(); + } else { + if (dataCase_ == 24) { + return oxygenSaturationBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.OxygenSaturation.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Data for points in the `oxygen-saturation` sample data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.OxygenSaturation oxygen_saturation = 24; + */ + public Builder setOxygenSaturation( + com.google.devicesandservices.health.v4.OxygenSaturation value) { + if (oxygenSaturationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + onChanged(); + } else { + oxygenSaturationBuilder_.setMessage(value); + } + dataCase_ = 24; + return this; + } + + /** + * + * + *
+     * Data for points in the `oxygen-saturation` sample data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.OxygenSaturation oxygen_saturation = 24; + */ + public Builder setOxygenSaturation( + com.google.devicesandservices.health.v4.OxygenSaturation.Builder builderForValue) { + if (oxygenSaturationBuilder_ == null) { + data_ = builderForValue.build(); + onChanged(); + } else { + oxygenSaturationBuilder_.setMessage(builderForValue.build()); + } + dataCase_ = 24; + return this; + } + + /** + * + * + *
+     * Data for points in the `oxygen-saturation` sample data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.OxygenSaturation oxygen_saturation = 24; + */ + public Builder mergeOxygenSaturation( + com.google.devicesandservices.health.v4.OxygenSaturation value) { + if (oxygenSaturationBuilder_ == null) { + if (dataCase_ == 24 + && data_ + != com.google.devicesandservices.health.v4.OxygenSaturation.getDefaultInstance()) { + data_ = + com.google.devicesandservices.health.v4.OxygenSaturation.newBuilder( + (com.google.devicesandservices.health.v4.OxygenSaturation) data_) + .mergeFrom(value) + .buildPartial(); + } else { + data_ = value; + } + onChanged(); + } else { + if (dataCase_ == 24) { + oxygenSaturationBuilder_.mergeFrom(value); + } else { + oxygenSaturationBuilder_.setMessage(value); + } + } + dataCase_ = 24; + return this; + } + + /** + * + * + *
+     * Data for points in the `oxygen-saturation` sample data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.OxygenSaturation oxygen_saturation = 24; + */ + public Builder clearOxygenSaturation() { + if (oxygenSaturationBuilder_ == null) { + if (dataCase_ == 24) { + dataCase_ = 0; + data_ = null; + onChanged(); + } + } else { + if (dataCase_ == 24) { + dataCase_ = 0; + data_ = null; + } + oxygenSaturationBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Data for points in the `oxygen-saturation` sample data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.OxygenSaturation oxygen_saturation = 24; + */ + public com.google.devicesandservices.health.v4.OxygenSaturation.Builder + getOxygenSaturationBuilder() { + return internalGetOxygenSaturationFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Data for points in the `oxygen-saturation` sample data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.OxygenSaturation oxygen_saturation = 24; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.OxygenSaturationOrBuilder + getOxygenSaturationOrBuilder() { + if ((dataCase_ == 24) && (oxygenSaturationBuilder_ != null)) { + return oxygenSaturationBuilder_.getMessageOrBuilder(); + } else { + if (dataCase_ == 24) { + return (com.google.devicesandservices.health.v4.OxygenSaturation) data_; + } + return com.google.devicesandservices.health.v4.OxygenSaturation.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Data for points in the `oxygen-saturation` sample data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.OxygenSaturation oxygen_saturation = 24; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.OxygenSaturation, + com.google.devicesandservices.health.v4.OxygenSaturation.Builder, + com.google.devicesandservices.health.v4.OxygenSaturationOrBuilder> + internalGetOxygenSaturationFieldBuilder() { + if (oxygenSaturationBuilder_ == null) { + if (!(dataCase_ == 24)) { + data_ = com.google.devicesandservices.health.v4.OxygenSaturation.getDefaultInstance(); + } + oxygenSaturationBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.OxygenSaturation, + com.google.devicesandservices.health.v4.OxygenSaturation.Builder, + com.google.devicesandservices.health.v4.OxygenSaturationOrBuilder>( + (com.google.devicesandservices.health.v4.OxygenSaturation) data_, + getParentForChildren(), + isClean()); + data_ = null; + } + dataCase_ = 24; + onChanged(); + return oxygenSaturationBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.DailyOxygenSaturation, + com.google.devicesandservices.health.v4.DailyOxygenSaturation.Builder, + com.google.devicesandservices.health.v4.DailyOxygenSaturationOrBuilder> + dailyOxygenSaturationBuilder_; + + /** + * + * + *
+     * Data for points in the `daily-oxygen-saturation` daily data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyOxygenSaturation daily_oxygen_saturation = 25; + * + * + * @return Whether the dailyOxygenSaturation field is set. + */ + @java.lang.Override + public boolean hasDailyOxygenSaturation() { + return dataCase_ == 25; + } + + /** + * + * + *
+     * Data for points in the `daily-oxygen-saturation` daily data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyOxygenSaturation daily_oxygen_saturation = 25; + * + * + * @return The dailyOxygenSaturation. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyOxygenSaturation + getDailyOxygenSaturation() { + if (dailyOxygenSaturationBuilder_ == null) { + if (dataCase_ == 25) { + return (com.google.devicesandservices.health.v4.DailyOxygenSaturation) data_; + } + return com.google.devicesandservices.health.v4.DailyOxygenSaturation.getDefaultInstance(); + } else { + if (dataCase_ == 25) { + return dailyOxygenSaturationBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.DailyOxygenSaturation.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Data for points in the `daily-oxygen-saturation` daily data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyOxygenSaturation daily_oxygen_saturation = 25; + * + */ + public Builder setDailyOxygenSaturation( + com.google.devicesandservices.health.v4.DailyOxygenSaturation value) { + if (dailyOxygenSaturationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + onChanged(); + } else { + dailyOxygenSaturationBuilder_.setMessage(value); + } + dataCase_ = 25; + return this; + } + + /** + * + * + *
+     * Data for points in the `daily-oxygen-saturation` daily data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyOxygenSaturation daily_oxygen_saturation = 25; + * + */ + public Builder setDailyOxygenSaturation( + com.google.devicesandservices.health.v4.DailyOxygenSaturation.Builder builderForValue) { + if (dailyOxygenSaturationBuilder_ == null) { + data_ = builderForValue.build(); + onChanged(); + } else { + dailyOxygenSaturationBuilder_.setMessage(builderForValue.build()); + } + dataCase_ = 25; + return this; + } + + /** + * + * + *
+     * Data for points in the `daily-oxygen-saturation` daily data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyOxygenSaturation daily_oxygen_saturation = 25; + * + */ + public Builder mergeDailyOxygenSaturation( + com.google.devicesandservices.health.v4.DailyOxygenSaturation value) { + if (dailyOxygenSaturationBuilder_ == null) { + if (dataCase_ == 25 + && data_ + != com.google.devicesandservices.health.v4.DailyOxygenSaturation + .getDefaultInstance()) { + data_ = + com.google.devicesandservices.health.v4.DailyOxygenSaturation.newBuilder( + (com.google.devicesandservices.health.v4.DailyOxygenSaturation) data_) + .mergeFrom(value) + .buildPartial(); + } else { + data_ = value; + } + onChanged(); + } else { + if (dataCase_ == 25) { + dailyOxygenSaturationBuilder_.mergeFrom(value); + } else { + dailyOxygenSaturationBuilder_.setMessage(value); + } + } + dataCase_ = 25; + return this; + } + + /** + * + * + *
+     * Data for points in the `daily-oxygen-saturation` daily data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyOxygenSaturation daily_oxygen_saturation = 25; + * + */ + public Builder clearDailyOxygenSaturation() { + if (dailyOxygenSaturationBuilder_ == null) { + if (dataCase_ == 25) { + dataCase_ = 0; + data_ = null; + onChanged(); + } + } else { + if (dataCase_ == 25) { + dataCase_ = 0; + data_ = null; + } + dailyOxygenSaturationBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Data for points in the `daily-oxygen-saturation` daily data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyOxygenSaturation daily_oxygen_saturation = 25; + * + */ + public com.google.devicesandservices.health.v4.DailyOxygenSaturation.Builder + getDailyOxygenSaturationBuilder() { + return internalGetDailyOxygenSaturationFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Data for points in the `daily-oxygen-saturation` daily data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyOxygenSaturation daily_oxygen_saturation = 25; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyOxygenSaturationOrBuilder + getDailyOxygenSaturationOrBuilder() { + if ((dataCase_ == 25) && (dailyOxygenSaturationBuilder_ != null)) { + return dailyOxygenSaturationBuilder_.getMessageOrBuilder(); + } else { + if (dataCase_ == 25) { + return (com.google.devicesandservices.health.v4.DailyOxygenSaturation) data_; + } + return com.google.devicesandservices.health.v4.DailyOxygenSaturation.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Data for points in the `daily-oxygen-saturation` daily data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.DailyOxygenSaturation daily_oxygen_saturation = 25; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.DailyOxygenSaturation, + com.google.devicesandservices.health.v4.DailyOxygenSaturation.Builder, + com.google.devicesandservices.health.v4.DailyOxygenSaturationOrBuilder> + internalGetDailyOxygenSaturationFieldBuilder() { + if (dailyOxygenSaturationBuilder_ == null) { + if (!(dataCase_ == 25)) { + data_ = + com.google.devicesandservices.health.v4.DailyOxygenSaturation.getDefaultInstance(); + } + dailyOxygenSaturationBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.DailyOxygenSaturation, + com.google.devicesandservices.health.v4.DailyOxygenSaturation.Builder, + com.google.devicesandservices.health.v4.DailyOxygenSaturationOrBuilder>( + (com.google.devicesandservices.health.v4.DailyOxygenSaturation) data_, + getParentForChildren(), + isClean()); + data_ = null; + } + dataCase_ = 25; + onChanged(); + return dailyOxygenSaturationBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ActivityLevel, + com.google.devicesandservices.health.v4.ActivityLevel.Builder, + com.google.devicesandservices.health.v4.ActivityLevelOrBuilder> + activityLevelBuilder_; + + /** + * + * + *
+     * Data for points in the `activity-level` daily data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.ActivityLevel activity_level = 26; + * + * @return Whether the activityLevel field is set. + */ + @java.lang.Override + public boolean hasActivityLevel() { + return dataCase_ == 26; + } + + /** + * + * + *
+     * Data for points in the `activity-level` daily data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.ActivityLevel activity_level = 26; + * + * @return The activityLevel. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ActivityLevel getActivityLevel() { + if (activityLevelBuilder_ == null) { + if (dataCase_ == 26) { + return (com.google.devicesandservices.health.v4.ActivityLevel) data_; + } + return com.google.devicesandservices.health.v4.ActivityLevel.getDefaultInstance(); + } else { + if (dataCase_ == 26) { + return activityLevelBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.ActivityLevel.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Data for points in the `activity-level` daily data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.ActivityLevel activity_level = 26; + */ + public Builder setActivityLevel(com.google.devicesandservices.health.v4.ActivityLevel value) { + if (activityLevelBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + onChanged(); + } else { + activityLevelBuilder_.setMessage(value); + } + dataCase_ = 26; + return this; + } + + /** + * + * + *
+     * Data for points in the `activity-level` daily data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.ActivityLevel activity_level = 26; + */ + public Builder setActivityLevel( + com.google.devicesandservices.health.v4.ActivityLevel.Builder builderForValue) { + if (activityLevelBuilder_ == null) { + data_ = builderForValue.build(); + onChanged(); + } else { + activityLevelBuilder_.setMessage(builderForValue.build()); + } + dataCase_ = 26; + return this; + } + + /** + * + * + *
+     * Data for points in the `activity-level` daily data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.ActivityLevel activity_level = 26; + */ + public Builder mergeActivityLevel(com.google.devicesandservices.health.v4.ActivityLevel value) { + if (activityLevelBuilder_ == null) { + if (dataCase_ == 26 + && data_ + != com.google.devicesandservices.health.v4.ActivityLevel.getDefaultInstance()) { + data_ = + com.google.devicesandservices.health.v4.ActivityLevel.newBuilder( + (com.google.devicesandservices.health.v4.ActivityLevel) data_) + .mergeFrom(value) + .buildPartial(); + } else { + data_ = value; + } + onChanged(); + } else { + if (dataCase_ == 26) { + activityLevelBuilder_.mergeFrom(value); + } else { + activityLevelBuilder_.setMessage(value); + } + } + dataCase_ = 26; + return this; + } + + /** + * + * + *
+     * Data for points in the `activity-level` daily data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.ActivityLevel activity_level = 26; + */ + public Builder clearActivityLevel() { + if (activityLevelBuilder_ == null) { + if (dataCase_ == 26) { + dataCase_ = 0; + data_ = null; + onChanged(); + } + } else { + if (dataCase_ == 26) { + dataCase_ = 0; + data_ = null; + } + activityLevelBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Data for points in the `activity-level` daily data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.ActivityLevel activity_level = 26; + */ + public com.google.devicesandservices.health.v4.ActivityLevel.Builder getActivityLevelBuilder() { + return internalGetActivityLevelFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Data for points in the `activity-level` daily data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.ActivityLevel activity_level = 26; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ActivityLevelOrBuilder + getActivityLevelOrBuilder() { + if ((dataCase_ == 26) && (activityLevelBuilder_ != null)) { + return activityLevelBuilder_.getMessageOrBuilder(); + } else { + if (dataCase_ == 26) { + return (com.google.devicesandservices.health.v4.ActivityLevel) data_; + } + return com.google.devicesandservices.health.v4.ActivityLevel.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Data for points in the `activity-level` daily data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.ActivityLevel activity_level = 26; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ActivityLevel, + com.google.devicesandservices.health.v4.ActivityLevel.Builder, + com.google.devicesandservices.health.v4.ActivityLevelOrBuilder> + internalGetActivityLevelFieldBuilder() { + if (activityLevelBuilder_ == null) { + if (!(dataCase_ == 26)) { + data_ = com.google.devicesandservices.health.v4.ActivityLevel.getDefaultInstance(); + } + activityLevelBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ActivityLevel, + com.google.devicesandservices.health.v4.ActivityLevel.Builder, + com.google.devicesandservices.health.v4.ActivityLevelOrBuilder>( + (com.google.devicesandservices.health.v4.ActivityLevel) data_, + getParentForChildren(), + isClean()); + data_ = null; + } + dataCase_ = 26; + onChanged(); + return activityLevelBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.VO2Max, + com.google.devicesandservices.health.v4.VO2Max.Builder, + com.google.devicesandservices.health.v4.VO2MaxOrBuilder> + vo2MaxBuilder_; + + /** + * + * + *
+     * Data for points in the `vo2-max` sample data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.VO2Max vo2_max = 27; + * + * @return Whether the vo2Max field is set. + */ + @java.lang.Override + public boolean hasVo2Max() { + return dataCase_ == 27; + } + + /** + * + * + *
+     * Data for points in the `vo2-max` sample data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.VO2Max vo2_max = 27; + * + * @return The vo2Max. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.VO2Max getVo2Max() { + if (vo2MaxBuilder_ == null) { + if (dataCase_ == 27) { + return (com.google.devicesandservices.health.v4.VO2Max) data_; + } + return com.google.devicesandservices.health.v4.VO2Max.getDefaultInstance(); + } else { + if (dataCase_ == 27) { + return vo2MaxBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.VO2Max.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Data for points in the `vo2-max` sample data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.VO2Max vo2_max = 27; + */ + public Builder setVo2Max(com.google.devicesandservices.health.v4.VO2Max value) { + if (vo2MaxBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + onChanged(); + } else { + vo2MaxBuilder_.setMessage(value); + } + dataCase_ = 27; + return this; + } + + /** + * + * + *
+     * Data for points in the `vo2-max` sample data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.VO2Max vo2_max = 27; + */ + public Builder setVo2Max( + com.google.devicesandservices.health.v4.VO2Max.Builder builderForValue) { + if (vo2MaxBuilder_ == null) { + data_ = builderForValue.build(); + onChanged(); + } else { + vo2MaxBuilder_.setMessage(builderForValue.build()); + } + dataCase_ = 27; + return this; + } + + /** + * + * + *
+     * Data for points in the `vo2-max` sample data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.VO2Max vo2_max = 27; + */ + public Builder mergeVo2Max(com.google.devicesandservices.health.v4.VO2Max value) { + if (vo2MaxBuilder_ == null) { + if (dataCase_ == 27 + && data_ != com.google.devicesandservices.health.v4.VO2Max.getDefaultInstance()) { + data_ = + com.google.devicesandservices.health.v4.VO2Max.newBuilder( + (com.google.devicesandservices.health.v4.VO2Max) data_) + .mergeFrom(value) + .buildPartial(); + } else { + data_ = value; + } + onChanged(); + } else { + if (dataCase_ == 27) { + vo2MaxBuilder_.mergeFrom(value); + } else { + vo2MaxBuilder_.setMessage(value); + } + } + dataCase_ = 27; + return this; + } + + /** + * + * + *
+     * Data for points in the `vo2-max` sample data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.VO2Max vo2_max = 27; + */ + public Builder clearVo2Max() { + if (vo2MaxBuilder_ == null) { + if (dataCase_ == 27) { + dataCase_ = 0; + data_ = null; + onChanged(); + } + } else { + if (dataCase_ == 27) { + dataCase_ = 0; + data_ = null; + } + vo2MaxBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Data for points in the `vo2-max` sample data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.VO2Max vo2_max = 27; + */ + public com.google.devicesandservices.health.v4.VO2Max.Builder getVo2MaxBuilder() { + return internalGetVo2MaxFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Data for points in the `vo2-max` sample data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.VO2Max vo2_max = 27; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.VO2MaxOrBuilder getVo2MaxOrBuilder() { + if ((dataCase_ == 27) && (vo2MaxBuilder_ != null)) { + return vo2MaxBuilder_.getMessageOrBuilder(); + } else { + if (dataCase_ == 27) { + return (com.google.devicesandservices.health.v4.VO2Max) data_; + } + return com.google.devicesandservices.health.v4.VO2Max.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Data for points in the `vo2-max` sample data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.VO2Max vo2_max = 27; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.VO2Max, + com.google.devicesandservices.health.v4.VO2Max.Builder, + com.google.devicesandservices.health.v4.VO2MaxOrBuilder> + internalGetVo2MaxFieldBuilder() { + if (vo2MaxBuilder_ == null) { + if (!(dataCase_ == 27)) { + data_ = com.google.devicesandservices.health.v4.VO2Max.getDefaultInstance(); + } + vo2MaxBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.VO2Max, + com.google.devicesandservices.health.v4.VO2Max.Builder, + com.google.devicesandservices.health.v4.VO2MaxOrBuilder>( + (com.google.devicesandservices.health.v4.VO2Max) data_, + getParentForChildren(), + isClean()); + data_ = null; + } + dataCase_ = 27; + onChanged(); + return vo2MaxBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.DailyVO2Max, + com.google.devicesandservices.health.v4.DailyVO2Max.Builder, + com.google.devicesandservices.health.v4.DailyVO2MaxOrBuilder> + dailyVo2MaxBuilder_; + + /** + * + * + *
+     * Data for points in the `daily-vo2-max` daily data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.DailyVO2Max daily_vo2_max = 28; + * + * @return Whether the dailyVo2Max field is set. + */ + @java.lang.Override + public boolean hasDailyVo2Max() { + return dataCase_ == 28; + } + + /** + * + * + *
+     * Data for points in the `daily-vo2-max` daily data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.DailyVO2Max daily_vo2_max = 28; + * + * @return The dailyVo2Max. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyVO2Max getDailyVo2Max() { + if (dailyVo2MaxBuilder_ == null) { + if (dataCase_ == 28) { + return (com.google.devicesandservices.health.v4.DailyVO2Max) data_; + } + return com.google.devicesandservices.health.v4.DailyVO2Max.getDefaultInstance(); + } else { + if (dataCase_ == 28) { + return dailyVo2MaxBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.DailyVO2Max.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Data for points in the `daily-vo2-max` daily data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.DailyVO2Max daily_vo2_max = 28; + */ + public Builder setDailyVo2Max(com.google.devicesandservices.health.v4.DailyVO2Max value) { + if (dailyVo2MaxBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + onChanged(); + } else { + dailyVo2MaxBuilder_.setMessage(value); + } + dataCase_ = 28; + return this; + } + + /** + * + * + *
+     * Data for points in the `daily-vo2-max` daily data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.DailyVO2Max daily_vo2_max = 28; + */ + public Builder setDailyVo2Max( + com.google.devicesandservices.health.v4.DailyVO2Max.Builder builderForValue) { + if (dailyVo2MaxBuilder_ == null) { + data_ = builderForValue.build(); + onChanged(); + } else { + dailyVo2MaxBuilder_.setMessage(builderForValue.build()); + } + dataCase_ = 28; + return this; + } + + /** + * + * + *
+     * Data for points in the `daily-vo2-max` daily data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.DailyVO2Max daily_vo2_max = 28; + */ + public Builder mergeDailyVo2Max(com.google.devicesandservices.health.v4.DailyVO2Max value) { + if (dailyVo2MaxBuilder_ == null) { + if (dataCase_ == 28 + && data_ != com.google.devicesandservices.health.v4.DailyVO2Max.getDefaultInstance()) { + data_ = + com.google.devicesandservices.health.v4.DailyVO2Max.newBuilder( + (com.google.devicesandservices.health.v4.DailyVO2Max) data_) + .mergeFrom(value) + .buildPartial(); + } else { + data_ = value; + } + onChanged(); + } else { + if (dataCase_ == 28) { + dailyVo2MaxBuilder_.mergeFrom(value); + } else { + dailyVo2MaxBuilder_.setMessage(value); + } + } + dataCase_ = 28; + return this; + } + + /** + * + * + *
+     * Data for points in the `daily-vo2-max` daily data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.DailyVO2Max daily_vo2_max = 28; + */ + public Builder clearDailyVo2Max() { + if (dailyVo2MaxBuilder_ == null) { + if (dataCase_ == 28) { + dataCase_ = 0; + data_ = null; + onChanged(); + } + } else { + if (dataCase_ == 28) { + dataCase_ = 0; + data_ = null; + } + dailyVo2MaxBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Data for points in the `daily-vo2-max` daily data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.DailyVO2Max daily_vo2_max = 28; + */ + public com.google.devicesandservices.health.v4.DailyVO2Max.Builder getDailyVo2MaxBuilder() { + return internalGetDailyVo2MaxFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Data for points in the `daily-vo2-max` daily data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.DailyVO2Max daily_vo2_max = 28; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyVO2MaxOrBuilder getDailyVo2MaxOrBuilder() { + if ((dataCase_ == 28) && (dailyVo2MaxBuilder_ != null)) { + return dailyVo2MaxBuilder_.getMessageOrBuilder(); + } else { + if (dataCase_ == 28) { + return (com.google.devicesandservices.health.v4.DailyVO2Max) data_; + } + return com.google.devicesandservices.health.v4.DailyVO2Max.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Data for points in the `daily-vo2-max` daily data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.DailyVO2Max daily_vo2_max = 28; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.DailyVO2Max, + com.google.devicesandservices.health.v4.DailyVO2Max.Builder, + com.google.devicesandservices.health.v4.DailyVO2MaxOrBuilder> + internalGetDailyVo2MaxFieldBuilder() { + if (dailyVo2MaxBuilder_ == null) { + if (!(dataCase_ == 28)) { + data_ = com.google.devicesandservices.health.v4.DailyVO2Max.getDefaultInstance(); + } + dailyVo2MaxBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.DailyVO2Max, + com.google.devicesandservices.health.v4.DailyVO2Max.Builder, + com.google.devicesandservices.health.v4.DailyVO2MaxOrBuilder>( + (com.google.devicesandservices.health.v4.DailyVO2Max) data_, + getParentForChildren(), + isClean()); + data_ = null; + } + dataCase_ = 28; + onChanged(); + return dailyVo2MaxBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.DailyHeartRateZones, + com.google.devicesandservices.health.v4.DailyHeartRateZones.Builder, + com.google.devicesandservices.health.v4.DailyHeartRateZonesOrBuilder> + dailyHeartRateZonesBuilder_; + + /** + * + * + *
+     * Data for points in the `daily-heart-rate-zones` daily data type
+     * collection.
+     * 
+ * + * .google.devicesandservices.health.v4.DailyHeartRateZones daily_heart_rate_zones = 32; + * + * + * @return Whether the dailyHeartRateZones field is set. + */ + @java.lang.Override + public boolean hasDailyHeartRateZones() { + return dataCase_ == 32; + } + + /** + * + * + *
+     * Data for points in the `daily-heart-rate-zones` daily data type
+     * collection.
+     * 
+ * + * .google.devicesandservices.health.v4.DailyHeartRateZones daily_heart_rate_zones = 32; + * + * + * @return The dailyHeartRateZones. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyHeartRateZones getDailyHeartRateZones() { + if (dailyHeartRateZonesBuilder_ == null) { + if (dataCase_ == 32) { + return (com.google.devicesandservices.health.v4.DailyHeartRateZones) data_; + } + return com.google.devicesandservices.health.v4.DailyHeartRateZones.getDefaultInstance(); + } else { + if (dataCase_ == 32) { + return dailyHeartRateZonesBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.DailyHeartRateZones.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Data for points in the `daily-heart-rate-zones` daily data type
+     * collection.
+     * 
+ * + * .google.devicesandservices.health.v4.DailyHeartRateZones daily_heart_rate_zones = 32; + * + */ + public Builder setDailyHeartRateZones( + com.google.devicesandservices.health.v4.DailyHeartRateZones value) { + if (dailyHeartRateZonesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + onChanged(); + } else { + dailyHeartRateZonesBuilder_.setMessage(value); + } + dataCase_ = 32; + return this; + } + + /** + * + * + *
+     * Data for points in the `daily-heart-rate-zones` daily data type
+     * collection.
+     * 
+ * + * .google.devicesandservices.health.v4.DailyHeartRateZones daily_heart_rate_zones = 32; + * + */ + public Builder setDailyHeartRateZones( + com.google.devicesandservices.health.v4.DailyHeartRateZones.Builder builderForValue) { + if (dailyHeartRateZonesBuilder_ == null) { + data_ = builderForValue.build(); + onChanged(); + } else { + dailyHeartRateZonesBuilder_.setMessage(builderForValue.build()); + } + dataCase_ = 32; + return this; + } + + /** + * + * + *
+     * Data for points in the `daily-heart-rate-zones` daily data type
+     * collection.
+     * 
+ * + * .google.devicesandservices.health.v4.DailyHeartRateZones daily_heart_rate_zones = 32; + * + */ + public Builder mergeDailyHeartRateZones( + com.google.devicesandservices.health.v4.DailyHeartRateZones value) { + if (dailyHeartRateZonesBuilder_ == null) { + if (dataCase_ == 32 + && data_ + != com.google.devicesandservices.health.v4.DailyHeartRateZones + .getDefaultInstance()) { + data_ = + com.google.devicesandservices.health.v4.DailyHeartRateZones.newBuilder( + (com.google.devicesandservices.health.v4.DailyHeartRateZones) data_) + .mergeFrom(value) + .buildPartial(); + } else { + data_ = value; + } + onChanged(); + } else { + if (dataCase_ == 32) { + dailyHeartRateZonesBuilder_.mergeFrom(value); + } else { + dailyHeartRateZonesBuilder_.setMessage(value); + } + } + dataCase_ = 32; + return this; + } + + /** + * + * + *
+     * Data for points in the `daily-heart-rate-zones` daily data type
+     * collection.
+     * 
+ * + * .google.devicesandservices.health.v4.DailyHeartRateZones daily_heart_rate_zones = 32; + * + */ + public Builder clearDailyHeartRateZones() { + if (dailyHeartRateZonesBuilder_ == null) { + if (dataCase_ == 32) { + dataCase_ = 0; + data_ = null; + onChanged(); + } + } else { + if (dataCase_ == 32) { + dataCase_ = 0; + data_ = null; + } + dailyHeartRateZonesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Data for points in the `daily-heart-rate-zones` daily data type
+     * collection.
+     * 
+ * + * .google.devicesandservices.health.v4.DailyHeartRateZones daily_heart_rate_zones = 32; + * + */ + public com.google.devicesandservices.health.v4.DailyHeartRateZones.Builder + getDailyHeartRateZonesBuilder() { + return internalGetDailyHeartRateZonesFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Data for points in the `daily-heart-rate-zones` daily data type
+     * collection.
+     * 
+ * + * .google.devicesandservices.health.v4.DailyHeartRateZones daily_heart_rate_zones = 32; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyHeartRateZonesOrBuilder + getDailyHeartRateZonesOrBuilder() { + if ((dataCase_ == 32) && (dailyHeartRateZonesBuilder_ != null)) { + return dailyHeartRateZonesBuilder_.getMessageOrBuilder(); + } else { + if (dataCase_ == 32) { + return (com.google.devicesandservices.health.v4.DailyHeartRateZones) data_; + } + return com.google.devicesandservices.health.v4.DailyHeartRateZones.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Data for points in the `daily-heart-rate-zones` daily data type
+     * collection.
+     * 
+ * + * .google.devicesandservices.health.v4.DailyHeartRateZones daily_heart_rate_zones = 32; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.DailyHeartRateZones, + com.google.devicesandservices.health.v4.DailyHeartRateZones.Builder, + com.google.devicesandservices.health.v4.DailyHeartRateZonesOrBuilder> + internalGetDailyHeartRateZonesFieldBuilder() { + if (dailyHeartRateZonesBuilder_ == null) { + if (!(dataCase_ == 32)) { + data_ = com.google.devicesandservices.health.v4.DailyHeartRateZones.getDefaultInstance(); + } + dailyHeartRateZonesBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.DailyHeartRateZones, + com.google.devicesandservices.health.v4.DailyHeartRateZones.Builder, + com.google.devicesandservices.health.v4.DailyHeartRateZonesOrBuilder>( + (com.google.devicesandservices.health.v4.DailyHeartRateZones) data_, + getParentForChildren(), + isClean()); + data_ = null; + } + dataCase_ = 32; + onChanged(); + return dailyHeartRateZonesBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.HydrationLog, + com.google.devicesandservices.health.v4.HydrationLog.Builder, + com.google.devicesandservices.health.v4.HydrationLogOrBuilder> + hydrationLogBuilder_; + + /** + * + * + *
+     * Data for points in the `hydration-log` session data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.HydrationLog hydration_log = 33; + * + * @return Whether the hydrationLog field is set. + */ + @java.lang.Override + public boolean hasHydrationLog() { + return dataCase_ == 33; + } + + /** + * + * + *
+     * Data for points in the `hydration-log` session data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.HydrationLog hydration_log = 33; + * + * @return The hydrationLog. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.HydrationLog getHydrationLog() { + if (hydrationLogBuilder_ == null) { + if (dataCase_ == 33) { + return (com.google.devicesandservices.health.v4.HydrationLog) data_; + } + return com.google.devicesandservices.health.v4.HydrationLog.getDefaultInstance(); + } else { + if (dataCase_ == 33) { + return hydrationLogBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.HydrationLog.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Data for points in the `hydration-log` session data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.HydrationLog hydration_log = 33; + */ + public Builder setHydrationLog(com.google.devicesandservices.health.v4.HydrationLog value) { + if (hydrationLogBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + onChanged(); + } else { + hydrationLogBuilder_.setMessage(value); + } + dataCase_ = 33; + return this; + } + + /** + * + * + *
+     * Data for points in the `hydration-log` session data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.HydrationLog hydration_log = 33; + */ + public Builder setHydrationLog( + com.google.devicesandservices.health.v4.HydrationLog.Builder builderForValue) { + if (hydrationLogBuilder_ == null) { + data_ = builderForValue.build(); + onChanged(); + } else { + hydrationLogBuilder_.setMessage(builderForValue.build()); + } + dataCase_ = 33; + return this; + } + + /** + * + * + *
+     * Data for points in the `hydration-log` session data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.HydrationLog hydration_log = 33; + */ + public Builder mergeHydrationLog(com.google.devicesandservices.health.v4.HydrationLog value) { + if (hydrationLogBuilder_ == null) { + if (dataCase_ == 33 + && data_ != com.google.devicesandservices.health.v4.HydrationLog.getDefaultInstance()) { + data_ = + com.google.devicesandservices.health.v4.HydrationLog.newBuilder( + (com.google.devicesandservices.health.v4.HydrationLog) data_) + .mergeFrom(value) + .buildPartial(); + } else { + data_ = value; + } + onChanged(); + } else { + if (dataCase_ == 33) { + hydrationLogBuilder_.mergeFrom(value); + } else { + hydrationLogBuilder_.setMessage(value); + } + } + dataCase_ = 33; + return this; + } + + /** + * + * + *
+     * Data for points in the `hydration-log` session data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.HydrationLog hydration_log = 33; + */ + public Builder clearHydrationLog() { + if (hydrationLogBuilder_ == null) { + if (dataCase_ == 33) { + dataCase_ = 0; + data_ = null; + onChanged(); + } + } else { + if (dataCase_ == 33) { + dataCase_ = 0; + data_ = null; + } + hydrationLogBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Data for points in the `hydration-log` session data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.HydrationLog hydration_log = 33; + */ + public com.google.devicesandservices.health.v4.HydrationLog.Builder getHydrationLogBuilder() { + return internalGetHydrationLogFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Data for points in the `hydration-log` session data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.HydrationLog hydration_log = 33; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.HydrationLogOrBuilder + getHydrationLogOrBuilder() { + if ((dataCase_ == 33) && (hydrationLogBuilder_ != null)) { + return hydrationLogBuilder_.getMessageOrBuilder(); + } else { + if (dataCase_ == 33) { + return (com.google.devicesandservices.health.v4.HydrationLog) data_; + } + return com.google.devicesandservices.health.v4.HydrationLog.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Data for points in the `hydration-log` session data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.HydrationLog hydration_log = 33; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.HydrationLog, + com.google.devicesandservices.health.v4.HydrationLog.Builder, + com.google.devicesandservices.health.v4.HydrationLogOrBuilder> + internalGetHydrationLogFieldBuilder() { + if (hydrationLogBuilder_ == null) { + if (!(dataCase_ == 33)) { + data_ = com.google.devicesandservices.health.v4.HydrationLog.getDefaultInstance(); + } + hydrationLogBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.HydrationLog, + com.google.devicesandservices.health.v4.HydrationLog.Builder, + com.google.devicesandservices.health.v4.HydrationLogOrBuilder>( + (com.google.devicesandservices.health.v4.HydrationLog) data_, + getParentForChildren(), + isClean()); + data_ = null; + } + dataCase_ = 33; + onChanged(); + return hydrationLogBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.TimeInHeartRateZone, + com.google.devicesandservices.health.v4.TimeInHeartRateZone.Builder, + com.google.devicesandservices.health.v4.TimeInHeartRateZoneOrBuilder> + timeInHeartRateZoneBuilder_; + + /** + * + * + *
+     * Data for points in the `time-in-heart-rate-zone` interval data type
+     * collection.
+     * 
+ * + * .google.devicesandservices.health.v4.TimeInHeartRateZone time_in_heart_rate_zone = 35; + * + * + * @return Whether the timeInHeartRateZone field is set. + */ + @java.lang.Override + public boolean hasTimeInHeartRateZone() { + return dataCase_ == 35; + } + + /** + * + * + *
+     * Data for points in the `time-in-heart-rate-zone` interval data type
+     * collection.
+     * 
+ * + * .google.devicesandservices.health.v4.TimeInHeartRateZone time_in_heart_rate_zone = 35; + * + * + * @return The timeInHeartRateZone. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.TimeInHeartRateZone getTimeInHeartRateZone() { + if (timeInHeartRateZoneBuilder_ == null) { + if (dataCase_ == 35) { + return (com.google.devicesandservices.health.v4.TimeInHeartRateZone) data_; + } + return com.google.devicesandservices.health.v4.TimeInHeartRateZone.getDefaultInstance(); + } else { + if (dataCase_ == 35) { + return timeInHeartRateZoneBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.TimeInHeartRateZone.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Data for points in the `time-in-heart-rate-zone` interval data type
+     * collection.
+     * 
+ * + * .google.devicesandservices.health.v4.TimeInHeartRateZone time_in_heart_rate_zone = 35; + * + */ + public Builder setTimeInHeartRateZone( + com.google.devicesandservices.health.v4.TimeInHeartRateZone value) { + if (timeInHeartRateZoneBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + onChanged(); + } else { + timeInHeartRateZoneBuilder_.setMessage(value); + } + dataCase_ = 35; + return this; + } + + /** + * + * + *
+     * Data for points in the `time-in-heart-rate-zone` interval data type
+     * collection.
+     * 
+ * + * .google.devicesandservices.health.v4.TimeInHeartRateZone time_in_heart_rate_zone = 35; + * + */ + public Builder setTimeInHeartRateZone( + com.google.devicesandservices.health.v4.TimeInHeartRateZone.Builder builderForValue) { + if (timeInHeartRateZoneBuilder_ == null) { + data_ = builderForValue.build(); + onChanged(); + } else { + timeInHeartRateZoneBuilder_.setMessage(builderForValue.build()); + } + dataCase_ = 35; + return this; + } + + /** + * + * + *
+     * Data for points in the `time-in-heart-rate-zone` interval data type
+     * collection.
+     * 
+ * + * .google.devicesandservices.health.v4.TimeInHeartRateZone time_in_heart_rate_zone = 35; + * + */ + public Builder mergeTimeInHeartRateZone( + com.google.devicesandservices.health.v4.TimeInHeartRateZone value) { + if (timeInHeartRateZoneBuilder_ == null) { + if (dataCase_ == 35 + && data_ + != com.google.devicesandservices.health.v4.TimeInHeartRateZone + .getDefaultInstance()) { + data_ = + com.google.devicesandservices.health.v4.TimeInHeartRateZone.newBuilder( + (com.google.devicesandservices.health.v4.TimeInHeartRateZone) data_) + .mergeFrom(value) + .buildPartial(); + } else { + data_ = value; + } + onChanged(); + } else { + if (dataCase_ == 35) { + timeInHeartRateZoneBuilder_.mergeFrom(value); + } else { + timeInHeartRateZoneBuilder_.setMessage(value); + } + } + dataCase_ = 35; + return this; + } + + /** + * + * + *
+     * Data for points in the `time-in-heart-rate-zone` interval data type
+     * collection.
+     * 
+ * + * .google.devicesandservices.health.v4.TimeInHeartRateZone time_in_heart_rate_zone = 35; + * + */ + public Builder clearTimeInHeartRateZone() { + if (timeInHeartRateZoneBuilder_ == null) { + if (dataCase_ == 35) { + dataCase_ = 0; + data_ = null; + onChanged(); + } + } else { + if (dataCase_ == 35) { + dataCase_ = 0; + data_ = null; + } + timeInHeartRateZoneBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Data for points in the `time-in-heart-rate-zone` interval data type
+     * collection.
+     * 
+ * + * .google.devicesandservices.health.v4.TimeInHeartRateZone time_in_heart_rate_zone = 35; + * + */ + public com.google.devicesandservices.health.v4.TimeInHeartRateZone.Builder + getTimeInHeartRateZoneBuilder() { + return internalGetTimeInHeartRateZoneFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Data for points in the `time-in-heart-rate-zone` interval data type
+     * collection.
+     * 
+ * + * .google.devicesandservices.health.v4.TimeInHeartRateZone time_in_heart_rate_zone = 35; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.TimeInHeartRateZoneOrBuilder + getTimeInHeartRateZoneOrBuilder() { + if ((dataCase_ == 35) && (timeInHeartRateZoneBuilder_ != null)) { + return timeInHeartRateZoneBuilder_.getMessageOrBuilder(); + } else { + if (dataCase_ == 35) { + return (com.google.devicesandservices.health.v4.TimeInHeartRateZone) data_; + } + return com.google.devicesandservices.health.v4.TimeInHeartRateZone.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Data for points in the `time-in-heart-rate-zone` interval data type
+     * collection.
+     * 
+ * + * .google.devicesandservices.health.v4.TimeInHeartRateZone time_in_heart_rate_zone = 35; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.TimeInHeartRateZone, + com.google.devicesandservices.health.v4.TimeInHeartRateZone.Builder, + com.google.devicesandservices.health.v4.TimeInHeartRateZoneOrBuilder> + internalGetTimeInHeartRateZoneFieldBuilder() { + if (timeInHeartRateZoneBuilder_ == null) { + if (!(dataCase_ == 35)) { + data_ = com.google.devicesandservices.health.v4.TimeInHeartRateZone.getDefaultInstance(); + } + timeInHeartRateZoneBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.TimeInHeartRateZone, + com.google.devicesandservices.health.v4.TimeInHeartRateZone.Builder, + com.google.devicesandservices.health.v4.TimeInHeartRateZoneOrBuilder>( + (com.google.devicesandservices.health.v4.TimeInHeartRateZone) data_, + getParentForChildren(), + isClean()); + data_ = null; + } + dataCase_ = 35; + onChanged(); + return timeInHeartRateZoneBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ActiveMinutes, + com.google.devicesandservices.health.v4.ActiveMinutes.Builder, + com.google.devicesandservices.health.v4.ActiveMinutesOrBuilder> + activeMinutesBuilder_; + + /** + * + * + *
+     * Data for points in the `active-minutes` interval data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.ActiveMinutes active_minutes = 36; + * + * @return Whether the activeMinutes field is set. + */ + @java.lang.Override + public boolean hasActiveMinutes() { + return dataCase_ == 36; + } + + /** + * + * + *
+     * Data for points in the `active-minutes` interval data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.ActiveMinutes active_minutes = 36; + * + * @return The activeMinutes. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ActiveMinutes getActiveMinutes() { + if (activeMinutesBuilder_ == null) { + if (dataCase_ == 36) { + return (com.google.devicesandservices.health.v4.ActiveMinutes) data_; + } + return com.google.devicesandservices.health.v4.ActiveMinutes.getDefaultInstance(); + } else { + if (dataCase_ == 36) { + return activeMinutesBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.ActiveMinutes.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Data for points in the `active-minutes` interval data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.ActiveMinutes active_minutes = 36; + */ + public Builder setActiveMinutes(com.google.devicesandservices.health.v4.ActiveMinutes value) { + if (activeMinutesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + onChanged(); + } else { + activeMinutesBuilder_.setMessage(value); + } + dataCase_ = 36; + return this; + } + + /** + * + * + *
+     * Data for points in the `active-minutes` interval data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.ActiveMinutes active_minutes = 36; + */ + public Builder setActiveMinutes( + com.google.devicesandservices.health.v4.ActiveMinutes.Builder builderForValue) { + if (activeMinutesBuilder_ == null) { + data_ = builderForValue.build(); + onChanged(); + } else { + activeMinutesBuilder_.setMessage(builderForValue.build()); + } + dataCase_ = 36; + return this; + } + + /** + * + * + *
+     * Data for points in the `active-minutes` interval data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.ActiveMinutes active_minutes = 36; + */ + public Builder mergeActiveMinutes(com.google.devicesandservices.health.v4.ActiveMinutes value) { + if (activeMinutesBuilder_ == null) { + if (dataCase_ == 36 + && data_ + != com.google.devicesandservices.health.v4.ActiveMinutes.getDefaultInstance()) { + data_ = + com.google.devicesandservices.health.v4.ActiveMinutes.newBuilder( + (com.google.devicesandservices.health.v4.ActiveMinutes) data_) + .mergeFrom(value) + .buildPartial(); + } else { + data_ = value; + } + onChanged(); + } else { + if (dataCase_ == 36) { + activeMinutesBuilder_.mergeFrom(value); + } else { + activeMinutesBuilder_.setMessage(value); + } + } + dataCase_ = 36; + return this; + } + + /** + * + * + *
+     * Data for points in the `active-minutes` interval data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.ActiveMinutes active_minutes = 36; + */ + public Builder clearActiveMinutes() { + if (activeMinutesBuilder_ == null) { + if (dataCase_ == 36) { + dataCase_ = 0; + data_ = null; + onChanged(); + } + } else { + if (dataCase_ == 36) { + dataCase_ = 0; + data_ = null; + } + activeMinutesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Data for points in the `active-minutes` interval data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.ActiveMinutes active_minutes = 36; + */ + public com.google.devicesandservices.health.v4.ActiveMinutes.Builder getActiveMinutesBuilder() { + return internalGetActiveMinutesFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Data for points in the `active-minutes` interval data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.ActiveMinutes active_minutes = 36; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ActiveMinutesOrBuilder + getActiveMinutesOrBuilder() { + if ((dataCase_ == 36) && (activeMinutesBuilder_ != null)) { + return activeMinutesBuilder_.getMessageOrBuilder(); + } else { + if (dataCase_ == 36) { + return (com.google.devicesandservices.health.v4.ActiveMinutes) data_; + } + return com.google.devicesandservices.health.v4.ActiveMinutes.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Data for points in the `active-minutes` interval data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.ActiveMinutes active_minutes = 36; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ActiveMinutes, + com.google.devicesandservices.health.v4.ActiveMinutes.Builder, + com.google.devicesandservices.health.v4.ActiveMinutesOrBuilder> + internalGetActiveMinutesFieldBuilder() { + if (activeMinutesBuilder_ == null) { + if (!(dataCase_ == 36)) { + data_ = com.google.devicesandservices.health.v4.ActiveMinutes.getDefaultInstance(); + } + activeMinutesBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ActiveMinutes, + com.google.devicesandservices.health.v4.ActiveMinutes.Builder, + com.google.devicesandservices.health.v4.ActiveMinutesOrBuilder>( + (com.google.devicesandservices.health.v4.ActiveMinutes) data_, + getParentForChildren(), + isClean()); + data_ = null; + } + dataCase_ = 36; + onChanged(); + return activeMinutesBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary, + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary.Builder, + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummaryOrBuilder> + respiratoryRateSleepSummaryBuilder_; + + /** + * + * + *
+     * Data for points in the `respiratory-rate-sleep-summary` sample data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary respiratory_rate_sleep_summary = 37; + * + * + * @return Whether the respiratoryRateSleepSummary field is set. + */ + @java.lang.Override + public boolean hasRespiratoryRateSleepSummary() { + return dataCase_ == 37; + } + + /** + * + * + *
+     * Data for points in the `respiratory-rate-sleep-summary` sample data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary respiratory_rate_sleep_summary = 37; + * + * + * @return The respiratoryRateSleepSummary. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + getRespiratoryRateSleepSummary() { + if (respiratoryRateSleepSummaryBuilder_ == null) { + if (dataCase_ == 37) { + return (com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary) data_; + } + return com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .getDefaultInstance(); + } else { + if (dataCase_ == 37) { + return respiratoryRateSleepSummaryBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Data for points in the `respiratory-rate-sleep-summary` sample data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary respiratory_rate_sleep_summary = 37; + * + */ + public Builder setRespiratoryRateSleepSummary( + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary value) { + if (respiratoryRateSleepSummaryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + onChanged(); + } else { + respiratoryRateSleepSummaryBuilder_.setMessage(value); + } + dataCase_ = 37; + return this; + } + + /** + * + * + *
+     * Data for points in the `respiratory-rate-sleep-summary` sample data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary respiratory_rate_sleep_summary = 37; + * + */ + public Builder setRespiratoryRateSleepSummary( + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary.Builder + builderForValue) { + if (respiratoryRateSleepSummaryBuilder_ == null) { + data_ = builderForValue.build(); + onChanged(); + } else { + respiratoryRateSleepSummaryBuilder_.setMessage(builderForValue.build()); + } + dataCase_ = 37; + return this; + } + + /** + * + * + *
+     * Data for points in the `respiratory-rate-sleep-summary` sample data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary respiratory_rate_sleep_summary = 37; + * + */ + public Builder mergeRespiratoryRateSleepSummary( + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary value) { + if (respiratoryRateSleepSummaryBuilder_ == null) { + if (dataCase_ == 37 + && data_ + != com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .getDefaultInstance()) { + data_ = + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary.newBuilder( + (com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary) data_) + .mergeFrom(value) + .buildPartial(); + } else { + data_ = value; + } + onChanged(); + } else { + if (dataCase_ == 37) { + respiratoryRateSleepSummaryBuilder_.mergeFrom(value); + } else { + respiratoryRateSleepSummaryBuilder_.setMessage(value); + } + } + dataCase_ = 37; + return this; + } + + /** + * + * + *
+     * Data for points in the `respiratory-rate-sleep-summary` sample data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary respiratory_rate_sleep_summary = 37; + * + */ + public Builder clearRespiratoryRateSleepSummary() { + if (respiratoryRateSleepSummaryBuilder_ == null) { + if (dataCase_ == 37) { + dataCase_ = 0; + data_ = null; + onChanged(); + } + } else { + if (dataCase_ == 37) { + dataCase_ = 0; + data_ = null; + } + respiratoryRateSleepSummaryBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Data for points in the `respiratory-rate-sleep-summary` sample data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary respiratory_rate_sleep_summary = 37; + * + */ + public com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary.Builder + getRespiratoryRateSleepSummaryBuilder() { + return internalGetRespiratoryRateSleepSummaryFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Data for points in the `respiratory-rate-sleep-summary` sample data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary respiratory_rate_sleep_summary = 37; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.RespiratoryRateSleepSummaryOrBuilder + getRespiratoryRateSleepSummaryOrBuilder() { + if ((dataCase_ == 37) && (respiratoryRateSleepSummaryBuilder_ != null)) { + return respiratoryRateSleepSummaryBuilder_.getMessageOrBuilder(); + } else { + if (dataCase_ == 37) { + return (com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary) data_; + } + return com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Data for points in the `respiratory-rate-sleep-summary` sample data type
+     * collection.
+     * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary respiratory_rate_sleep_summary = 37; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary, + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary.Builder, + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummaryOrBuilder> + internalGetRespiratoryRateSleepSummaryFieldBuilder() { + if (respiratoryRateSleepSummaryBuilder_ == null) { + if (!(dataCase_ == 37)) { + data_ = + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .getDefaultInstance(); + } + respiratoryRateSleepSummaryBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary, + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary.Builder, + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummaryOrBuilder>( + (com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary) data_, + getParentForChildren(), + isClean()); + data_ = null; + } + dataCase_ = 37; + onChanged(); + return respiratoryRateSleepSummaryBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.DailyRespiratoryRate, + com.google.devicesandservices.health.v4.DailyRespiratoryRate.Builder, + com.google.devicesandservices.health.v4.DailyRespiratoryRateOrBuilder> + dailyRespiratoryRateBuilder_; + + /** + * + * + *
+     * Data for points in the `daily-respiratory-rate` daily data type
+     * collection.
+     * 
+ * + * .google.devicesandservices.health.v4.DailyRespiratoryRate daily_respiratory_rate = 38; + * + * + * @return Whether the dailyRespiratoryRate field is set. + */ + @java.lang.Override + public boolean hasDailyRespiratoryRate() { + return dataCase_ == 38; + } + + /** + * + * + *
+     * Data for points in the `daily-respiratory-rate` daily data type
+     * collection.
+     * 
+ * + * .google.devicesandservices.health.v4.DailyRespiratoryRate daily_respiratory_rate = 38; + * + * + * @return The dailyRespiratoryRate. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyRespiratoryRate getDailyRespiratoryRate() { + if (dailyRespiratoryRateBuilder_ == null) { + if (dataCase_ == 38) { + return (com.google.devicesandservices.health.v4.DailyRespiratoryRate) data_; + } + return com.google.devicesandservices.health.v4.DailyRespiratoryRate.getDefaultInstance(); + } else { + if (dataCase_ == 38) { + return dailyRespiratoryRateBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.DailyRespiratoryRate.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Data for points in the `daily-respiratory-rate` daily data type
+     * collection.
+     * 
+ * + * .google.devicesandservices.health.v4.DailyRespiratoryRate daily_respiratory_rate = 38; + * + */ + public Builder setDailyRespiratoryRate( + com.google.devicesandservices.health.v4.DailyRespiratoryRate value) { + if (dailyRespiratoryRateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + onChanged(); + } else { + dailyRespiratoryRateBuilder_.setMessage(value); + } + dataCase_ = 38; + return this; + } + + /** + * + * + *
+     * Data for points in the `daily-respiratory-rate` daily data type
+     * collection.
+     * 
+ * + * .google.devicesandservices.health.v4.DailyRespiratoryRate daily_respiratory_rate = 38; + * + */ + public Builder setDailyRespiratoryRate( + com.google.devicesandservices.health.v4.DailyRespiratoryRate.Builder builderForValue) { + if (dailyRespiratoryRateBuilder_ == null) { + data_ = builderForValue.build(); + onChanged(); + } else { + dailyRespiratoryRateBuilder_.setMessage(builderForValue.build()); + } + dataCase_ = 38; + return this; + } + + /** + * + * + *
+     * Data for points in the `daily-respiratory-rate` daily data type
+     * collection.
+     * 
+ * + * .google.devicesandservices.health.v4.DailyRespiratoryRate daily_respiratory_rate = 38; + * + */ + public Builder mergeDailyRespiratoryRate( + com.google.devicesandservices.health.v4.DailyRespiratoryRate value) { + if (dailyRespiratoryRateBuilder_ == null) { + if (dataCase_ == 38 + && data_ + != com.google.devicesandservices.health.v4.DailyRespiratoryRate + .getDefaultInstance()) { + data_ = + com.google.devicesandservices.health.v4.DailyRespiratoryRate.newBuilder( + (com.google.devicesandservices.health.v4.DailyRespiratoryRate) data_) + .mergeFrom(value) + .buildPartial(); + } else { + data_ = value; + } + onChanged(); + } else { + if (dataCase_ == 38) { + dailyRespiratoryRateBuilder_.mergeFrom(value); + } else { + dailyRespiratoryRateBuilder_.setMessage(value); + } + } + dataCase_ = 38; + return this; + } + + /** + * + * + *
+     * Data for points in the `daily-respiratory-rate` daily data type
+     * collection.
+     * 
+ * + * .google.devicesandservices.health.v4.DailyRespiratoryRate daily_respiratory_rate = 38; + * + */ + public Builder clearDailyRespiratoryRate() { + if (dailyRespiratoryRateBuilder_ == null) { + if (dataCase_ == 38) { + dataCase_ = 0; + data_ = null; + onChanged(); + } + } else { + if (dataCase_ == 38) { + dataCase_ = 0; + data_ = null; + } + dailyRespiratoryRateBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Data for points in the `daily-respiratory-rate` daily data type
+     * collection.
+     * 
+ * + * .google.devicesandservices.health.v4.DailyRespiratoryRate daily_respiratory_rate = 38; + * + */ + public com.google.devicesandservices.health.v4.DailyRespiratoryRate.Builder + getDailyRespiratoryRateBuilder() { + return internalGetDailyRespiratoryRateFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Data for points in the `daily-respiratory-rate` daily data type
+     * collection.
+     * 
+ * + * .google.devicesandservices.health.v4.DailyRespiratoryRate daily_respiratory_rate = 38; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DailyRespiratoryRateOrBuilder + getDailyRespiratoryRateOrBuilder() { + if ((dataCase_ == 38) && (dailyRespiratoryRateBuilder_ != null)) { + return dailyRespiratoryRateBuilder_.getMessageOrBuilder(); + } else { + if (dataCase_ == 38) { + return (com.google.devicesandservices.health.v4.DailyRespiratoryRate) data_; + } + return com.google.devicesandservices.health.v4.DailyRespiratoryRate.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Data for points in the `daily-respiratory-rate` daily data type
+     * collection.
+     * 
+ * + * .google.devicesandservices.health.v4.DailyRespiratoryRate daily_respiratory_rate = 38; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.DailyRespiratoryRate, + com.google.devicesandservices.health.v4.DailyRespiratoryRate.Builder, + com.google.devicesandservices.health.v4.DailyRespiratoryRateOrBuilder> + internalGetDailyRespiratoryRateFieldBuilder() { + if (dailyRespiratoryRateBuilder_ == null) { + if (!(dataCase_ == 38)) { + data_ = com.google.devicesandservices.health.v4.DailyRespiratoryRate.getDefaultInstance(); + } + dailyRespiratoryRateBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.DailyRespiratoryRate, + com.google.devicesandservices.health.v4.DailyRespiratoryRate.Builder, + com.google.devicesandservices.health.v4.DailyRespiratoryRateOrBuilder>( + (com.google.devicesandservices.health.v4.DailyRespiratoryRate) data_, + getParentForChildren(), + isClean()); + data_ = null; + } + dataCase_ = 38; + onChanged(); + return dailyRespiratoryRateBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.SwimLengthsData, + com.google.devicesandservices.health.v4.SwimLengthsData.Builder, + com.google.devicesandservices.health.v4.SwimLengthsDataOrBuilder> + swimLengthsDataBuilder_; + + /** + * + * + *
+     * Data for points in the `swim-lengths-data` interval data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.SwimLengthsData swim_lengths_data = 39; + * + * @return Whether the swimLengthsData field is set. + */ + @java.lang.Override + public boolean hasSwimLengthsData() { + return dataCase_ == 39; + } + + /** + * + * + *
+     * Data for points in the `swim-lengths-data` interval data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.SwimLengthsData swim_lengths_data = 39; + * + * @return The swimLengthsData. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.SwimLengthsData getSwimLengthsData() { + if (swimLengthsDataBuilder_ == null) { + if (dataCase_ == 39) { + return (com.google.devicesandservices.health.v4.SwimLengthsData) data_; + } + return com.google.devicesandservices.health.v4.SwimLengthsData.getDefaultInstance(); + } else { + if (dataCase_ == 39) { + return swimLengthsDataBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.SwimLengthsData.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Data for points in the `swim-lengths-data` interval data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.SwimLengthsData swim_lengths_data = 39; + */ + public Builder setSwimLengthsData( + com.google.devicesandservices.health.v4.SwimLengthsData value) { + if (swimLengthsDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + onChanged(); + } else { + swimLengthsDataBuilder_.setMessage(value); + } + dataCase_ = 39; + return this; + } + + /** + * + * + *
+     * Data for points in the `swim-lengths-data` interval data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.SwimLengthsData swim_lengths_data = 39; + */ + public Builder setSwimLengthsData( + com.google.devicesandservices.health.v4.SwimLengthsData.Builder builderForValue) { + if (swimLengthsDataBuilder_ == null) { + data_ = builderForValue.build(); + onChanged(); + } else { + swimLengthsDataBuilder_.setMessage(builderForValue.build()); + } + dataCase_ = 39; + return this; + } + + /** + * + * + *
+     * Data for points in the `swim-lengths-data` interval data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.SwimLengthsData swim_lengths_data = 39; + */ + public Builder mergeSwimLengthsData( + com.google.devicesandservices.health.v4.SwimLengthsData value) { + if (swimLengthsDataBuilder_ == null) { + if (dataCase_ == 39 + && data_ + != com.google.devicesandservices.health.v4.SwimLengthsData.getDefaultInstance()) { + data_ = + com.google.devicesandservices.health.v4.SwimLengthsData.newBuilder( + (com.google.devicesandservices.health.v4.SwimLengthsData) data_) + .mergeFrom(value) + .buildPartial(); + } else { + data_ = value; + } + onChanged(); + } else { + if (dataCase_ == 39) { + swimLengthsDataBuilder_.mergeFrom(value); + } else { + swimLengthsDataBuilder_.setMessage(value); + } + } + dataCase_ = 39; + return this; + } + + /** + * + * + *
+     * Data for points in the `swim-lengths-data` interval data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.SwimLengthsData swim_lengths_data = 39; + */ + public Builder clearSwimLengthsData() { + if (swimLengthsDataBuilder_ == null) { + if (dataCase_ == 39) { + dataCase_ = 0; + data_ = null; + onChanged(); + } + } else { + if (dataCase_ == 39) { + dataCase_ = 0; + data_ = null; + } + swimLengthsDataBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Data for points in the `swim-lengths-data` interval data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.SwimLengthsData swim_lengths_data = 39; + */ + public com.google.devicesandservices.health.v4.SwimLengthsData.Builder + getSwimLengthsDataBuilder() { + return internalGetSwimLengthsDataFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Data for points in the `swim-lengths-data` interval data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.SwimLengthsData swim_lengths_data = 39; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.SwimLengthsDataOrBuilder + getSwimLengthsDataOrBuilder() { + if ((dataCase_ == 39) && (swimLengthsDataBuilder_ != null)) { + return swimLengthsDataBuilder_.getMessageOrBuilder(); + } else { + if (dataCase_ == 39) { + return (com.google.devicesandservices.health.v4.SwimLengthsData) data_; + } + return com.google.devicesandservices.health.v4.SwimLengthsData.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Data for points in the `swim-lengths-data` interval data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.SwimLengthsData swim_lengths_data = 39; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.SwimLengthsData, + com.google.devicesandservices.health.v4.SwimLengthsData.Builder, + com.google.devicesandservices.health.v4.SwimLengthsDataOrBuilder> + internalGetSwimLengthsDataFieldBuilder() { + if (swimLengthsDataBuilder_ == null) { + if (!(dataCase_ == 39)) { + data_ = com.google.devicesandservices.health.v4.SwimLengthsData.getDefaultInstance(); + } + swimLengthsDataBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.SwimLengthsData, + com.google.devicesandservices.health.v4.SwimLengthsData.Builder, + com.google.devicesandservices.health.v4.SwimLengthsDataOrBuilder>( + (com.google.devicesandservices.health.v4.SwimLengthsData) data_, + getParentForChildren(), + isClean()); + data_ = null; + } + dataCase_ = 39; + onChanged(); + return swimLengthsDataBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.Height, + com.google.devicesandservices.health.v4.Height.Builder, + com.google.devicesandservices.health.v4.HeightOrBuilder> + heightBuilder_; + + /** + * + * + *
+     * Data for points in the `height` sample data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.Height height = 40; + * + * @return Whether the height field is set. + */ + @java.lang.Override + public boolean hasHeight() { + return dataCase_ == 40; + } + + /** + * + * + *
+     * Data for points in the `height` sample data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.Height height = 40; + * + * @return The height. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Height getHeight() { + if (heightBuilder_ == null) { + if (dataCase_ == 40) { + return (com.google.devicesandservices.health.v4.Height) data_; + } + return com.google.devicesandservices.health.v4.Height.getDefaultInstance(); + } else { + if (dataCase_ == 40) { + return heightBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.Height.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Data for points in the `height` sample data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.Height height = 40; + */ + public Builder setHeight(com.google.devicesandservices.health.v4.Height value) { + if (heightBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + onChanged(); + } else { + heightBuilder_.setMessage(value); + } + dataCase_ = 40; + return this; + } + + /** + * + * + *
+     * Data for points in the `height` sample data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.Height height = 40; + */ + public Builder setHeight( + com.google.devicesandservices.health.v4.Height.Builder builderForValue) { + if (heightBuilder_ == null) { + data_ = builderForValue.build(); + onChanged(); + } else { + heightBuilder_.setMessage(builderForValue.build()); + } + dataCase_ = 40; + return this; + } + + /** + * + * + *
+     * Data for points in the `height` sample data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.Height height = 40; + */ + public Builder mergeHeight(com.google.devicesandservices.health.v4.Height value) { + if (heightBuilder_ == null) { + if (dataCase_ == 40 + && data_ != com.google.devicesandservices.health.v4.Height.getDefaultInstance()) { + data_ = + com.google.devicesandservices.health.v4.Height.newBuilder( + (com.google.devicesandservices.health.v4.Height) data_) + .mergeFrom(value) + .buildPartial(); + } else { + data_ = value; + } + onChanged(); + } else { + if (dataCase_ == 40) { + heightBuilder_.mergeFrom(value); + } else { + heightBuilder_.setMessage(value); + } + } + dataCase_ = 40; + return this; + } + + /** + * + * + *
+     * Data for points in the `height` sample data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.Height height = 40; + */ + public Builder clearHeight() { + if (heightBuilder_ == null) { + if (dataCase_ == 40) { + dataCase_ = 0; + data_ = null; + onChanged(); + } + } else { + if (dataCase_ == 40) { + dataCase_ = 0; + data_ = null; + } + heightBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Data for points in the `height` sample data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.Height height = 40; + */ + public com.google.devicesandservices.health.v4.Height.Builder getHeightBuilder() { + return internalGetHeightFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Data for points in the `height` sample data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.Height height = 40; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.HeightOrBuilder getHeightOrBuilder() { + if ((dataCase_ == 40) && (heightBuilder_ != null)) { + return heightBuilder_.getMessageOrBuilder(); + } else { + if (dataCase_ == 40) { + return (com.google.devicesandservices.health.v4.Height) data_; + } + return com.google.devicesandservices.health.v4.Height.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Data for points in the `height` sample data type collection.
+     * 
+ * + * .google.devicesandservices.health.v4.Height height = 40; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.Height, + com.google.devicesandservices.health.v4.Height.Builder, + com.google.devicesandservices.health.v4.HeightOrBuilder> + internalGetHeightFieldBuilder() { + if (heightBuilder_ == null) { + if (!(dataCase_ == 40)) { + data_ = com.google.devicesandservices.health.v4.Height.getDefaultInstance(); + } + heightBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.Height, + com.google.devicesandservices.health.v4.Height.Builder, + com.google.devicesandservices.health.v4.HeightOrBuilder>( + (com.google.devicesandservices.health.v4.Height) data_, + getParentForChildren(), + isClean()); + data_ = null; + } + dataCase_ = 40; + onChanged(); + return heightBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.BasalEnergyBurned, + com.google.devicesandservices.health.v4.BasalEnergyBurned.Builder, + com.google.devicesandservices.health.v4.BasalEnergyBurnedOrBuilder> + basalEnergyBurnedBuilder_; + + /** + * + * + *
+     * Data for points in the `basal-energy-burned` interval data type
+     * collection.
+     * 
+ * + * .google.devicesandservices.health.v4.BasalEnergyBurned basal_energy_burned = 41; + * + * @return Whether the basalEnergyBurned field is set. + */ + @java.lang.Override + public boolean hasBasalEnergyBurned() { + return dataCase_ == 41; + } + + /** + * + * + *
+     * Data for points in the `basal-energy-burned` interval data type
+     * collection.
+     * 
+ * + * .google.devicesandservices.health.v4.BasalEnergyBurned basal_energy_burned = 41; + * + * @return The basalEnergyBurned. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.BasalEnergyBurned getBasalEnergyBurned() { + if (basalEnergyBurnedBuilder_ == null) { + if (dataCase_ == 41) { + return (com.google.devicesandservices.health.v4.BasalEnergyBurned) data_; + } + return com.google.devicesandservices.health.v4.BasalEnergyBurned.getDefaultInstance(); + } else { + if (dataCase_ == 41) { + return basalEnergyBurnedBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.BasalEnergyBurned.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Data for points in the `basal-energy-burned` interval data type
+     * collection.
+     * 
+ * + * .google.devicesandservices.health.v4.BasalEnergyBurned basal_energy_burned = 41; + */ + public Builder setBasalEnergyBurned( + com.google.devicesandservices.health.v4.BasalEnergyBurned value) { + if (basalEnergyBurnedBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + onChanged(); + } else { + basalEnergyBurnedBuilder_.setMessage(value); + } + dataCase_ = 41; + return this; + } + + /** + * + * + *
+     * Data for points in the `basal-energy-burned` interval data type
+     * collection.
+     * 
+ * + * .google.devicesandservices.health.v4.BasalEnergyBurned basal_energy_burned = 41; + */ + public Builder setBasalEnergyBurned( + com.google.devicesandservices.health.v4.BasalEnergyBurned.Builder builderForValue) { + if (basalEnergyBurnedBuilder_ == null) { + data_ = builderForValue.build(); + onChanged(); + } else { + basalEnergyBurnedBuilder_.setMessage(builderForValue.build()); + } + dataCase_ = 41; + return this; + } + + /** + * + * + *
+     * Data for points in the `basal-energy-burned` interval data type
+     * collection.
+     * 
+ * + * .google.devicesandservices.health.v4.BasalEnergyBurned basal_energy_burned = 41; + */ + public Builder mergeBasalEnergyBurned( + com.google.devicesandservices.health.v4.BasalEnergyBurned value) { + if (basalEnergyBurnedBuilder_ == null) { + if (dataCase_ == 41 + && data_ + != com.google.devicesandservices.health.v4.BasalEnergyBurned.getDefaultInstance()) { + data_ = + com.google.devicesandservices.health.v4.BasalEnergyBurned.newBuilder( + (com.google.devicesandservices.health.v4.BasalEnergyBurned) data_) + .mergeFrom(value) + .buildPartial(); + } else { + data_ = value; + } + onChanged(); + } else { + if (dataCase_ == 41) { + basalEnergyBurnedBuilder_.mergeFrom(value); + } else { + basalEnergyBurnedBuilder_.setMessage(value); + } + } + dataCase_ = 41; + return this; + } + + /** + * + * + *
+     * Data for points in the `basal-energy-burned` interval data type
+     * collection.
+     * 
+ * + * .google.devicesandservices.health.v4.BasalEnergyBurned basal_energy_burned = 41; + */ + public Builder clearBasalEnergyBurned() { + if (basalEnergyBurnedBuilder_ == null) { + if (dataCase_ == 41) { + dataCase_ = 0; + data_ = null; + onChanged(); + } + } else { + if (dataCase_ == 41) { + dataCase_ = 0; + data_ = null; + } + basalEnergyBurnedBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Data for points in the `basal-energy-burned` interval data type
+     * collection.
+     * 
+ * + * .google.devicesandservices.health.v4.BasalEnergyBurned basal_energy_burned = 41; + */ + public com.google.devicesandservices.health.v4.BasalEnergyBurned.Builder + getBasalEnergyBurnedBuilder() { + return internalGetBasalEnergyBurnedFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Data for points in the `basal-energy-burned` interval data type
+     * collection.
+     * 
+ * + * .google.devicesandservices.health.v4.BasalEnergyBurned basal_energy_burned = 41; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.BasalEnergyBurnedOrBuilder + getBasalEnergyBurnedOrBuilder() { + if ((dataCase_ == 41) && (basalEnergyBurnedBuilder_ != null)) { + return basalEnergyBurnedBuilder_.getMessageOrBuilder(); + } else { + if (dataCase_ == 41) { + return (com.google.devicesandservices.health.v4.BasalEnergyBurned) data_; + } + return com.google.devicesandservices.health.v4.BasalEnergyBurned.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Data for points in the `basal-energy-burned` interval data type
+     * collection.
+     * 
+ * + * .google.devicesandservices.health.v4.BasalEnergyBurned basal_energy_burned = 41; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.BasalEnergyBurned, + com.google.devicesandservices.health.v4.BasalEnergyBurned.Builder, + com.google.devicesandservices.health.v4.BasalEnergyBurnedOrBuilder> + internalGetBasalEnergyBurnedFieldBuilder() { + if (basalEnergyBurnedBuilder_ == null) { + if (!(dataCase_ == 41)) { + data_ = com.google.devicesandservices.health.v4.BasalEnergyBurned.getDefaultInstance(); + } + basalEnergyBurnedBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.BasalEnergyBurned, + com.google.devicesandservices.health.v4.BasalEnergyBurned.Builder, + com.google.devicesandservices.health.v4.BasalEnergyBurnedOrBuilder>( + (com.google.devicesandservices.health.v4.BasalEnergyBurned) data_, + getParentForChildren(), + isClean()); + data_ = null; + } + dataCase_ = 41; + onChanged(); + return basalEnergyBurnedBuilder_; + } + + private java.lang.Object dataPointName_ = ""; + + /** + * + * + *
+     * Identifier. Data point name, only supported for the subset of identifiable
+     * data types. For the majority of the data types, individual data points do
+     * not need to be identified and this field would be empty.
+     *
+     * Format: `users/{user}/dataTypes/{data_type}/dataPoints/{data_point}`
+     *
+     * Example:
+     * `users/abcd1234/dataTypes/sleep/dataPoints/a1b2c3d4-e5f6-7890-1234-567890abcdef`
+     *
+     * The `{user}` ID is a system-generated identifier, as described in
+     * [Identity.health_user_id][google.devicesandservices.health.v4.Identity.health_user_id].
+     *
+     * The `{data_type}` ID corresponds to the kebab-case version of the field
+     * names in the [DataPoint
+     * data][google.devicesandservices.health.v4.DataPoint] union
+     * field, e.g. `total-calories` for the `total_calories` field.
+     *
+     * The `{data_point}` ID can be client-provided or system-generated.
+     * If client-provided, it must be a string of 4-63 characters,
+     * containing only lowercase letters, numbers, and hyphens.
+     * 
+ * + * string data_point_name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The dataPointName. + */ + public java.lang.String getDataPointName() { + java.lang.Object ref = dataPointName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dataPointName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Identifier. Data point name, only supported for the subset of identifiable
+     * data types. For the majority of the data types, individual data points do
+     * not need to be identified and this field would be empty.
+     *
+     * Format: `users/{user}/dataTypes/{data_type}/dataPoints/{data_point}`
+     *
+     * Example:
+     * `users/abcd1234/dataTypes/sleep/dataPoints/a1b2c3d4-e5f6-7890-1234-567890abcdef`
+     *
+     * The `{user}` ID is a system-generated identifier, as described in
+     * [Identity.health_user_id][google.devicesandservices.health.v4.Identity.health_user_id].
+     *
+     * The `{data_type}` ID corresponds to the kebab-case version of the field
+     * names in the [DataPoint
+     * data][google.devicesandservices.health.v4.DataPoint] union
+     * field, e.g. `total-calories` for the `total_calories` field.
+     *
+     * The `{data_point}` ID can be client-provided or system-generated.
+     * If client-provided, it must be a string of 4-63 characters,
+     * containing only lowercase letters, numbers, and hyphens.
+     * 
+ * + * string data_point_name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for dataPointName. + */ + public com.google.protobuf.ByteString getDataPointNameBytes() { + java.lang.Object ref = dataPointName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataPointName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Identifier. Data point name, only supported for the subset of identifiable
+     * data types. For the majority of the data types, individual data points do
+     * not need to be identified and this field would be empty.
+     *
+     * Format: `users/{user}/dataTypes/{data_type}/dataPoints/{data_point}`
+     *
+     * Example:
+     * `users/abcd1234/dataTypes/sleep/dataPoints/a1b2c3d4-e5f6-7890-1234-567890abcdef`
+     *
+     * The `{user}` ID is a system-generated identifier, as described in
+     * [Identity.health_user_id][google.devicesandservices.health.v4.Identity.health_user_id].
+     *
+     * The `{data_type}` ID corresponds to the kebab-case version of the field
+     * names in the [DataPoint
+     * data][google.devicesandservices.health.v4.DataPoint] union
+     * field, e.g. `total-calories` for the `total_calories` field.
+     *
+     * The `{data_point}` ID can be client-provided or system-generated.
+     * If client-provided, it must be a string of 4-63 characters,
+     * containing only lowercase letters, numbers, and hyphens.
+     * 
+ * + * string data_point_name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The dataPointName to set. + * @return This builder for chaining. + */ + public Builder setDataPointName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + dataPointName_ = value; + bitField0_ |= 0x40000000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. Data point name, only supported for the subset of identifiable
+     * data types. For the majority of the data types, individual data points do
+     * not need to be identified and this field would be empty.
+     *
+     * Format: `users/{user}/dataTypes/{data_type}/dataPoints/{data_point}`
+     *
+     * Example:
+     * `users/abcd1234/dataTypes/sleep/dataPoints/a1b2c3d4-e5f6-7890-1234-567890abcdef`
+     *
+     * The `{user}` ID is a system-generated identifier, as described in
+     * [Identity.health_user_id][google.devicesandservices.health.v4.Identity.health_user_id].
+     *
+     * The `{data_type}` ID corresponds to the kebab-case version of the field
+     * names in the [DataPoint
+     * data][google.devicesandservices.health.v4.DataPoint] union
+     * field, e.g. `total-calories` for the `total_calories` field.
+     *
+     * The `{data_point}` ID can be client-provided or system-generated.
+     * If client-provided, it must be a string of 4-63 characters,
+     * containing only lowercase letters, numbers, and hyphens.
+     * 
+ * + * string data_point_name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return This builder for chaining. + */ + public Builder clearDataPointName() { + dataPointName_ = getDefaultInstance().getDataPointName(); + bitField0_ = (bitField0_ & ~0x40000000); + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. Data point name, only supported for the subset of identifiable
+     * data types. For the majority of the data types, individual data points do
+     * not need to be identified and this field would be empty.
+     *
+     * Format: `users/{user}/dataTypes/{data_type}/dataPoints/{data_point}`
+     *
+     * Example:
+     * `users/abcd1234/dataTypes/sleep/dataPoints/a1b2c3d4-e5f6-7890-1234-567890abcdef`
+     *
+     * The `{user}` ID is a system-generated identifier, as described in
+     * [Identity.health_user_id][google.devicesandservices.health.v4.Identity.health_user_id].
+     *
+     * The `{data_type}` ID corresponds to the kebab-case version of the field
+     * names in the [DataPoint
+     * data][google.devicesandservices.health.v4.DataPoint] union
+     * field, e.g. `total-calories` for the `total_calories` field.
+     *
+     * The `{data_point}` ID can be client-provided or system-generated.
+     * If client-provided, it must be a string of 4-63 characters,
+     * containing only lowercase letters, numbers, and hyphens.
+     * 
+ * + * string data_point_name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The bytes for dataPointName to set. + * @return This builder for chaining. + */ + public Builder setDataPointNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + dataPointName_ = value; + bitField0_ |= 0x40000000; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.ReconciledDataPoint) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.ReconciledDataPoint) + private static final com.google.devicesandservices.health.v4.ReconciledDataPoint DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.ReconciledDataPoint(); + } + + public static com.google.devicesandservices.health.v4.ReconciledDataPoint getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ReconciledDataPoint parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.ReconciledDataPoint getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ReconciledDataPointOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ReconciledDataPointOrBuilder.java new file mode 100644 index 000000000000..d7a22604eeaa --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/ReconciledDataPointOrBuilder.java @@ -0,0 +1,1286 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_points.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface ReconciledDataPointOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.ReconciledDataPoint) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Data for points in the `steps` interval data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.Steps steps = 4; + * + * @return Whether the steps field is set. + */ + boolean hasSteps(); + + /** + * + * + *
+   * Data for points in the `steps` interval data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.Steps steps = 4; + * + * @return The steps. + */ + com.google.devicesandservices.health.v4.Steps getSteps(); + + /** + * + * + *
+   * Data for points in the `steps` interval data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.Steps steps = 4; + */ + com.google.devicesandservices.health.v4.StepsOrBuilder getStepsOrBuilder(); + + /** + * + * + *
+   * Data for points in the `floors` interval data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.Floors floors = 5; + * + * @return Whether the floors field is set. + */ + boolean hasFloors(); + + /** + * + * + *
+   * Data for points in the `floors` interval data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.Floors floors = 5; + * + * @return The floors. + */ + com.google.devicesandservices.health.v4.Floors getFloors(); + + /** + * + * + *
+   * Data for points in the `floors` interval data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.Floors floors = 5; + */ + com.google.devicesandservices.health.v4.FloorsOrBuilder getFloorsOrBuilder(); + + /** + * + * + *
+   * Data for points in the `heart-rate` sample data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.HeartRate heart_rate = 6; + * + * @return Whether the heartRate field is set. + */ + boolean hasHeartRate(); + + /** + * + * + *
+   * Data for points in the `heart-rate` sample data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.HeartRate heart_rate = 6; + * + * @return The heartRate. + */ + com.google.devicesandservices.health.v4.HeartRate getHeartRate(); + + /** + * + * + *
+   * Data for points in the `heart-rate` sample data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.HeartRate heart_rate = 6; + */ + com.google.devicesandservices.health.v4.HeartRateOrBuilder getHeartRateOrBuilder(); + + /** + * + * + *
+   * Data for points in the `sleep` session data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.Sleep sleep = 8; + * + * @return Whether the sleep field is set. + */ + boolean hasSleep(); + + /** + * + * + *
+   * Data for points in the `sleep` session data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.Sleep sleep = 8; + * + * @return The sleep. + */ + com.google.devicesandservices.health.v4.Sleep getSleep(); + + /** + * + * + *
+   * Data for points in the `sleep` session data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.Sleep sleep = 8; + */ + com.google.devicesandservices.health.v4.SleepOrBuilder getSleepOrBuilder(); + + /** + * + * + *
+   * Data for points in the `daily-resting-heart-rate` daily data type
+   * collection.
+   * 
+ * + * .google.devicesandservices.health.v4.DailyRestingHeartRate daily_resting_heart_rate = 9; + * + * + * @return Whether the dailyRestingHeartRate field is set. + */ + boolean hasDailyRestingHeartRate(); + + /** + * + * + *
+   * Data for points in the `daily-resting-heart-rate` daily data type
+   * collection.
+   * 
+ * + * .google.devicesandservices.health.v4.DailyRestingHeartRate daily_resting_heart_rate = 9; + * + * + * @return The dailyRestingHeartRate. + */ + com.google.devicesandservices.health.v4.DailyRestingHeartRate getDailyRestingHeartRate(); + + /** + * + * + *
+   * Data for points in the `daily-resting-heart-rate` daily data type
+   * collection.
+   * 
+ * + * .google.devicesandservices.health.v4.DailyRestingHeartRate daily_resting_heart_rate = 9; + * + */ + com.google.devicesandservices.health.v4.DailyRestingHeartRateOrBuilder + getDailyRestingHeartRateOrBuilder(); + + /** + * + * + *
+   * Data for points in the `daily-heart-rate-variability` daily data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.DailyHeartRateVariability daily_heart_rate_variability = 10; + * + * + * @return Whether the dailyHeartRateVariability field is set. + */ + boolean hasDailyHeartRateVariability(); + + /** + * + * + *
+   * Data for points in the `daily-heart-rate-variability` daily data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.DailyHeartRateVariability daily_heart_rate_variability = 10; + * + * + * @return The dailyHeartRateVariability. + */ + com.google.devicesandservices.health.v4.DailyHeartRateVariability getDailyHeartRateVariability(); + + /** + * + * + *
+   * Data for points in the `daily-heart-rate-variability` daily data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.DailyHeartRateVariability daily_heart_rate_variability = 10; + * + */ + com.google.devicesandservices.health.v4.DailyHeartRateVariabilityOrBuilder + getDailyHeartRateVariabilityOrBuilder(); + + /** + * + * + *
+   * Data for points in the `exercise` session data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.Exercise exercise = 11; + * + * @return Whether the exercise field is set. + */ + boolean hasExercise(); + + /** + * + * + *
+   * Data for points in the `exercise` session data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.Exercise exercise = 11; + * + * @return The exercise. + */ + com.google.devicesandservices.health.v4.Exercise getExercise(); + + /** + * + * + *
+   * Data for points in the `exercise` session data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.Exercise exercise = 11; + */ + com.google.devicesandservices.health.v4.ExerciseOrBuilder getExerciseOrBuilder(); + + /** + * + * + *
+   * Data for points in the `weight` sample data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.Weight weight = 12; + * + * @return Whether the weight field is set. + */ + boolean hasWeight(); + + /** + * + * + *
+   * Data for points in the `weight` sample data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.Weight weight = 12; + * + * @return The weight. + */ + com.google.devicesandservices.health.v4.Weight getWeight(); + + /** + * + * + *
+   * Data for points in the `weight` sample data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.Weight weight = 12; + */ + com.google.devicesandservices.health.v4.WeightOrBuilder getWeightOrBuilder(); + + /** + * + * + *
+   * Data for points in the `altitude` interval data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.Altitude altitude = 13; + * + * @return Whether the altitude field is set. + */ + boolean hasAltitude(); + + /** + * + * + *
+   * Data for points in the `altitude` interval data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.Altitude altitude = 13; + * + * @return The altitude. + */ + com.google.devicesandservices.health.v4.Altitude getAltitude(); + + /** + * + * + *
+   * Data for points in the `altitude` interval data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.Altitude altitude = 13; + */ + com.google.devicesandservices.health.v4.AltitudeOrBuilder getAltitudeOrBuilder(); + + /** + * + * + *
+   * Data for points in the `distance` interval data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.Distance distance = 14; + * + * @return Whether the distance field is set. + */ + boolean hasDistance(); + + /** + * + * + *
+   * Data for points in the `distance` interval data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.Distance distance = 14; + * + * @return The distance. + */ + com.google.devicesandservices.health.v4.Distance getDistance(); + + /** + * + * + *
+   * Data for points in the `distance` interval data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.Distance distance = 14; + */ + com.google.devicesandservices.health.v4.DistanceOrBuilder getDistanceOrBuilder(); + + /** + * + * + *
+   * Data for points in the `body-fat` sample data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.BodyFat body_fat = 15; + * + * @return Whether the bodyFat field is set. + */ + boolean hasBodyFat(); + + /** + * + * + *
+   * Data for points in the `body-fat` sample data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.BodyFat body_fat = 15; + * + * @return The bodyFat. + */ + com.google.devicesandservices.health.v4.BodyFat getBodyFat(); + + /** + * + * + *
+   * Data for points in the `body-fat` sample data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.BodyFat body_fat = 15; + */ + com.google.devicesandservices.health.v4.BodyFatOrBuilder getBodyFatOrBuilder(); + + /** + * + * + *
+   * Data for points in the `active-zone-minutes` interval data type
+   * collection, measured in minutes.
+   * 
+ * + * .google.devicesandservices.health.v4.ActiveZoneMinutes active_zone_minutes = 17; + * + * @return Whether the activeZoneMinutes field is set. + */ + boolean hasActiveZoneMinutes(); + + /** + * + * + *
+   * Data for points in the `active-zone-minutes` interval data type
+   * collection, measured in minutes.
+   * 
+ * + * .google.devicesandservices.health.v4.ActiveZoneMinutes active_zone_minutes = 17; + * + * @return The activeZoneMinutes. + */ + com.google.devicesandservices.health.v4.ActiveZoneMinutes getActiveZoneMinutes(); + + /** + * + * + *
+   * Data for points in the `active-zone-minutes` interval data type
+   * collection, measured in minutes.
+   * 
+ * + * .google.devicesandservices.health.v4.ActiveZoneMinutes active_zone_minutes = 17; + */ + com.google.devicesandservices.health.v4.ActiveZoneMinutesOrBuilder + getActiveZoneMinutesOrBuilder(); + + /** + * + * + *
+   * Data for points in the `heart-rate-variability` sample data type
+   * collection.
+   * 
+ * + * .google.devicesandservices.health.v4.HeartRateVariability heart_rate_variability = 19; + * + * + * @return Whether the heartRateVariability field is set. + */ + boolean hasHeartRateVariability(); + + /** + * + * + *
+   * Data for points in the `heart-rate-variability` sample data type
+   * collection.
+   * 
+ * + * .google.devicesandservices.health.v4.HeartRateVariability heart_rate_variability = 19; + * + * + * @return The heartRateVariability. + */ + com.google.devicesandservices.health.v4.HeartRateVariability getHeartRateVariability(); + + /** + * + * + *
+   * Data for points in the `heart-rate-variability` sample data type
+   * collection.
+   * 
+ * + * .google.devicesandservices.health.v4.HeartRateVariability heart_rate_variability = 19; + * + */ + com.google.devicesandservices.health.v4.HeartRateVariabilityOrBuilder + getHeartRateVariabilityOrBuilder(); + + /** + * + * + *
+   * Data for points in the `daily-sleep-temperature-derivations` daily data
+   * type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.DailySleepTemperatureDerivations daily_sleep_temperature_derivations = 20; + * + * + * @return Whether the dailySleepTemperatureDerivations field is set. + */ + boolean hasDailySleepTemperatureDerivations(); + + /** + * + * + *
+   * Data for points in the `daily-sleep-temperature-derivations` daily data
+   * type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.DailySleepTemperatureDerivations daily_sleep_temperature_derivations = 20; + * + * + * @return The dailySleepTemperatureDerivations. + */ + com.google.devicesandservices.health.v4.DailySleepTemperatureDerivations + getDailySleepTemperatureDerivations(); + + /** + * + * + *
+   * Data for points in the `daily-sleep-temperature-derivations` daily data
+   * type collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.DailySleepTemperatureDerivations daily_sleep_temperature_derivations = 20; + * + */ + com.google.devicesandservices.health.v4.DailySleepTemperatureDerivationsOrBuilder + getDailySleepTemperatureDerivationsOrBuilder(); + + /** + * + * + *
+   * Data for points in the `sedentary-period` interval data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.SedentaryPeriod sedentary_period = 21; + * + * @return Whether the sedentaryPeriod field is set. + */ + boolean hasSedentaryPeriod(); + + /** + * + * + *
+   * Data for points in the `sedentary-period` interval data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.SedentaryPeriod sedentary_period = 21; + * + * @return The sedentaryPeriod. + */ + com.google.devicesandservices.health.v4.SedentaryPeriod getSedentaryPeriod(); + + /** + * + * + *
+   * Data for points in the `sedentary-period` interval data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.SedentaryPeriod sedentary_period = 21; + */ + com.google.devicesandservices.health.v4.SedentaryPeriodOrBuilder getSedentaryPeriodOrBuilder(); + + /** + * + * + *
+   * Data for points in the `run-vo2-max` sample data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.RunVO2Max run_vo2_max = 22; + * + * @return Whether the runVo2Max field is set. + */ + boolean hasRunVo2Max(); + + /** + * + * + *
+   * Data for points in the `run-vo2-max` sample data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.RunVO2Max run_vo2_max = 22; + * + * @return The runVo2Max. + */ + com.google.devicesandservices.health.v4.RunVO2Max getRunVo2Max(); + + /** + * + * + *
+   * Data for points in the `run-vo2-max` sample data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.RunVO2Max run_vo2_max = 22; + */ + com.google.devicesandservices.health.v4.RunVO2MaxOrBuilder getRunVo2MaxOrBuilder(); + + /** + * + * + *
+   * Data for points in the `oxygen-saturation` sample data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.OxygenSaturation oxygen_saturation = 24; + * + * @return Whether the oxygenSaturation field is set. + */ + boolean hasOxygenSaturation(); + + /** + * + * + *
+   * Data for points in the `oxygen-saturation` sample data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.OxygenSaturation oxygen_saturation = 24; + * + * @return The oxygenSaturation. + */ + com.google.devicesandservices.health.v4.OxygenSaturation getOxygenSaturation(); + + /** + * + * + *
+   * Data for points in the `oxygen-saturation` sample data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.OxygenSaturation oxygen_saturation = 24; + */ + com.google.devicesandservices.health.v4.OxygenSaturationOrBuilder getOxygenSaturationOrBuilder(); + + /** + * + * + *
+   * Data for points in the `daily-oxygen-saturation` daily data type
+   * collection.
+   * 
+ * + * .google.devicesandservices.health.v4.DailyOxygenSaturation daily_oxygen_saturation = 25; + * + * + * @return Whether the dailyOxygenSaturation field is set. + */ + boolean hasDailyOxygenSaturation(); + + /** + * + * + *
+   * Data for points in the `daily-oxygen-saturation` daily data type
+   * collection.
+   * 
+ * + * .google.devicesandservices.health.v4.DailyOxygenSaturation daily_oxygen_saturation = 25; + * + * + * @return The dailyOxygenSaturation. + */ + com.google.devicesandservices.health.v4.DailyOxygenSaturation getDailyOxygenSaturation(); + + /** + * + * + *
+   * Data for points in the `daily-oxygen-saturation` daily data type
+   * collection.
+   * 
+ * + * .google.devicesandservices.health.v4.DailyOxygenSaturation daily_oxygen_saturation = 25; + * + */ + com.google.devicesandservices.health.v4.DailyOxygenSaturationOrBuilder + getDailyOxygenSaturationOrBuilder(); + + /** + * + * + *
+   * Data for points in the `activity-level` daily data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.ActivityLevel activity_level = 26; + * + * @return Whether the activityLevel field is set. + */ + boolean hasActivityLevel(); + + /** + * + * + *
+   * Data for points in the `activity-level` daily data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.ActivityLevel activity_level = 26; + * + * @return The activityLevel. + */ + com.google.devicesandservices.health.v4.ActivityLevel getActivityLevel(); + + /** + * + * + *
+   * Data for points in the `activity-level` daily data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.ActivityLevel activity_level = 26; + */ + com.google.devicesandservices.health.v4.ActivityLevelOrBuilder getActivityLevelOrBuilder(); + + /** + * + * + *
+   * Data for points in the `vo2-max` sample data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.VO2Max vo2_max = 27; + * + * @return Whether the vo2Max field is set. + */ + boolean hasVo2Max(); + + /** + * + * + *
+   * Data for points in the `vo2-max` sample data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.VO2Max vo2_max = 27; + * + * @return The vo2Max. + */ + com.google.devicesandservices.health.v4.VO2Max getVo2Max(); + + /** + * + * + *
+   * Data for points in the `vo2-max` sample data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.VO2Max vo2_max = 27; + */ + com.google.devicesandservices.health.v4.VO2MaxOrBuilder getVo2MaxOrBuilder(); + + /** + * + * + *
+   * Data for points in the `daily-vo2-max` daily data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.DailyVO2Max daily_vo2_max = 28; + * + * @return Whether the dailyVo2Max field is set. + */ + boolean hasDailyVo2Max(); + + /** + * + * + *
+   * Data for points in the `daily-vo2-max` daily data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.DailyVO2Max daily_vo2_max = 28; + * + * @return The dailyVo2Max. + */ + com.google.devicesandservices.health.v4.DailyVO2Max getDailyVo2Max(); + + /** + * + * + *
+   * Data for points in the `daily-vo2-max` daily data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.DailyVO2Max daily_vo2_max = 28; + */ + com.google.devicesandservices.health.v4.DailyVO2MaxOrBuilder getDailyVo2MaxOrBuilder(); + + /** + * + * + *
+   * Data for points in the `daily-heart-rate-zones` daily data type
+   * collection.
+   * 
+ * + * .google.devicesandservices.health.v4.DailyHeartRateZones daily_heart_rate_zones = 32; + * + * + * @return Whether the dailyHeartRateZones field is set. + */ + boolean hasDailyHeartRateZones(); + + /** + * + * + *
+   * Data for points in the `daily-heart-rate-zones` daily data type
+   * collection.
+   * 
+ * + * .google.devicesandservices.health.v4.DailyHeartRateZones daily_heart_rate_zones = 32; + * + * + * @return The dailyHeartRateZones. + */ + com.google.devicesandservices.health.v4.DailyHeartRateZones getDailyHeartRateZones(); + + /** + * + * + *
+   * Data for points in the `daily-heart-rate-zones` daily data type
+   * collection.
+   * 
+ * + * .google.devicesandservices.health.v4.DailyHeartRateZones daily_heart_rate_zones = 32; + * + */ + com.google.devicesandservices.health.v4.DailyHeartRateZonesOrBuilder + getDailyHeartRateZonesOrBuilder(); + + /** + * + * + *
+   * Data for points in the `hydration-log` session data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.HydrationLog hydration_log = 33; + * + * @return Whether the hydrationLog field is set. + */ + boolean hasHydrationLog(); + + /** + * + * + *
+   * Data for points in the `hydration-log` session data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.HydrationLog hydration_log = 33; + * + * @return The hydrationLog. + */ + com.google.devicesandservices.health.v4.HydrationLog getHydrationLog(); + + /** + * + * + *
+   * Data for points in the `hydration-log` session data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.HydrationLog hydration_log = 33; + */ + com.google.devicesandservices.health.v4.HydrationLogOrBuilder getHydrationLogOrBuilder(); + + /** + * + * + *
+   * Data for points in the `time-in-heart-rate-zone` interval data type
+   * collection.
+   * 
+ * + * .google.devicesandservices.health.v4.TimeInHeartRateZone time_in_heart_rate_zone = 35; + * + * + * @return Whether the timeInHeartRateZone field is set. + */ + boolean hasTimeInHeartRateZone(); + + /** + * + * + *
+   * Data for points in the `time-in-heart-rate-zone` interval data type
+   * collection.
+   * 
+ * + * .google.devicesandservices.health.v4.TimeInHeartRateZone time_in_heart_rate_zone = 35; + * + * + * @return The timeInHeartRateZone. + */ + com.google.devicesandservices.health.v4.TimeInHeartRateZone getTimeInHeartRateZone(); + + /** + * + * + *
+   * Data for points in the `time-in-heart-rate-zone` interval data type
+   * collection.
+   * 
+ * + * .google.devicesandservices.health.v4.TimeInHeartRateZone time_in_heart_rate_zone = 35; + * + */ + com.google.devicesandservices.health.v4.TimeInHeartRateZoneOrBuilder + getTimeInHeartRateZoneOrBuilder(); + + /** + * + * + *
+   * Data for points in the `active-minutes` interval data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.ActiveMinutes active_minutes = 36; + * + * @return Whether the activeMinutes field is set. + */ + boolean hasActiveMinutes(); + + /** + * + * + *
+   * Data for points in the `active-minutes` interval data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.ActiveMinutes active_minutes = 36; + * + * @return The activeMinutes. + */ + com.google.devicesandservices.health.v4.ActiveMinutes getActiveMinutes(); + + /** + * + * + *
+   * Data for points in the `active-minutes` interval data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.ActiveMinutes active_minutes = 36; + */ + com.google.devicesandservices.health.v4.ActiveMinutesOrBuilder getActiveMinutesOrBuilder(); + + /** + * + * + *
+   * Data for points in the `respiratory-rate-sleep-summary` sample data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary respiratory_rate_sleep_summary = 37; + * + * + * @return Whether the respiratoryRateSleepSummary field is set. + */ + boolean hasRespiratoryRateSleepSummary(); + + /** + * + * + *
+   * Data for points in the `respiratory-rate-sleep-summary` sample data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary respiratory_rate_sleep_summary = 37; + * + * + * @return The respiratoryRateSleepSummary. + */ + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + getRespiratoryRateSleepSummary(); + + /** + * + * + *
+   * Data for points in the `respiratory-rate-sleep-summary` sample data type
+   * collection.
+   * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary respiratory_rate_sleep_summary = 37; + * + */ + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummaryOrBuilder + getRespiratoryRateSleepSummaryOrBuilder(); + + /** + * + * + *
+   * Data for points in the `daily-respiratory-rate` daily data type
+   * collection.
+   * 
+ * + * .google.devicesandservices.health.v4.DailyRespiratoryRate daily_respiratory_rate = 38; + * + * + * @return Whether the dailyRespiratoryRate field is set. + */ + boolean hasDailyRespiratoryRate(); + + /** + * + * + *
+   * Data for points in the `daily-respiratory-rate` daily data type
+   * collection.
+   * 
+ * + * .google.devicesandservices.health.v4.DailyRespiratoryRate daily_respiratory_rate = 38; + * + * + * @return The dailyRespiratoryRate. + */ + com.google.devicesandservices.health.v4.DailyRespiratoryRate getDailyRespiratoryRate(); + + /** + * + * + *
+   * Data for points in the `daily-respiratory-rate` daily data type
+   * collection.
+   * 
+ * + * .google.devicesandservices.health.v4.DailyRespiratoryRate daily_respiratory_rate = 38; + * + */ + com.google.devicesandservices.health.v4.DailyRespiratoryRateOrBuilder + getDailyRespiratoryRateOrBuilder(); + + /** + * + * + *
+   * Data for points in the `swim-lengths-data` interval data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.SwimLengthsData swim_lengths_data = 39; + * + * @return Whether the swimLengthsData field is set. + */ + boolean hasSwimLengthsData(); + + /** + * + * + *
+   * Data for points in the `swim-lengths-data` interval data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.SwimLengthsData swim_lengths_data = 39; + * + * @return The swimLengthsData. + */ + com.google.devicesandservices.health.v4.SwimLengthsData getSwimLengthsData(); + + /** + * + * + *
+   * Data for points in the `swim-lengths-data` interval data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.SwimLengthsData swim_lengths_data = 39; + */ + com.google.devicesandservices.health.v4.SwimLengthsDataOrBuilder getSwimLengthsDataOrBuilder(); + + /** + * + * + *
+   * Data for points in the `height` sample data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.Height height = 40; + * + * @return Whether the height field is set. + */ + boolean hasHeight(); + + /** + * + * + *
+   * Data for points in the `height` sample data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.Height height = 40; + * + * @return The height. + */ + com.google.devicesandservices.health.v4.Height getHeight(); + + /** + * + * + *
+   * Data for points in the `height` sample data type collection.
+   * 
+ * + * .google.devicesandservices.health.v4.Height height = 40; + */ + com.google.devicesandservices.health.v4.HeightOrBuilder getHeightOrBuilder(); + + /** + * + * + *
+   * Data for points in the `basal-energy-burned` interval data type
+   * collection.
+   * 
+ * + * .google.devicesandservices.health.v4.BasalEnergyBurned basal_energy_burned = 41; + * + * @return Whether the basalEnergyBurned field is set. + */ + boolean hasBasalEnergyBurned(); + + /** + * + * + *
+   * Data for points in the `basal-energy-burned` interval data type
+   * collection.
+   * 
+ * + * .google.devicesandservices.health.v4.BasalEnergyBurned basal_energy_burned = 41; + * + * @return The basalEnergyBurned. + */ + com.google.devicesandservices.health.v4.BasalEnergyBurned getBasalEnergyBurned(); + + /** + * + * + *
+   * Data for points in the `basal-energy-burned` interval data type
+   * collection.
+   * 
+ * + * .google.devicesandservices.health.v4.BasalEnergyBurned basal_energy_burned = 41; + */ + com.google.devicesandservices.health.v4.BasalEnergyBurnedOrBuilder + getBasalEnergyBurnedOrBuilder(); + + /** + * + * + *
+   * Identifier. Data point name, only supported for the subset of identifiable
+   * data types. For the majority of the data types, individual data points do
+   * not need to be identified and this field would be empty.
+   *
+   * Format: `users/{user}/dataTypes/{data_type}/dataPoints/{data_point}`
+   *
+   * Example:
+   * `users/abcd1234/dataTypes/sleep/dataPoints/a1b2c3d4-e5f6-7890-1234-567890abcdef`
+   *
+   * The `{user}` ID is a system-generated identifier, as described in
+   * [Identity.health_user_id][google.devicesandservices.health.v4.Identity.health_user_id].
+   *
+   * The `{data_type}` ID corresponds to the kebab-case version of the field
+   * names in the [DataPoint
+   * data][google.devicesandservices.health.v4.DataPoint] union
+   * field, e.g. `total-calories` for the `total_calories` field.
+   *
+   * The `{data_point}` ID can be client-provided or system-generated.
+   * If client-provided, it must be a string of 4-63 characters,
+   * containing only lowercase letters, numbers, and hyphens.
+   * 
+ * + * string data_point_name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The dataPointName. + */ + java.lang.String getDataPointName(); + + /** + * + * + *
+   * Identifier. Data point name, only supported for the subset of identifiable
+   * data types. For the majority of the data types, individual data points do
+   * not need to be identified and this field would be empty.
+   *
+   * Format: `users/{user}/dataTypes/{data_type}/dataPoints/{data_point}`
+   *
+   * Example:
+   * `users/abcd1234/dataTypes/sleep/dataPoints/a1b2c3d4-e5f6-7890-1234-567890abcdef`
+   *
+   * The `{user}` ID is a system-generated identifier, as described in
+   * [Identity.health_user_id][google.devicesandservices.health.v4.Identity.health_user_id].
+   *
+   * The `{data_type}` ID corresponds to the kebab-case version of the field
+   * names in the [DataPoint
+   * data][google.devicesandservices.health.v4.DataPoint] union
+   * field, e.g. `total-calories` for the `total_calories` field.
+   *
+   * The `{data_point}` ID can be client-provided or system-generated.
+   * If client-provided, it must be a string of 4-63 characters,
+   * containing only lowercase letters, numbers, and hyphens.
+   * 
+ * + * string data_point_name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for dataPointName. + */ + com.google.protobuf.ByteString getDataPointNameBytes(); + + com.google.devicesandservices.health.v4.ReconciledDataPoint.DataCase getDataCase(); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/RespiratoryRateSleepSummary.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/RespiratoryRateSleepSummary.java new file mode 100644 index 000000000000..832e2b7b0fbb --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/RespiratoryRateSleepSummary.java @@ -0,0 +1,2924 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * Records respiratory rate details during sleep.
+ * Can have multiple per day if the user sleeps multiple times.
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.RespiratoryRateSleepSummary} + */ +@com.google.protobuf.Generated +public final class RespiratoryRateSleepSummary extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.RespiratoryRateSleepSummary) + RespiratoryRateSleepSummaryOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "RespiratoryRateSleepSummary"); + } + + // Use RespiratoryRateSleepSummary.newBuilder() to construct. + private RespiratoryRateSleepSummary(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private RespiratoryRateSleepSummary() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_RespiratoryRateSleepSummary_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_RespiratoryRateSleepSummary_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary.class, + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary.Builder.class); + } + + public interface RespiratoryRateSleepSummaryStatisticsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.RespiratoryRateSleepSummary.RespiratoryRateSleepSummaryStatistics) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. Average breaths per minute.
+     * 
+ * + * double breaths_per_minute = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The breathsPerMinute. + */ + double getBreathsPerMinute(); + + /** + * + * + *
+     * Optional. Standard deviation of the respiratory rate during sleep.
+     * 
+ * + * double standard_deviation = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The standardDeviation. + */ + double getStandardDeviation(); + + /** + * + * + *
+     * Optional. How trustworthy the data is for the computation.
+     * 
+ * + * double signal_to_noise = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The signalToNoise. + */ + double getSignalToNoise(); + } + + /** + * + * + *
+   * Respiratory rate statistics for a given sleep stage.
+   * 
+ * + * Protobuf type {@code + * google.devicesandservices.health.v4.RespiratoryRateSleepSummary.RespiratoryRateSleepSummaryStatistics} + */ + public static final class RespiratoryRateSleepSummaryStatistics + extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.RespiratoryRateSleepSummary.RespiratoryRateSleepSummaryStatistics) + RespiratoryRateSleepSummaryStatisticsOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "RespiratoryRateSleepSummaryStatistics"); + } + + // Use RespiratoryRateSleepSummaryStatistics.newBuilder() to construct. + private RespiratoryRateSleepSummaryStatistics( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private RespiratoryRateSleepSummaryStatistics() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_RespiratoryRateSleepSummary_RespiratoryRateSleepSummaryStatistics_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_RespiratoryRateSleepSummary_RespiratoryRateSleepSummaryStatistics_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics.class, + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics.Builder.class); + } + + public static final int BREATHS_PER_MINUTE_FIELD_NUMBER = 1; + private double breathsPerMinute_ = 0D; + + /** + * + * + *
+     * Required. Average breaths per minute.
+     * 
+ * + * double breaths_per_minute = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The breathsPerMinute. + */ + @java.lang.Override + public double getBreathsPerMinute() { + return breathsPerMinute_; + } + + public static final int STANDARD_DEVIATION_FIELD_NUMBER = 2; + private double standardDeviation_ = 0D; + + /** + * + * + *
+     * Optional. Standard deviation of the respiratory rate during sleep.
+     * 
+ * + * double standard_deviation = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The standardDeviation. + */ + @java.lang.Override + public double getStandardDeviation() { + return standardDeviation_; + } + + public static final int SIGNAL_TO_NOISE_FIELD_NUMBER = 3; + private double signalToNoise_ = 0D; + + /** + * + * + *
+     * Optional. How trustworthy the data is for the computation.
+     * 
+ * + * double signal_to_noise = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The signalToNoise. + */ + @java.lang.Override + public double getSignalToNoise() { + return signalToNoise_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (java.lang.Double.doubleToRawLongBits(breathsPerMinute_) != 0) { + output.writeDouble(1, breathsPerMinute_); + } + if (java.lang.Double.doubleToRawLongBits(standardDeviation_) != 0) { + output.writeDouble(2, standardDeviation_); + } + if (java.lang.Double.doubleToRawLongBits(signalToNoise_) != 0) { + output.writeDouble(3, signalToNoise_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (java.lang.Double.doubleToRawLongBits(breathsPerMinute_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(1, breathsPerMinute_); + } + if (java.lang.Double.doubleToRawLongBits(standardDeviation_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(2, standardDeviation_); + } + if (java.lang.Double.doubleToRawLongBits(signalToNoise_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(3, signalToNoise_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics + other = + (com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics) + obj; + + if (java.lang.Double.doubleToLongBits(getBreathsPerMinute()) + != java.lang.Double.doubleToLongBits(other.getBreathsPerMinute())) return false; + if (java.lang.Double.doubleToLongBits(getStandardDeviation()) + != java.lang.Double.doubleToLongBits(other.getStandardDeviation())) return false; + if (java.lang.Double.doubleToLongBits(getSignalToNoise()) + != java.lang.Double.doubleToLongBits(other.getSignalToNoise())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + BREATHS_PER_MINUTE_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getBreathsPerMinute())); + hash = (37 * hash) + STANDARD_DEVIATION_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getStandardDeviation())); + hash = (37 * hash) + SIGNAL_TO_NOISE_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getSignalToNoise())); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+     * Respiratory rate statistics for a given sleep stage.
+     * 
+ * + * Protobuf type {@code + * google.devicesandservices.health.v4.RespiratoryRateSleepSummary.RespiratoryRateSleepSummaryStatistics} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.RespiratoryRateSleepSummary.RespiratoryRateSleepSummaryStatistics) + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatisticsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_RespiratoryRateSleepSummary_RespiratoryRateSleepSummaryStatistics_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_RespiratoryRateSleepSummary_RespiratoryRateSleepSummaryStatistics_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics.class, + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics.Builder.class); + } + + // Construct using + // com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary.RespiratoryRateSleepSummaryStatistics.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + breathsPerMinute_ = 0D; + standardDeviation_ = 0D; + signalToNoise_ = 0D; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_RespiratoryRateSleepSummary_RespiratoryRateSleepSummaryStatistics_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics + getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics + build() { + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics + buildPartial() { + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics + result = + new com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.breathsPerMinute_ = breathsPerMinute_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.standardDeviation_ = standardDeviation_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.signalToNoise_ = signalToNoise_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics) { + return mergeFrom( + (com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics + other) { + if (other + == com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics.getDefaultInstance()) return this; + if (java.lang.Double.doubleToRawLongBits(other.getBreathsPerMinute()) != 0) { + setBreathsPerMinute(other.getBreathsPerMinute()); + } + if (java.lang.Double.doubleToRawLongBits(other.getStandardDeviation()) != 0) { + setStandardDeviation(other.getStandardDeviation()); + } + if (java.lang.Double.doubleToRawLongBits(other.getSignalToNoise()) != 0) { + setSignalToNoise(other.getSignalToNoise()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 9: + { + breathsPerMinute_ = input.readDouble(); + bitField0_ |= 0x00000001; + break; + } // case 9 + case 17: + { + standardDeviation_ = input.readDouble(); + bitField0_ |= 0x00000002; + break; + } // case 17 + case 25: + { + signalToNoise_ = input.readDouble(); + bitField0_ |= 0x00000004; + break; + } // case 25 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private double breathsPerMinute_; + + /** + * + * + *
+       * Required. Average breaths per minute.
+       * 
+ * + * double breaths_per_minute = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The breathsPerMinute. + */ + @java.lang.Override + public double getBreathsPerMinute() { + return breathsPerMinute_; + } + + /** + * + * + *
+       * Required. Average breaths per minute.
+       * 
+ * + * double breaths_per_minute = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The breathsPerMinute to set. + * @return This builder for chaining. + */ + public Builder setBreathsPerMinute(double value) { + + breathsPerMinute_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. Average breaths per minute.
+       * 
+ * + * double breaths_per_minute = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearBreathsPerMinute() { + bitField0_ = (bitField0_ & ~0x00000001); + breathsPerMinute_ = 0D; + onChanged(); + return this; + } + + private double standardDeviation_; + + /** + * + * + *
+       * Optional. Standard deviation of the respiratory rate during sleep.
+       * 
+ * + * double standard_deviation = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The standardDeviation. + */ + @java.lang.Override + public double getStandardDeviation() { + return standardDeviation_; + } + + /** + * + * + *
+       * Optional. Standard deviation of the respiratory rate during sleep.
+       * 
+ * + * double standard_deviation = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The standardDeviation to set. + * @return This builder for chaining. + */ + public Builder setStandardDeviation(double value) { + + standardDeviation_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. Standard deviation of the respiratory rate during sleep.
+       * 
+ * + * double standard_deviation = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearStandardDeviation() { + bitField0_ = (bitField0_ & ~0x00000002); + standardDeviation_ = 0D; + onChanged(); + return this; + } + + private double signalToNoise_; + + /** + * + * + *
+       * Optional. How trustworthy the data is for the computation.
+       * 
+ * + * double signal_to_noise = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The signalToNoise. + */ + @java.lang.Override + public double getSignalToNoise() { + return signalToNoise_; + } + + /** + * + * + *
+       * Optional. How trustworthy the data is for the computation.
+       * 
+ * + * double signal_to_noise = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The signalToNoise to set. + * @return This builder for chaining. + */ + public Builder setSignalToNoise(double value) { + + signalToNoise_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. How trustworthy the data is for the computation.
+       * 
+ * + * double signal_to_noise = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearSignalToNoise() { + bitField0_ = (bitField0_ & ~0x00000004); + signalToNoise_ = 0D; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.RespiratoryRateSleepSummary.RespiratoryRateSleepSummaryStatistics) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.RespiratoryRateSleepSummary.RespiratoryRateSleepSummaryStatistics) + private static final com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics(); + } + + public static com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RespiratoryRateSleepSummaryStatistics parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int SAMPLE_TIME_FIELD_NUMBER = 1; + private com.google.devicesandservices.health.v4.ObservationSampleTime sampleTime_; + + /** + * + * + *
+   * Required. The time at which respiratory rate was measured.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the sampleTime field is set. + */ + @java.lang.Override + public boolean hasSampleTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The time at which respiratory rate was measured.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The sampleTime. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ObservationSampleTime getSampleTime() { + return sampleTime_ == null + ? com.google.devicesandservices.health.v4.ObservationSampleTime.getDefaultInstance() + : sampleTime_; + } + + /** + * + * + *
+   * Required. The time at which respiratory rate was measured.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ObservationSampleTimeOrBuilder + getSampleTimeOrBuilder() { + return sampleTime_ == null + ? com.google.devicesandservices.health.v4.ObservationSampleTime.getDefaultInstance() + : sampleTime_; + } + + public static final int DEEP_SLEEP_STATS_FIELD_NUMBER = 2; + private com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics + deepSleepStats_; + + /** + * + * + *
+   * Optional. Respiratory rate statistics for deep sleep.
+   * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary.RespiratoryRateSleepSummaryStatistics deep_sleep_stats = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the deepSleepStats field is set. + */ + @java.lang.Override + public boolean hasDeepSleepStats() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Optional. Respiratory rate statistics for deep sleep.
+   * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary.RespiratoryRateSleepSummaryStatistics deep_sleep_stats = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The deepSleepStats. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics + getDeepSleepStats() { + return deepSleepStats_ == null + ? com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics.getDefaultInstance() + : deepSleepStats_; + } + + /** + * + * + *
+   * Optional. Respiratory rate statistics for deep sleep.
+   * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary.RespiratoryRateSleepSummaryStatistics deep_sleep_stats = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatisticsOrBuilder + getDeepSleepStatsOrBuilder() { + return deepSleepStats_ == null + ? com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics.getDefaultInstance() + : deepSleepStats_; + } + + public static final int LIGHT_SLEEP_STATS_FIELD_NUMBER = 3; + private com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics + lightSleepStats_; + + /** + * + * + *
+   * Optional. Respiratory rate statistics for light sleep.
+   * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary.RespiratoryRateSleepSummaryStatistics light_sleep_stats = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the lightSleepStats field is set. + */ + @java.lang.Override + public boolean hasLightSleepStats() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Optional. Respiratory rate statistics for light sleep.
+   * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary.RespiratoryRateSleepSummaryStatistics light_sleep_stats = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The lightSleepStats. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics + getLightSleepStats() { + return lightSleepStats_ == null + ? com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics.getDefaultInstance() + : lightSleepStats_; + } + + /** + * + * + *
+   * Optional. Respiratory rate statistics for light sleep.
+   * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary.RespiratoryRateSleepSummaryStatistics light_sleep_stats = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatisticsOrBuilder + getLightSleepStatsOrBuilder() { + return lightSleepStats_ == null + ? com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics.getDefaultInstance() + : lightSleepStats_; + } + + public static final int REM_SLEEP_STATS_FIELD_NUMBER = 4; + private com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics + remSleepStats_; + + /** + * + * + *
+   * Optional. Respiratory rate statistics for REM sleep.
+   * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary.RespiratoryRateSleepSummaryStatistics rem_sleep_stats = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the remSleepStats field is set. + */ + @java.lang.Override + public boolean hasRemSleepStats() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+   * Optional. Respiratory rate statistics for REM sleep.
+   * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary.RespiratoryRateSleepSummaryStatistics rem_sleep_stats = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The remSleepStats. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics + getRemSleepStats() { + return remSleepStats_ == null + ? com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics.getDefaultInstance() + : remSleepStats_; + } + + /** + * + * + *
+   * Optional. Respiratory rate statistics for REM sleep.
+   * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary.RespiratoryRateSleepSummaryStatistics rem_sleep_stats = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatisticsOrBuilder + getRemSleepStatsOrBuilder() { + return remSleepStats_ == null + ? com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics.getDefaultInstance() + : remSleepStats_; + } + + public static final int FULL_SLEEP_STATS_FIELD_NUMBER = 5; + private com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics + fullSleepStats_; + + /** + * + * + *
+   * Required. Full respiratory rate statistics.
+   * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary.RespiratoryRateSleepSummaryStatistics full_sleep_stats = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the fullSleepStats field is set. + */ + @java.lang.Override + public boolean hasFullSleepStats() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+   * Required. Full respiratory rate statistics.
+   * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary.RespiratoryRateSleepSummaryStatistics full_sleep_stats = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The fullSleepStats. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics + getFullSleepStats() { + return fullSleepStats_ == null + ? com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics.getDefaultInstance() + : fullSleepStats_; + } + + /** + * + * + *
+   * Required. Full respiratory rate statistics.
+   * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary.RespiratoryRateSleepSummaryStatistics full_sleep_stats = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatisticsOrBuilder + getFullSleepStatsOrBuilder() { + return fullSleepStats_ == null + ? com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics.getDefaultInstance() + : fullSleepStats_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getSampleTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getDeepSleepStats()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(3, getLightSleepStats()); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(4, getRemSleepStats()); + } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeMessage(5, getFullSleepStats()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getSampleTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDeepSleepStats()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getLightSleepStats()); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getRemSleepStats()); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getFullSleepStats()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary other = + (com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary) obj; + + if (hasSampleTime() != other.hasSampleTime()) return false; + if (hasSampleTime()) { + if (!getSampleTime().equals(other.getSampleTime())) return false; + } + if (hasDeepSleepStats() != other.hasDeepSleepStats()) return false; + if (hasDeepSleepStats()) { + if (!getDeepSleepStats().equals(other.getDeepSleepStats())) return false; + } + if (hasLightSleepStats() != other.hasLightSleepStats()) return false; + if (hasLightSleepStats()) { + if (!getLightSleepStats().equals(other.getLightSleepStats())) return false; + } + if (hasRemSleepStats() != other.hasRemSleepStats()) return false; + if (hasRemSleepStats()) { + if (!getRemSleepStats().equals(other.getRemSleepStats())) return false; + } + if (hasFullSleepStats() != other.hasFullSleepStats()) return false; + if (hasFullSleepStats()) { + if (!getFullSleepStats().equals(other.getFullSleepStats())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasSampleTime()) { + hash = (37 * hash) + SAMPLE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getSampleTime().hashCode(); + } + if (hasDeepSleepStats()) { + hash = (37 * hash) + DEEP_SLEEP_STATS_FIELD_NUMBER; + hash = (53 * hash) + getDeepSleepStats().hashCode(); + } + if (hasLightSleepStats()) { + hash = (37 * hash) + LIGHT_SLEEP_STATS_FIELD_NUMBER; + hash = (53 * hash) + getLightSleepStats().hashCode(); + } + if (hasRemSleepStats()) { + hash = (37 * hash) + REM_SLEEP_STATS_FIELD_NUMBER; + hash = (53 * hash) + getRemSleepStats().hashCode(); + } + if (hasFullSleepStats()) { + hash = (37 * hash) + FULL_SLEEP_STATS_FIELD_NUMBER; + hash = (53 * hash) + getFullSleepStats().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Records respiratory rate details during sleep.
+   * Can have multiple per day if the user sleeps multiple times.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.RespiratoryRateSleepSummary} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.RespiratoryRateSleepSummary) + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummaryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_RespiratoryRateSleepSummary_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_RespiratoryRateSleepSummary_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary.class, + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary.Builder.class); + } + + // Construct using + // com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetSampleTimeFieldBuilder(); + internalGetDeepSleepStatsFieldBuilder(); + internalGetLightSleepStatsFieldBuilder(); + internalGetRemSleepStatsFieldBuilder(); + internalGetFullSleepStatsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + sampleTime_ = null; + if (sampleTimeBuilder_ != null) { + sampleTimeBuilder_.dispose(); + sampleTimeBuilder_ = null; + } + deepSleepStats_ = null; + if (deepSleepStatsBuilder_ != null) { + deepSleepStatsBuilder_.dispose(); + deepSleepStatsBuilder_ = null; + } + lightSleepStats_ = null; + if (lightSleepStatsBuilder_ != null) { + lightSleepStatsBuilder_.dispose(); + lightSleepStatsBuilder_ = null; + } + remSleepStats_ = null; + if (remSleepStatsBuilder_ != null) { + remSleepStatsBuilder_.dispose(); + remSleepStatsBuilder_ = null; + } + fullSleepStats_ = null; + if (fullSleepStatsBuilder_ != null) { + fullSleepStatsBuilder_.dispose(); + fullSleepStatsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_RespiratoryRateSleepSummary_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary build() { + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary buildPartial() { + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary result = + new com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.sampleTime_ = sampleTimeBuilder_ == null ? sampleTime_ : sampleTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.deepSleepStats_ = + deepSleepStatsBuilder_ == null ? deepSleepStats_ : deepSleepStatsBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.lightSleepStats_ = + lightSleepStatsBuilder_ == null ? lightSleepStats_ : lightSleepStatsBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.remSleepStats_ = + remSleepStatsBuilder_ == null ? remSleepStats_ : remSleepStatsBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.fullSleepStats_ = + fullSleepStatsBuilder_ == null ? fullSleepStats_ : fullSleepStatsBuilder_.build(); + to_bitField0_ |= 0x00000010; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary) { + return mergeFrom( + (com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary other) { + if (other + == com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .getDefaultInstance()) return this; + if (other.hasSampleTime()) { + mergeSampleTime(other.getSampleTime()); + } + if (other.hasDeepSleepStats()) { + mergeDeepSleepStats(other.getDeepSleepStats()); + } + if (other.hasLightSleepStats()) { + mergeLightSleepStats(other.getLightSleepStats()); + } + if (other.hasRemSleepStats()) { + mergeRemSleepStats(other.getRemSleepStats()); + } + if (other.hasFullSleepStats()) { + mergeFullSleepStats(other.getFullSleepStats()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetSampleTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetDeepSleepStatsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetLightSleepStatsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage( + internalGetRemSleepStatsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + input.readMessage( + internalGetFullSleepStatsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.devicesandservices.health.v4.ObservationSampleTime sampleTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ObservationSampleTime, + com.google.devicesandservices.health.v4.ObservationSampleTime.Builder, + com.google.devicesandservices.health.v4.ObservationSampleTimeOrBuilder> + sampleTimeBuilder_; + + /** + * + * + *
+     * Required. The time at which respiratory rate was measured.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the sampleTime field is set. + */ + public boolean hasSampleTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. The time at which respiratory rate was measured.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The sampleTime. + */ + public com.google.devicesandservices.health.v4.ObservationSampleTime getSampleTime() { + if (sampleTimeBuilder_ == null) { + return sampleTime_ == null + ? com.google.devicesandservices.health.v4.ObservationSampleTime.getDefaultInstance() + : sampleTime_; + } else { + return sampleTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The time at which respiratory rate was measured.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSampleTime( + com.google.devicesandservices.health.v4.ObservationSampleTime value) { + if (sampleTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sampleTime_ = value; + } else { + sampleTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The time at which respiratory rate was measured.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSampleTime( + com.google.devicesandservices.health.v4.ObservationSampleTime.Builder builderForValue) { + if (sampleTimeBuilder_ == null) { + sampleTime_ = builderForValue.build(); + } else { + sampleTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The time at which respiratory rate was measured.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeSampleTime( + com.google.devicesandservices.health.v4.ObservationSampleTime value) { + if (sampleTimeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && sampleTime_ != null + && sampleTime_ + != com.google.devicesandservices.health.v4.ObservationSampleTime + .getDefaultInstance()) { + getSampleTimeBuilder().mergeFrom(value); + } else { + sampleTime_ = value; + } + } else { + sampleTimeBuilder_.mergeFrom(value); + } + if (sampleTime_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The time at which respiratory rate was measured.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearSampleTime() { + bitField0_ = (bitField0_ & ~0x00000001); + sampleTime_ = null; + if (sampleTimeBuilder_ != null) { + sampleTimeBuilder_.dispose(); + sampleTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The time at which respiratory rate was measured.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.devicesandservices.health.v4.ObservationSampleTime.Builder + getSampleTimeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetSampleTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The time at which respiratory rate was measured.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.devicesandservices.health.v4.ObservationSampleTimeOrBuilder + getSampleTimeOrBuilder() { + if (sampleTimeBuilder_ != null) { + return sampleTimeBuilder_.getMessageOrBuilder(); + } else { + return sampleTime_ == null + ? com.google.devicesandservices.health.v4.ObservationSampleTime.getDefaultInstance() + : sampleTime_; + } + } + + /** + * + * + *
+     * Required. The time at which respiratory rate was measured.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ObservationSampleTime, + com.google.devicesandservices.health.v4.ObservationSampleTime.Builder, + com.google.devicesandservices.health.v4.ObservationSampleTimeOrBuilder> + internalGetSampleTimeFieldBuilder() { + if (sampleTimeBuilder_ == null) { + sampleTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ObservationSampleTime, + com.google.devicesandservices.health.v4.ObservationSampleTime.Builder, + com.google.devicesandservices.health.v4.ObservationSampleTimeOrBuilder>( + getSampleTime(), getParentForChildren(), isClean()); + sampleTime_ = null; + } + return sampleTimeBuilder_; + } + + private com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics + deepSleepStats_; + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics, + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics.Builder, + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatisticsOrBuilder> + deepSleepStatsBuilder_; + + /** + * + * + *
+     * Optional. Respiratory rate statistics for deep sleep.
+     * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary.RespiratoryRateSleepSummaryStatistics deep_sleep_stats = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the deepSleepStats field is set. + */ + public boolean hasDeepSleepStats() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Optional. Respiratory rate statistics for deep sleep.
+     * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary.RespiratoryRateSleepSummaryStatistics deep_sleep_stats = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The deepSleepStats. + */ + public com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics + getDeepSleepStats() { + if (deepSleepStatsBuilder_ == null) { + return deepSleepStats_ == null + ? com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics.getDefaultInstance() + : deepSleepStats_; + } else { + return deepSleepStatsBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. Respiratory rate statistics for deep sleep.
+     * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary.RespiratoryRateSleepSummaryStatistics deep_sleep_stats = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDeepSleepStats( + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics + value) { + if (deepSleepStatsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + deepSleepStats_ = value; + } else { + deepSleepStatsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Respiratory rate statistics for deep sleep.
+     * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary.RespiratoryRateSleepSummaryStatistics deep_sleep_stats = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDeepSleepStats( + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics.Builder + builderForValue) { + if (deepSleepStatsBuilder_ == null) { + deepSleepStats_ = builderForValue.build(); + } else { + deepSleepStatsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Respiratory rate statistics for deep sleep.
+     * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary.RespiratoryRateSleepSummaryStatistics deep_sleep_stats = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeDeepSleepStats( + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics + value) { + if (deepSleepStatsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && deepSleepStats_ != null + && deepSleepStats_ + != com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics.getDefaultInstance()) { + getDeepSleepStatsBuilder().mergeFrom(value); + } else { + deepSleepStats_ = value; + } + } else { + deepSleepStatsBuilder_.mergeFrom(value); + } + if (deepSleepStats_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. Respiratory rate statistics for deep sleep.
+     * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary.RespiratoryRateSleepSummaryStatistics deep_sleep_stats = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearDeepSleepStats() { + bitField0_ = (bitField0_ & ~0x00000002); + deepSleepStats_ = null; + if (deepSleepStatsBuilder_ != null) { + deepSleepStatsBuilder_.dispose(); + deepSleepStatsBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Respiratory rate statistics for deep sleep.
+     * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary.RespiratoryRateSleepSummaryStatistics deep_sleep_stats = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics.Builder + getDeepSleepStatsBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetDeepSleepStatsFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Respiratory rate statistics for deep sleep.
+     * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary.RespiratoryRateSleepSummaryStatistics deep_sleep_stats = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatisticsOrBuilder + getDeepSleepStatsOrBuilder() { + if (deepSleepStatsBuilder_ != null) { + return deepSleepStatsBuilder_.getMessageOrBuilder(); + } else { + return deepSleepStats_ == null + ? com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics.getDefaultInstance() + : deepSleepStats_; + } + } + + /** + * + * + *
+     * Optional. Respiratory rate statistics for deep sleep.
+     * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary.RespiratoryRateSleepSummaryStatistics deep_sleep_stats = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics, + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics.Builder, + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatisticsOrBuilder> + internalGetDeepSleepStatsFieldBuilder() { + if (deepSleepStatsBuilder_ == null) { + deepSleepStatsBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics, + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics.Builder, + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatisticsOrBuilder>( + getDeepSleepStats(), getParentForChildren(), isClean()); + deepSleepStats_ = null; + } + return deepSleepStatsBuilder_; + } + + private com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics + lightSleepStats_; + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics, + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics.Builder, + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatisticsOrBuilder> + lightSleepStatsBuilder_; + + /** + * + * + *
+     * Optional. Respiratory rate statistics for light sleep.
+     * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary.RespiratoryRateSleepSummaryStatistics light_sleep_stats = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the lightSleepStats field is set. + */ + public boolean hasLightSleepStats() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Optional. Respiratory rate statistics for light sleep.
+     * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary.RespiratoryRateSleepSummaryStatistics light_sleep_stats = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The lightSleepStats. + */ + public com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics + getLightSleepStats() { + if (lightSleepStatsBuilder_ == null) { + return lightSleepStats_ == null + ? com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics.getDefaultInstance() + : lightSleepStats_; + } else { + return lightSleepStatsBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. Respiratory rate statistics for light sleep.
+     * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary.RespiratoryRateSleepSummaryStatistics light_sleep_stats = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setLightSleepStats( + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics + value) { + if (lightSleepStatsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + lightSleepStats_ = value; + } else { + lightSleepStatsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Respiratory rate statistics for light sleep.
+     * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary.RespiratoryRateSleepSummaryStatistics light_sleep_stats = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setLightSleepStats( + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics.Builder + builderForValue) { + if (lightSleepStatsBuilder_ == null) { + lightSleepStats_ = builderForValue.build(); + } else { + lightSleepStatsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Respiratory rate statistics for light sleep.
+     * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary.RespiratoryRateSleepSummaryStatistics light_sleep_stats = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeLightSleepStats( + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics + value) { + if (lightSleepStatsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && lightSleepStats_ != null + && lightSleepStats_ + != com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics.getDefaultInstance()) { + getLightSleepStatsBuilder().mergeFrom(value); + } else { + lightSleepStats_ = value; + } + } else { + lightSleepStatsBuilder_.mergeFrom(value); + } + if (lightSleepStats_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. Respiratory rate statistics for light sleep.
+     * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary.RespiratoryRateSleepSummaryStatistics light_sleep_stats = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearLightSleepStats() { + bitField0_ = (bitField0_ & ~0x00000004); + lightSleepStats_ = null; + if (lightSleepStatsBuilder_ != null) { + lightSleepStatsBuilder_.dispose(); + lightSleepStatsBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Respiratory rate statistics for light sleep.
+     * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary.RespiratoryRateSleepSummaryStatistics light_sleep_stats = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics.Builder + getLightSleepStatsBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetLightSleepStatsFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Respiratory rate statistics for light sleep.
+     * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary.RespiratoryRateSleepSummaryStatistics light_sleep_stats = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatisticsOrBuilder + getLightSleepStatsOrBuilder() { + if (lightSleepStatsBuilder_ != null) { + return lightSleepStatsBuilder_.getMessageOrBuilder(); + } else { + return lightSleepStats_ == null + ? com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics.getDefaultInstance() + : lightSleepStats_; + } + } + + /** + * + * + *
+     * Optional. Respiratory rate statistics for light sleep.
+     * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary.RespiratoryRateSleepSummaryStatistics light_sleep_stats = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics, + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics.Builder, + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatisticsOrBuilder> + internalGetLightSleepStatsFieldBuilder() { + if (lightSleepStatsBuilder_ == null) { + lightSleepStatsBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics, + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics.Builder, + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatisticsOrBuilder>( + getLightSleepStats(), getParentForChildren(), isClean()); + lightSleepStats_ = null; + } + return lightSleepStatsBuilder_; + } + + private com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics + remSleepStats_; + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics, + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics.Builder, + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatisticsOrBuilder> + remSleepStatsBuilder_; + + /** + * + * + *
+     * Optional. Respiratory rate statistics for REM sleep.
+     * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary.RespiratoryRateSleepSummaryStatistics rem_sleep_stats = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the remSleepStats field is set. + */ + public boolean hasRemSleepStats() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+     * Optional. Respiratory rate statistics for REM sleep.
+     * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary.RespiratoryRateSleepSummaryStatistics rem_sleep_stats = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The remSleepStats. + */ + public com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics + getRemSleepStats() { + if (remSleepStatsBuilder_ == null) { + return remSleepStats_ == null + ? com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics.getDefaultInstance() + : remSleepStats_; + } else { + return remSleepStatsBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. Respiratory rate statistics for REM sleep.
+     * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary.RespiratoryRateSleepSummaryStatistics rem_sleep_stats = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRemSleepStats( + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics + value) { + if (remSleepStatsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + remSleepStats_ = value; + } else { + remSleepStatsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Respiratory rate statistics for REM sleep.
+     * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary.RespiratoryRateSleepSummaryStatistics rem_sleep_stats = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRemSleepStats( + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics.Builder + builderForValue) { + if (remSleepStatsBuilder_ == null) { + remSleepStats_ = builderForValue.build(); + } else { + remSleepStatsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Respiratory rate statistics for REM sleep.
+     * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary.RespiratoryRateSleepSummaryStatistics rem_sleep_stats = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeRemSleepStats( + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics + value) { + if (remSleepStatsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && remSleepStats_ != null + && remSleepStats_ + != com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics.getDefaultInstance()) { + getRemSleepStatsBuilder().mergeFrom(value); + } else { + remSleepStats_ = value; + } + } else { + remSleepStatsBuilder_.mergeFrom(value); + } + if (remSleepStats_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. Respiratory rate statistics for REM sleep.
+     * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary.RespiratoryRateSleepSummaryStatistics rem_sleep_stats = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearRemSleepStats() { + bitField0_ = (bitField0_ & ~0x00000008); + remSleepStats_ = null; + if (remSleepStatsBuilder_ != null) { + remSleepStatsBuilder_.dispose(); + remSleepStatsBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Respiratory rate statistics for REM sleep.
+     * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary.RespiratoryRateSleepSummaryStatistics rem_sleep_stats = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics.Builder + getRemSleepStatsBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return internalGetRemSleepStatsFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Respiratory rate statistics for REM sleep.
+     * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary.RespiratoryRateSleepSummaryStatistics rem_sleep_stats = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatisticsOrBuilder + getRemSleepStatsOrBuilder() { + if (remSleepStatsBuilder_ != null) { + return remSleepStatsBuilder_.getMessageOrBuilder(); + } else { + return remSleepStats_ == null + ? com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics.getDefaultInstance() + : remSleepStats_; + } + } + + /** + * + * + *
+     * Optional. Respiratory rate statistics for REM sleep.
+     * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary.RespiratoryRateSleepSummaryStatistics rem_sleep_stats = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics, + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics.Builder, + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatisticsOrBuilder> + internalGetRemSleepStatsFieldBuilder() { + if (remSleepStatsBuilder_ == null) { + remSleepStatsBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics, + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics.Builder, + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatisticsOrBuilder>( + getRemSleepStats(), getParentForChildren(), isClean()); + remSleepStats_ = null; + } + return remSleepStatsBuilder_; + } + + private com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics + fullSleepStats_; + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics, + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics.Builder, + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatisticsOrBuilder> + fullSleepStatsBuilder_; + + /** + * + * + *
+     * Required. Full respiratory rate statistics.
+     * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary.RespiratoryRateSleepSummaryStatistics full_sleep_stats = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the fullSleepStats field is set. + */ + public boolean hasFullSleepStats() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+     * Required. Full respiratory rate statistics.
+     * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary.RespiratoryRateSleepSummaryStatistics full_sleep_stats = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The fullSleepStats. + */ + public com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics + getFullSleepStats() { + if (fullSleepStatsBuilder_ == null) { + return fullSleepStats_ == null + ? com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics.getDefaultInstance() + : fullSleepStats_; + } else { + return fullSleepStatsBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. Full respiratory rate statistics.
+     * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary.RespiratoryRateSleepSummaryStatistics full_sleep_stats = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setFullSleepStats( + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics + value) { + if (fullSleepStatsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + fullSleepStats_ = value; + } else { + fullSleepStatsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Full respiratory rate statistics.
+     * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary.RespiratoryRateSleepSummaryStatistics full_sleep_stats = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setFullSleepStats( + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics.Builder + builderForValue) { + if (fullSleepStatsBuilder_ == null) { + fullSleepStats_ = builderForValue.build(); + } else { + fullSleepStatsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Full respiratory rate statistics.
+     * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary.RespiratoryRateSleepSummaryStatistics full_sleep_stats = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeFullSleepStats( + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics + value) { + if (fullSleepStatsBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && fullSleepStats_ != null + && fullSleepStats_ + != com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics.getDefaultInstance()) { + getFullSleepStatsBuilder().mergeFrom(value); + } else { + fullSleepStats_ = value; + } + } else { + fullSleepStatsBuilder_.mergeFrom(value); + } + if (fullSleepStats_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. Full respiratory rate statistics.
+     * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary.RespiratoryRateSleepSummaryStatistics full_sleep_stats = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearFullSleepStats() { + bitField0_ = (bitField0_ & ~0x00000010); + fullSleepStats_ = null; + if (fullSleepStatsBuilder_ != null) { + fullSleepStatsBuilder_.dispose(); + fullSleepStatsBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Full respiratory rate statistics.
+     * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary.RespiratoryRateSleepSummaryStatistics full_sleep_stats = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics.Builder + getFullSleepStatsBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return internalGetFullSleepStatsFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. Full respiratory rate statistics.
+     * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary.RespiratoryRateSleepSummaryStatistics full_sleep_stats = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatisticsOrBuilder + getFullSleepStatsOrBuilder() { + if (fullSleepStatsBuilder_ != null) { + return fullSleepStatsBuilder_.getMessageOrBuilder(); + } else { + return fullSleepStats_ == null + ? com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics.getDefaultInstance() + : fullSleepStats_; + } + } + + /** + * + * + *
+     * Required. Full respiratory rate statistics.
+     * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary.RespiratoryRateSleepSummaryStatistics full_sleep_stats = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics, + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics.Builder, + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatisticsOrBuilder> + internalGetFullSleepStatsFieldBuilder() { + if (fullSleepStatsBuilder_ == null) { + fullSleepStatsBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics, + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics.Builder, + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatisticsOrBuilder>( + getFullSleepStats(), getParentForChildren(), isClean()); + fullSleepStats_ = null; + } + return fullSleepStatsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.RespiratoryRateSleepSummary) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.RespiratoryRateSleepSummary) + private static final com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary(); + } + + public static com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RespiratoryRateSleepSummary parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/RespiratoryRateSleepSummaryOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/RespiratoryRateSleepSummaryOrBuilder.java new file mode 100644 index 000000000000..916714d5e0a2 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/RespiratoryRateSleepSummaryOrBuilder.java @@ -0,0 +1,259 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface RespiratoryRateSleepSummaryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.RespiratoryRateSleepSummary) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The time at which respiratory rate was measured.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the sampleTime field is set. + */ + boolean hasSampleTime(); + + /** + * + * + *
+   * Required. The time at which respiratory rate was measured.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The sampleTime. + */ + com.google.devicesandservices.health.v4.ObservationSampleTime getSampleTime(); + + /** + * + * + *
+   * Required. The time at which respiratory rate was measured.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.devicesandservices.health.v4.ObservationSampleTimeOrBuilder getSampleTimeOrBuilder(); + + /** + * + * + *
+   * Optional. Respiratory rate statistics for deep sleep.
+   * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary.RespiratoryRateSleepSummaryStatistics deep_sleep_stats = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the deepSleepStats field is set. + */ + boolean hasDeepSleepStats(); + + /** + * + * + *
+   * Optional. Respiratory rate statistics for deep sleep.
+   * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary.RespiratoryRateSleepSummaryStatistics deep_sleep_stats = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The deepSleepStats. + */ + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics + getDeepSleepStats(); + + /** + * + * + *
+   * Optional. Respiratory rate statistics for deep sleep.
+   * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary.RespiratoryRateSleepSummaryStatistics deep_sleep_stats = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatisticsOrBuilder + getDeepSleepStatsOrBuilder(); + + /** + * + * + *
+   * Optional. Respiratory rate statistics for light sleep.
+   * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary.RespiratoryRateSleepSummaryStatistics light_sleep_stats = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the lightSleepStats field is set. + */ + boolean hasLightSleepStats(); + + /** + * + * + *
+   * Optional. Respiratory rate statistics for light sleep.
+   * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary.RespiratoryRateSleepSummaryStatistics light_sleep_stats = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The lightSleepStats. + */ + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics + getLightSleepStats(); + + /** + * + * + *
+   * Optional. Respiratory rate statistics for light sleep.
+   * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary.RespiratoryRateSleepSummaryStatistics light_sleep_stats = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatisticsOrBuilder + getLightSleepStatsOrBuilder(); + + /** + * + * + *
+   * Optional. Respiratory rate statistics for REM sleep.
+   * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary.RespiratoryRateSleepSummaryStatistics rem_sleep_stats = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the remSleepStats field is set. + */ + boolean hasRemSleepStats(); + + /** + * + * + *
+   * Optional. Respiratory rate statistics for REM sleep.
+   * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary.RespiratoryRateSleepSummaryStatistics rem_sleep_stats = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The remSleepStats. + */ + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics + getRemSleepStats(); + + /** + * + * + *
+   * Optional. Respiratory rate statistics for REM sleep.
+   * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary.RespiratoryRateSleepSummaryStatistics rem_sleep_stats = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatisticsOrBuilder + getRemSleepStatsOrBuilder(); + + /** + * + * + *
+   * Required. Full respiratory rate statistics.
+   * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary.RespiratoryRateSleepSummaryStatistics full_sleep_stats = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the fullSleepStats field is set. + */ + boolean hasFullSleepStats(); + + /** + * + * + *
+   * Required. Full respiratory rate statistics.
+   * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary.RespiratoryRateSleepSummaryStatistics full_sleep_stats = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The fullSleepStats. + */ + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatistics + getFullSleepStats(); + + /** + * + * + *
+   * Required. Full respiratory rate statistics.
+   * 
+ * + * + * .google.devicesandservices.health.v4.RespiratoryRateSleepSummary.RespiratoryRateSleepSummaryStatistics full_sleep_stats = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.devicesandservices.health.v4.RespiratoryRateSleepSummary + .RespiratoryRateSleepSummaryStatisticsOrBuilder + getFullSleepStatsOrBuilder(); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/RestingHeartRatePersonalRangeRollupValue.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/RestingHeartRatePersonalRangeRollupValue.java new file mode 100644 index 000000000000..db4c50492cb6 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/RestingHeartRatePersonalRangeRollupValue.java @@ -0,0 +1,722 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * Represents the rollup value for the daily resting heart rate data type.
+ * 
+ * + * Protobuf type {@code + * google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue} + */ +@com.google.protobuf.Generated +public final class RestingHeartRatePersonalRangeRollupValue + extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue) + RestingHeartRatePersonalRangeRollupValueOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "RestingHeartRatePersonalRangeRollupValue"); + } + + // Use RestingHeartRatePersonalRangeRollupValue.newBuilder() to construct. + private RestingHeartRatePersonalRangeRollupValue( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private RestingHeartRatePersonalRangeRollupValue() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_RestingHeartRatePersonalRangeRollupValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_RestingHeartRatePersonalRangeRollupValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue.class, + com.google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue.Builder + .class); + } + + private int bitField0_; + public static final int BEATS_PER_MINUTE_MIN_FIELD_NUMBER = 1; + private double beatsPerMinuteMin_ = 0D; + + /** + * + * + *
+   * The lower bound of the user's daily resting heart rate personal range.
+   * 
+ * + * optional double beats_per_minute_min = 1; + * + * @return Whether the beatsPerMinuteMin field is set. + */ + @java.lang.Override + public boolean hasBeatsPerMinuteMin() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * The lower bound of the user's daily resting heart rate personal range.
+   * 
+ * + * optional double beats_per_minute_min = 1; + * + * @return The beatsPerMinuteMin. + */ + @java.lang.Override + public double getBeatsPerMinuteMin() { + return beatsPerMinuteMin_; + } + + public static final int BEATS_PER_MINUTE_MAX_FIELD_NUMBER = 2; + private double beatsPerMinuteMax_ = 0D; + + /** + * + * + *
+   * The upper bound of the user's daily resting heart rate personal range.
+   * 
+ * + * optional double beats_per_minute_max = 2; + * + * @return Whether the beatsPerMinuteMax field is set. + */ + @java.lang.Override + public boolean hasBeatsPerMinuteMax() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * The upper bound of the user's daily resting heart rate personal range.
+   * 
+ * + * optional double beats_per_minute_max = 2; + * + * @return The beatsPerMinuteMax. + */ + @java.lang.Override + public double getBeatsPerMinuteMax() { + return beatsPerMinuteMax_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeDouble(1, beatsPerMinuteMin_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeDouble(2, beatsPerMinuteMax_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(1, beatsPerMinuteMin_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(2, beatsPerMinuteMax_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue other = + (com.google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue) obj; + + if (hasBeatsPerMinuteMin() != other.hasBeatsPerMinuteMin()) return false; + if (hasBeatsPerMinuteMin()) { + if (java.lang.Double.doubleToLongBits(getBeatsPerMinuteMin()) + != java.lang.Double.doubleToLongBits(other.getBeatsPerMinuteMin())) return false; + } + if (hasBeatsPerMinuteMax() != other.hasBeatsPerMinuteMax()) return false; + if (hasBeatsPerMinuteMax()) { + if (java.lang.Double.doubleToLongBits(getBeatsPerMinuteMax()) + != java.lang.Double.doubleToLongBits(other.getBeatsPerMinuteMax())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasBeatsPerMinuteMin()) { + hash = (37 * hash) + BEATS_PER_MINUTE_MIN_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getBeatsPerMinuteMin())); + } + if (hasBeatsPerMinuteMax()) { + hash = (37 * hash) + BEATS_PER_MINUTE_MAX_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getBeatsPerMinuteMax())); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Represents the rollup value for the daily resting heart rate data type.
+   * 
+ * + * Protobuf type {@code + * google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue) + com.google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_RestingHeartRatePersonalRangeRollupValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_RestingHeartRatePersonalRangeRollupValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue + .class, + com.google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue + .Builder.class); + } + + // Construct using + // com.google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + beatsPerMinuteMin_ = 0D; + beatsPerMinuteMax_ = 0D; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_RestingHeartRatePersonalRangeRollupValue_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue + getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue + build() { + com.google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue + buildPartial() { + com.google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue result = + new com.google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.beatsPerMinuteMin_ = beatsPerMinuteMin_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.beatsPerMinuteMax_ = beatsPerMinuteMax_; + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue) { + return mergeFrom( + (com.google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue other) { + if (other + == com.google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue + .getDefaultInstance()) return this; + if (other.hasBeatsPerMinuteMin()) { + setBeatsPerMinuteMin(other.getBeatsPerMinuteMin()); + } + if (other.hasBeatsPerMinuteMax()) { + setBeatsPerMinuteMax(other.getBeatsPerMinuteMax()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 9: + { + beatsPerMinuteMin_ = input.readDouble(); + bitField0_ |= 0x00000001; + break; + } // case 9 + case 17: + { + beatsPerMinuteMax_ = input.readDouble(); + bitField0_ |= 0x00000002; + break; + } // case 17 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private double beatsPerMinuteMin_; + + /** + * + * + *
+     * The lower bound of the user's daily resting heart rate personal range.
+     * 
+ * + * optional double beats_per_minute_min = 1; + * + * @return Whether the beatsPerMinuteMin field is set. + */ + @java.lang.Override + public boolean hasBeatsPerMinuteMin() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * The lower bound of the user's daily resting heart rate personal range.
+     * 
+ * + * optional double beats_per_minute_min = 1; + * + * @return The beatsPerMinuteMin. + */ + @java.lang.Override + public double getBeatsPerMinuteMin() { + return beatsPerMinuteMin_; + } + + /** + * + * + *
+     * The lower bound of the user's daily resting heart rate personal range.
+     * 
+ * + * optional double beats_per_minute_min = 1; + * + * @param value The beatsPerMinuteMin to set. + * @return This builder for chaining. + */ + public Builder setBeatsPerMinuteMin(double value) { + + beatsPerMinuteMin_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The lower bound of the user's daily resting heart rate personal range.
+     * 
+ * + * optional double beats_per_minute_min = 1; + * + * @return This builder for chaining. + */ + public Builder clearBeatsPerMinuteMin() { + bitField0_ = (bitField0_ & ~0x00000001); + beatsPerMinuteMin_ = 0D; + onChanged(); + return this; + } + + private double beatsPerMinuteMax_; + + /** + * + * + *
+     * The upper bound of the user's daily resting heart rate personal range.
+     * 
+ * + * optional double beats_per_minute_max = 2; + * + * @return Whether the beatsPerMinuteMax field is set. + */ + @java.lang.Override + public boolean hasBeatsPerMinuteMax() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * The upper bound of the user's daily resting heart rate personal range.
+     * 
+ * + * optional double beats_per_minute_max = 2; + * + * @return The beatsPerMinuteMax. + */ + @java.lang.Override + public double getBeatsPerMinuteMax() { + return beatsPerMinuteMax_; + } + + /** + * + * + *
+     * The upper bound of the user's daily resting heart rate personal range.
+     * 
+ * + * optional double beats_per_minute_max = 2; + * + * @param value The beatsPerMinuteMax to set. + * @return This builder for chaining. + */ + public Builder setBeatsPerMinuteMax(double value) { + + beatsPerMinuteMax_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * The upper bound of the user's daily resting heart rate personal range.
+     * 
+ * + * optional double beats_per_minute_max = 2; + * + * @return This builder for chaining. + */ + public Builder clearBeatsPerMinuteMax() { + bitField0_ = (bitField0_ & ~0x00000002); + beatsPerMinuteMax_ = 0D; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue) + private static final com.google.devicesandservices.health.v4 + .RestingHeartRatePersonalRangeRollupValue + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue(); + } + + public static com.google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RestingHeartRatePersonalRangeRollupValue parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/RestingHeartRatePersonalRangeRollupValueOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/RestingHeartRatePersonalRangeRollupValueOrBuilder.java new file mode 100644 index 000000000000..fa0f5887ecd5 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/RestingHeartRatePersonalRangeRollupValueOrBuilder.java @@ -0,0 +1,80 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface RestingHeartRatePersonalRangeRollupValueOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.RestingHeartRatePersonalRangeRollupValue) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The lower bound of the user's daily resting heart rate personal range.
+   * 
+ * + * optional double beats_per_minute_min = 1; + * + * @return Whether the beatsPerMinuteMin field is set. + */ + boolean hasBeatsPerMinuteMin(); + + /** + * + * + *
+   * The lower bound of the user's daily resting heart rate personal range.
+   * 
+ * + * optional double beats_per_minute_min = 1; + * + * @return The beatsPerMinuteMin. + */ + double getBeatsPerMinuteMin(); + + /** + * + * + *
+   * The upper bound of the user's daily resting heart rate personal range.
+   * 
+ * + * optional double beats_per_minute_max = 2; + * + * @return Whether the beatsPerMinuteMax field is set. + */ + boolean hasBeatsPerMinuteMax(); + + /** + * + * + *
+   * The upper bound of the user's daily resting heart rate personal range.
+   * 
+ * + * optional double beats_per_minute_max = 2; + * + * @return The beatsPerMinuteMax. + */ + double getBeatsPerMinuteMax(); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/RollUpDataPointsRequest.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/RollUpDataPointsRequest.java new file mode 100644 index 000000000000..889e397c742d --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/RollUpDataPointsRequest.java @@ -0,0 +1,1878 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_points.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * Request to roll up data points by physical time intervals.
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.RollUpDataPointsRequest} + */ +@com.google.protobuf.Generated +public final class RollUpDataPointsRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.RollUpDataPointsRequest) + RollUpDataPointsRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "RollUpDataPointsRequest"); + } + + // Use RollUpDataPointsRequest.newBuilder() to construct. + private RollUpDataPointsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private RollUpDataPointsRequest() { + parent_ = ""; + pageToken_ = ""; + dataSourceFamily_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_RollUpDataPointsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_RollUpDataPointsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.RollUpDataPointsRequest.class, + com.google.devicesandservices.health.v4.RollUpDataPointsRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. Parent data type of the Data Point collection.
+   *
+   * Format: `users/{user}/dataTypes/{data_type}`, e.g.:
+   *
+   * - `users/me/dataTypes/steps`
+   * - `users/me/dataTypes/distance`
+   *
+   * For a list of the supported data types see the [RollupDataPoint
+   * value][google.devicesandservices.health.v4.RollupDataPoint]
+   * union field.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Parent data type of the Data Point collection.
+   *
+   * Format: `users/{user}/dataTypes/{data_type}`, e.g.:
+   *
+   * - `users/me/dataTypes/steps`
+   * - `users/me/dataTypes/distance`
+   *
+   * For a list of the supported data types see the [RollupDataPoint
+   * value][google.devicesandservices.health.v4.RollupDataPoint]
+   * union field.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RANGE_FIELD_NUMBER = 2; + private com.google.type.Interval range_; + + /** + * + * + *
+   * Required. Closed-open range of data points that will be rolled up.
+   * The maximum range for `calories-in-heart-rate-zone`, `heart-rate`,
+   * `active-minutes` and `total-calories` is 14 days.
+   * The maximum range for all other data types is 90 days.
+   * 
+ * + * .google.type.Interval range = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the range field is set. + */ + @java.lang.Override + public boolean hasRange() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. Closed-open range of data points that will be rolled up.
+   * The maximum range for `calories-in-heart-rate-zone`, `heart-rate`,
+   * `active-minutes` and `total-calories` is 14 days.
+   * The maximum range for all other data types is 90 days.
+   * 
+ * + * .google.type.Interval range = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The range. + */ + @java.lang.Override + public com.google.type.Interval getRange() { + return range_ == null ? com.google.type.Interval.getDefaultInstance() : range_; + } + + /** + * + * + *
+   * Required. Closed-open range of data points that will be rolled up.
+   * The maximum range for `calories-in-heart-rate-zone`, `heart-rate`,
+   * `active-minutes` and `total-calories` is 14 days.
+   * The maximum range for all other data types is 90 days.
+   * 
+ * + * .google.type.Interval range = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.type.IntervalOrBuilder getRangeOrBuilder() { + return range_ == null ? com.google.type.Interval.getDefaultInstance() : range_; + } + + public static final int WINDOW_SIZE_FIELD_NUMBER = 3; + private com.google.protobuf.Duration windowSize_; + + /** + * + * + *
+   * Required. The size of the time window to group data points into before
+   * applying the aggregation functions.
+   * 
+ * + * .google.protobuf.Duration window_size = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the windowSize field is set. + */ + @java.lang.Override + public boolean hasWindowSize() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Required. The size of the time window to group data points into before
+   * applying the aggregation functions.
+   * 
+ * + * .google.protobuf.Duration window_size = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The windowSize. + */ + @java.lang.Override + public com.google.protobuf.Duration getWindowSize() { + return windowSize_ == null ? com.google.protobuf.Duration.getDefaultInstance() : windowSize_; + } + + /** + * + * + *
+   * Required. The size of the time window to group data points into before
+   * applying the aggregation functions.
+   * 
+ * + * .google.protobuf.Duration window_size = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getWindowSizeOrBuilder() { + return windowSize_ == null ? com.google.protobuf.Duration.getDefaultInstance() : windowSize_; + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 4; + private int pageSize_ = 0; + + /** + * + * + *
+   * Optional. The maximum number of data points to return.
+   * If unspecified, at most 1440 data points will be returned.
+   * The maximum page size is 10000; values above that will be truncated
+   * accordingly.
+   * 
+ * + * int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + + /** + * + * + *
+   * Optional. The next_page_token from a previous request, if any.
+   * All other request fields need to be the same as in the initial request
+   * when the page token is specified.
+   * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The next_page_token from a previous request, if any.
+   * All other request fields need to be the same as in the initial request
+   * when the page token is specified.
+   * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATA_SOURCE_FAMILY_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object dataSourceFamily_ = ""; + + /** + * + * + *
+   * Optional. The data source family name to roll up.
+   *
+   * If empty, data points from all available data sources will be rolled up.
+   *
+   * Format: `users/me/dataSourceFamilies/{data_source_family}`
+   *
+   * The supported values are:
+   *
+   * - `users/me/dataSourceFamilies/all-sources` - default value
+   * - `users/me/dataSourceFamilies/google-wearables` - tracker devices
+   * - `users/me/dataSourceFamilies/google-sources` - Google first party
+   * sources
+   * 
+ * + * string data_source_family = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The dataSourceFamily. + */ + @java.lang.Override + public java.lang.String getDataSourceFamily() { + java.lang.Object ref = dataSourceFamily_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dataSourceFamily_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The data source family name to roll up.
+   *
+   * If empty, data points from all available data sources will be rolled up.
+   *
+   * Format: `users/me/dataSourceFamilies/{data_source_family}`
+   *
+   * The supported values are:
+   *
+   * - `users/me/dataSourceFamilies/all-sources` - default value
+   * - `users/me/dataSourceFamilies/google-wearables` - tracker devices
+   * - `users/me/dataSourceFamilies/google-sources` - Google first party
+   * sources
+   * 
+ * + * string data_source_family = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for dataSourceFamily. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDataSourceFamilyBytes() { + java.lang.Object ref = dataSourceFamily_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataSourceFamily_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getRange()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getWindowSize()); + } + if (pageSize_ != 0) { + output.writeInt32(4, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(dataSourceFamily_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 7, dataSourceFamily_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getRange()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getWindowSize()); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(dataSourceFamily_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(7, dataSourceFamily_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.RollUpDataPointsRequest)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.RollUpDataPointsRequest other = + (com.google.devicesandservices.health.v4.RollUpDataPointsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasRange() != other.hasRange()) return false; + if (hasRange()) { + if (!getRange().equals(other.getRange())) return false; + } + if (hasWindowSize() != other.hasWindowSize()) return false; + if (hasWindowSize()) { + if (!getWindowSize().equals(other.getWindowSize())) return false; + } + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getDataSourceFamily().equals(other.getDataSourceFamily())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasRange()) { + hash = (37 * hash) + RANGE_FIELD_NUMBER; + hash = (53 * hash) + getRange().hashCode(); + } + if (hasWindowSize()) { + hash = (37 * hash) + WINDOW_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getWindowSize().hashCode(); + } + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + DATA_SOURCE_FAMILY_FIELD_NUMBER; + hash = (53 * hash) + getDataSourceFamily().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.RollUpDataPointsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.RollUpDataPointsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.RollUpDataPointsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.RollUpDataPointsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.RollUpDataPointsRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.RollUpDataPointsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.RollUpDataPointsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.RollUpDataPointsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.RollUpDataPointsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.RollUpDataPointsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.RollUpDataPointsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.RollUpDataPointsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.RollUpDataPointsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request to roll up data points by physical time intervals.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.RollUpDataPointsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.RollUpDataPointsRequest) + com.google.devicesandservices.health.v4.RollUpDataPointsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_RollUpDataPointsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_RollUpDataPointsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.RollUpDataPointsRequest.class, + com.google.devicesandservices.health.v4.RollUpDataPointsRequest.Builder.class); + } + + // Construct using com.google.devicesandservices.health.v4.RollUpDataPointsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetRangeFieldBuilder(); + internalGetWindowSizeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + range_ = null; + if (rangeBuilder_ != null) { + rangeBuilder_.dispose(); + rangeBuilder_ = null; + } + windowSize_ = null; + if (windowSizeBuilder_ != null) { + windowSizeBuilder_.dispose(); + windowSizeBuilder_ = null; + } + pageSize_ = 0; + pageToken_ = ""; + dataSourceFamily_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_RollUpDataPointsRequest_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.RollUpDataPointsRequest + getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.RollUpDataPointsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.RollUpDataPointsRequest build() { + com.google.devicesandservices.health.v4.RollUpDataPointsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.RollUpDataPointsRequest buildPartial() { + com.google.devicesandservices.health.v4.RollUpDataPointsRequest result = + new com.google.devicesandservices.health.v4.RollUpDataPointsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.devicesandservices.health.v4.RollUpDataPointsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.range_ = rangeBuilder_ == null ? range_ : rangeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.windowSize_ = windowSizeBuilder_ == null ? windowSize_ : windowSizeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.dataSourceFamily_ = dataSourceFamily_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.RollUpDataPointsRequest) { + return mergeFrom((com.google.devicesandservices.health.v4.RollUpDataPointsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.devicesandservices.health.v4.RollUpDataPointsRequest other) { + if (other + == com.google.devicesandservices.health.v4.RollUpDataPointsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasRange()) { + mergeRange(other.getRange()); + } + if (other.hasWindowSize()) { + mergeWindowSize(other.getWindowSize()); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getDataSourceFamily().isEmpty()) { + dataSourceFamily_ = other.dataSourceFamily_; + bitField0_ |= 0x00000020; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(internalGetRangeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetWindowSizeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 58: + { + dataSourceFamily_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 58 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. Parent data type of the Data Point collection.
+     *
+     * Format: `users/{user}/dataTypes/{data_type}`, e.g.:
+     *
+     * - `users/me/dataTypes/steps`
+     * - `users/me/dataTypes/distance`
+     *
+     * For a list of the supported data types see the [RollupDataPoint
+     * value][google.devicesandservices.health.v4.RollupDataPoint]
+     * union field.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Parent data type of the Data Point collection.
+     *
+     * Format: `users/{user}/dataTypes/{data_type}`, e.g.:
+     *
+     * - `users/me/dataTypes/steps`
+     * - `users/me/dataTypes/distance`
+     *
+     * For a list of the supported data types see the [RollupDataPoint
+     * value][google.devicesandservices.health.v4.RollupDataPoint]
+     * union field.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Parent data type of the Data Point collection.
+     *
+     * Format: `users/{user}/dataTypes/{data_type}`, e.g.:
+     *
+     * - `users/me/dataTypes/steps`
+     * - `users/me/dataTypes/distance`
+     *
+     * For a list of the supported data types see the [RollupDataPoint
+     * value][google.devicesandservices.health.v4.RollupDataPoint]
+     * union field.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Parent data type of the Data Point collection.
+     *
+     * Format: `users/{user}/dataTypes/{data_type}`, e.g.:
+     *
+     * - `users/me/dataTypes/steps`
+     * - `users/me/dataTypes/distance`
+     *
+     * For a list of the supported data types see the [RollupDataPoint
+     * value][google.devicesandservices.health.v4.RollupDataPoint]
+     * union field.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Parent data type of the Data Point collection.
+     *
+     * Format: `users/{user}/dataTypes/{data_type}`, e.g.:
+     *
+     * - `users/me/dataTypes/steps`
+     * - `users/me/dataTypes/distance`
+     *
+     * For a list of the supported data types see the [RollupDataPoint
+     * value][google.devicesandservices.health.v4.RollupDataPoint]
+     * union field.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.type.Interval range_; + private com.google.protobuf.SingleFieldBuilder< + com.google.type.Interval, + com.google.type.Interval.Builder, + com.google.type.IntervalOrBuilder> + rangeBuilder_; + + /** + * + * + *
+     * Required. Closed-open range of data points that will be rolled up.
+     * The maximum range for `calories-in-heart-rate-zone`, `heart-rate`,
+     * `active-minutes` and `total-calories` is 14 days.
+     * The maximum range for all other data types is 90 days.
+     * 
+ * + * .google.type.Interval range = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the range field is set. + */ + public boolean hasRange() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Required. Closed-open range of data points that will be rolled up.
+     * The maximum range for `calories-in-heart-rate-zone`, `heart-rate`,
+     * `active-minutes` and `total-calories` is 14 days.
+     * The maximum range for all other data types is 90 days.
+     * 
+ * + * .google.type.Interval range = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The range. + */ + public com.google.type.Interval getRange() { + if (rangeBuilder_ == null) { + return range_ == null ? com.google.type.Interval.getDefaultInstance() : range_; + } else { + return rangeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. Closed-open range of data points that will be rolled up.
+     * The maximum range for `calories-in-heart-rate-zone`, `heart-rate`,
+     * `active-minutes` and `total-calories` is 14 days.
+     * The maximum range for all other data types is 90 days.
+     * 
+ * + * .google.type.Interval range = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setRange(com.google.type.Interval value) { + if (rangeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + range_ = value; + } else { + rangeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Closed-open range of data points that will be rolled up.
+     * The maximum range for `calories-in-heart-rate-zone`, `heart-rate`,
+     * `active-minutes` and `total-calories` is 14 days.
+     * The maximum range for all other data types is 90 days.
+     * 
+ * + * .google.type.Interval range = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setRange(com.google.type.Interval.Builder builderForValue) { + if (rangeBuilder_ == null) { + range_ = builderForValue.build(); + } else { + rangeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Closed-open range of data points that will be rolled up.
+     * The maximum range for `calories-in-heart-rate-zone`, `heart-rate`,
+     * `active-minutes` and `total-calories` is 14 days.
+     * The maximum range for all other data types is 90 days.
+     * 
+ * + * .google.type.Interval range = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeRange(com.google.type.Interval value) { + if (rangeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && range_ != null + && range_ != com.google.type.Interval.getDefaultInstance()) { + getRangeBuilder().mergeFrom(value); + } else { + range_ = value; + } + } else { + rangeBuilder_.mergeFrom(value); + } + if (range_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. Closed-open range of data points that will be rolled up.
+     * The maximum range for `calories-in-heart-rate-zone`, `heart-rate`,
+     * `active-minutes` and `total-calories` is 14 days.
+     * The maximum range for all other data types is 90 days.
+     * 
+ * + * .google.type.Interval range = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearRange() { + bitField0_ = (bitField0_ & ~0x00000002); + range_ = null; + if (rangeBuilder_ != null) { + rangeBuilder_.dispose(); + rangeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Closed-open range of data points that will be rolled up.
+     * The maximum range for `calories-in-heart-rate-zone`, `heart-rate`,
+     * `active-minutes` and `total-calories` is 14 days.
+     * The maximum range for all other data types is 90 days.
+     * 
+ * + * .google.type.Interval range = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.type.Interval.Builder getRangeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetRangeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. Closed-open range of data points that will be rolled up.
+     * The maximum range for `calories-in-heart-rate-zone`, `heart-rate`,
+     * `active-minutes` and `total-calories` is 14 days.
+     * The maximum range for all other data types is 90 days.
+     * 
+ * + * .google.type.Interval range = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.type.IntervalOrBuilder getRangeOrBuilder() { + if (rangeBuilder_ != null) { + return rangeBuilder_.getMessageOrBuilder(); + } else { + return range_ == null ? com.google.type.Interval.getDefaultInstance() : range_; + } + } + + /** + * + * + *
+     * Required. Closed-open range of data points that will be rolled up.
+     * The maximum range for `calories-in-heart-rate-zone`, `heart-rate`,
+     * `active-minutes` and `total-calories` is 14 days.
+     * The maximum range for all other data types is 90 days.
+     * 
+ * + * .google.type.Interval range = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.type.Interval, + com.google.type.Interval.Builder, + com.google.type.IntervalOrBuilder> + internalGetRangeFieldBuilder() { + if (rangeBuilder_ == null) { + rangeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.type.Interval, + com.google.type.Interval.Builder, + com.google.type.IntervalOrBuilder>(getRange(), getParentForChildren(), isClean()); + range_ = null; + } + return rangeBuilder_; + } + + private com.google.protobuf.Duration windowSize_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + windowSizeBuilder_; + + /** + * + * + *
+     * Required. The size of the time window to group data points into before
+     * applying the aggregation functions.
+     * 
+ * + * .google.protobuf.Duration window_size = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the windowSize field is set. + */ + public boolean hasWindowSize() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Required. The size of the time window to group data points into before
+     * applying the aggregation functions.
+     * 
+ * + * .google.protobuf.Duration window_size = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The windowSize. + */ + public com.google.protobuf.Duration getWindowSize() { + if (windowSizeBuilder_ == null) { + return windowSize_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : windowSize_; + } else { + return windowSizeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The size of the time window to group data points into before
+     * applying the aggregation functions.
+     * 
+ * + * .google.protobuf.Duration window_size = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setWindowSize(com.google.protobuf.Duration value) { + if (windowSizeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + windowSize_ = value; + } else { + windowSizeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The size of the time window to group data points into before
+     * applying the aggregation functions.
+     * 
+ * + * .google.protobuf.Duration window_size = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setWindowSize(com.google.protobuf.Duration.Builder builderForValue) { + if (windowSizeBuilder_ == null) { + windowSize_ = builderForValue.build(); + } else { + windowSizeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The size of the time window to group data points into before
+     * applying the aggregation functions.
+     * 
+ * + * .google.protobuf.Duration window_size = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeWindowSize(com.google.protobuf.Duration value) { + if (windowSizeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && windowSize_ != null + && windowSize_ != com.google.protobuf.Duration.getDefaultInstance()) { + getWindowSizeBuilder().mergeFrom(value); + } else { + windowSize_ = value; + } + } else { + windowSizeBuilder_.mergeFrom(value); + } + if (windowSize_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The size of the time window to group data points into before
+     * applying the aggregation functions.
+     * 
+ * + * .google.protobuf.Duration window_size = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearWindowSize() { + bitField0_ = (bitField0_ & ~0x00000004); + windowSize_ = null; + if (windowSizeBuilder_ != null) { + windowSizeBuilder_.dispose(); + windowSizeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The size of the time window to group data points into before
+     * applying the aggregation functions.
+     * 
+ * + * .google.protobuf.Duration window_size = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.Duration.Builder getWindowSizeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetWindowSizeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The size of the time window to group data points into before
+     * applying the aggregation functions.
+     * 
+ * + * .google.protobuf.Duration window_size = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.DurationOrBuilder getWindowSizeOrBuilder() { + if (windowSizeBuilder_ != null) { + return windowSizeBuilder_.getMessageOrBuilder(); + } else { + return windowSize_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : windowSize_; + } + } + + /** + * + * + *
+     * Required. The size of the time window to group data points into before
+     * applying the aggregation functions.
+     * 
+ * + * .google.protobuf.Duration window_size = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + internalGetWindowSizeFieldBuilder() { + if (windowSizeBuilder_ == null) { + windowSizeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getWindowSize(), getParentForChildren(), isClean()); + windowSize_ = null; + } + return windowSizeBuilder_; + } + + private int pageSize_; + + /** + * + * + *
+     * Optional. The maximum number of data points to return.
+     * If unspecified, at most 1440 data points will be returned.
+     * The maximum page size is 10000; values above that will be truncated
+     * accordingly.
+     * 
+ * + * int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. The maximum number of data points to return.
+     * If unspecified, at most 1440 data points will be returned.
+     * The maximum page size is 10000; values above that will be truncated
+     * accordingly.
+     * 
+ * + * int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The maximum number of data points to return.
+     * If unspecified, at most 1440 data points will be returned.
+     * The maximum page size is 10000; values above that will be truncated
+     * accordingly.
+     * 
+ * + * int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000008); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
+     * Optional. The next_page_token from a previous request, if any.
+     * All other request fields need to be the same as in the initial request
+     * when the page token is specified.
+     * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The next_page_token from a previous request, if any.
+     * All other request fields need to be the same as in the initial request
+     * when the page token is specified.
+     * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The next_page_token from a previous request, if any.
+     * All other request fields need to be the same as in the initial request
+     * when the page token is specified.
+     * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The next_page_token from a previous request, if any.
+     * All other request fields need to be the same as in the initial request
+     * when the page token is specified.
+     * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The next_page_token from a previous request, if any.
+     * All other request fields need to be the same as in the initial request
+     * when the page token is specified.
+     * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object dataSourceFamily_ = ""; + + /** + * + * + *
+     * Optional. The data source family name to roll up.
+     *
+     * If empty, data points from all available data sources will be rolled up.
+     *
+     * Format: `users/me/dataSourceFamilies/{data_source_family}`
+     *
+     * The supported values are:
+     *
+     * - `users/me/dataSourceFamilies/all-sources` - default value
+     * - `users/me/dataSourceFamilies/google-wearables` - tracker devices
+     * - `users/me/dataSourceFamilies/google-sources` - Google first party
+     * sources
+     * 
+ * + * string data_source_family = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The dataSourceFamily. + */ + public java.lang.String getDataSourceFamily() { + java.lang.Object ref = dataSourceFamily_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dataSourceFamily_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The data source family name to roll up.
+     *
+     * If empty, data points from all available data sources will be rolled up.
+     *
+     * Format: `users/me/dataSourceFamilies/{data_source_family}`
+     *
+     * The supported values are:
+     *
+     * - `users/me/dataSourceFamilies/all-sources` - default value
+     * - `users/me/dataSourceFamilies/google-wearables` - tracker devices
+     * - `users/me/dataSourceFamilies/google-sources` - Google first party
+     * sources
+     * 
+ * + * string data_source_family = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for dataSourceFamily. + */ + public com.google.protobuf.ByteString getDataSourceFamilyBytes() { + java.lang.Object ref = dataSourceFamily_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataSourceFamily_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The data source family name to roll up.
+     *
+     * If empty, data points from all available data sources will be rolled up.
+     *
+     * Format: `users/me/dataSourceFamilies/{data_source_family}`
+     *
+     * The supported values are:
+     *
+     * - `users/me/dataSourceFamilies/all-sources` - default value
+     * - `users/me/dataSourceFamilies/google-wearables` - tracker devices
+     * - `users/me/dataSourceFamilies/google-sources` - Google first party
+     * sources
+     * 
+ * + * string data_source_family = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The dataSourceFamily to set. + * @return This builder for chaining. + */ + public Builder setDataSourceFamily(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + dataSourceFamily_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The data source family name to roll up.
+     *
+     * If empty, data points from all available data sources will be rolled up.
+     *
+     * Format: `users/me/dataSourceFamilies/{data_source_family}`
+     *
+     * The supported values are:
+     *
+     * - `users/me/dataSourceFamilies/all-sources` - default value
+     * - `users/me/dataSourceFamilies/google-wearables` - tracker devices
+     * - `users/me/dataSourceFamilies/google-sources` - Google first party
+     * sources
+     * 
+ * + * string data_source_family = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDataSourceFamily() { + dataSourceFamily_ = getDefaultInstance().getDataSourceFamily(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The data source family name to roll up.
+     *
+     * If empty, data points from all available data sources will be rolled up.
+     *
+     * Format: `users/me/dataSourceFamilies/{data_source_family}`
+     *
+     * The supported values are:
+     *
+     * - `users/me/dataSourceFamilies/all-sources` - default value
+     * - `users/me/dataSourceFamilies/google-wearables` - tracker devices
+     * - `users/me/dataSourceFamilies/google-sources` - Google first party
+     * sources
+     * 
+ * + * string data_source_family = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for dataSourceFamily to set. + * @return This builder for chaining. + */ + public Builder setDataSourceFamilyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + dataSourceFamily_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.RollUpDataPointsRequest) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.RollUpDataPointsRequest) + private static final com.google.devicesandservices.health.v4.RollUpDataPointsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.RollUpDataPointsRequest(); + } + + public static com.google.devicesandservices.health.v4.RollUpDataPointsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RollUpDataPointsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.RollUpDataPointsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/RollUpDataPointsRequestOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/RollUpDataPointsRequestOrBuilder.java new file mode 100644 index 000000000000..f11db89505c9 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/RollUpDataPointsRequestOrBuilder.java @@ -0,0 +1,259 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_points.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface RollUpDataPointsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.RollUpDataPointsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Parent data type of the Data Point collection.
+   *
+   * Format: `users/{user}/dataTypes/{data_type}`, e.g.:
+   *
+   * - `users/me/dataTypes/steps`
+   * - `users/me/dataTypes/distance`
+   *
+   * For a list of the supported data types see the [RollupDataPoint
+   * value][google.devicesandservices.health.v4.RollupDataPoint]
+   * union field.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. Parent data type of the Data Point collection.
+   *
+   * Format: `users/{user}/dataTypes/{data_type}`, e.g.:
+   *
+   * - `users/me/dataTypes/steps`
+   * - `users/me/dataTypes/distance`
+   *
+   * For a list of the supported data types see the [RollupDataPoint
+   * value][google.devicesandservices.health.v4.RollupDataPoint]
+   * union field.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. Closed-open range of data points that will be rolled up.
+   * The maximum range for `calories-in-heart-rate-zone`, `heart-rate`,
+   * `active-minutes` and `total-calories` is 14 days.
+   * The maximum range for all other data types is 90 days.
+   * 
+ * + * .google.type.Interval range = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the range field is set. + */ + boolean hasRange(); + + /** + * + * + *
+   * Required. Closed-open range of data points that will be rolled up.
+   * The maximum range for `calories-in-heart-rate-zone`, `heart-rate`,
+   * `active-minutes` and `total-calories` is 14 days.
+   * The maximum range for all other data types is 90 days.
+   * 
+ * + * .google.type.Interval range = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The range. + */ + com.google.type.Interval getRange(); + + /** + * + * + *
+   * Required. Closed-open range of data points that will be rolled up.
+   * The maximum range for `calories-in-heart-rate-zone`, `heart-rate`,
+   * `active-minutes` and `total-calories` is 14 days.
+   * The maximum range for all other data types is 90 days.
+   * 
+ * + * .google.type.Interval range = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.type.IntervalOrBuilder getRangeOrBuilder(); + + /** + * + * + *
+   * Required. The size of the time window to group data points into before
+   * applying the aggregation functions.
+   * 
+ * + * .google.protobuf.Duration window_size = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the windowSize field is set. + */ + boolean hasWindowSize(); + + /** + * + * + *
+   * Required. The size of the time window to group data points into before
+   * applying the aggregation functions.
+   * 
+ * + * .google.protobuf.Duration window_size = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The windowSize. + */ + com.google.protobuf.Duration getWindowSize(); + + /** + * + * + *
+   * Required. The size of the time window to group data points into before
+   * applying the aggregation functions.
+   * 
+ * + * .google.protobuf.Duration window_size = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.DurationOrBuilder getWindowSizeOrBuilder(); + + /** + * + * + *
+   * Optional. The maximum number of data points to return.
+   * If unspecified, at most 1440 data points will be returned.
+   * The maximum page size is 10000; values above that will be truncated
+   * accordingly.
+   * 
+ * + * int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. The next_page_token from a previous request, if any.
+   * All other request fields need to be the same as in the initial request
+   * when the page token is specified.
+   * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. The next_page_token from a previous request, if any.
+   * All other request fields need to be the same as in the initial request
+   * when the page token is specified.
+   * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. The data source family name to roll up.
+   *
+   * If empty, data points from all available data sources will be rolled up.
+   *
+   * Format: `users/me/dataSourceFamilies/{data_source_family}`
+   *
+   * The supported values are:
+   *
+   * - `users/me/dataSourceFamilies/all-sources` - default value
+   * - `users/me/dataSourceFamilies/google-wearables` - tracker devices
+   * - `users/me/dataSourceFamilies/google-sources` - Google first party
+   * sources
+   * 
+ * + * string data_source_family = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The dataSourceFamily. + */ + java.lang.String getDataSourceFamily(); + + /** + * + * + *
+   * Optional. The data source family name to roll up.
+   *
+   * If empty, data points from all available data sources will be rolled up.
+   *
+   * Format: `users/me/dataSourceFamilies/{data_source_family}`
+   *
+   * The supported values are:
+   *
+   * - `users/me/dataSourceFamilies/all-sources` - default value
+   * - `users/me/dataSourceFamilies/google-wearables` - tracker devices
+   * - `users/me/dataSourceFamilies/google-sources` - Google first party
+   * sources
+   * 
+ * + * string data_source_family = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for dataSourceFamily. + */ + com.google.protobuf.ByteString getDataSourceFamilyBytes(); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/RollUpDataPointsResponse.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/RollUpDataPointsResponse.java new file mode 100644 index 000000000000..11fc16239a25 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/RollUpDataPointsResponse.java @@ -0,0 +1,1171 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_points.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * Response containing the list of rolled up data points.
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.RollUpDataPointsResponse} + */ +@com.google.protobuf.Generated +public final class RollUpDataPointsResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.RollUpDataPointsResponse) + RollUpDataPointsResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "RollUpDataPointsResponse"); + } + + // Use RollUpDataPointsResponse.newBuilder() to construct. + private RollUpDataPointsResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private RollUpDataPointsResponse() { + rollupDataPoints_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_RollUpDataPointsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_RollUpDataPointsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.RollUpDataPointsResponse.class, + com.google.devicesandservices.health.v4.RollUpDataPointsResponse.Builder.class); + } + + public static final int ROLLUP_DATA_POINTS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List rollupDataPoints_; + + /** + * + * + *
+   * Values for each aggregation time window.
+   * 
+ * + * repeated .google.devicesandservices.health.v4.RollupDataPoint rollup_data_points = 1; + * + */ + @java.lang.Override + public java.util.List + getRollupDataPointsList() { + return rollupDataPoints_; + } + + /** + * + * + *
+   * Values for each aggregation time window.
+   * 
+ * + * repeated .google.devicesandservices.health.v4.RollupDataPoint rollup_data_points = 1; + * + */ + @java.lang.Override + public java.util.List + getRollupDataPointsOrBuilderList() { + return rollupDataPoints_; + } + + /** + * + * + *
+   * Values for each aggregation time window.
+   * 
+ * + * repeated .google.devicesandservices.health.v4.RollupDataPoint rollup_data_points = 1; + * + */ + @java.lang.Override + public int getRollupDataPointsCount() { + return rollupDataPoints_.size(); + } + + /** + * + * + *
+   * Values for each aggregation time window.
+   * 
+ * + * repeated .google.devicesandservices.health.v4.RollupDataPoint rollup_data_points = 1; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.RollupDataPoint getRollupDataPoints(int index) { + return rollupDataPoints_.get(index); + } + + /** + * + * + *
+   * Values for each aggregation time window.
+   * 
+ * + * repeated .google.devicesandservices.health.v4.RollupDataPoint rollup_data_points = 1; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.RollupDataPointOrBuilder + getRollupDataPointsOrBuilder(int index) { + return rollupDataPoints_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < rollupDataPoints_.size(); i++) { + output.writeMessage(1, rollupDataPoints_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < rollupDataPoints_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, rollupDataPoints_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.RollUpDataPointsResponse)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.RollUpDataPointsResponse other = + (com.google.devicesandservices.health.v4.RollUpDataPointsResponse) obj; + + if (!getRollupDataPointsList().equals(other.getRollupDataPointsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getRollupDataPointsCount() > 0) { + hash = (37 * hash) + ROLLUP_DATA_POINTS_FIELD_NUMBER; + hash = (53 * hash) + getRollupDataPointsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.RollUpDataPointsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.RollUpDataPointsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.RollUpDataPointsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.RollUpDataPointsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.RollUpDataPointsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.RollUpDataPointsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.RollUpDataPointsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.RollUpDataPointsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.RollUpDataPointsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.RollUpDataPointsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.RollUpDataPointsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.RollUpDataPointsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.RollUpDataPointsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Response containing the list of rolled up data points.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.RollUpDataPointsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.RollUpDataPointsResponse) + com.google.devicesandservices.health.v4.RollUpDataPointsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_RollUpDataPointsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_RollUpDataPointsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.RollUpDataPointsResponse.class, + com.google.devicesandservices.health.v4.RollUpDataPointsResponse.Builder.class); + } + + // Construct using com.google.devicesandservices.health.v4.RollUpDataPointsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (rollupDataPointsBuilder_ == null) { + rollupDataPoints_ = java.util.Collections.emptyList(); + } else { + rollupDataPoints_ = null; + rollupDataPointsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_RollUpDataPointsResponse_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.RollUpDataPointsResponse + getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.RollUpDataPointsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.RollUpDataPointsResponse build() { + com.google.devicesandservices.health.v4.RollUpDataPointsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.RollUpDataPointsResponse buildPartial() { + com.google.devicesandservices.health.v4.RollUpDataPointsResponse result = + new com.google.devicesandservices.health.v4.RollUpDataPointsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.devicesandservices.health.v4.RollUpDataPointsResponse result) { + if (rollupDataPointsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + rollupDataPoints_ = java.util.Collections.unmodifiableList(rollupDataPoints_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.rollupDataPoints_ = rollupDataPoints_; + } else { + result.rollupDataPoints_ = rollupDataPointsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.devicesandservices.health.v4.RollUpDataPointsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.RollUpDataPointsResponse) { + return mergeFrom((com.google.devicesandservices.health.v4.RollUpDataPointsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.devicesandservices.health.v4.RollUpDataPointsResponse other) { + if (other + == com.google.devicesandservices.health.v4.RollUpDataPointsResponse.getDefaultInstance()) + return this; + if (rollupDataPointsBuilder_ == null) { + if (!other.rollupDataPoints_.isEmpty()) { + if (rollupDataPoints_.isEmpty()) { + rollupDataPoints_ = other.rollupDataPoints_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRollupDataPointsIsMutable(); + rollupDataPoints_.addAll(other.rollupDataPoints_); + } + onChanged(); + } + } else { + if (!other.rollupDataPoints_.isEmpty()) { + if (rollupDataPointsBuilder_.isEmpty()) { + rollupDataPointsBuilder_.dispose(); + rollupDataPointsBuilder_ = null; + rollupDataPoints_ = other.rollupDataPoints_; + bitField0_ = (bitField0_ & ~0x00000001); + rollupDataPointsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetRollupDataPointsFieldBuilder() + : null; + } else { + rollupDataPointsBuilder_.addAllMessages(other.rollupDataPoints_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.devicesandservices.health.v4.RollupDataPoint m = + input.readMessage( + com.google.devicesandservices.health.v4.RollupDataPoint.parser(), + extensionRegistry); + if (rollupDataPointsBuilder_ == null) { + ensureRollupDataPointsIsMutable(); + rollupDataPoints_.add(m); + } else { + rollupDataPointsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List + rollupDataPoints_ = java.util.Collections.emptyList(); + + private void ensureRollupDataPointsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + rollupDataPoints_ = + new java.util.ArrayList( + rollupDataPoints_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.devicesandservices.health.v4.RollupDataPoint, + com.google.devicesandservices.health.v4.RollupDataPoint.Builder, + com.google.devicesandservices.health.v4.RollupDataPointOrBuilder> + rollupDataPointsBuilder_; + + /** + * + * + *
+     * Values for each aggregation time window.
+     * 
+ * + * repeated .google.devicesandservices.health.v4.RollupDataPoint rollup_data_points = 1; + * + */ + public java.util.List + getRollupDataPointsList() { + if (rollupDataPointsBuilder_ == null) { + return java.util.Collections.unmodifiableList(rollupDataPoints_); + } else { + return rollupDataPointsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Values for each aggregation time window.
+     * 
+ * + * repeated .google.devicesandservices.health.v4.RollupDataPoint rollup_data_points = 1; + * + */ + public int getRollupDataPointsCount() { + if (rollupDataPointsBuilder_ == null) { + return rollupDataPoints_.size(); + } else { + return rollupDataPointsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Values for each aggregation time window.
+     * 
+ * + * repeated .google.devicesandservices.health.v4.RollupDataPoint rollup_data_points = 1; + * + */ + public com.google.devicesandservices.health.v4.RollupDataPoint getRollupDataPoints(int index) { + if (rollupDataPointsBuilder_ == null) { + return rollupDataPoints_.get(index); + } else { + return rollupDataPointsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Values for each aggregation time window.
+     * 
+ * + * repeated .google.devicesandservices.health.v4.RollupDataPoint rollup_data_points = 1; + * + */ + public Builder setRollupDataPoints( + int index, com.google.devicesandservices.health.v4.RollupDataPoint value) { + if (rollupDataPointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRollupDataPointsIsMutable(); + rollupDataPoints_.set(index, value); + onChanged(); + } else { + rollupDataPointsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Values for each aggregation time window.
+     * 
+ * + * repeated .google.devicesandservices.health.v4.RollupDataPoint rollup_data_points = 1; + * + */ + public Builder setRollupDataPoints( + int index, + com.google.devicesandservices.health.v4.RollupDataPoint.Builder builderForValue) { + if (rollupDataPointsBuilder_ == null) { + ensureRollupDataPointsIsMutable(); + rollupDataPoints_.set(index, builderForValue.build()); + onChanged(); + } else { + rollupDataPointsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Values for each aggregation time window.
+     * 
+ * + * repeated .google.devicesandservices.health.v4.RollupDataPoint rollup_data_points = 1; + * + */ + public Builder addRollupDataPoints( + com.google.devicesandservices.health.v4.RollupDataPoint value) { + if (rollupDataPointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRollupDataPointsIsMutable(); + rollupDataPoints_.add(value); + onChanged(); + } else { + rollupDataPointsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Values for each aggregation time window.
+     * 
+ * + * repeated .google.devicesandservices.health.v4.RollupDataPoint rollup_data_points = 1; + * + */ + public Builder addRollupDataPoints( + int index, com.google.devicesandservices.health.v4.RollupDataPoint value) { + if (rollupDataPointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRollupDataPointsIsMutable(); + rollupDataPoints_.add(index, value); + onChanged(); + } else { + rollupDataPointsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Values for each aggregation time window.
+     * 
+ * + * repeated .google.devicesandservices.health.v4.RollupDataPoint rollup_data_points = 1; + * + */ + public Builder addRollupDataPoints( + com.google.devicesandservices.health.v4.RollupDataPoint.Builder builderForValue) { + if (rollupDataPointsBuilder_ == null) { + ensureRollupDataPointsIsMutable(); + rollupDataPoints_.add(builderForValue.build()); + onChanged(); + } else { + rollupDataPointsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Values for each aggregation time window.
+     * 
+ * + * repeated .google.devicesandservices.health.v4.RollupDataPoint rollup_data_points = 1; + * + */ + public Builder addRollupDataPoints( + int index, + com.google.devicesandservices.health.v4.RollupDataPoint.Builder builderForValue) { + if (rollupDataPointsBuilder_ == null) { + ensureRollupDataPointsIsMutable(); + rollupDataPoints_.add(index, builderForValue.build()); + onChanged(); + } else { + rollupDataPointsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Values for each aggregation time window.
+     * 
+ * + * repeated .google.devicesandservices.health.v4.RollupDataPoint rollup_data_points = 1; + * + */ + public Builder addAllRollupDataPoints( + java.lang.Iterable + values) { + if (rollupDataPointsBuilder_ == null) { + ensureRollupDataPointsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, rollupDataPoints_); + onChanged(); + } else { + rollupDataPointsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Values for each aggregation time window.
+     * 
+ * + * repeated .google.devicesandservices.health.v4.RollupDataPoint rollup_data_points = 1; + * + */ + public Builder clearRollupDataPoints() { + if (rollupDataPointsBuilder_ == null) { + rollupDataPoints_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + rollupDataPointsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Values for each aggregation time window.
+     * 
+ * + * repeated .google.devicesandservices.health.v4.RollupDataPoint rollup_data_points = 1; + * + */ + public Builder removeRollupDataPoints(int index) { + if (rollupDataPointsBuilder_ == null) { + ensureRollupDataPointsIsMutable(); + rollupDataPoints_.remove(index); + onChanged(); + } else { + rollupDataPointsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Values for each aggregation time window.
+     * 
+ * + * repeated .google.devicesandservices.health.v4.RollupDataPoint rollup_data_points = 1; + * + */ + public com.google.devicesandservices.health.v4.RollupDataPoint.Builder + getRollupDataPointsBuilder(int index) { + return internalGetRollupDataPointsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Values for each aggregation time window.
+     * 
+ * + * repeated .google.devicesandservices.health.v4.RollupDataPoint rollup_data_points = 1; + * + */ + public com.google.devicesandservices.health.v4.RollupDataPointOrBuilder + getRollupDataPointsOrBuilder(int index) { + if (rollupDataPointsBuilder_ == null) { + return rollupDataPoints_.get(index); + } else { + return rollupDataPointsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Values for each aggregation time window.
+     * 
+ * + * repeated .google.devicesandservices.health.v4.RollupDataPoint rollup_data_points = 1; + * + */ + public java.util.List< + ? extends com.google.devicesandservices.health.v4.RollupDataPointOrBuilder> + getRollupDataPointsOrBuilderList() { + if (rollupDataPointsBuilder_ != null) { + return rollupDataPointsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(rollupDataPoints_); + } + } + + /** + * + * + *
+     * Values for each aggregation time window.
+     * 
+ * + * repeated .google.devicesandservices.health.v4.RollupDataPoint rollup_data_points = 1; + * + */ + public com.google.devicesandservices.health.v4.RollupDataPoint.Builder + addRollupDataPointsBuilder() { + return internalGetRollupDataPointsFieldBuilder() + .addBuilder(com.google.devicesandservices.health.v4.RollupDataPoint.getDefaultInstance()); + } + + /** + * + * + *
+     * Values for each aggregation time window.
+     * 
+ * + * repeated .google.devicesandservices.health.v4.RollupDataPoint rollup_data_points = 1; + * + */ + public com.google.devicesandservices.health.v4.RollupDataPoint.Builder + addRollupDataPointsBuilder(int index) { + return internalGetRollupDataPointsFieldBuilder() + .addBuilder( + index, com.google.devicesandservices.health.v4.RollupDataPoint.getDefaultInstance()); + } + + /** + * + * + *
+     * Values for each aggregation time window.
+     * 
+ * + * repeated .google.devicesandservices.health.v4.RollupDataPoint rollup_data_points = 1; + * + */ + public java.util.List + getRollupDataPointsBuilderList() { + return internalGetRollupDataPointsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.devicesandservices.health.v4.RollupDataPoint, + com.google.devicesandservices.health.v4.RollupDataPoint.Builder, + com.google.devicesandservices.health.v4.RollupDataPointOrBuilder> + internalGetRollupDataPointsFieldBuilder() { + if (rollupDataPointsBuilder_ == null) { + rollupDataPointsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.devicesandservices.health.v4.RollupDataPoint, + com.google.devicesandservices.health.v4.RollupDataPoint.Builder, + com.google.devicesandservices.health.v4.RollupDataPointOrBuilder>( + rollupDataPoints_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + rollupDataPoints_ = null; + } + return rollupDataPointsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.RollUpDataPointsResponse) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.RollUpDataPointsResponse) + private static final com.google.devicesandservices.health.v4.RollUpDataPointsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.RollUpDataPointsResponse(); + } + + public static com.google.devicesandservices.health.v4.RollUpDataPointsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RollUpDataPointsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.RollUpDataPointsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/RollUpDataPointsResponseOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/RollUpDataPointsResponseOrBuilder.java new file mode 100644 index 000000000000..3d95dec38454 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/RollUpDataPointsResponseOrBuilder.java @@ -0,0 +1,118 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_points.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface RollUpDataPointsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.RollUpDataPointsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Values for each aggregation time window.
+   * 
+ * + * repeated .google.devicesandservices.health.v4.RollupDataPoint rollup_data_points = 1; + * + */ + java.util.List getRollupDataPointsList(); + + /** + * + * + *
+   * Values for each aggregation time window.
+   * 
+ * + * repeated .google.devicesandservices.health.v4.RollupDataPoint rollup_data_points = 1; + * + */ + com.google.devicesandservices.health.v4.RollupDataPoint getRollupDataPoints(int index); + + /** + * + * + *
+   * Values for each aggregation time window.
+   * 
+ * + * repeated .google.devicesandservices.health.v4.RollupDataPoint rollup_data_points = 1; + * + */ + int getRollupDataPointsCount(); + + /** + * + * + *
+   * Values for each aggregation time window.
+   * 
+ * + * repeated .google.devicesandservices.health.v4.RollupDataPoint rollup_data_points = 1; + * + */ + java.util.List + getRollupDataPointsOrBuilderList(); + + /** + * + * + *
+   * Values for each aggregation time window.
+   * 
+ * + * repeated .google.devicesandservices.health.v4.RollupDataPoint rollup_data_points = 1; + * + */ + com.google.devicesandservices.health.v4.RollupDataPointOrBuilder getRollupDataPointsOrBuilder( + int index); + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/RollupDataPoint.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/RollupDataPoint.java new file mode 100644 index 000000000000..34b5deac43c0 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/RollupDataPoint.java @@ -0,0 +1,6977 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_points.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * Value of a rollup for a single physical time interval (aggregation window)
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.RollupDataPoint} + */ +@com.google.protobuf.Generated +public final class RollupDataPoint extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.RollupDataPoint) + RollupDataPointOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "RollupDataPoint"); + } + + // Use RollupDataPoint.newBuilder() to construct. + private RollupDataPoint(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private RollupDataPoint() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_RollupDataPoint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_RollupDataPoint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.RollupDataPoint.class, + com.google.devicesandservices.health.v4.RollupDataPoint.Builder.class); + } + + private int bitField0_; + private int valueCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object value_; + + public enum ValueCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + STEPS(5), + FLOORS(6), + HEART_RATE(7), + WEIGHT(8), + ALTITUDE(9), + DISTANCE(10), + BODY_FAT(11), + TOTAL_CALORIES(12), + ACTIVE_ZONE_MINUTES(13), + SEDENTARY_PERIOD(15), + RUN_VO2_MAX(16), + CALORIES_IN_HEART_RATE_ZONE(17), + ACTIVITY_LEVEL(18), + HYDRATION_LOG(20), + TIME_IN_HEART_RATE_ZONE(21), + ACTIVE_MINUTES(22), + SWIM_LENGTHS_DATA(23), + VALUE_NOT_SET(0); + private final int value; + + private ValueCase(int value) { + this.value = value; + } + + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ValueCase valueOf(int value) { + return forNumber(value); + } + + public static ValueCase forNumber(int value) { + switch (value) { + case 5: + return STEPS; + case 6: + return FLOORS; + case 7: + return HEART_RATE; + case 8: + return WEIGHT; + case 9: + return ALTITUDE; + case 10: + return DISTANCE; + case 11: + return BODY_FAT; + case 12: + return TOTAL_CALORIES; + case 13: + return ACTIVE_ZONE_MINUTES; + case 15: + return SEDENTARY_PERIOD; + case 16: + return RUN_VO2_MAX; + case 17: + return CALORIES_IN_HEART_RATE_ZONE; + case 18: + return ACTIVITY_LEVEL; + case 20: + return HYDRATION_LOG; + case 21: + return TIME_IN_HEART_RATE_ZONE; + case 22: + return ACTIVE_MINUTES; + case 23: + return SWIM_LENGTHS_DATA; + case 0: + return VALUE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ValueCase getValueCase() { + return ValueCase.forNumber(valueCase_); + } + + public static final int STEPS_FIELD_NUMBER = 5; + + /** + * + * + *
+   * Returned by default when rolling up data points from the `steps` data
+   * type, or when requested explicitly using the `steps` rollup type
+   * identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.StepsRollupValue steps = 5; + * + * @return Whether the steps field is set. + */ + @java.lang.Override + public boolean hasSteps() { + return valueCase_ == 5; + } + + /** + * + * + *
+   * Returned by default when rolling up data points from the `steps` data
+   * type, or when requested explicitly using the `steps` rollup type
+   * identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.StepsRollupValue steps = 5; + * + * @return The steps. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.StepsRollupValue getSteps() { + if (valueCase_ == 5) { + return (com.google.devicesandservices.health.v4.StepsRollupValue) value_; + } + return com.google.devicesandservices.health.v4.StepsRollupValue.getDefaultInstance(); + } + + /** + * + * + *
+   * Returned by default when rolling up data points from the `steps` data
+   * type, or when requested explicitly using the `steps` rollup type
+   * identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.StepsRollupValue steps = 5; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.StepsRollupValueOrBuilder getStepsOrBuilder() { + if (valueCase_ == 5) { + return (com.google.devicesandservices.health.v4.StepsRollupValue) value_; + } + return com.google.devicesandservices.health.v4.StepsRollupValue.getDefaultInstance(); + } + + public static final int FLOORS_FIELD_NUMBER = 6; + + /** + * + * + *
+   * Returned by default when rolling up data points from the `floors` data
+   * type, or when requested explicitly using the `floors` rollup type
+   * identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.FloorsRollupValue floors = 6; + * + * @return Whether the floors field is set. + */ + @java.lang.Override + public boolean hasFloors() { + return valueCase_ == 6; + } + + /** + * + * + *
+   * Returned by default when rolling up data points from the `floors` data
+   * type, or when requested explicitly using the `floors` rollup type
+   * identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.FloorsRollupValue floors = 6; + * + * @return The floors. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.FloorsRollupValue getFloors() { + if (valueCase_ == 6) { + return (com.google.devicesandservices.health.v4.FloorsRollupValue) value_; + } + return com.google.devicesandservices.health.v4.FloorsRollupValue.getDefaultInstance(); + } + + /** + * + * + *
+   * Returned by default when rolling up data points from the `floors` data
+   * type, or when requested explicitly using the `floors` rollup type
+   * identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.FloorsRollupValue floors = 6; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.FloorsRollupValueOrBuilder getFloorsOrBuilder() { + if (valueCase_ == 6) { + return (com.google.devicesandservices.health.v4.FloorsRollupValue) value_; + } + return com.google.devicesandservices.health.v4.FloorsRollupValue.getDefaultInstance(); + } + + public static final int HEART_RATE_FIELD_NUMBER = 7; + + /** + * + * + *
+   * Returned by default when rolling up data points from the `heart-rate`
+   * data type, or when requested explicitly using the `heart-rate` rollup
+   * type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.HeartRateRollupValue heart_rate = 7; + * + * @return Whether the heartRate field is set. + */ + @java.lang.Override + public boolean hasHeartRate() { + return valueCase_ == 7; + } + + /** + * + * + *
+   * Returned by default when rolling up data points from the `heart-rate`
+   * data type, or when requested explicitly using the `heart-rate` rollup
+   * type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.HeartRateRollupValue heart_rate = 7; + * + * @return The heartRate. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.HeartRateRollupValue getHeartRate() { + if (valueCase_ == 7) { + return (com.google.devicesandservices.health.v4.HeartRateRollupValue) value_; + } + return com.google.devicesandservices.health.v4.HeartRateRollupValue.getDefaultInstance(); + } + + /** + * + * + *
+   * Returned by default when rolling up data points from the `heart-rate`
+   * data type, or when requested explicitly using the `heart-rate` rollup
+   * type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.HeartRateRollupValue heart_rate = 7; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.HeartRateRollupValueOrBuilder + getHeartRateOrBuilder() { + if (valueCase_ == 7) { + return (com.google.devicesandservices.health.v4.HeartRateRollupValue) value_; + } + return com.google.devicesandservices.health.v4.HeartRateRollupValue.getDefaultInstance(); + } + + public static final int WEIGHT_FIELD_NUMBER = 8; + + /** + * + * + *
+   * Returned by default when rolling up data points from the `weight` data
+   * type, or when requested explicitly using the `weight` rollup type
+   * identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.WeightRollupValue weight = 8; + * + * @return Whether the weight field is set. + */ + @java.lang.Override + public boolean hasWeight() { + return valueCase_ == 8; + } + + /** + * + * + *
+   * Returned by default when rolling up data points from the `weight` data
+   * type, or when requested explicitly using the `weight` rollup type
+   * identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.WeightRollupValue weight = 8; + * + * @return The weight. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.WeightRollupValue getWeight() { + if (valueCase_ == 8) { + return (com.google.devicesandservices.health.v4.WeightRollupValue) value_; + } + return com.google.devicesandservices.health.v4.WeightRollupValue.getDefaultInstance(); + } + + /** + * + * + *
+   * Returned by default when rolling up data points from the `weight` data
+   * type, or when requested explicitly using the `weight` rollup type
+   * identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.WeightRollupValue weight = 8; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.WeightRollupValueOrBuilder getWeightOrBuilder() { + if (valueCase_ == 8) { + return (com.google.devicesandservices.health.v4.WeightRollupValue) value_; + } + return com.google.devicesandservices.health.v4.WeightRollupValue.getDefaultInstance(); + } + + public static final int ALTITUDE_FIELD_NUMBER = 9; + + /** + * + * + *
+   * Returned by default when rolling up data points from the `altitude` data
+   * type, or when requested explicitly using the `altitude` rollup type
+   * identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.AltitudeRollupValue altitude = 9; + * + * @return Whether the altitude field is set. + */ + @java.lang.Override + public boolean hasAltitude() { + return valueCase_ == 9; + } + + /** + * + * + *
+   * Returned by default when rolling up data points from the `altitude` data
+   * type, or when requested explicitly using the `altitude` rollup type
+   * identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.AltitudeRollupValue altitude = 9; + * + * @return The altitude. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.AltitudeRollupValue getAltitude() { + if (valueCase_ == 9) { + return (com.google.devicesandservices.health.v4.AltitudeRollupValue) value_; + } + return com.google.devicesandservices.health.v4.AltitudeRollupValue.getDefaultInstance(); + } + + /** + * + * + *
+   * Returned by default when rolling up data points from the `altitude` data
+   * type, or when requested explicitly using the `altitude` rollup type
+   * identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.AltitudeRollupValue altitude = 9; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.AltitudeRollupValueOrBuilder + getAltitudeOrBuilder() { + if (valueCase_ == 9) { + return (com.google.devicesandservices.health.v4.AltitudeRollupValue) value_; + } + return com.google.devicesandservices.health.v4.AltitudeRollupValue.getDefaultInstance(); + } + + public static final int DISTANCE_FIELD_NUMBER = 10; + + /** + * + * + *
+   * Returned by default when rolling up data points from the `distance` data
+   * type, or when requested explicitly using the `distance` rollup type
+   * identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.DistanceRollupValue distance = 10; + * + * @return Whether the distance field is set. + */ + @java.lang.Override + public boolean hasDistance() { + return valueCase_ == 10; + } + + /** + * + * + *
+   * Returned by default when rolling up data points from the `distance` data
+   * type, or when requested explicitly using the `distance` rollup type
+   * identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.DistanceRollupValue distance = 10; + * + * @return The distance. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DistanceRollupValue getDistance() { + if (valueCase_ == 10) { + return (com.google.devicesandservices.health.v4.DistanceRollupValue) value_; + } + return com.google.devicesandservices.health.v4.DistanceRollupValue.getDefaultInstance(); + } + + /** + * + * + *
+   * Returned by default when rolling up data points from the `distance` data
+   * type, or when requested explicitly using the `distance` rollup type
+   * identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.DistanceRollupValue distance = 10; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DistanceRollupValueOrBuilder + getDistanceOrBuilder() { + if (valueCase_ == 10) { + return (com.google.devicesandservices.health.v4.DistanceRollupValue) value_; + } + return com.google.devicesandservices.health.v4.DistanceRollupValue.getDefaultInstance(); + } + + public static final int BODY_FAT_FIELD_NUMBER = 11; + + /** + * + * + *
+   * Returned by default when rolling up data points from the `body-fat` data
+   * type, or when requested explicitly using the `body-fat` rollup type
+   * identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.BodyFatRollupValue body_fat = 11; + * + * @return Whether the bodyFat field is set. + */ + @java.lang.Override + public boolean hasBodyFat() { + return valueCase_ == 11; + } + + /** + * + * + *
+   * Returned by default when rolling up data points from the `body-fat` data
+   * type, or when requested explicitly using the `body-fat` rollup type
+   * identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.BodyFatRollupValue body_fat = 11; + * + * @return The bodyFat. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.BodyFatRollupValue getBodyFat() { + if (valueCase_ == 11) { + return (com.google.devicesandservices.health.v4.BodyFatRollupValue) value_; + } + return com.google.devicesandservices.health.v4.BodyFatRollupValue.getDefaultInstance(); + } + + /** + * + * + *
+   * Returned by default when rolling up data points from the `body-fat` data
+   * type, or when requested explicitly using the `body-fat` rollup type
+   * identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.BodyFatRollupValue body_fat = 11; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.BodyFatRollupValueOrBuilder getBodyFatOrBuilder() { + if (valueCase_ == 11) { + return (com.google.devicesandservices.health.v4.BodyFatRollupValue) value_; + } + return com.google.devicesandservices.health.v4.BodyFatRollupValue.getDefaultInstance(); + } + + public static final int TOTAL_CALORIES_FIELD_NUMBER = 12; + + /** + * + * + *
+   * Returned by default when rolling up data points from the `total-calories`
+   * data type, or when requested explicitly using the `total-calories`
+   * rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.TotalCaloriesRollupValue total_calories = 12; + * + * @return Whether the totalCalories field is set. + */ + @java.lang.Override + public boolean hasTotalCalories() { + return valueCase_ == 12; + } + + /** + * + * + *
+   * Returned by default when rolling up data points from the `total-calories`
+   * data type, or when requested explicitly using the `total-calories`
+   * rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.TotalCaloriesRollupValue total_calories = 12; + * + * @return The totalCalories. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.TotalCaloriesRollupValue getTotalCalories() { + if (valueCase_ == 12) { + return (com.google.devicesandservices.health.v4.TotalCaloriesRollupValue) value_; + } + return com.google.devicesandservices.health.v4.TotalCaloriesRollupValue.getDefaultInstance(); + } + + /** + * + * + *
+   * Returned by default when rolling up data points from the `total-calories`
+   * data type, or when requested explicitly using the `total-calories`
+   * rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.TotalCaloriesRollupValue total_calories = 12; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.TotalCaloriesRollupValueOrBuilder + getTotalCaloriesOrBuilder() { + if (valueCase_ == 12) { + return (com.google.devicesandservices.health.v4.TotalCaloriesRollupValue) value_; + } + return com.google.devicesandservices.health.v4.TotalCaloriesRollupValue.getDefaultInstance(); + } + + public static final int ACTIVE_ZONE_MINUTES_FIELD_NUMBER = 13; + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `active-zone-minutes` data type, or when requested explicitly using the
+   * `active-zone-minutes` rollup type identifier.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue active_zone_minutes = 13; + * + * + * @return Whether the activeZoneMinutes field is set. + */ + @java.lang.Override + public boolean hasActiveZoneMinutes() { + return valueCase_ == 13; + } + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `active-zone-minutes` data type, or when requested explicitly using the
+   * `active-zone-minutes` rollup type identifier.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue active_zone_minutes = 13; + * + * + * @return The activeZoneMinutes. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue + getActiveZoneMinutes() { + if (valueCase_ == 13) { + return (com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue) value_; + } + return com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue + .getDefaultInstance(); + } + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `active-zone-minutes` data type, or when requested explicitly using the
+   * `active-zone-minutes` rollup type identifier.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue active_zone_minutes = 13; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValueOrBuilder + getActiveZoneMinutesOrBuilder() { + if (valueCase_ == 13) { + return (com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue) value_; + } + return com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue + .getDefaultInstance(); + } + + public static final int SEDENTARY_PERIOD_FIELD_NUMBER = 15; + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `sedentary-period` data type, or when requested explicitly using the
+   * `sedentary-period` rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.SedentaryPeriodRollupValue sedentary_period = 15; + * + * + * @return Whether the sedentaryPeriod field is set. + */ + @java.lang.Override + public boolean hasSedentaryPeriod() { + return valueCase_ == 15; + } + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `sedentary-period` data type, or when requested explicitly using the
+   * `sedentary-period` rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.SedentaryPeriodRollupValue sedentary_period = 15; + * + * + * @return The sedentaryPeriod. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue getSedentaryPeriod() { + if (valueCase_ == 15) { + return (com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue) value_; + } + return com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue.getDefaultInstance(); + } + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `sedentary-period` data type, or when requested explicitly using the
+   * `sedentary-period` rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.SedentaryPeriodRollupValue sedentary_period = 15; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.SedentaryPeriodRollupValueOrBuilder + getSedentaryPeriodOrBuilder() { + if (valueCase_ == 15) { + return (com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue) value_; + } + return com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue.getDefaultInstance(); + } + + public static final int RUN_VO2_MAX_FIELD_NUMBER = 16; + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `run-vo2-max` data type, or when requested explicitly using the
+   * `run-vo2-max` rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.RunVO2MaxRollupValue run_vo2_max = 16; + * + * @return Whether the runVo2Max field is set. + */ + @java.lang.Override + public boolean hasRunVo2Max() { + return valueCase_ == 16; + } + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `run-vo2-max` data type, or when requested explicitly using the
+   * `run-vo2-max` rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.RunVO2MaxRollupValue run_vo2_max = 16; + * + * @return The runVo2Max. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.RunVO2MaxRollupValue getRunVo2Max() { + if (valueCase_ == 16) { + return (com.google.devicesandservices.health.v4.RunVO2MaxRollupValue) value_; + } + return com.google.devicesandservices.health.v4.RunVO2MaxRollupValue.getDefaultInstance(); + } + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `run-vo2-max` data type, or when requested explicitly using the
+   * `run-vo2-max` rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.RunVO2MaxRollupValue run_vo2_max = 16; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.RunVO2MaxRollupValueOrBuilder + getRunVo2MaxOrBuilder() { + if (valueCase_ == 16) { + return (com.google.devicesandservices.health.v4.RunVO2MaxRollupValue) value_; + } + return com.google.devicesandservices.health.v4.RunVO2MaxRollupValue.getDefaultInstance(); + } + + public static final int CALORIES_IN_HEART_RATE_ZONE_FIELD_NUMBER = 17; + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `calories-in-heart-rate-zone` data type, or when requested explicitly
+   * using the `calories-in-heart-rate-zone` rollup type identifier.
+   * 
+ * + * + * .google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue calories_in_heart_rate_zone = 17; + * + * + * @return Whether the caloriesInHeartRateZone field is set. + */ + @java.lang.Override + public boolean hasCaloriesInHeartRateZone() { + return valueCase_ == 17; + } + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `calories-in-heart-rate-zone` data type, or when requested explicitly
+   * using the `calories-in-heart-rate-zone` rollup type identifier.
+   * 
+ * + * + * .google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue calories_in_heart_rate_zone = 17; + * + * + * @return The caloriesInHeartRateZone. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + getCaloriesInHeartRateZone() { + if (valueCase_ == 17) { + return (com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue) value_; + } + return com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .getDefaultInstance(); + } + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `calories-in-heart-rate-zone` data type, or when requested explicitly
+   * using the `calories-in-heart-rate-zone` rollup type identifier.
+   * 
+ * + * + * .google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue calories_in_heart_rate_zone = 17; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValueOrBuilder + getCaloriesInHeartRateZoneOrBuilder() { + if (valueCase_ == 17) { + return (com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue) value_; + } + return com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .getDefaultInstance(); + } + + public static final int ACTIVITY_LEVEL_FIELD_NUMBER = 18; + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `activity-level` data type, or when requested explicitly using the
+   * `activity-level` rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.ActivityLevelRollupValue activity_level = 18; + * + * @return Whether the activityLevel field is set. + */ + @java.lang.Override + public boolean hasActivityLevel() { + return valueCase_ == 18; + } + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `activity-level` data type, or when requested explicitly using the
+   * `activity-level` rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.ActivityLevelRollupValue activity_level = 18; + * + * @return The activityLevel. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ActivityLevelRollupValue getActivityLevel() { + if (valueCase_ == 18) { + return (com.google.devicesandservices.health.v4.ActivityLevelRollupValue) value_; + } + return com.google.devicesandservices.health.v4.ActivityLevelRollupValue.getDefaultInstance(); + } + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `activity-level` data type, or when requested explicitly using the
+   * `activity-level` rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.ActivityLevelRollupValue activity_level = 18; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ActivityLevelRollupValueOrBuilder + getActivityLevelOrBuilder() { + if (valueCase_ == 18) { + return (com.google.devicesandservices.health.v4.ActivityLevelRollupValue) value_; + } + return com.google.devicesandservices.health.v4.ActivityLevelRollupValue.getDefaultInstance(); + } + + public static final int HYDRATION_LOG_FIELD_NUMBER = 20; + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `hydration-log` data type, or when requested explicitly using the
+   * `hydration-log` rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.HydrationLogRollupValue hydration_log = 20; + * + * @return Whether the hydrationLog field is set. + */ + @java.lang.Override + public boolean hasHydrationLog() { + return valueCase_ == 20; + } + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `hydration-log` data type, or when requested explicitly using the
+   * `hydration-log` rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.HydrationLogRollupValue hydration_log = 20; + * + * @return The hydrationLog. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.HydrationLogRollupValue getHydrationLog() { + if (valueCase_ == 20) { + return (com.google.devicesandservices.health.v4.HydrationLogRollupValue) value_; + } + return com.google.devicesandservices.health.v4.HydrationLogRollupValue.getDefaultInstance(); + } + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `hydration-log` data type, or when requested explicitly using the
+   * `hydration-log` rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.HydrationLogRollupValue hydration_log = 20; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.HydrationLogRollupValueOrBuilder + getHydrationLogOrBuilder() { + if (valueCase_ == 20) { + return (com.google.devicesandservices.health.v4.HydrationLogRollupValue) value_; + } + return com.google.devicesandservices.health.v4.HydrationLogRollupValue.getDefaultInstance(); + } + + public static final int TIME_IN_HEART_RATE_ZONE_FIELD_NUMBER = 21; + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `time-in-heart-rate-zone` data type, or when requested explicitly using
+   * the `time-in-heart-rate-zone` rollup type identifier.
+   * 
+ * + * + * .google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue time_in_heart_rate_zone = 21; + * + * + * @return Whether the timeInHeartRateZone field is set. + */ + @java.lang.Override + public boolean hasTimeInHeartRateZone() { + return valueCase_ == 21; + } + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `time-in-heart-rate-zone` data type, or when requested explicitly using
+   * the `time-in-heart-rate-zone` rollup type identifier.
+   * 
+ * + * + * .google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue time_in_heart_rate_zone = 21; + * + * + * @return The timeInHeartRateZone. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + getTimeInHeartRateZone() { + if (valueCase_ == 21) { + return (com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue) value_; + } + return com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .getDefaultInstance(); + } + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `time-in-heart-rate-zone` data type, or when requested explicitly using
+   * the `time-in-heart-rate-zone` rollup type identifier.
+   * 
+ * + * + * .google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue time_in_heart_rate_zone = 21; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValueOrBuilder + getTimeInHeartRateZoneOrBuilder() { + if (valueCase_ == 21) { + return (com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue) value_; + } + return com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .getDefaultInstance(); + } + + public static final int ACTIVE_MINUTES_FIELD_NUMBER = 22; + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `active-minutes` data type, or when requested explicitly using the
+   * `active-minutes` rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.ActiveMinutesRollupValue active_minutes = 22; + * + * @return Whether the activeMinutes field is set. + */ + @java.lang.Override + public boolean hasActiveMinutes() { + return valueCase_ == 22; + } + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `active-minutes` data type, or when requested explicitly using the
+   * `active-minutes` rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.ActiveMinutesRollupValue active_minutes = 22; + * + * @return The activeMinutes. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ActiveMinutesRollupValue getActiveMinutes() { + if (valueCase_ == 22) { + return (com.google.devicesandservices.health.v4.ActiveMinutesRollupValue) value_; + } + return com.google.devicesandservices.health.v4.ActiveMinutesRollupValue.getDefaultInstance(); + } + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `active-minutes` data type, or when requested explicitly using the
+   * `active-minutes` rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.ActiveMinutesRollupValue active_minutes = 22; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ActiveMinutesRollupValueOrBuilder + getActiveMinutesOrBuilder() { + if (valueCase_ == 22) { + return (com.google.devicesandservices.health.v4.ActiveMinutesRollupValue) value_; + } + return com.google.devicesandservices.health.v4.ActiveMinutesRollupValue.getDefaultInstance(); + } + + public static final int SWIM_LENGTHS_DATA_FIELD_NUMBER = 23; + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `swim-lengths-data` data type, or when requested explicitly using the
+   * `swim-lengths-data` rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.SwimLengthsDataRollupValue swim_lengths_data = 23; + * + * + * @return Whether the swimLengthsData field is set. + */ + @java.lang.Override + public boolean hasSwimLengthsData() { + return valueCase_ == 23; + } + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `swim-lengths-data` data type, or when requested explicitly using the
+   * `swim-lengths-data` rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.SwimLengthsDataRollupValue swim_lengths_data = 23; + * + * + * @return The swimLengthsData. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue getSwimLengthsData() { + if (valueCase_ == 23) { + return (com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue) value_; + } + return com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue.getDefaultInstance(); + } + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `swim-lengths-data` data type, or when requested explicitly using the
+   * `swim-lengths-data` rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.SwimLengthsDataRollupValue swim_lengths_data = 23; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.SwimLengthsDataRollupValueOrBuilder + getSwimLengthsDataOrBuilder() { + if (valueCase_ == 23) { + return (com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue) value_; + } + return com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue.getDefaultInstance(); + } + + public static final int START_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp startTime_; + + /** + * + * + *
+   * Start time of the window this value aggregates over
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1; + * + * @return Whether the startTime field is set. + */ + @java.lang.Override + public boolean hasStartTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Start time of the window this value aggregates over
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1; + * + * @return The startTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + + /** + * + * + *
+   * Start time of the window this value aggregates over
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + + public static final int END_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp endTime_; + + /** + * + * + *
+   * End time of the window this value aggregates over
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * End time of the window this value aggregates over
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + /** + * + * + *
+   * End time of the window this value aggregates over
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getStartTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getEndTime()); + } + if (valueCase_ == 5) { + output.writeMessage(5, (com.google.devicesandservices.health.v4.StepsRollupValue) value_); + } + if (valueCase_ == 6) { + output.writeMessage(6, (com.google.devicesandservices.health.v4.FloorsRollupValue) value_); + } + if (valueCase_ == 7) { + output.writeMessage(7, (com.google.devicesandservices.health.v4.HeartRateRollupValue) value_); + } + if (valueCase_ == 8) { + output.writeMessage(8, (com.google.devicesandservices.health.v4.WeightRollupValue) value_); + } + if (valueCase_ == 9) { + output.writeMessage(9, (com.google.devicesandservices.health.v4.AltitudeRollupValue) value_); + } + if (valueCase_ == 10) { + output.writeMessage(10, (com.google.devicesandservices.health.v4.DistanceRollupValue) value_); + } + if (valueCase_ == 11) { + output.writeMessage(11, (com.google.devicesandservices.health.v4.BodyFatRollupValue) value_); + } + if (valueCase_ == 12) { + output.writeMessage( + 12, (com.google.devicesandservices.health.v4.TotalCaloriesRollupValue) value_); + } + if (valueCase_ == 13) { + output.writeMessage( + 13, (com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue) value_); + } + if (valueCase_ == 15) { + output.writeMessage( + 15, (com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue) value_); + } + if (valueCase_ == 16) { + output.writeMessage( + 16, (com.google.devicesandservices.health.v4.RunVO2MaxRollupValue) value_); + } + if (valueCase_ == 17) { + output.writeMessage( + 17, (com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue) value_); + } + if (valueCase_ == 18) { + output.writeMessage( + 18, (com.google.devicesandservices.health.v4.ActivityLevelRollupValue) value_); + } + if (valueCase_ == 20) { + output.writeMessage( + 20, (com.google.devicesandservices.health.v4.HydrationLogRollupValue) value_); + } + if (valueCase_ == 21) { + output.writeMessage( + 21, (com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue) value_); + } + if (valueCase_ == 22) { + output.writeMessage( + 22, (com.google.devicesandservices.health.v4.ActiveMinutesRollupValue) value_); + } + if (valueCase_ == 23) { + output.writeMessage( + 23, (com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue) value_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getStartTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEndTime()); + } + if (valueCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, (com.google.devicesandservices.health.v4.StepsRollupValue) value_); + } + if (valueCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, (com.google.devicesandservices.health.v4.FloorsRollupValue) value_); + } + if (valueCase_ == 7) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 7, (com.google.devicesandservices.health.v4.HeartRateRollupValue) value_); + } + if (valueCase_ == 8) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 8, (com.google.devicesandservices.health.v4.WeightRollupValue) value_); + } + if (valueCase_ == 9) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 9, (com.google.devicesandservices.health.v4.AltitudeRollupValue) value_); + } + if (valueCase_ == 10) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 10, (com.google.devicesandservices.health.v4.DistanceRollupValue) value_); + } + if (valueCase_ == 11) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 11, (com.google.devicesandservices.health.v4.BodyFatRollupValue) value_); + } + if (valueCase_ == 12) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 12, (com.google.devicesandservices.health.v4.TotalCaloriesRollupValue) value_); + } + if (valueCase_ == 13) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 13, (com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue) value_); + } + if (valueCase_ == 15) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 15, (com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue) value_); + } + if (valueCase_ == 16) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 16, (com.google.devicesandservices.health.v4.RunVO2MaxRollupValue) value_); + } + if (valueCase_ == 17) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 17, + (com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue) value_); + } + if (valueCase_ == 18) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 18, (com.google.devicesandservices.health.v4.ActivityLevelRollupValue) value_); + } + if (valueCase_ == 20) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 20, (com.google.devicesandservices.health.v4.HydrationLogRollupValue) value_); + } + if (valueCase_ == 21) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 21, (com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue) value_); + } + if (valueCase_ == 22) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 22, (com.google.devicesandservices.health.v4.ActiveMinutesRollupValue) value_); + } + if (valueCase_ == 23) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 23, (com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue) value_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.RollupDataPoint)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.RollupDataPoint other = + (com.google.devicesandservices.health.v4.RollupDataPoint) obj; + + if (hasStartTime() != other.hasStartTime()) return false; + if (hasStartTime()) { + if (!getStartTime().equals(other.getStartTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime().equals(other.getEndTime())) return false; + } + if (!getValueCase().equals(other.getValueCase())) return false; + switch (valueCase_) { + case 5: + if (!getSteps().equals(other.getSteps())) return false; + break; + case 6: + if (!getFloors().equals(other.getFloors())) return false; + break; + case 7: + if (!getHeartRate().equals(other.getHeartRate())) return false; + break; + case 8: + if (!getWeight().equals(other.getWeight())) return false; + break; + case 9: + if (!getAltitude().equals(other.getAltitude())) return false; + break; + case 10: + if (!getDistance().equals(other.getDistance())) return false; + break; + case 11: + if (!getBodyFat().equals(other.getBodyFat())) return false; + break; + case 12: + if (!getTotalCalories().equals(other.getTotalCalories())) return false; + break; + case 13: + if (!getActiveZoneMinutes().equals(other.getActiveZoneMinutes())) return false; + break; + case 15: + if (!getSedentaryPeriod().equals(other.getSedentaryPeriod())) return false; + break; + case 16: + if (!getRunVo2Max().equals(other.getRunVo2Max())) return false; + break; + case 17: + if (!getCaloriesInHeartRateZone().equals(other.getCaloriesInHeartRateZone())) return false; + break; + case 18: + if (!getActivityLevel().equals(other.getActivityLevel())) return false; + break; + case 20: + if (!getHydrationLog().equals(other.getHydrationLog())) return false; + break; + case 21: + if (!getTimeInHeartRateZone().equals(other.getTimeInHeartRateZone())) return false; + break; + case 22: + if (!getActiveMinutes().equals(other.getActiveMinutes())) return false; + break; + case 23: + if (!getSwimLengthsData().equals(other.getSwimLengthsData())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasStartTime()) { + hash = (37 * hash) + START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getStartTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + switch (valueCase_) { + case 5: + hash = (37 * hash) + STEPS_FIELD_NUMBER; + hash = (53 * hash) + getSteps().hashCode(); + break; + case 6: + hash = (37 * hash) + FLOORS_FIELD_NUMBER; + hash = (53 * hash) + getFloors().hashCode(); + break; + case 7: + hash = (37 * hash) + HEART_RATE_FIELD_NUMBER; + hash = (53 * hash) + getHeartRate().hashCode(); + break; + case 8: + hash = (37 * hash) + WEIGHT_FIELD_NUMBER; + hash = (53 * hash) + getWeight().hashCode(); + break; + case 9: + hash = (37 * hash) + ALTITUDE_FIELD_NUMBER; + hash = (53 * hash) + getAltitude().hashCode(); + break; + case 10: + hash = (37 * hash) + DISTANCE_FIELD_NUMBER; + hash = (53 * hash) + getDistance().hashCode(); + break; + case 11: + hash = (37 * hash) + BODY_FAT_FIELD_NUMBER; + hash = (53 * hash) + getBodyFat().hashCode(); + break; + case 12: + hash = (37 * hash) + TOTAL_CALORIES_FIELD_NUMBER; + hash = (53 * hash) + getTotalCalories().hashCode(); + break; + case 13: + hash = (37 * hash) + ACTIVE_ZONE_MINUTES_FIELD_NUMBER; + hash = (53 * hash) + getActiveZoneMinutes().hashCode(); + break; + case 15: + hash = (37 * hash) + SEDENTARY_PERIOD_FIELD_NUMBER; + hash = (53 * hash) + getSedentaryPeriod().hashCode(); + break; + case 16: + hash = (37 * hash) + RUN_VO2_MAX_FIELD_NUMBER; + hash = (53 * hash) + getRunVo2Max().hashCode(); + break; + case 17: + hash = (37 * hash) + CALORIES_IN_HEART_RATE_ZONE_FIELD_NUMBER; + hash = (53 * hash) + getCaloriesInHeartRateZone().hashCode(); + break; + case 18: + hash = (37 * hash) + ACTIVITY_LEVEL_FIELD_NUMBER; + hash = (53 * hash) + getActivityLevel().hashCode(); + break; + case 20: + hash = (37 * hash) + HYDRATION_LOG_FIELD_NUMBER; + hash = (53 * hash) + getHydrationLog().hashCode(); + break; + case 21: + hash = (37 * hash) + TIME_IN_HEART_RATE_ZONE_FIELD_NUMBER; + hash = (53 * hash) + getTimeInHeartRateZone().hashCode(); + break; + case 22: + hash = (37 * hash) + ACTIVE_MINUTES_FIELD_NUMBER; + hash = (53 * hash) + getActiveMinutes().hashCode(); + break; + case 23: + hash = (37 * hash) + SWIM_LENGTHS_DATA_FIELD_NUMBER; + hash = (53 * hash) + getSwimLengthsData().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.RollupDataPoint parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.RollupDataPoint parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.RollupDataPoint parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.RollupDataPoint parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.RollupDataPoint parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.RollupDataPoint parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.RollupDataPoint parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.RollupDataPoint parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.RollupDataPoint parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.RollupDataPoint parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.RollupDataPoint parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.RollupDataPoint parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.RollupDataPoint prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Value of a rollup for a single physical time interval (aggregation window)
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.RollupDataPoint} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.RollupDataPoint) + com.google.devicesandservices.health.v4.RollupDataPointOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_RollupDataPoint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_RollupDataPoint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.RollupDataPoint.class, + com.google.devicesandservices.health.v4.RollupDataPoint.Builder.class); + } + + // Construct using com.google.devicesandservices.health.v4.RollupDataPoint.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetStartTimeFieldBuilder(); + internalGetEndTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (stepsBuilder_ != null) { + stepsBuilder_.clear(); + } + if (floorsBuilder_ != null) { + floorsBuilder_.clear(); + } + if (heartRateBuilder_ != null) { + heartRateBuilder_.clear(); + } + if (weightBuilder_ != null) { + weightBuilder_.clear(); + } + if (altitudeBuilder_ != null) { + altitudeBuilder_.clear(); + } + if (distanceBuilder_ != null) { + distanceBuilder_.clear(); + } + if (bodyFatBuilder_ != null) { + bodyFatBuilder_.clear(); + } + if (totalCaloriesBuilder_ != null) { + totalCaloriesBuilder_.clear(); + } + if (activeZoneMinutesBuilder_ != null) { + activeZoneMinutesBuilder_.clear(); + } + if (sedentaryPeriodBuilder_ != null) { + sedentaryPeriodBuilder_.clear(); + } + if (runVo2MaxBuilder_ != null) { + runVo2MaxBuilder_.clear(); + } + if (caloriesInHeartRateZoneBuilder_ != null) { + caloriesInHeartRateZoneBuilder_.clear(); + } + if (activityLevelBuilder_ != null) { + activityLevelBuilder_.clear(); + } + if (hydrationLogBuilder_ != null) { + hydrationLogBuilder_.clear(); + } + if (timeInHeartRateZoneBuilder_ != null) { + timeInHeartRateZoneBuilder_.clear(); + } + if (activeMinutesBuilder_ != null) { + activeMinutesBuilder_.clear(); + } + if (swimLengthsDataBuilder_ != null) { + swimLengthsDataBuilder_.clear(); + } + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + valueCase_ = 0; + value_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_RollupDataPoint_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.RollupDataPoint getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.RollupDataPoint.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.RollupDataPoint build() { + com.google.devicesandservices.health.v4.RollupDataPoint result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.RollupDataPoint buildPartial() { + com.google.devicesandservices.health.v4.RollupDataPoint result = + new com.google.devicesandservices.health.v4.RollupDataPoint(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.devicesandservices.health.v4.RollupDataPoint result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00020000) != 0)) { + result.startTime_ = startTimeBuilder_ == null ? startTime_ : startTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00040000) != 0)) { + result.endTime_ = endTimeBuilder_ == null ? endTime_ : endTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartialOneofs( + com.google.devicesandservices.health.v4.RollupDataPoint result) { + result.valueCase_ = valueCase_; + result.value_ = this.value_; + if (valueCase_ == 5 && stepsBuilder_ != null) { + result.value_ = stepsBuilder_.build(); + } + if (valueCase_ == 6 && floorsBuilder_ != null) { + result.value_ = floorsBuilder_.build(); + } + if (valueCase_ == 7 && heartRateBuilder_ != null) { + result.value_ = heartRateBuilder_.build(); + } + if (valueCase_ == 8 && weightBuilder_ != null) { + result.value_ = weightBuilder_.build(); + } + if (valueCase_ == 9 && altitudeBuilder_ != null) { + result.value_ = altitudeBuilder_.build(); + } + if (valueCase_ == 10 && distanceBuilder_ != null) { + result.value_ = distanceBuilder_.build(); + } + if (valueCase_ == 11 && bodyFatBuilder_ != null) { + result.value_ = bodyFatBuilder_.build(); + } + if (valueCase_ == 12 && totalCaloriesBuilder_ != null) { + result.value_ = totalCaloriesBuilder_.build(); + } + if (valueCase_ == 13 && activeZoneMinutesBuilder_ != null) { + result.value_ = activeZoneMinutesBuilder_.build(); + } + if (valueCase_ == 15 && sedentaryPeriodBuilder_ != null) { + result.value_ = sedentaryPeriodBuilder_.build(); + } + if (valueCase_ == 16 && runVo2MaxBuilder_ != null) { + result.value_ = runVo2MaxBuilder_.build(); + } + if (valueCase_ == 17 && caloriesInHeartRateZoneBuilder_ != null) { + result.value_ = caloriesInHeartRateZoneBuilder_.build(); + } + if (valueCase_ == 18 && activityLevelBuilder_ != null) { + result.value_ = activityLevelBuilder_.build(); + } + if (valueCase_ == 20 && hydrationLogBuilder_ != null) { + result.value_ = hydrationLogBuilder_.build(); + } + if (valueCase_ == 21 && timeInHeartRateZoneBuilder_ != null) { + result.value_ = timeInHeartRateZoneBuilder_.build(); + } + if (valueCase_ == 22 && activeMinutesBuilder_ != null) { + result.value_ = activeMinutesBuilder_.build(); + } + if (valueCase_ == 23 && swimLengthsDataBuilder_ != null) { + result.value_ = swimLengthsDataBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.RollupDataPoint) { + return mergeFrom((com.google.devicesandservices.health.v4.RollupDataPoint) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.devicesandservices.health.v4.RollupDataPoint other) { + if (other == com.google.devicesandservices.health.v4.RollupDataPoint.getDefaultInstance()) + return this; + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + switch (other.getValueCase()) { + case STEPS: + { + mergeSteps(other.getSteps()); + break; + } + case FLOORS: + { + mergeFloors(other.getFloors()); + break; + } + case HEART_RATE: + { + mergeHeartRate(other.getHeartRate()); + break; + } + case WEIGHT: + { + mergeWeight(other.getWeight()); + break; + } + case ALTITUDE: + { + mergeAltitude(other.getAltitude()); + break; + } + case DISTANCE: + { + mergeDistance(other.getDistance()); + break; + } + case BODY_FAT: + { + mergeBodyFat(other.getBodyFat()); + break; + } + case TOTAL_CALORIES: + { + mergeTotalCalories(other.getTotalCalories()); + break; + } + case ACTIVE_ZONE_MINUTES: + { + mergeActiveZoneMinutes(other.getActiveZoneMinutes()); + break; + } + case SEDENTARY_PERIOD: + { + mergeSedentaryPeriod(other.getSedentaryPeriod()); + break; + } + case RUN_VO2_MAX: + { + mergeRunVo2Max(other.getRunVo2Max()); + break; + } + case CALORIES_IN_HEART_RATE_ZONE: + { + mergeCaloriesInHeartRateZone(other.getCaloriesInHeartRateZone()); + break; + } + case ACTIVITY_LEVEL: + { + mergeActivityLevel(other.getActivityLevel()); + break; + } + case HYDRATION_LOG: + { + mergeHydrationLog(other.getHydrationLog()); + break; + } + case TIME_IN_HEART_RATE_ZONE: + { + mergeTimeInHeartRateZone(other.getTimeInHeartRateZone()); + break; + } + case ACTIVE_MINUTES: + { + mergeActiveMinutes(other.getActiveMinutes()); + break; + } + case SWIM_LENGTHS_DATA: + { + mergeSwimLengthsData(other.getSwimLengthsData()); + break; + } + case VALUE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetStartTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00020000; + break; + } // case 10 + case 18: + { + input.readMessage(internalGetEndTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00040000; + break; + } // case 18 + case 42: + { + input.readMessage(internalGetStepsFieldBuilder().getBuilder(), extensionRegistry); + valueCase_ = 5; + break; + } // case 42 + case 50: + { + input.readMessage(internalGetFloorsFieldBuilder().getBuilder(), extensionRegistry); + valueCase_ = 6; + break; + } // case 50 + case 58: + { + input.readMessage( + internalGetHeartRateFieldBuilder().getBuilder(), extensionRegistry); + valueCase_ = 7; + break; + } // case 58 + case 66: + { + input.readMessage(internalGetWeightFieldBuilder().getBuilder(), extensionRegistry); + valueCase_ = 8; + break; + } // case 66 + case 74: + { + input.readMessage( + internalGetAltitudeFieldBuilder().getBuilder(), extensionRegistry); + valueCase_ = 9; + break; + } // case 74 + case 82: + { + input.readMessage( + internalGetDistanceFieldBuilder().getBuilder(), extensionRegistry); + valueCase_ = 10; + break; + } // case 82 + case 90: + { + input.readMessage(internalGetBodyFatFieldBuilder().getBuilder(), extensionRegistry); + valueCase_ = 11; + break; + } // case 90 + case 98: + { + input.readMessage( + internalGetTotalCaloriesFieldBuilder().getBuilder(), extensionRegistry); + valueCase_ = 12; + break; + } // case 98 + case 106: + { + input.readMessage( + internalGetActiveZoneMinutesFieldBuilder().getBuilder(), extensionRegistry); + valueCase_ = 13; + break; + } // case 106 + case 122: + { + input.readMessage( + internalGetSedentaryPeriodFieldBuilder().getBuilder(), extensionRegistry); + valueCase_ = 15; + break; + } // case 122 + case 130: + { + input.readMessage( + internalGetRunVo2MaxFieldBuilder().getBuilder(), extensionRegistry); + valueCase_ = 16; + break; + } // case 130 + case 138: + { + input.readMessage( + internalGetCaloriesInHeartRateZoneFieldBuilder().getBuilder(), + extensionRegistry); + valueCase_ = 17; + break; + } // case 138 + case 146: + { + input.readMessage( + internalGetActivityLevelFieldBuilder().getBuilder(), extensionRegistry); + valueCase_ = 18; + break; + } // case 146 + case 162: + { + input.readMessage( + internalGetHydrationLogFieldBuilder().getBuilder(), extensionRegistry); + valueCase_ = 20; + break; + } // case 162 + case 170: + { + input.readMessage( + internalGetTimeInHeartRateZoneFieldBuilder().getBuilder(), extensionRegistry); + valueCase_ = 21; + break; + } // case 170 + case 178: + { + input.readMessage( + internalGetActiveMinutesFieldBuilder().getBuilder(), extensionRegistry); + valueCase_ = 22; + break; + } // case 178 + case 186: + { + input.readMessage( + internalGetSwimLengthsDataFieldBuilder().getBuilder(), extensionRegistry); + valueCase_ = 23; + break; + } // case 186 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int valueCase_ = 0; + private java.lang.Object value_; + + public ValueCase getValueCase() { + return ValueCase.forNumber(valueCase_); + } + + public Builder clearValue() { + valueCase_ = 0; + value_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.StepsRollupValue, + com.google.devicesandservices.health.v4.StepsRollupValue.Builder, + com.google.devicesandservices.health.v4.StepsRollupValueOrBuilder> + stepsBuilder_; + + /** + * + * + *
+     * Returned by default when rolling up data points from the `steps` data
+     * type, or when requested explicitly using the `steps` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.StepsRollupValue steps = 5; + * + * @return Whether the steps field is set. + */ + @java.lang.Override + public boolean hasSteps() { + return valueCase_ == 5; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `steps` data
+     * type, or when requested explicitly using the `steps` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.StepsRollupValue steps = 5; + * + * @return The steps. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.StepsRollupValue getSteps() { + if (stepsBuilder_ == null) { + if (valueCase_ == 5) { + return (com.google.devicesandservices.health.v4.StepsRollupValue) value_; + } + return com.google.devicesandservices.health.v4.StepsRollupValue.getDefaultInstance(); + } else { + if (valueCase_ == 5) { + return stepsBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.StepsRollupValue.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `steps` data
+     * type, or when requested explicitly using the `steps` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.StepsRollupValue steps = 5; + */ + public Builder setSteps(com.google.devicesandservices.health.v4.StepsRollupValue value) { + if (stepsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + onChanged(); + } else { + stepsBuilder_.setMessage(value); + } + valueCase_ = 5; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `steps` data
+     * type, or when requested explicitly using the `steps` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.StepsRollupValue steps = 5; + */ + public Builder setSteps( + com.google.devicesandservices.health.v4.StepsRollupValue.Builder builderForValue) { + if (stepsBuilder_ == null) { + value_ = builderForValue.build(); + onChanged(); + } else { + stepsBuilder_.setMessage(builderForValue.build()); + } + valueCase_ = 5; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `steps` data
+     * type, or when requested explicitly using the `steps` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.StepsRollupValue steps = 5; + */ + public Builder mergeSteps(com.google.devicesandservices.health.v4.StepsRollupValue value) { + if (stepsBuilder_ == null) { + if (valueCase_ == 5 + && value_ + != com.google.devicesandservices.health.v4.StepsRollupValue.getDefaultInstance()) { + value_ = + com.google.devicesandservices.health.v4.StepsRollupValue.newBuilder( + (com.google.devicesandservices.health.v4.StepsRollupValue) value_) + .mergeFrom(value) + .buildPartial(); + } else { + value_ = value; + } + onChanged(); + } else { + if (valueCase_ == 5) { + stepsBuilder_.mergeFrom(value); + } else { + stepsBuilder_.setMessage(value); + } + } + valueCase_ = 5; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `steps` data
+     * type, or when requested explicitly using the `steps` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.StepsRollupValue steps = 5; + */ + public Builder clearSteps() { + if (stepsBuilder_ == null) { + if (valueCase_ == 5) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + } else { + if (valueCase_ == 5) { + valueCase_ = 0; + value_ = null; + } + stepsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `steps` data
+     * type, or when requested explicitly using the `steps` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.StepsRollupValue steps = 5; + */ + public com.google.devicesandservices.health.v4.StepsRollupValue.Builder getStepsBuilder() { + return internalGetStepsFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `steps` data
+     * type, or when requested explicitly using the `steps` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.StepsRollupValue steps = 5; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.StepsRollupValueOrBuilder getStepsOrBuilder() { + if ((valueCase_ == 5) && (stepsBuilder_ != null)) { + return stepsBuilder_.getMessageOrBuilder(); + } else { + if (valueCase_ == 5) { + return (com.google.devicesandservices.health.v4.StepsRollupValue) value_; + } + return com.google.devicesandservices.health.v4.StepsRollupValue.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `steps` data
+     * type, or when requested explicitly using the `steps` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.StepsRollupValue steps = 5; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.StepsRollupValue, + com.google.devicesandservices.health.v4.StepsRollupValue.Builder, + com.google.devicesandservices.health.v4.StepsRollupValueOrBuilder> + internalGetStepsFieldBuilder() { + if (stepsBuilder_ == null) { + if (!(valueCase_ == 5)) { + value_ = com.google.devicesandservices.health.v4.StepsRollupValue.getDefaultInstance(); + } + stepsBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.StepsRollupValue, + com.google.devicesandservices.health.v4.StepsRollupValue.Builder, + com.google.devicesandservices.health.v4.StepsRollupValueOrBuilder>( + (com.google.devicesandservices.health.v4.StepsRollupValue) value_, + getParentForChildren(), + isClean()); + value_ = null; + } + valueCase_ = 5; + onChanged(); + return stepsBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.FloorsRollupValue, + com.google.devicesandservices.health.v4.FloorsRollupValue.Builder, + com.google.devicesandservices.health.v4.FloorsRollupValueOrBuilder> + floorsBuilder_; + + /** + * + * + *
+     * Returned by default when rolling up data points from the `floors` data
+     * type, or when requested explicitly using the `floors` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.FloorsRollupValue floors = 6; + * + * @return Whether the floors field is set. + */ + @java.lang.Override + public boolean hasFloors() { + return valueCase_ == 6; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `floors` data
+     * type, or when requested explicitly using the `floors` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.FloorsRollupValue floors = 6; + * + * @return The floors. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.FloorsRollupValue getFloors() { + if (floorsBuilder_ == null) { + if (valueCase_ == 6) { + return (com.google.devicesandservices.health.v4.FloorsRollupValue) value_; + } + return com.google.devicesandservices.health.v4.FloorsRollupValue.getDefaultInstance(); + } else { + if (valueCase_ == 6) { + return floorsBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.FloorsRollupValue.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `floors` data
+     * type, or when requested explicitly using the `floors` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.FloorsRollupValue floors = 6; + */ + public Builder setFloors(com.google.devicesandservices.health.v4.FloorsRollupValue value) { + if (floorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + onChanged(); + } else { + floorsBuilder_.setMessage(value); + } + valueCase_ = 6; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `floors` data
+     * type, or when requested explicitly using the `floors` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.FloorsRollupValue floors = 6; + */ + public Builder setFloors( + com.google.devicesandservices.health.v4.FloorsRollupValue.Builder builderForValue) { + if (floorsBuilder_ == null) { + value_ = builderForValue.build(); + onChanged(); + } else { + floorsBuilder_.setMessage(builderForValue.build()); + } + valueCase_ = 6; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `floors` data
+     * type, or when requested explicitly using the `floors` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.FloorsRollupValue floors = 6; + */ + public Builder mergeFloors(com.google.devicesandservices.health.v4.FloorsRollupValue value) { + if (floorsBuilder_ == null) { + if (valueCase_ == 6 + && value_ + != com.google.devicesandservices.health.v4.FloorsRollupValue.getDefaultInstance()) { + value_ = + com.google.devicesandservices.health.v4.FloorsRollupValue.newBuilder( + (com.google.devicesandservices.health.v4.FloorsRollupValue) value_) + .mergeFrom(value) + .buildPartial(); + } else { + value_ = value; + } + onChanged(); + } else { + if (valueCase_ == 6) { + floorsBuilder_.mergeFrom(value); + } else { + floorsBuilder_.setMessage(value); + } + } + valueCase_ = 6; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `floors` data
+     * type, or when requested explicitly using the `floors` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.FloorsRollupValue floors = 6; + */ + public Builder clearFloors() { + if (floorsBuilder_ == null) { + if (valueCase_ == 6) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + } else { + if (valueCase_ == 6) { + valueCase_ = 0; + value_ = null; + } + floorsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `floors` data
+     * type, or when requested explicitly using the `floors` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.FloorsRollupValue floors = 6; + */ + public com.google.devicesandservices.health.v4.FloorsRollupValue.Builder getFloorsBuilder() { + return internalGetFloorsFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `floors` data
+     * type, or when requested explicitly using the `floors` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.FloorsRollupValue floors = 6; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.FloorsRollupValueOrBuilder getFloorsOrBuilder() { + if ((valueCase_ == 6) && (floorsBuilder_ != null)) { + return floorsBuilder_.getMessageOrBuilder(); + } else { + if (valueCase_ == 6) { + return (com.google.devicesandservices.health.v4.FloorsRollupValue) value_; + } + return com.google.devicesandservices.health.v4.FloorsRollupValue.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `floors` data
+     * type, or when requested explicitly using the `floors` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.FloorsRollupValue floors = 6; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.FloorsRollupValue, + com.google.devicesandservices.health.v4.FloorsRollupValue.Builder, + com.google.devicesandservices.health.v4.FloorsRollupValueOrBuilder> + internalGetFloorsFieldBuilder() { + if (floorsBuilder_ == null) { + if (!(valueCase_ == 6)) { + value_ = com.google.devicesandservices.health.v4.FloorsRollupValue.getDefaultInstance(); + } + floorsBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.FloorsRollupValue, + com.google.devicesandservices.health.v4.FloorsRollupValue.Builder, + com.google.devicesandservices.health.v4.FloorsRollupValueOrBuilder>( + (com.google.devicesandservices.health.v4.FloorsRollupValue) value_, + getParentForChildren(), + isClean()); + value_ = null; + } + valueCase_ = 6; + onChanged(); + return floorsBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.HeartRateRollupValue, + com.google.devicesandservices.health.v4.HeartRateRollupValue.Builder, + com.google.devicesandservices.health.v4.HeartRateRollupValueOrBuilder> + heartRateBuilder_; + + /** + * + * + *
+     * Returned by default when rolling up data points from the `heart-rate`
+     * data type, or when requested explicitly using the `heart-rate` rollup
+     * type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.HeartRateRollupValue heart_rate = 7; + * + * @return Whether the heartRate field is set. + */ + @java.lang.Override + public boolean hasHeartRate() { + return valueCase_ == 7; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `heart-rate`
+     * data type, or when requested explicitly using the `heart-rate` rollup
+     * type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.HeartRateRollupValue heart_rate = 7; + * + * @return The heartRate. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.HeartRateRollupValue getHeartRate() { + if (heartRateBuilder_ == null) { + if (valueCase_ == 7) { + return (com.google.devicesandservices.health.v4.HeartRateRollupValue) value_; + } + return com.google.devicesandservices.health.v4.HeartRateRollupValue.getDefaultInstance(); + } else { + if (valueCase_ == 7) { + return heartRateBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.HeartRateRollupValue.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `heart-rate`
+     * data type, or when requested explicitly using the `heart-rate` rollup
+     * type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.HeartRateRollupValue heart_rate = 7; + */ + public Builder setHeartRate( + com.google.devicesandservices.health.v4.HeartRateRollupValue value) { + if (heartRateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + onChanged(); + } else { + heartRateBuilder_.setMessage(value); + } + valueCase_ = 7; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `heart-rate`
+     * data type, or when requested explicitly using the `heart-rate` rollup
+     * type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.HeartRateRollupValue heart_rate = 7; + */ + public Builder setHeartRate( + com.google.devicesandservices.health.v4.HeartRateRollupValue.Builder builderForValue) { + if (heartRateBuilder_ == null) { + value_ = builderForValue.build(); + onChanged(); + } else { + heartRateBuilder_.setMessage(builderForValue.build()); + } + valueCase_ = 7; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `heart-rate`
+     * data type, or when requested explicitly using the `heart-rate` rollup
+     * type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.HeartRateRollupValue heart_rate = 7; + */ + public Builder mergeHeartRate( + com.google.devicesandservices.health.v4.HeartRateRollupValue value) { + if (heartRateBuilder_ == null) { + if (valueCase_ == 7 + && value_ + != com.google.devicesandservices.health.v4.HeartRateRollupValue + .getDefaultInstance()) { + value_ = + com.google.devicesandservices.health.v4.HeartRateRollupValue.newBuilder( + (com.google.devicesandservices.health.v4.HeartRateRollupValue) value_) + .mergeFrom(value) + .buildPartial(); + } else { + value_ = value; + } + onChanged(); + } else { + if (valueCase_ == 7) { + heartRateBuilder_.mergeFrom(value); + } else { + heartRateBuilder_.setMessage(value); + } + } + valueCase_ = 7; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `heart-rate`
+     * data type, or when requested explicitly using the `heart-rate` rollup
+     * type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.HeartRateRollupValue heart_rate = 7; + */ + public Builder clearHeartRate() { + if (heartRateBuilder_ == null) { + if (valueCase_ == 7) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + } else { + if (valueCase_ == 7) { + valueCase_ = 0; + value_ = null; + } + heartRateBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `heart-rate`
+     * data type, or when requested explicitly using the `heart-rate` rollup
+     * type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.HeartRateRollupValue heart_rate = 7; + */ + public com.google.devicesandservices.health.v4.HeartRateRollupValue.Builder + getHeartRateBuilder() { + return internalGetHeartRateFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `heart-rate`
+     * data type, or when requested explicitly using the `heart-rate` rollup
+     * type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.HeartRateRollupValue heart_rate = 7; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.HeartRateRollupValueOrBuilder + getHeartRateOrBuilder() { + if ((valueCase_ == 7) && (heartRateBuilder_ != null)) { + return heartRateBuilder_.getMessageOrBuilder(); + } else { + if (valueCase_ == 7) { + return (com.google.devicesandservices.health.v4.HeartRateRollupValue) value_; + } + return com.google.devicesandservices.health.v4.HeartRateRollupValue.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `heart-rate`
+     * data type, or when requested explicitly using the `heart-rate` rollup
+     * type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.HeartRateRollupValue heart_rate = 7; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.HeartRateRollupValue, + com.google.devicesandservices.health.v4.HeartRateRollupValue.Builder, + com.google.devicesandservices.health.v4.HeartRateRollupValueOrBuilder> + internalGetHeartRateFieldBuilder() { + if (heartRateBuilder_ == null) { + if (!(valueCase_ == 7)) { + value_ = + com.google.devicesandservices.health.v4.HeartRateRollupValue.getDefaultInstance(); + } + heartRateBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.HeartRateRollupValue, + com.google.devicesandservices.health.v4.HeartRateRollupValue.Builder, + com.google.devicesandservices.health.v4.HeartRateRollupValueOrBuilder>( + (com.google.devicesandservices.health.v4.HeartRateRollupValue) value_, + getParentForChildren(), + isClean()); + value_ = null; + } + valueCase_ = 7; + onChanged(); + return heartRateBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.WeightRollupValue, + com.google.devicesandservices.health.v4.WeightRollupValue.Builder, + com.google.devicesandservices.health.v4.WeightRollupValueOrBuilder> + weightBuilder_; + + /** + * + * + *
+     * Returned by default when rolling up data points from the `weight` data
+     * type, or when requested explicitly using the `weight` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.WeightRollupValue weight = 8; + * + * @return Whether the weight field is set. + */ + @java.lang.Override + public boolean hasWeight() { + return valueCase_ == 8; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `weight` data
+     * type, or when requested explicitly using the `weight` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.WeightRollupValue weight = 8; + * + * @return The weight. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.WeightRollupValue getWeight() { + if (weightBuilder_ == null) { + if (valueCase_ == 8) { + return (com.google.devicesandservices.health.v4.WeightRollupValue) value_; + } + return com.google.devicesandservices.health.v4.WeightRollupValue.getDefaultInstance(); + } else { + if (valueCase_ == 8) { + return weightBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.WeightRollupValue.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `weight` data
+     * type, or when requested explicitly using the `weight` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.WeightRollupValue weight = 8; + */ + public Builder setWeight(com.google.devicesandservices.health.v4.WeightRollupValue value) { + if (weightBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + onChanged(); + } else { + weightBuilder_.setMessage(value); + } + valueCase_ = 8; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `weight` data
+     * type, or when requested explicitly using the `weight` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.WeightRollupValue weight = 8; + */ + public Builder setWeight( + com.google.devicesandservices.health.v4.WeightRollupValue.Builder builderForValue) { + if (weightBuilder_ == null) { + value_ = builderForValue.build(); + onChanged(); + } else { + weightBuilder_.setMessage(builderForValue.build()); + } + valueCase_ = 8; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `weight` data
+     * type, or when requested explicitly using the `weight` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.WeightRollupValue weight = 8; + */ + public Builder mergeWeight(com.google.devicesandservices.health.v4.WeightRollupValue value) { + if (weightBuilder_ == null) { + if (valueCase_ == 8 + && value_ + != com.google.devicesandservices.health.v4.WeightRollupValue.getDefaultInstance()) { + value_ = + com.google.devicesandservices.health.v4.WeightRollupValue.newBuilder( + (com.google.devicesandservices.health.v4.WeightRollupValue) value_) + .mergeFrom(value) + .buildPartial(); + } else { + value_ = value; + } + onChanged(); + } else { + if (valueCase_ == 8) { + weightBuilder_.mergeFrom(value); + } else { + weightBuilder_.setMessage(value); + } + } + valueCase_ = 8; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `weight` data
+     * type, or when requested explicitly using the `weight` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.WeightRollupValue weight = 8; + */ + public Builder clearWeight() { + if (weightBuilder_ == null) { + if (valueCase_ == 8) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + } else { + if (valueCase_ == 8) { + valueCase_ = 0; + value_ = null; + } + weightBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `weight` data
+     * type, or when requested explicitly using the `weight` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.WeightRollupValue weight = 8; + */ + public com.google.devicesandservices.health.v4.WeightRollupValue.Builder getWeightBuilder() { + return internalGetWeightFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `weight` data
+     * type, or when requested explicitly using the `weight` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.WeightRollupValue weight = 8; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.WeightRollupValueOrBuilder getWeightOrBuilder() { + if ((valueCase_ == 8) && (weightBuilder_ != null)) { + return weightBuilder_.getMessageOrBuilder(); + } else { + if (valueCase_ == 8) { + return (com.google.devicesandservices.health.v4.WeightRollupValue) value_; + } + return com.google.devicesandservices.health.v4.WeightRollupValue.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `weight` data
+     * type, or when requested explicitly using the `weight` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.WeightRollupValue weight = 8; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.WeightRollupValue, + com.google.devicesandservices.health.v4.WeightRollupValue.Builder, + com.google.devicesandservices.health.v4.WeightRollupValueOrBuilder> + internalGetWeightFieldBuilder() { + if (weightBuilder_ == null) { + if (!(valueCase_ == 8)) { + value_ = com.google.devicesandservices.health.v4.WeightRollupValue.getDefaultInstance(); + } + weightBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.WeightRollupValue, + com.google.devicesandservices.health.v4.WeightRollupValue.Builder, + com.google.devicesandservices.health.v4.WeightRollupValueOrBuilder>( + (com.google.devicesandservices.health.v4.WeightRollupValue) value_, + getParentForChildren(), + isClean()); + value_ = null; + } + valueCase_ = 8; + onChanged(); + return weightBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.AltitudeRollupValue, + com.google.devicesandservices.health.v4.AltitudeRollupValue.Builder, + com.google.devicesandservices.health.v4.AltitudeRollupValueOrBuilder> + altitudeBuilder_; + + /** + * + * + *
+     * Returned by default when rolling up data points from the `altitude` data
+     * type, or when requested explicitly using the `altitude` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.AltitudeRollupValue altitude = 9; + * + * @return Whether the altitude field is set. + */ + @java.lang.Override + public boolean hasAltitude() { + return valueCase_ == 9; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `altitude` data
+     * type, or when requested explicitly using the `altitude` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.AltitudeRollupValue altitude = 9; + * + * @return The altitude. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.AltitudeRollupValue getAltitude() { + if (altitudeBuilder_ == null) { + if (valueCase_ == 9) { + return (com.google.devicesandservices.health.v4.AltitudeRollupValue) value_; + } + return com.google.devicesandservices.health.v4.AltitudeRollupValue.getDefaultInstance(); + } else { + if (valueCase_ == 9) { + return altitudeBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.AltitudeRollupValue.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `altitude` data
+     * type, or when requested explicitly using the `altitude` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.AltitudeRollupValue altitude = 9; + */ + public Builder setAltitude(com.google.devicesandservices.health.v4.AltitudeRollupValue value) { + if (altitudeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + onChanged(); + } else { + altitudeBuilder_.setMessage(value); + } + valueCase_ = 9; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `altitude` data
+     * type, or when requested explicitly using the `altitude` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.AltitudeRollupValue altitude = 9; + */ + public Builder setAltitude( + com.google.devicesandservices.health.v4.AltitudeRollupValue.Builder builderForValue) { + if (altitudeBuilder_ == null) { + value_ = builderForValue.build(); + onChanged(); + } else { + altitudeBuilder_.setMessage(builderForValue.build()); + } + valueCase_ = 9; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `altitude` data
+     * type, or when requested explicitly using the `altitude` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.AltitudeRollupValue altitude = 9; + */ + public Builder mergeAltitude( + com.google.devicesandservices.health.v4.AltitudeRollupValue value) { + if (altitudeBuilder_ == null) { + if (valueCase_ == 9 + && value_ + != com.google.devicesandservices.health.v4.AltitudeRollupValue + .getDefaultInstance()) { + value_ = + com.google.devicesandservices.health.v4.AltitudeRollupValue.newBuilder( + (com.google.devicesandservices.health.v4.AltitudeRollupValue) value_) + .mergeFrom(value) + .buildPartial(); + } else { + value_ = value; + } + onChanged(); + } else { + if (valueCase_ == 9) { + altitudeBuilder_.mergeFrom(value); + } else { + altitudeBuilder_.setMessage(value); + } + } + valueCase_ = 9; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `altitude` data
+     * type, or when requested explicitly using the `altitude` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.AltitudeRollupValue altitude = 9; + */ + public Builder clearAltitude() { + if (altitudeBuilder_ == null) { + if (valueCase_ == 9) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + } else { + if (valueCase_ == 9) { + valueCase_ = 0; + value_ = null; + } + altitudeBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `altitude` data
+     * type, or when requested explicitly using the `altitude` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.AltitudeRollupValue altitude = 9; + */ + public com.google.devicesandservices.health.v4.AltitudeRollupValue.Builder + getAltitudeBuilder() { + return internalGetAltitudeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `altitude` data
+     * type, or when requested explicitly using the `altitude` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.AltitudeRollupValue altitude = 9; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.AltitudeRollupValueOrBuilder + getAltitudeOrBuilder() { + if ((valueCase_ == 9) && (altitudeBuilder_ != null)) { + return altitudeBuilder_.getMessageOrBuilder(); + } else { + if (valueCase_ == 9) { + return (com.google.devicesandservices.health.v4.AltitudeRollupValue) value_; + } + return com.google.devicesandservices.health.v4.AltitudeRollupValue.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `altitude` data
+     * type, or when requested explicitly using the `altitude` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.AltitudeRollupValue altitude = 9; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.AltitudeRollupValue, + com.google.devicesandservices.health.v4.AltitudeRollupValue.Builder, + com.google.devicesandservices.health.v4.AltitudeRollupValueOrBuilder> + internalGetAltitudeFieldBuilder() { + if (altitudeBuilder_ == null) { + if (!(valueCase_ == 9)) { + value_ = com.google.devicesandservices.health.v4.AltitudeRollupValue.getDefaultInstance(); + } + altitudeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.AltitudeRollupValue, + com.google.devicesandservices.health.v4.AltitudeRollupValue.Builder, + com.google.devicesandservices.health.v4.AltitudeRollupValueOrBuilder>( + (com.google.devicesandservices.health.v4.AltitudeRollupValue) value_, + getParentForChildren(), + isClean()); + value_ = null; + } + valueCase_ = 9; + onChanged(); + return altitudeBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.DistanceRollupValue, + com.google.devicesandservices.health.v4.DistanceRollupValue.Builder, + com.google.devicesandservices.health.v4.DistanceRollupValueOrBuilder> + distanceBuilder_; + + /** + * + * + *
+     * Returned by default when rolling up data points from the `distance` data
+     * type, or when requested explicitly using the `distance` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.DistanceRollupValue distance = 10; + * + * @return Whether the distance field is set. + */ + @java.lang.Override + public boolean hasDistance() { + return valueCase_ == 10; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `distance` data
+     * type, or when requested explicitly using the `distance` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.DistanceRollupValue distance = 10; + * + * @return The distance. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DistanceRollupValue getDistance() { + if (distanceBuilder_ == null) { + if (valueCase_ == 10) { + return (com.google.devicesandservices.health.v4.DistanceRollupValue) value_; + } + return com.google.devicesandservices.health.v4.DistanceRollupValue.getDefaultInstance(); + } else { + if (valueCase_ == 10) { + return distanceBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.DistanceRollupValue.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `distance` data
+     * type, or when requested explicitly using the `distance` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.DistanceRollupValue distance = 10; + */ + public Builder setDistance(com.google.devicesandservices.health.v4.DistanceRollupValue value) { + if (distanceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + onChanged(); + } else { + distanceBuilder_.setMessage(value); + } + valueCase_ = 10; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `distance` data
+     * type, or when requested explicitly using the `distance` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.DistanceRollupValue distance = 10; + */ + public Builder setDistance( + com.google.devicesandservices.health.v4.DistanceRollupValue.Builder builderForValue) { + if (distanceBuilder_ == null) { + value_ = builderForValue.build(); + onChanged(); + } else { + distanceBuilder_.setMessage(builderForValue.build()); + } + valueCase_ = 10; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `distance` data
+     * type, or when requested explicitly using the `distance` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.DistanceRollupValue distance = 10; + */ + public Builder mergeDistance( + com.google.devicesandservices.health.v4.DistanceRollupValue value) { + if (distanceBuilder_ == null) { + if (valueCase_ == 10 + && value_ + != com.google.devicesandservices.health.v4.DistanceRollupValue + .getDefaultInstance()) { + value_ = + com.google.devicesandservices.health.v4.DistanceRollupValue.newBuilder( + (com.google.devicesandservices.health.v4.DistanceRollupValue) value_) + .mergeFrom(value) + .buildPartial(); + } else { + value_ = value; + } + onChanged(); + } else { + if (valueCase_ == 10) { + distanceBuilder_.mergeFrom(value); + } else { + distanceBuilder_.setMessage(value); + } + } + valueCase_ = 10; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `distance` data
+     * type, or when requested explicitly using the `distance` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.DistanceRollupValue distance = 10; + */ + public Builder clearDistance() { + if (distanceBuilder_ == null) { + if (valueCase_ == 10) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + } else { + if (valueCase_ == 10) { + valueCase_ = 0; + value_ = null; + } + distanceBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `distance` data
+     * type, or when requested explicitly using the `distance` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.DistanceRollupValue distance = 10; + */ + public com.google.devicesandservices.health.v4.DistanceRollupValue.Builder + getDistanceBuilder() { + return internalGetDistanceFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `distance` data
+     * type, or when requested explicitly using the `distance` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.DistanceRollupValue distance = 10; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DistanceRollupValueOrBuilder + getDistanceOrBuilder() { + if ((valueCase_ == 10) && (distanceBuilder_ != null)) { + return distanceBuilder_.getMessageOrBuilder(); + } else { + if (valueCase_ == 10) { + return (com.google.devicesandservices.health.v4.DistanceRollupValue) value_; + } + return com.google.devicesandservices.health.v4.DistanceRollupValue.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `distance` data
+     * type, or when requested explicitly using the `distance` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.DistanceRollupValue distance = 10; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.DistanceRollupValue, + com.google.devicesandservices.health.v4.DistanceRollupValue.Builder, + com.google.devicesandservices.health.v4.DistanceRollupValueOrBuilder> + internalGetDistanceFieldBuilder() { + if (distanceBuilder_ == null) { + if (!(valueCase_ == 10)) { + value_ = com.google.devicesandservices.health.v4.DistanceRollupValue.getDefaultInstance(); + } + distanceBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.DistanceRollupValue, + com.google.devicesandservices.health.v4.DistanceRollupValue.Builder, + com.google.devicesandservices.health.v4.DistanceRollupValueOrBuilder>( + (com.google.devicesandservices.health.v4.DistanceRollupValue) value_, + getParentForChildren(), + isClean()); + value_ = null; + } + valueCase_ = 10; + onChanged(); + return distanceBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.BodyFatRollupValue, + com.google.devicesandservices.health.v4.BodyFatRollupValue.Builder, + com.google.devicesandservices.health.v4.BodyFatRollupValueOrBuilder> + bodyFatBuilder_; + + /** + * + * + *
+     * Returned by default when rolling up data points from the `body-fat` data
+     * type, or when requested explicitly using the `body-fat` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.BodyFatRollupValue body_fat = 11; + * + * @return Whether the bodyFat field is set. + */ + @java.lang.Override + public boolean hasBodyFat() { + return valueCase_ == 11; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `body-fat` data
+     * type, or when requested explicitly using the `body-fat` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.BodyFatRollupValue body_fat = 11; + * + * @return The bodyFat. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.BodyFatRollupValue getBodyFat() { + if (bodyFatBuilder_ == null) { + if (valueCase_ == 11) { + return (com.google.devicesandservices.health.v4.BodyFatRollupValue) value_; + } + return com.google.devicesandservices.health.v4.BodyFatRollupValue.getDefaultInstance(); + } else { + if (valueCase_ == 11) { + return bodyFatBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.BodyFatRollupValue.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `body-fat` data
+     * type, or when requested explicitly using the `body-fat` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.BodyFatRollupValue body_fat = 11; + */ + public Builder setBodyFat(com.google.devicesandservices.health.v4.BodyFatRollupValue value) { + if (bodyFatBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + onChanged(); + } else { + bodyFatBuilder_.setMessage(value); + } + valueCase_ = 11; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `body-fat` data
+     * type, or when requested explicitly using the `body-fat` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.BodyFatRollupValue body_fat = 11; + */ + public Builder setBodyFat( + com.google.devicesandservices.health.v4.BodyFatRollupValue.Builder builderForValue) { + if (bodyFatBuilder_ == null) { + value_ = builderForValue.build(); + onChanged(); + } else { + bodyFatBuilder_.setMessage(builderForValue.build()); + } + valueCase_ = 11; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `body-fat` data
+     * type, or when requested explicitly using the `body-fat` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.BodyFatRollupValue body_fat = 11; + */ + public Builder mergeBodyFat(com.google.devicesandservices.health.v4.BodyFatRollupValue value) { + if (bodyFatBuilder_ == null) { + if (valueCase_ == 11 + && value_ + != com.google.devicesandservices.health.v4.BodyFatRollupValue + .getDefaultInstance()) { + value_ = + com.google.devicesandservices.health.v4.BodyFatRollupValue.newBuilder( + (com.google.devicesandservices.health.v4.BodyFatRollupValue) value_) + .mergeFrom(value) + .buildPartial(); + } else { + value_ = value; + } + onChanged(); + } else { + if (valueCase_ == 11) { + bodyFatBuilder_.mergeFrom(value); + } else { + bodyFatBuilder_.setMessage(value); + } + } + valueCase_ = 11; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `body-fat` data
+     * type, or when requested explicitly using the `body-fat` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.BodyFatRollupValue body_fat = 11; + */ + public Builder clearBodyFat() { + if (bodyFatBuilder_ == null) { + if (valueCase_ == 11) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + } else { + if (valueCase_ == 11) { + valueCase_ = 0; + value_ = null; + } + bodyFatBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `body-fat` data
+     * type, or when requested explicitly using the `body-fat` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.BodyFatRollupValue body_fat = 11; + */ + public com.google.devicesandservices.health.v4.BodyFatRollupValue.Builder getBodyFatBuilder() { + return internalGetBodyFatFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `body-fat` data
+     * type, or when requested explicitly using the `body-fat` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.BodyFatRollupValue body_fat = 11; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.BodyFatRollupValueOrBuilder + getBodyFatOrBuilder() { + if ((valueCase_ == 11) && (bodyFatBuilder_ != null)) { + return bodyFatBuilder_.getMessageOrBuilder(); + } else { + if (valueCase_ == 11) { + return (com.google.devicesandservices.health.v4.BodyFatRollupValue) value_; + } + return com.google.devicesandservices.health.v4.BodyFatRollupValue.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `body-fat` data
+     * type, or when requested explicitly using the `body-fat` rollup type
+     * identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.BodyFatRollupValue body_fat = 11; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.BodyFatRollupValue, + com.google.devicesandservices.health.v4.BodyFatRollupValue.Builder, + com.google.devicesandservices.health.v4.BodyFatRollupValueOrBuilder> + internalGetBodyFatFieldBuilder() { + if (bodyFatBuilder_ == null) { + if (!(valueCase_ == 11)) { + value_ = com.google.devicesandservices.health.v4.BodyFatRollupValue.getDefaultInstance(); + } + bodyFatBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.BodyFatRollupValue, + com.google.devicesandservices.health.v4.BodyFatRollupValue.Builder, + com.google.devicesandservices.health.v4.BodyFatRollupValueOrBuilder>( + (com.google.devicesandservices.health.v4.BodyFatRollupValue) value_, + getParentForChildren(), + isClean()); + value_ = null; + } + valueCase_ = 11; + onChanged(); + return bodyFatBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.TotalCaloriesRollupValue, + com.google.devicesandservices.health.v4.TotalCaloriesRollupValue.Builder, + com.google.devicesandservices.health.v4.TotalCaloriesRollupValueOrBuilder> + totalCaloriesBuilder_; + + /** + * + * + *
+     * Returned by default when rolling up data points from the `total-calories`
+     * data type, or when requested explicitly using the `total-calories`
+     * rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.TotalCaloriesRollupValue total_calories = 12; + * + * + * @return Whether the totalCalories field is set. + */ + @java.lang.Override + public boolean hasTotalCalories() { + return valueCase_ == 12; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `total-calories`
+     * data type, or when requested explicitly using the `total-calories`
+     * rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.TotalCaloriesRollupValue total_calories = 12; + * + * + * @return The totalCalories. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.TotalCaloriesRollupValue getTotalCalories() { + if (totalCaloriesBuilder_ == null) { + if (valueCase_ == 12) { + return (com.google.devicesandservices.health.v4.TotalCaloriesRollupValue) value_; + } + return com.google.devicesandservices.health.v4.TotalCaloriesRollupValue + .getDefaultInstance(); + } else { + if (valueCase_ == 12) { + return totalCaloriesBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.TotalCaloriesRollupValue + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `total-calories`
+     * data type, or when requested explicitly using the `total-calories`
+     * rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.TotalCaloriesRollupValue total_calories = 12; + * + */ + public Builder setTotalCalories( + com.google.devicesandservices.health.v4.TotalCaloriesRollupValue value) { + if (totalCaloriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + onChanged(); + } else { + totalCaloriesBuilder_.setMessage(value); + } + valueCase_ = 12; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `total-calories`
+     * data type, or when requested explicitly using the `total-calories`
+     * rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.TotalCaloriesRollupValue total_calories = 12; + * + */ + public Builder setTotalCalories( + com.google.devicesandservices.health.v4.TotalCaloriesRollupValue.Builder builderForValue) { + if (totalCaloriesBuilder_ == null) { + value_ = builderForValue.build(); + onChanged(); + } else { + totalCaloriesBuilder_.setMessage(builderForValue.build()); + } + valueCase_ = 12; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `total-calories`
+     * data type, or when requested explicitly using the `total-calories`
+     * rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.TotalCaloriesRollupValue total_calories = 12; + * + */ + public Builder mergeTotalCalories( + com.google.devicesandservices.health.v4.TotalCaloriesRollupValue value) { + if (totalCaloriesBuilder_ == null) { + if (valueCase_ == 12 + && value_ + != com.google.devicesandservices.health.v4.TotalCaloriesRollupValue + .getDefaultInstance()) { + value_ = + com.google.devicesandservices.health.v4.TotalCaloriesRollupValue.newBuilder( + (com.google.devicesandservices.health.v4.TotalCaloriesRollupValue) value_) + .mergeFrom(value) + .buildPartial(); + } else { + value_ = value; + } + onChanged(); + } else { + if (valueCase_ == 12) { + totalCaloriesBuilder_.mergeFrom(value); + } else { + totalCaloriesBuilder_.setMessage(value); + } + } + valueCase_ = 12; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `total-calories`
+     * data type, or when requested explicitly using the `total-calories`
+     * rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.TotalCaloriesRollupValue total_calories = 12; + * + */ + public Builder clearTotalCalories() { + if (totalCaloriesBuilder_ == null) { + if (valueCase_ == 12) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + } else { + if (valueCase_ == 12) { + valueCase_ = 0; + value_ = null; + } + totalCaloriesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `total-calories`
+     * data type, or when requested explicitly using the `total-calories`
+     * rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.TotalCaloriesRollupValue total_calories = 12; + * + */ + public com.google.devicesandservices.health.v4.TotalCaloriesRollupValue.Builder + getTotalCaloriesBuilder() { + return internalGetTotalCaloriesFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `total-calories`
+     * data type, or when requested explicitly using the `total-calories`
+     * rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.TotalCaloriesRollupValue total_calories = 12; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.TotalCaloriesRollupValueOrBuilder + getTotalCaloriesOrBuilder() { + if ((valueCase_ == 12) && (totalCaloriesBuilder_ != null)) { + return totalCaloriesBuilder_.getMessageOrBuilder(); + } else { + if (valueCase_ == 12) { + return (com.google.devicesandservices.health.v4.TotalCaloriesRollupValue) value_; + } + return com.google.devicesandservices.health.v4.TotalCaloriesRollupValue + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the `total-calories`
+     * data type, or when requested explicitly using the `total-calories`
+     * rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.TotalCaloriesRollupValue total_calories = 12; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.TotalCaloriesRollupValue, + com.google.devicesandservices.health.v4.TotalCaloriesRollupValue.Builder, + com.google.devicesandservices.health.v4.TotalCaloriesRollupValueOrBuilder> + internalGetTotalCaloriesFieldBuilder() { + if (totalCaloriesBuilder_ == null) { + if (!(valueCase_ == 12)) { + value_ = + com.google.devicesandservices.health.v4.TotalCaloriesRollupValue.getDefaultInstance(); + } + totalCaloriesBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.TotalCaloriesRollupValue, + com.google.devicesandservices.health.v4.TotalCaloriesRollupValue.Builder, + com.google.devicesandservices.health.v4.TotalCaloriesRollupValueOrBuilder>( + (com.google.devicesandservices.health.v4.TotalCaloriesRollupValue) value_, + getParentForChildren(), + isClean()); + value_ = null; + } + valueCase_ = 12; + onChanged(); + return totalCaloriesBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue, + com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue.Builder, + com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValueOrBuilder> + activeZoneMinutesBuilder_; + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `active-zone-minutes` data type, or when requested explicitly using the
+     * `active-zone-minutes` rollup type identifier.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue active_zone_minutes = 13; + * + * + * @return Whether the activeZoneMinutes field is set. + */ + @java.lang.Override + public boolean hasActiveZoneMinutes() { + return valueCase_ == 13; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `active-zone-minutes` data type, or when requested explicitly using the
+     * `active-zone-minutes` rollup type identifier.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue active_zone_minutes = 13; + * + * + * @return The activeZoneMinutes. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue + getActiveZoneMinutes() { + if (activeZoneMinutesBuilder_ == null) { + if (valueCase_ == 13) { + return (com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue) value_; + } + return com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue + .getDefaultInstance(); + } else { + if (valueCase_ == 13) { + return activeZoneMinutesBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `active-zone-minutes` data type, or when requested explicitly using the
+     * `active-zone-minutes` rollup type identifier.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue active_zone_minutes = 13; + * + */ + public Builder setActiveZoneMinutes( + com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue value) { + if (activeZoneMinutesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + onChanged(); + } else { + activeZoneMinutesBuilder_.setMessage(value); + } + valueCase_ = 13; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `active-zone-minutes` data type, or when requested explicitly using the
+     * `active-zone-minutes` rollup type identifier.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue active_zone_minutes = 13; + * + */ + public Builder setActiveZoneMinutes( + com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue.Builder + builderForValue) { + if (activeZoneMinutesBuilder_ == null) { + value_ = builderForValue.build(); + onChanged(); + } else { + activeZoneMinutesBuilder_.setMessage(builderForValue.build()); + } + valueCase_ = 13; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `active-zone-minutes` data type, or when requested explicitly using the
+     * `active-zone-minutes` rollup type identifier.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue active_zone_minutes = 13; + * + */ + public Builder mergeActiveZoneMinutes( + com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue value) { + if (activeZoneMinutesBuilder_ == null) { + if (valueCase_ == 13 + && value_ + != com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue + .getDefaultInstance()) { + value_ = + com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue.newBuilder( + (com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue) value_) + .mergeFrom(value) + .buildPartial(); + } else { + value_ = value; + } + onChanged(); + } else { + if (valueCase_ == 13) { + activeZoneMinutesBuilder_.mergeFrom(value); + } else { + activeZoneMinutesBuilder_.setMessage(value); + } + } + valueCase_ = 13; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `active-zone-minutes` data type, or when requested explicitly using the
+     * `active-zone-minutes` rollup type identifier.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue active_zone_minutes = 13; + * + */ + public Builder clearActiveZoneMinutes() { + if (activeZoneMinutesBuilder_ == null) { + if (valueCase_ == 13) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + } else { + if (valueCase_ == 13) { + valueCase_ = 0; + value_ = null; + } + activeZoneMinutesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `active-zone-minutes` data type, or when requested explicitly using the
+     * `active-zone-minutes` rollup type identifier.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue active_zone_minutes = 13; + * + */ + public com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue.Builder + getActiveZoneMinutesBuilder() { + return internalGetActiveZoneMinutesFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `active-zone-minutes` data type, or when requested explicitly using the
+     * `active-zone-minutes` rollup type identifier.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue active_zone_minutes = 13; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValueOrBuilder + getActiveZoneMinutesOrBuilder() { + if ((valueCase_ == 13) && (activeZoneMinutesBuilder_ != null)) { + return activeZoneMinutesBuilder_.getMessageOrBuilder(); + } else { + if (valueCase_ == 13) { + return (com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue) value_; + } + return com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `active-zone-minutes` data type, or when requested explicitly using the
+     * `active-zone-minutes` rollup type identifier.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue active_zone_minutes = 13; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue, + com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue.Builder, + com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValueOrBuilder> + internalGetActiveZoneMinutesFieldBuilder() { + if (activeZoneMinutesBuilder_ == null) { + if (!(valueCase_ == 13)) { + value_ = + com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue + .getDefaultInstance(); + } + activeZoneMinutesBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue, + com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue.Builder, + com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValueOrBuilder>( + (com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue) value_, + getParentForChildren(), + isClean()); + value_ = null; + } + valueCase_ = 13; + onChanged(); + return activeZoneMinutesBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue, + com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue.Builder, + com.google.devicesandservices.health.v4.SedentaryPeriodRollupValueOrBuilder> + sedentaryPeriodBuilder_; + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `sedentary-period` data type, or when requested explicitly using the
+     * `sedentary-period` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.SedentaryPeriodRollupValue sedentary_period = 15; + * + * + * @return Whether the sedentaryPeriod field is set. + */ + @java.lang.Override + public boolean hasSedentaryPeriod() { + return valueCase_ == 15; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `sedentary-period` data type, or when requested explicitly using the
+     * `sedentary-period` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.SedentaryPeriodRollupValue sedentary_period = 15; + * + * + * @return The sedentaryPeriod. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue getSedentaryPeriod() { + if (sedentaryPeriodBuilder_ == null) { + if (valueCase_ == 15) { + return (com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue) value_; + } + return com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue + .getDefaultInstance(); + } else { + if (valueCase_ == 15) { + return sedentaryPeriodBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `sedentary-period` data type, or when requested explicitly using the
+     * `sedentary-period` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.SedentaryPeriodRollupValue sedentary_period = 15; + * + */ + public Builder setSedentaryPeriod( + com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue value) { + if (sedentaryPeriodBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + onChanged(); + } else { + sedentaryPeriodBuilder_.setMessage(value); + } + valueCase_ = 15; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `sedentary-period` data type, or when requested explicitly using the
+     * `sedentary-period` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.SedentaryPeriodRollupValue sedentary_period = 15; + * + */ + public Builder setSedentaryPeriod( + com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue.Builder + builderForValue) { + if (sedentaryPeriodBuilder_ == null) { + value_ = builderForValue.build(); + onChanged(); + } else { + sedentaryPeriodBuilder_.setMessage(builderForValue.build()); + } + valueCase_ = 15; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `sedentary-period` data type, or when requested explicitly using the
+     * `sedentary-period` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.SedentaryPeriodRollupValue sedentary_period = 15; + * + */ + public Builder mergeSedentaryPeriod( + com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue value) { + if (sedentaryPeriodBuilder_ == null) { + if (valueCase_ == 15 + && value_ + != com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue + .getDefaultInstance()) { + value_ = + com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue.newBuilder( + (com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue) value_) + .mergeFrom(value) + .buildPartial(); + } else { + value_ = value; + } + onChanged(); + } else { + if (valueCase_ == 15) { + sedentaryPeriodBuilder_.mergeFrom(value); + } else { + sedentaryPeriodBuilder_.setMessage(value); + } + } + valueCase_ = 15; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `sedentary-period` data type, or when requested explicitly using the
+     * `sedentary-period` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.SedentaryPeriodRollupValue sedentary_period = 15; + * + */ + public Builder clearSedentaryPeriod() { + if (sedentaryPeriodBuilder_ == null) { + if (valueCase_ == 15) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + } else { + if (valueCase_ == 15) { + valueCase_ = 0; + value_ = null; + } + sedentaryPeriodBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `sedentary-period` data type, or when requested explicitly using the
+     * `sedentary-period` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.SedentaryPeriodRollupValue sedentary_period = 15; + * + */ + public com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue.Builder + getSedentaryPeriodBuilder() { + return internalGetSedentaryPeriodFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `sedentary-period` data type, or when requested explicitly using the
+     * `sedentary-period` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.SedentaryPeriodRollupValue sedentary_period = 15; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.SedentaryPeriodRollupValueOrBuilder + getSedentaryPeriodOrBuilder() { + if ((valueCase_ == 15) && (sedentaryPeriodBuilder_ != null)) { + return sedentaryPeriodBuilder_.getMessageOrBuilder(); + } else { + if (valueCase_ == 15) { + return (com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue) value_; + } + return com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `sedentary-period` data type, or when requested explicitly using the
+     * `sedentary-period` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.SedentaryPeriodRollupValue sedentary_period = 15; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue, + com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue.Builder, + com.google.devicesandservices.health.v4.SedentaryPeriodRollupValueOrBuilder> + internalGetSedentaryPeriodFieldBuilder() { + if (sedentaryPeriodBuilder_ == null) { + if (!(valueCase_ == 15)) { + value_ = + com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue + .getDefaultInstance(); + } + sedentaryPeriodBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue, + com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue.Builder, + com.google.devicesandservices.health.v4.SedentaryPeriodRollupValueOrBuilder>( + (com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue) value_, + getParentForChildren(), + isClean()); + value_ = null; + } + valueCase_ = 15; + onChanged(); + return sedentaryPeriodBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.RunVO2MaxRollupValue, + com.google.devicesandservices.health.v4.RunVO2MaxRollupValue.Builder, + com.google.devicesandservices.health.v4.RunVO2MaxRollupValueOrBuilder> + runVo2MaxBuilder_; + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `run-vo2-max` data type, or when requested explicitly using the
+     * `run-vo2-max` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.RunVO2MaxRollupValue run_vo2_max = 16; + * + * @return Whether the runVo2Max field is set. + */ + @java.lang.Override + public boolean hasRunVo2Max() { + return valueCase_ == 16; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `run-vo2-max` data type, or when requested explicitly using the
+     * `run-vo2-max` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.RunVO2MaxRollupValue run_vo2_max = 16; + * + * @return The runVo2Max. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.RunVO2MaxRollupValue getRunVo2Max() { + if (runVo2MaxBuilder_ == null) { + if (valueCase_ == 16) { + return (com.google.devicesandservices.health.v4.RunVO2MaxRollupValue) value_; + } + return com.google.devicesandservices.health.v4.RunVO2MaxRollupValue.getDefaultInstance(); + } else { + if (valueCase_ == 16) { + return runVo2MaxBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.RunVO2MaxRollupValue.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `run-vo2-max` data type, or when requested explicitly using the
+     * `run-vo2-max` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.RunVO2MaxRollupValue run_vo2_max = 16; + */ + public Builder setRunVo2Max( + com.google.devicesandservices.health.v4.RunVO2MaxRollupValue value) { + if (runVo2MaxBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + onChanged(); + } else { + runVo2MaxBuilder_.setMessage(value); + } + valueCase_ = 16; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `run-vo2-max` data type, or when requested explicitly using the
+     * `run-vo2-max` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.RunVO2MaxRollupValue run_vo2_max = 16; + */ + public Builder setRunVo2Max( + com.google.devicesandservices.health.v4.RunVO2MaxRollupValue.Builder builderForValue) { + if (runVo2MaxBuilder_ == null) { + value_ = builderForValue.build(); + onChanged(); + } else { + runVo2MaxBuilder_.setMessage(builderForValue.build()); + } + valueCase_ = 16; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `run-vo2-max` data type, or when requested explicitly using the
+     * `run-vo2-max` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.RunVO2MaxRollupValue run_vo2_max = 16; + */ + public Builder mergeRunVo2Max( + com.google.devicesandservices.health.v4.RunVO2MaxRollupValue value) { + if (runVo2MaxBuilder_ == null) { + if (valueCase_ == 16 + && value_ + != com.google.devicesandservices.health.v4.RunVO2MaxRollupValue + .getDefaultInstance()) { + value_ = + com.google.devicesandservices.health.v4.RunVO2MaxRollupValue.newBuilder( + (com.google.devicesandservices.health.v4.RunVO2MaxRollupValue) value_) + .mergeFrom(value) + .buildPartial(); + } else { + value_ = value; + } + onChanged(); + } else { + if (valueCase_ == 16) { + runVo2MaxBuilder_.mergeFrom(value); + } else { + runVo2MaxBuilder_.setMessage(value); + } + } + valueCase_ = 16; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `run-vo2-max` data type, or when requested explicitly using the
+     * `run-vo2-max` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.RunVO2MaxRollupValue run_vo2_max = 16; + */ + public Builder clearRunVo2Max() { + if (runVo2MaxBuilder_ == null) { + if (valueCase_ == 16) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + } else { + if (valueCase_ == 16) { + valueCase_ = 0; + value_ = null; + } + runVo2MaxBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `run-vo2-max` data type, or when requested explicitly using the
+     * `run-vo2-max` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.RunVO2MaxRollupValue run_vo2_max = 16; + */ + public com.google.devicesandservices.health.v4.RunVO2MaxRollupValue.Builder + getRunVo2MaxBuilder() { + return internalGetRunVo2MaxFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `run-vo2-max` data type, or when requested explicitly using the
+     * `run-vo2-max` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.RunVO2MaxRollupValue run_vo2_max = 16; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.RunVO2MaxRollupValueOrBuilder + getRunVo2MaxOrBuilder() { + if ((valueCase_ == 16) && (runVo2MaxBuilder_ != null)) { + return runVo2MaxBuilder_.getMessageOrBuilder(); + } else { + if (valueCase_ == 16) { + return (com.google.devicesandservices.health.v4.RunVO2MaxRollupValue) value_; + } + return com.google.devicesandservices.health.v4.RunVO2MaxRollupValue.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `run-vo2-max` data type, or when requested explicitly using the
+     * `run-vo2-max` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.RunVO2MaxRollupValue run_vo2_max = 16; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.RunVO2MaxRollupValue, + com.google.devicesandservices.health.v4.RunVO2MaxRollupValue.Builder, + com.google.devicesandservices.health.v4.RunVO2MaxRollupValueOrBuilder> + internalGetRunVo2MaxFieldBuilder() { + if (runVo2MaxBuilder_ == null) { + if (!(valueCase_ == 16)) { + value_ = + com.google.devicesandservices.health.v4.RunVO2MaxRollupValue.getDefaultInstance(); + } + runVo2MaxBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.RunVO2MaxRollupValue, + com.google.devicesandservices.health.v4.RunVO2MaxRollupValue.Builder, + com.google.devicesandservices.health.v4.RunVO2MaxRollupValueOrBuilder>( + (com.google.devicesandservices.health.v4.RunVO2MaxRollupValue) value_, + getParentForChildren(), + isClean()); + value_ = null; + } + valueCase_ = 16; + onChanged(); + return runVo2MaxBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue, + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue.Builder, + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValueOrBuilder> + caloriesInHeartRateZoneBuilder_; + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `calories-in-heart-rate-zone` data type, or when requested explicitly
+     * using the `calories-in-heart-rate-zone` rollup type identifier.
+     * 
+ * + * + * .google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue calories_in_heart_rate_zone = 17; + * + * + * @return Whether the caloriesInHeartRateZone field is set. + */ + @java.lang.Override + public boolean hasCaloriesInHeartRateZone() { + return valueCase_ == 17; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `calories-in-heart-rate-zone` data type, or when requested explicitly
+     * using the `calories-in-heart-rate-zone` rollup type identifier.
+     * 
+ * + * + * .google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue calories_in_heart_rate_zone = 17; + * + * + * @return The caloriesInHeartRateZone. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + getCaloriesInHeartRateZone() { + if (caloriesInHeartRateZoneBuilder_ == null) { + if (valueCase_ == 17) { + return (com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue) + value_; + } + return com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .getDefaultInstance(); + } else { + if (valueCase_ == 17) { + return caloriesInHeartRateZoneBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `calories-in-heart-rate-zone` data type, or when requested explicitly
+     * using the `calories-in-heart-rate-zone` rollup type identifier.
+     * 
+ * + * + * .google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue calories_in_heart_rate_zone = 17; + * + */ + public Builder setCaloriesInHeartRateZone( + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue value) { + if (caloriesInHeartRateZoneBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + onChanged(); + } else { + caloriesInHeartRateZoneBuilder_.setMessage(value); + } + valueCase_ = 17; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `calories-in-heart-rate-zone` data type, or when requested explicitly
+     * using the `calories-in-heart-rate-zone` rollup type identifier.
+     * 
+ * + * + * .google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue calories_in_heart_rate_zone = 17; + * + */ + public Builder setCaloriesInHeartRateZone( + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue.Builder + builderForValue) { + if (caloriesInHeartRateZoneBuilder_ == null) { + value_ = builderForValue.build(); + onChanged(); + } else { + caloriesInHeartRateZoneBuilder_.setMessage(builderForValue.build()); + } + valueCase_ = 17; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `calories-in-heart-rate-zone` data type, or when requested explicitly
+     * using the `calories-in-heart-rate-zone` rollup type identifier.
+     * 
+ * + * + * .google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue calories_in_heart_rate_zone = 17; + * + */ + public Builder mergeCaloriesInHeartRateZone( + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue value) { + if (caloriesInHeartRateZoneBuilder_ == null) { + if (valueCase_ == 17 + && value_ + != com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .getDefaultInstance()) { + value_ = + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue.newBuilder( + (com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue) + value_) + .mergeFrom(value) + .buildPartial(); + } else { + value_ = value; + } + onChanged(); + } else { + if (valueCase_ == 17) { + caloriesInHeartRateZoneBuilder_.mergeFrom(value); + } else { + caloriesInHeartRateZoneBuilder_.setMessage(value); + } + } + valueCase_ = 17; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `calories-in-heart-rate-zone` data type, or when requested explicitly
+     * using the `calories-in-heart-rate-zone` rollup type identifier.
+     * 
+ * + * + * .google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue calories_in_heart_rate_zone = 17; + * + */ + public Builder clearCaloriesInHeartRateZone() { + if (caloriesInHeartRateZoneBuilder_ == null) { + if (valueCase_ == 17) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + } else { + if (valueCase_ == 17) { + valueCase_ = 0; + value_ = null; + } + caloriesInHeartRateZoneBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `calories-in-heart-rate-zone` data type, or when requested explicitly
+     * using the `calories-in-heart-rate-zone` rollup type identifier.
+     * 
+ * + * + * .google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue calories_in_heart_rate_zone = 17; + * + */ + public com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue.Builder + getCaloriesInHeartRateZoneBuilder() { + return internalGetCaloriesInHeartRateZoneFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `calories-in-heart-rate-zone` data type, or when requested explicitly
+     * using the `calories-in-heart-rate-zone` rollup type identifier.
+     * 
+ * + * + * .google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue calories_in_heart_rate_zone = 17; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValueOrBuilder + getCaloriesInHeartRateZoneOrBuilder() { + if ((valueCase_ == 17) && (caloriesInHeartRateZoneBuilder_ != null)) { + return caloriesInHeartRateZoneBuilder_.getMessageOrBuilder(); + } else { + if (valueCase_ == 17) { + return (com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue) + value_; + } + return com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `calories-in-heart-rate-zone` data type, or when requested explicitly
+     * using the `calories-in-heart-rate-zone` rollup type identifier.
+     * 
+ * + * + * .google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue calories_in_heart_rate_zone = 17; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue, + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue.Builder, + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValueOrBuilder> + internalGetCaloriesInHeartRateZoneFieldBuilder() { + if (caloriesInHeartRateZoneBuilder_ == null) { + if (!(valueCase_ == 17)) { + value_ = + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + .getDefaultInstance(); + } + caloriesInHeartRateZoneBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue, + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue.Builder, + com.google.devicesandservices.health.v4 + .CaloriesInHeartRateZoneRollupValueOrBuilder>( + (com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue) value_, + getParentForChildren(), + isClean()); + value_ = null; + } + valueCase_ = 17; + onChanged(); + return caloriesInHeartRateZoneBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ActivityLevelRollupValue, + com.google.devicesandservices.health.v4.ActivityLevelRollupValue.Builder, + com.google.devicesandservices.health.v4.ActivityLevelRollupValueOrBuilder> + activityLevelBuilder_; + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `activity-level` data type, or when requested explicitly using the
+     * `activity-level` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.ActivityLevelRollupValue activity_level = 18; + * + * + * @return Whether the activityLevel field is set. + */ + @java.lang.Override + public boolean hasActivityLevel() { + return valueCase_ == 18; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `activity-level` data type, or when requested explicitly using the
+     * `activity-level` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.ActivityLevelRollupValue activity_level = 18; + * + * + * @return The activityLevel. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ActivityLevelRollupValue getActivityLevel() { + if (activityLevelBuilder_ == null) { + if (valueCase_ == 18) { + return (com.google.devicesandservices.health.v4.ActivityLevelRollupValue) value_; + } + return com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .getDefaultInstance(); + } else { + if (valueCase_ == 18) { + return activityLevelBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `activity-level` data type, or when requested explicitly using the
+     * `activity-level` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.ActivityLevelRollupValue activity_level = 18; + * + */ + public Builder setActivityLevel( + com.google.devicesandservices.health.v4.ActivityLevelRollupValue value) { + if (activityLevelBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + onChanged(); + } else { + activityLevelBuilder_.setMessage(value); + } + valueCase_ = 18; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `activity-level` data type, or when requested explicitly using the
+     * `activity-level` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.ActivityLevelRollupValue activity_level = 18; + * + */ + public Builder setActivityLevel( + com.google.devicesandservices.health.v4.ActivityLevelRollupValue.Builder builderForValue) { + if (activityLevelBuilder_ == null) { + value_ = builderForValue.build(); + onChanged(); + } else { + activityLevelBuilder_.setMessage(builderForValue.build()); + } + valueCase_ = 18; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `activity-level` data type, or when requested explicitly using the
+     * `activity-level` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.ActivityLevelRollupValue activity_level = 18; + * + */ + public Builder mergeActivityLevel( + com.google.devicesandservices.health.v4.ActivityLevelRollupValue value) { + if (activityLevelBuilder_ == null) { + if (valueCase_ == 18 + && value_ + != com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .getDefaultInstance()) { + value_ = + com.google.devicesandservices.health.v4.ActivityLevelRollupValue.newBuilder( + (com.google.devicesandservices.health.v4.ActivityLevelRollupValue) value_) + .mergeFrom(value) + .buildPartial(); + } else { + value_ = value; + } + onChanged(); + } else { + if (valueCase_ == 18) { + activityLevelBuilder_.mergeFrom(value); + } else { + activityLevelBuilder_.setMessage(value); + } + } + valueCase_ = 18; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `activity-level` data type, or when requested explicitly using the
+     * `activity-level` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.ActivityLevelRollupValue activity_level = 18; + * + */ + public Builder clearActivityLevel() { + if (activityLevelBuilder_ == null) { + if (valueCase_ == 18) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + } else { + if (valueCase_ == 18) { + valueCase_ = 0; + value_ = null; + } + activityLevelBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `activity-level` data type, or when requested explicitly using the
+     * `activity-level` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.ActivityLevelRollupValue activity_level = 18; + * + */ + public com.google.devicesandservices.health.v4.ActivityLevelRollupValue.Builder + getActivityLevelBuilder() { + return internalGetActivityLevelFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `activity-level` data type, or when requested explicitly using the
+     * `activity-level` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.ActivityLevelRollupValue activity_level = 18; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ActivityLevelRollupValueOrBuilder + getActivityLevelOrBuilder() { + if ((valueCase_ == 18) && (activityLevelBuilder_ != null)) { + return activityLevelBuilder_.getMessageOrBuilder(); + } else { + if (valueCase_ == 18) { + return (com.google.devicesandservices.health.v4.ActivityLevelRollupValue) value_; + } + return com.google.devicesandservices.health.v4.ActivityLevelRollupValue + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `activity-level` data type, or when requested explicitly using the
+     * `activity-level` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.ActivityLevelRollupValue activity_level = 18; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ActivityLevelRollupValue, + com.google.devicesandservices.health.v4.ActivityLevelRollupValue.Builder, + com.google.devicesandservices.health.v4.ActivityLevelRollupValueOrBuilder> + internalGetActivityLevelFieldBuilder() { + if (activityLevelBuilder_ == null) { + if (!(valueCase_ == 18)) { + value_ = + com.google.devicesandservices.health.v4.ActivityLevelRollupValue.getDefaultInstance(); + } + activityLevelBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ActivityLevelRollupValue, + com.google.devicesandservices.health.v4.ActivityLevelRollupValue.Builder, + com.google.devicesandservices.health.v4.ActivityLevelRollupValueOrBuilder>( + (com.google.devicesandservices.health.v4.ActivityLevelRollupValue) value_, + getParentForChildren(), + isClean()); + value_ = null; + } + valueCase_ = 18; + onChanged(); + return activityLevelBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.HydrationLogRollupValue, + com.google.devicesandservices.health.v4.HydrationLogRollupValue.Builder, + com.google.devicesandservices.health.v4.HydrationLogRollupValueOrBuilder> + hydrationLogBuilder_; + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `hydration-log` data type, or when requested explicitly using the
+     * `hydration-log` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.HydrationLogRollupValue hydration_log = 20; + * + * @return Whether the hydrationLog field is set. + */ + @java.lang.Override + public boolean hasHydrationLog() { + return valueCase_ == 20; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `hydration-log` data type, or when requested explicitly using the
+     * `hydration-log` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.HydrationLogRollupValue hydration_log = 20; + * + * @return The hydrationLog. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.HydrationLogRollupValue getHydrationLog() { + if (hydrationLogBuilder_ == null) { + if (valueCase_ == 20) { + return (com.google.devicesandservices.health.v4.HydrationLogRollupValue) value_; + } + return com.google.devicesandservices.health.v4.HydrationLogRollupValue.getDefaultInstance(); + } else { + if (valueCase_ == 20) { + return hydrationLogBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.HydrationLogRollupValue.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `hydration-log` data type, or when requested explicitly using the
+     * `hydration-log` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.HydrationLogRollupValue hydration_log = 20; + */ + public Builder setHydrationLog( + com.google.devicesandservices.health.v4.HydrationLogRollupValue value) { + if (hydrationLogBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + onChanged(); + } else { + hydrationLogBuilder_.setMessage(value); + } + valueCase_ = 20; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `hydration-log` data type, or when requested explicitly using the
+     * `hydration-log` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.HydrationLogRollupValue hydration_log = 20; + */ + public Builder setHydrationLog( + com.google.devicesandservices.health.v4.HydrationLogRollupValue.Builder builderForValue) { + if (hydrationLogBuilder_ == null) { + value_ = builderForValue.build(); + onChanged(); + } else { + hydrationLogBuilder_.setMessage(builderForValue.build()); + } + valueCase_ = 20; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `hydration-log` data type, or when requested explicitly using the
+     * `hydration-log` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.HydrationLogRollupValue hydration_log = 20; + */ + public Builder mergeHydrationLog( + com.google.devicesandservices.health.v4.HydrationLogRollupValue value) { + if (hydrationLogBuilder_ == null) { + if (valueCase_ == 20 + && value_ + != com.google.devicesandservices.health.v4.HydrationLogRollupValue + .getDefaultInstance()) { + value_ = + com.google.devicesandservices.health.v4.HydrationLogRollupValue.newBuilder( + (com.google.devicesandservices.health.v4.HydrationLogRollupValue) value_) + .mergeFrom(value) + .buildPartial(); + } else { + value_ = value; + } + onChanged(); + } else { + if (valueCase_ == 20) { + hydrationLogBuilder_.mergeFrom(value); + } else { + hydrationLogBuilder_.setMessage(value); + } + } + valueCase_ = 20; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `hydration-log` data type, or when requested explicitly using the
+     * `hydration-log` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.HydrationLogRollupValue hydration_log = 20; + */ + public Builder clearHydrationLog() { + if (hydrationLogBuilder_ == null) { + if (valueCase_ == 20) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + } else { + if (valueCase_ == 20) { + valueCase_ = 0; + value_ = null; + } + hydrationLogBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `hydration-log` data type, or when requested explicitly using the
+     * `hydration-log` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.HydrationLogRollupValue hydration_log = 20; + */ + public com.google.devicesandservices.health.v4.HydrationLogRollupValue.Builder + getHydrationLogBuilder() { + return internalGetHydrationLogFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `hydration-log` data type, or when requested explicitly using the
+     * `hydration-log` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.HydrationLogRollupValue hydration_log = 20; + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.HydrationLogRollupValueOrBuilder + getHydrationLogOrBuilder() { + if ((valueCase_ == 20) && (hydrationLogBuilder_ != null)) { + return hydrationLogBuilder_.getMessageOrBuilder(); + } else { + if (valueCase_ == 20) { + return (com.google.devicesandservices.health.v4.HydrationLogRollupValue) value_; + } + return com.google.devicesandservices.health.v4.HydrationLogRollupValue.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `hydration-log` data type, or when requested explicitly using the
+     * `hydration-log` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.HydrationLogRollupValue hydration_log = 20; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.HydrationLogRollupValue, + com.google.devicesandservices.health.v4.HydrationLogRollupValue.Builder, + com.google.devicesandservices.health.v4.HydrationLogRollupValueOrBuilder> + internalGetHydrationLogFieldBuilder() { + if (hydrationLogBuilder_ == null) { + if (!(valueCase_ == 20)) { + value_ = + com.google.devicesandservices.health.v4.HydrationLogRollupValue.getDefaultInstance(); + } + hydrationLogBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.HydrationLogRollupValue, + com.google.devicesandservices.health.v4.HydrationLogRollupValue.Builder, + com.google.devicesandservices.health.v4.HydrationLogRollupValueOrBuilder>( + (com.google.devicesandservices.health.v4.HydrationLogRollupValue) value_, + getParentForChildren(), + isClean()); + value_ = null; + } + valueCase_ = 20; + onChanged(); + return hydrationLogBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue, + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue.Builder, + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValueOrBuilder> + timeInHeartRateZoneBuilder_; + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `time-in-heart-rate-zone` data type, or when requested explicitly using
+     * the `time-in-heart-rate-zone` rollup type identifier.
+     * 
+ * + * + * .google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue time_in_heart_rate_zone = 21; + * + * + * @return Whether the timeInHeartRateZone field is set. + */ + @java.lang.Override + public boolean hasTimeInHeartRateZone() { + return valueCase_ == 21; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `time-in-heart-rate-zone` data type, or when requested explicitly using
+     * the `time-in-heart-rate-zone` rollup type identifier.
+     * 
+ * + * + * .google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue time_in_heart_rate_zone = 21; + * + * + * @return The timeInHeartRateZone. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + getTimeInHeartRateZone() { + if (timeInHeartRateZoneBuilder_ == null) { + if (valueCase_ == 21) { + return (com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue) value_; + } + return com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .getDefaultInstance(); + } else { + if (valueCase_ == 21) { + return timeInHeartRateZoneBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `time-in-heart-rate-zone` data type, or when requested explicitly using
+     * the `time-in-heart-rate-zone` rollup type identifier.
+     * 
+ * + * + * .google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue time_in_heart_rate_zone = 21; + * + */ + public Builder setTimeInHeartRateZone( + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue value) { + if (timeInHeartRateZoneBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + onChanged(); + } else { + timeInHeartRateZoneBuilder_.setMessage(value); + } + valueCase_ = 21; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `time-in-heart-rate-zone` data type, or when requested explicitly using
+     * the `time-in-heart-rate-zone` rollup type identifier.
+     * 
+ * + * + * .google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue time_in_heart_rate_zone = 21; + * + */ + public Builder setTimeInHeartRateZone( + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue.Builder + builderForValue) { + if (timeInHeartRateZoneBuilder_ == null) { + value_ = builderForValue.build(); + onChanged(); + } else { + timeInHeartRateZoneBuilder_.setMessage(builderForValue.build()); + } + valueCase_ = 21; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `time-in-heart-rate-zone` data type, or when requested explicitly using
+     * the `time-in-heart-rate-zone` rollup type identifier.
+     * 
+ * + * + * .google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue time_in_heart_rate_zone = 21; + * + */ + public Builder mergeTimeInHeartRateZone( + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue value) { + if (timeInHeartRateZoneBuilder_ == null) { + if (valueCase_ == 21 + && value_ + != com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .getDefaultInstance()) { + value_ = + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue.newBuilder( + (com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue) + value_) + .mergeFrom(value) + .buildPartial(); + } else { + value_ = value; + } + onChanged(); + } else { + if (valueCase_ == 21) { + timeInHeartRateZoneBuilder_.mergeFrom(value); + } else { + timeInHeartRateZoneBuilder_.setMessage(value); + } + } + valueCase_ = 21; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `time-in-heart-rate-zone` data type, or when requested explicitly using
+     * the `time-in-heart-rate-zone` rollup type identifier.
+     * 
+ * + * + * .google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue time_in_heart_rate_zone = 21; + * + */ + public Builder clearTimeInHeartRateZone() { + if (timeInHeartRateZoneBuilder_ == null) { + if (valueCase_ == 21) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + } else { + if (valueCase_ == 21) { + valueCase_ = 0; + value_ = null; + } + timeInHeartRateZoneBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `time-in-heart-rate-zone` data type, or when requested explicitly using
+     * the `time-in-heart-rate-zone` rollup type identifier.
+     * 
+ * + * + * .google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue time_in_heart_rate_zone = 21; + * + */ + public com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue.Builder + getTimeInHeartRateZoneBuilder() { + return internalGetTimeInHeartRateZoneFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `time-in-heart-rate-zone` data type, or when requested explicitly using
+     * the `time-in-heart-rate-zone` rollup type identifier.
+     * 
+ * + * + * .google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue time_in_heart_rate_zone = 21; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValueOrBuilder + getTimeInHeartRateZoneOrBuilder() { + if ((valueCase_ == 21) && (timeInHeartRateZoneBuilder_ != null)) { + return timeInHeartRateZoneBuilder_.getMessageOrBuilder(); + } else { + if (valueCase_ == 21) { + return (com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue) value_; + } + return com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `time-in-heart-rate-zone` data type, or when requested explicitly using
+     * the `time-in-heart-rate-zone` rollup type identifier.
+     * 
+ * + * + * .google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue time_in_heart_rate_zone = 21; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue, + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue.Builder, + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValueOrBuilder> + internalGetTimeInHeartRateZoneFieldBuilder() { + if (timeInHeartRateZoneBuilder_ == null) { + if (!(valueCase_ == 21)) { + value_ = + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .getDefaultInstance(); + } + timeInHeartRateZoneBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue, + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue.Builder, + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValueOrBuilder>( + (com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue) value_, + getParentForChildren(), + isClean()); + value_ = null; + } + valueCase_ = 21; + onChanged(); + return timeInHeartRateZoneBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ActiveMinutesRollupValue, + com.google.devicesandservices.health.v4.ActiveMinutesRollupValue.Builder, + com.google.devicesandservices.health.v4.ActiveMinutesRollupValueOrBuilder> + activeMinutesBuilder_; + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `active-minutes` data type, or when requested explicitly using the
+     * `active-minutes` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.ActiveMinutesRollupValue active_minutes = 22; + * + * + * @return Whether the activeMinutes field is set. + */ + @java.lang.Override + public boolean hasActiveMinutes() { + return valueCase_ == 22; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `active-minutes` data type, or when requested explicitly using the
+     * `active-minutes` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.ActiveMinutesRollupValue active_minutes = 22; + * + * + * @return The activeMinutes. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ActiveMinutesRollupValue getActiveMinutes() { + if (activeMinutesBuilder_ == null) { + if (valueCase_ == 22) { + return (com.google.devicesandservices.health.v4.ActiveMinutesRollupValue) value_; + } + return com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .getDefaultInstance(); + } else { + if (valueCase_ == 22) { + return activeMinutesBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `active-minutes` data type, or when requested explicitly using the
+     * `active-minutes` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.ActiveMinutesRollupValue active_minutes = 22; + * + */ + public Builder setActiveMinutes( + com.google.devicesandservices.health.v4.ActiveMinutesRollupValue value) { + if (activeMinutesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + onChanged(); + } else { + activeMinutesBuilder_.setMessage(value); + } + valueCase_ = 22; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `active-minutes` data type, or when requested explicitly using the
+     * `active-minutes` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.ActiveMinutesRollupValue active_minutes = 22; + * + */ + public Builder setActiveMinutes( + com.google.devicesandservices.health.v4.ActiveMinutesRollupValue.Builder builderForValue) { + if (activeMinutesBuilder_ == null) { + value_ = builderForValue.build(); + onChanged(); + } else { + activeMinutesBuilder_.setMessage(builderForValue.build()); + } + valueCase_ = 22; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `active-minutes` data type, or when requested explicitly using the
+     * `active-minutes` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.ActiveMinutesRollupValue active_minutes = 22; + * + */ + public Builder mergeActiveMinutes( + com.google.devicesandservices.health.v4.ActiveMinutesRollupValue value) { + if (activeMinutesBuilder_ == null) { + if (valueCase_ == 22 + && value_ + != com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .getDefaultInstance()) { + value_ = + com.google.devicesandservices.health.v4.ActiveMinutesRollupValue.newBuilder( + (com.google.devicesandservices.health.v4.ActiveMinutesRollupValue) value_) + .mergeFrom(value) + .buildPartial(); + } else { + value_ = value; + } + onChanged(); + } else { + if (valueCase_ == 22) { + activeMinutesBuilder_.mergeFrom(value); + } else { + activeMinutesBuilder_.setMessage(value); + } + } + valueCase_ = 22; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `active-minutes` data type, or when requested explicitly using the
+     * `active-minutes` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.ActiveMinutesRollupValue active_minutes = 22; + * + */ + public Builder clearActiveMinutes() { + if (activeMinutesBuilder_ == null) { + if (valueCase_ == 22) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + } else { + if (valueCase_ == 22) { + valueCase_ = 0; + value_ = null; + } + activeMinutesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `active-minutes` data type, or when requested explicitly using the
+     * `active-minutes` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.ActiveMinutesRollupValue active_minutes = 22; + * + */ + public com.google.devicesandservices.health.v4.ActiveMinutesRollupValue.Builder + getActiveMinutesBuilder() { + return internalGetActiveMinutesFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `active-minutes` data type, or when requested explicitly using the
+     * `active-minutes` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.ActiveMinutesRollupValue active_minutes = 22; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ActiveMinutesRollupValueOrBuilder + getActiveMinutesOrBuilder() { + if ((valueCase_ == 22) && (activeMinutesBuilder_ != null)) { + return activeMinutesBuilder_.getMessageOrBuilder(); + } else { + if (valueCase_ == 22) { + return (com.google.devicesandservices.health.v4.ActiveMinutesRollupValue) value_; + } + return com.google.devicesandservices.health.v4.ActiveMinutesRollupValue + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `active-minutes` data type, or when requested explicitly using the
+     * `active-minutes` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.ActiveMinutesRollupValue active_minutes = 22; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ActiveMinutesRollupValue, + com.google.devicesandservices.health.v4.ActiveMinutesRollupValue.Builder, + com.google.devicesandservices.health.v4.ActiveMinutesRollupValueOrBuilder> + internalGetActiveMinutesFieldBuilder() { + if (activeMinutesBuilder_ == null) { + if (!(valueCase_ == 22)) { + value_ = + com.google.devicesandservices.health.v4.ActiveMinutesRollupValue.getDefaultInstance(); + } + activeMinutesBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ActiveMinutesRollupValue, + com.google.devicesandservices.health.v4.ActiveMinutesRollupValue.Builder, + com.google.devicesandservices.health.v4.ActiveMinutesRollupValueOrBuilder>( + (com.google.devicesandservices.health.v4.ActiveMinutesRollupValue) value_, + getParentForChildren(), + isClean()); + value_ = null; + } + valueCase_ = 22; + onChanged(); + return activeMinutesBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue, + com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue.Builder, + com.google.devicesandservices.health.v4.SwimLengthsDataRollupValueOrBuilder> + swimLengthsDataBuilder_; + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `swim-lengths-data` data type, or when requested explicitly using the
+     * `swim-lengths-data` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.SwimLengthsDataRollupValue swim_lengths_data = 23; + * + * + * @return Whether the swimLengthsData field is set. + */ + @java.lang.Override + public boolean hasSwimLengthsData() { + return valueCase_ == 23; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `swim-lengths-data` data type, or when requested explicitly using the
+     * `swim-lengths-data` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.SwimLengthsDataRollupValue swim_lengths_data = 23; + * + * + * @return The swimLengthsData. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue getSwimLengthsData() { + if (swimLengthsDataBuilder_ == null) { + if (valueCase_ == 23) { + return (com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue) value_; + } + return com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue + .getDefaultInstance(); + } else { + if (valueCase_ == 23) { + return swimLengthsDataBuilder_.getMessage(); + } + return com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `swim-lengths-data` data type, or when requested explicitly using the
+     * `swim-lengths-data` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.SwimLengthsDataRollupValue swim_lengths_data = 23; + * + */ + public Builder setSwimLengthsData( + com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue value) { + if (swimLengthsDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + onChanged(); + } else { + swimLengthsDataBuilder_.setMessage(value); + } + valueCase_ = 23; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `swim-lengths-data` data type, or when requested explicitly using the
+     * `swim-lengths-data` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.SwimLengthsDataRollupValue swim_lengths_data = 23; + * + */ + public Builder setSwimLengthsData( + com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue.Builder + builderForValue) { + if (swimLengthsDataBuilder_ == null) { + value_ = builderForValue.build(); + onChanged(); + } else { + swimLengthsDataBuilder_.setMessage(builderForValue.build()); + } + valueCase_ = 23; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `swim-lengths-data` data type, or when requested explicitly using the
+     * `swim-lengths-data` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.SwimLengthsDataRollupValue swim_lengths_data = 23; + * + */ + public Builder mergeSwimLengthsData( + com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue value) { + if (swimLengthsDataBuilder_ == null) { + if (valueCase_ == 23 + && value_ + != com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue + .getDefaultInstance()) { + value_ = + com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue.newBuilder( + (com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue) value_) + .mergeFrom(value) + .buildPartial(); + } else { + value_ = value; + } + onChanged(); + } else { + if (valueCase_ == 23) { + swimLengthsDataBuilder_.mergeFrom(value); + } else { + swimLengthsDataBuilder_.setMessage(value); + } + } + valueCase_ = 23; + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `swim-lengths-data` data type, or when requested explicitly using the
+     * `swim-lengths-data` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.SwimLengthsDataRollupValue swim_lengths_data = 23; + * + */ + public Builder clearSwimLengthsData() { + if (swimLengthsDataBuilder_ == null) { + if (valueCase_ == 23) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + } else { + if (valueCase_ == 23) { + valueCase_ = 0; + value_ = null; + } + swimLengthsDataBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `swim-lengths-data` data type, or when requested explicitly using the
+     * `swim-lengths-data` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.SwimLengthsDataRollupValue swim_lengths_data = 23; + * + */ + public com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue.Builder + getSwimLengthsDataBuilder() { + return internalGetSwimLengthsDataFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `swim-lengths-data` data type, or when requested explicitly using the
+     * `swim-lengths-data` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.SwimLengthsDataRollupValue swim_lengths_data = 23; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.SwimLengthsDataRollupValueOrBuilder + getSwimLengthsDataOrBuilder() { + if ((valueCase_ == 23) && (swimLengthsDataBuilder_ != null)) { + return swimLengthsDataBuilder_.getMessageOrBuilder(); + } else { + if (valueCase_ == 23) { + return (com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue) value_; + } + return com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Returned by default when rolling up data points from the
+     * `swim-lengths-data` data type, or when requested explicitly using the
+     * `swim-lengths-data` rollup type identifier.
+     * 
+ * + * .google.devicesandservices.health.v4.SwimLengthsDataRollupValue swim_lengths_data = 23; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue, + com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue.Builder, + com.google.devicesandservices.health.v4.SwimLengthsDataRollupValueOrBuilder> + internalGetSwimLengthsDataFieldBuilder() { + if (swimLengthsDataBuilder_ == null) { + if (!(valueCase_ == 23)) { + value_ = + com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue + .getDefaultInstance(); + } + swimLengthsDataBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue, + com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue.Builder, + com.google.devicesandservices.health.v4.SwimLengthsDataRollupValueOrBuilder>( + (com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue) value_, + getParentForChildren(), + isClean()); + value_ = null; + } + valueCase_ = 23; + onChanged(); + return swimLengthsDataBuilder_; + } + + private com.google.protobuf.Timestamp startTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + startTimeBuilder_; + + /** + * + * + *
+     * Start time of the window this value aggregates over
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + * + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return ((bitField0_ & 0x00020000) != 0); + } + + /** + * + * + *
+     * Start time of the window this value aggregates over
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + * + * @return The startTime. + */ + public com.google.protobuf.Timestamp getStartTime() { + if (startTimeBuilder_ == null) { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } else { + return startTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Start time of the window this value aggregates over
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public Builder setStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + } else { + startTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Start time of the window this value aggregates over
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Start time of the window this value aggregates over
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (((bitField0_ & 0x00020000) != 0) + && startTime_ != null + && startTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getStartTimeBuilder().mergeFrom(value); + } else { + startTime_ = value; + } + } else { + startTimeBuilder_.mergeFrom(value); + } + if (startTime_ != null) { + bitField0_ |= 0x00020000; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Start time of the window this value aggregates over
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public Builder clearStartTime() { + bitField0_ = (bitField0_ & ~0x00020000); + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Start time of the window this value aggregates over
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + bitField0_ |= 0x00020000; + onChanged(); + return internalGetStartTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Start time of the window this value aggregates over
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + } + + /** + * + * + *
+     * Start time of the window this value aggregates over
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getStartTime(), getParentForChildren(), isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + + /** + * + * + *
+     * End time of the window this value aggregates over
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return ((bitField0_ & 0x00040000) != 0); + } + + /** + * + * + *
+     * End time of the window this value aggregates over
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * End time of the window this value aggregates over
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + } else { + endTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00040000; + onChanged(); + return this; + } + + /** + * + * + *
+     * End time of the window this value aggregates over
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00040000; + onChanged(); + return this; + } + + /** + * + * + *
+     * End time of the window this value aggregates over
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (((bitField0_ & 0x00040000) != 0) + && endTime_ != null + && endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEndTimeBuilder().mergeFrom(value); + } else { + endTime_ = value; + } + } else { + endTimeBuilder_.mergeFrom(value); + } + if (endTime_ != null) { + bitField0_ |= 0x00040000; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * End time of the window this value aggregates over
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder clearEndTime() { + bitField0_ = (bitField0_ & ~0x00040000); + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * End time of the window this value aggregates over
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + bitField0_ |= 0x00040000; + onChanged(); + return internalGetEndTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * End time of the window this value aggregates over
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + + /** + * + * + *
+     * End time of the window this value aggregates over
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.RollupDataPoint) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.RollupDataPoint) + private static final com.google.devicesandservices.health.v4.RollupDataPoint DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.RollupDataPoint(); + } + + public static com.google.devicesandservices.health.v4.RollupDataPoint getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RollupDataPoint parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.RollupDataPoint getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/RollupDataPointOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/RollupDataPointOrBuilder.java new file mode 100644 index 000000000000..fffc131972eb --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/RollupDataPointOrBuilder.java @@ -0,0 +1,869 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_points.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface RollupDataPointOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.RollupDataPoint) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Returned by default when rolling up data points from the `steps` data
+   * type, or when requested explicitly using the `steps` rollup type
+   * identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.StepsRollupValue steps = 5; + * + * @return Whether the steps field is set. + */ + boolean hasSteps(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the `steps` data
+   * type, or when requested explicitly using the `steps` rollup type
+   * identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.StepsRollupValue steps = 5; + * + * @return The steps. + */ + com.google.devicesandservices.health.v4.StepsRollupValue getSteps(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the `steps` data
+   * type, or when requested explicitly using the `steps` rollup type
+   * identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.StepsRollupValue steps = 5; + */ + com.google.devicesandservices.health.v4.StepsRollupValueOrBuilder getStepsOrBuilder(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the `floors` data
+   * type, or when requested explicitly using the `floors` rollup type
+   * identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.FloorsRollupValue floors = 6; + * + * @return Whether the floors field is set. + */ + boolean hasFloors(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the `floors` data
+   * type, or when requested explicitly using the `floors` rollup type
+   * identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.FloorsRollupValue floors = 6; + * + * @return The floors. + */ + com.google.devicesandservices.health.v4.FloorsRollupValue getFloors(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the `floors` data
+   * type, or when requested explicitly using the `floors` rollup type
+   * identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.FloorsRollupValue floors = 6; + */ + com.google.devicesandservices.health.v4.FloorsRollupValueOrBuilder getFloorsOrBuilder(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the `heart-rate`
+   * data type, or when requested explicitly using the `heart-rate` rollup
+   * type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.HeartRateRollupValue heart_rate = 7; + * + * @return Whether the heartRate field is set. + */ + boolean hasHeartRate(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the `heart-rate`
+   * data type, or when requested explicitly using the `heart-rate` rollup
+   * type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.HeartRateRollupValue heart_rate = 7; + * + * @return The heartRate. + */ + com.google.devicesandservices.health.v4.HeartRateRollupValue getHeartRate(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the `heart-rate`
+   * data type, or when requested explicitly using the `heart-rate` rollup
+   * type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.HeartRateRollupValue heart_rate = 7; + */ + com.google.devicesandservices.health.v4.HeartRateRollupValueOrBuilder getHeartRateOrBuilder(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the `weight` data
+   * type, or when requested explicitly using the `weight` rollup type
+   * identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.WeightRollupValue weight = 8; + * + * @return Whether the weight field is set. + */ + boolean hasWeight(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the `weight` data
+   * type, or when requested explicitly using the `weight` rollup type
+   * identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.WeightRollupValue weight = 8; + * + * @return The weight. + */ + com.google.devicesandservices.health.v4.WeightRollupValue getWeight(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the `weight` data
+   * type, or when requested explicitly using the `weight` rollup type
+   * identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.WeightRollupValue weight = 8; + */ + com.google.devicesandservices.health.v4.WeightRollupValueOrBuilder getWeightOrBuilder(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the `altitude` data
+   * type, or when requested explicitly using the `altitude` rollup type
+   * identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.AltitudeRollupValue altitude = 9; + * + * @return Whether the altitude field is set. + */ + boolean hasAltitude(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the `altitude` data
+   * type, or when requested explicitly using the `altitude` rollup type
+   * identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.AltitudeRollupValue altitude = 9; + * + * @return The altitude. + */ + com.google.devicesandservices.health.v4.AltitudeRollupValue getAltitude(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the `altitude` data
+   * type, or when requested explicitly using the `altitude` rollup type
+   * identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.AltitudeRollupValue altitude = 9; + */ + com.google.devicesandservices.health.v4.AltitudeRollupValueOrBuilder getAltitudeOrBuilder(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the `distance` data
+   * type, or when requested explicitly using the `distance` rollup type
+   * identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.DistanceRollupValue distance = 10; + * + * @return Whether the distance field is set. + */ + boolean hasDistance(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the `distance` data
+   * type, or when requested explicitly using the `distance` rollup type
+   * identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.DistanceRollupValue distance = 10; + * + * @return The distance. + */ + com.google.devicesandservices.health.v4.DistanceRollupValue getDistance(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the `distance` data
+   * type, or when requested explicitly using the `distance` rollup type
+   * identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.DistanceRollupValue distance = 10; + */ + com.google.devicesandservices.health.v4.DistanceRollupValueOrBuilder getDistanceOrBuilder(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the `body-fat` data
+   * type, or when requested explicitly using the `body-fat` rollup type
+   * identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.BodyFatRollupValue body_fat = 11; + * + * @return Whether the bodyFat field is set. + */ + boolean hasBodyFat(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the `body-fat` data
+   * type, or when requested explicitly using the `body-fat` rollup type
+   * identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.BodyFatRollupValue body_fat = 11; + * + * @return The bodyFat. + */ + com.google.devicesandservices.health.v4.BodyFatRollupValue getBodyFat(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the `body-fat` data
+   * type, or when requested explicitly using the `body-fat` rollup type
+   * identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.BodyFatRollupValue body_fat = 11; + */ + com.google.devicesandservices.health.v4.BodyFatRollupValueOrBuilder getBodyFatOrBuilder(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the `total-calories`
+   * data type, or when requested explicitly using the `total-calories`
+   * rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.TotalCaloriesRollupValue total_calories = 12; + * + * @return Whether the totalCalories field is set. + */ + boolean hasTotalCalories(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the `total-calories`
+   * data type, or when requested explicitly using the `total-calories`
+   * rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.TotalCaloriesRollupValue total_calories = 12; + * + * @return The totalCalories. + */ + com.google.devicesandservices.health.v4.TotalCaloriesRollupValue getTotalCalories(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the `total-calories`
+   * data type, or when requested explicitly using the `total-calories`
+   * rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.TotalCaloriesRollupValue total_calories = 12; + */ + com.google.devicesandservices.health.v4.TotalCaloriesRollupValueOrBuilder + getTotalCaloriesOrBuilder(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `active-zone-minutes` data type, or when requested explicitly using the
+   * `active-zone-minutes` rollup type identifier.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue active_zone_minutes = 13; + * + * + * @return Whether the activeZoneMinutes field is set. + */ + boolean hasActiveZoneMinutes(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `active-zone-minutes` data type, or when requested explicitly using the
+   * `active-zone-minutes` rollup type identifier.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue active_zone_minutes = 13; + * + * + * @return The activeZoneMinutes. + */ + com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue getActiveZoneMinutes(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `active-zone-minutes` data type, or when requested explicitly using the
+   * `active-zone-minutes` rollup type identifier.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ActiveZoneMinutesRollupValue active_zone_minutes = 13; + * + */ + com.google.devicesandservices.health.v4.ActiveZoneMinutesRollupValueOrBuilder + getActiveZoneMinutesOrBuilder(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `sedentary-period` data type, or when requested explicitly using the
+   * `sedentary-period` rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.SedentaryPeriodRollupValue sedentary_period = 15; + * + * + * @return Whether the sedentaryPeriod field is set. + */ + boolean hasSedentaryPeriod(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `sedentary-period` data type, or when requested explicitly using the
+   * `sedentary-period` rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.SedentaryPeriodRollupValue sedentary_period = 15; + * + * + * @return The sedentaryPeriod. + */ + com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue getSedentaryPeriod(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `sedentary-period` data type, or when requested explicitly using the
+   * `sedentary-period` rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.SedentaryPeriodRollupValue sedentary_period = 15; + * + */ + com.google.devicesandservices.health.v4.SedentaryPeriodRollupValueOrBuilder + getSedentaryPeriodOrBuilder(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `run-vo2-max` data type, or when requested explicitly using the
+   * `run-vo2-max` rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.RunVO2MaxRollupValue run_vo2_max = 16; + * + * @return Whether the runVo2Max field is set. + */ + boolean hasRunVo2Max(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `run-vo2-max` data type, or when requested explicitly using the
+   * `run-vo2-max` rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.RunVO2MaxRollupValue run_vo2_max = 16; + * + * @return The runVo2Max. + */ + com.google.devicesandservices.health.v4.RunVO2MaxRollupValue getRunVo2Max(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `run-vo2-max` data type, or when requested explicitly using the
+   * `run-vo2-max` rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.RunVO2MaxRollupValue run_vo2_max = 16; + */ + com.google.devicesandservices.health.v4.RunVO2MaxRollupValueOrBuilder getRunVo2MaxOrBuilder(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `calories-in-heart-rate-zone` data type, or when requested explicitly
+   * using the `calories-in-heart-rate-zone` rollup type identifier.
+   * 
+ * + * + * .google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue calories_in_heart_rate_zone = 17; + * + * + * @return Whether the caloriesInHeartRateZone field is set. + */ + boolean hasCaloriesInHeartRateZone(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `calories-in-heart-rate-zone` data type, or when requested explicitly
+   * using the `calories-in-heart-rate-zone` rollup type identifier.
+   * 
+ * + * + * .google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue calories_in_heart_rate_zone = 17; + * + * + * @return The caloriesInHeartRateZone. + */ + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue + getCaloriesInHeartRateZone(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `calories-in-heart-rate-zone` data type, or when requested explicitly
+   * using the `calories-in-heart-rate-zone` rollup type identifier.
+   * 
+ * + * + * .google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValue calories_in_heart_rate_zone = 17; + * + */ + com.google.devicesandservices.health.v4.CaloriesInHeartRateZoneRollupValueOrBuilder + getCaloriesInHeartRateZoneOrBuilder(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `activity-level` data type, or when requested explicitly using the
+   * `activity-level` rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.ActivityLevelRollupValue activity_level = 18; + * + * @return Whether the activityLevel field is set. + */ + boolean hasActivityLevel(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `activity-level` data type, or when requested explicitly using the
+   * `activity-level` rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.ActivityLevelRollupValue activity_level = 18; + * + * @return The activityLevel. + */ + com.google.devicesandservices.health.v4.ActivityLevelRollupValue getActivityLevel(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `activity-level` data type, or when requested explicitly using the
+   * `activity-level` rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.ActivityLevelRollupValue activity_level = 18; + */ + com.google.devicesandservices.health.v4.ActivityLevelRollupValueOrBuilder + getActivityLevelOrBuilder(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `hydration-log` data type, or when requested explicitly using the
+   * `hydration-log` rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.HydrationLogRollupValue hydration_log = 20; + * + * @return Whether the hydrationLog field is set. + */ + boolean hasHydrationLog(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `hydration-log` data type, or when requested explicitly using the
+   * `hydration-log` rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.HydrationLogRollupValue hydration_log = 20; + * + * @return The hydrationLog. + */ + com.google.devicesandservices.health.v4.HydrationLogRollupValue getHydrationLog(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `hydration-log` data type, or when requested explicitly using the
+   * `hydration-log` rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.HydrationLogRollupValue hydration_log = 20; + */ + com.google.devicesandservices.health.v4.HydrationLogRollupValueOrBuilder + getHydrationLogOrBuilder(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `time-in-heart-rate-zone` data type, or when requested explicitly using
+   * the `time-in-heart-rate-zone` rollup type identifier.
+   * 
+ * + * + * .google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue time_in_heart_rate_zone = 21; + * + * + * @return Whether the timeInHeartRateZone field is set. + */ + boolean hasTimeInHeartRateZone(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `time-in-heart-rate-zone` data type, or when requested explicitly using
+   * the `time-in-heart-rate-zone` rollup type identifier.
+   * 
+ * + * + * .google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue time_in_heart_rate_zone = 21; + * + * + * @return The timeInHeartRateZone. + */ + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue getTimeInHeartRateZone(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `time-in-heart-rate-zone` data type, or when requested explicitly using
+   * the `time-in-heart-rate-zone` rollup type identifier.
+   * 
+ * + * + * .google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue time_in_heart_rate_zone = 21; + * + */ + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValueOrBuilder + getTimeInHeartRateZoneOrBuilder(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `active-minutes` data type, or when requested explicitly using the
+   * `active-minutes` rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.ActiveMinutesRollupValue active_minutes = 22; + * + * @return Whether the activeMinutes field is set. + */ + boolean hasActiveMinutes(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `active-minutes` data type, or when requested explicitly using the
+   * `active-minutes` rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.ActiveMinutesRollupValue active_minutes = 22; + * + * @return The activeMinutes. + */ + com.google.devicesandservices.health.v4.ActiveMinutesRollupValue getActiveMinutes(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `active-minutes` data type, or when requested explicitly using the
+   * `active-minutes` rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.ActiveMinutesRollupValue active_minutes = 22; + */ + com.google.devicesandservices.health.v4.ActiveMinutesRollupValueOrBuilder + getActiveMinutesOrBuilder(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `swim-lengths-data` data type, or when requested explicitly using the
+   * `swim-lengths-data` rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.SwimLengthsDataRollupValue swim_lengths_data = 23; + * + * + * @return Whether the swimLengthsData field is set. + */ + boolean hasSwimLengthsData(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `swim-lengths-data` data type, or when requested explicitly using the
+   * `swim-lengths-data` rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.SwimLengthsDataRollupValue swim_lengths_data = 23; + * + * + * @return The swimLengthsData. + */ + com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue getSwimLengthsData(); + + /** + * + * + *
+   * Returned by default when rolling up data points from the
+   * `swim-lengths-data` data type, or when requested explicitly using the
+   * `swim-lengths-data` rollup type identifier.
+   * 
+ * + * .google.devicesandservices.health.v4.SwimLengthsDataRollupValue swim_lengths_data = 23; + * + */ + com.google.devicesandservices.health.v4.SwimLengthsDataRollupValueOrBuilder + getSwimLengthsDataOrBuilder(); + + /** + * + * + *
+   * Start time of the window this value aggregates over
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1; + * + * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + + /** + * + * + *
+   * Start time of the window this value aggregates over
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1; + * + * @return The startTime. + */ + com.google.protobuf.Timestamp getStartTime(); + + /** + * + * + *
+   * Start time of the window this value aggregates over
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1; + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + + /** + * + * + *
+   * End time of the window this value aggregates over
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + + /** + * + * + *
+   * End time of the window this value aggregates over
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + + /** + * + * + *
+   * End time of the window this value aggregates over
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + com.google.devicesandservices.health.v4.RollupDataPoint.ValueCase getValueCase(); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/RunVO2Max.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/RunVO2Max.java new file mode 100644 index 000000000000..1e748c695b31 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/RunVO2Max.java @@ -0,0 +1,833 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * VO2 max value calculated based on the user's running activity.
+ * Value stored in ml/kg/min.
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.RunVO2Max} + */ +@com.google.protobuf.Generated +public final class RunVO2Max extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.RunVO2Max) + RunVO2MaxOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "RunVO2Max"); + } + + // Use RunVO2Max.newBuilder() to construct. + private RunVO2Max(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private RunVO2Max() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_RunVO2Max_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_RunVO2Max_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.RunVO2Max.class, + com.google.devicesandservices.health.v4.RunVO2Max.Builder.class); + } + + private int bitField0_; + public static final int SAMPLE_TIME_FIELD_NUMBER = 1; + private com.google.devicesandservices.health.v4.ObservationSampleTime sampleTime_; + + /** + * + * + *
+   * Required. The time at which the metric was measured.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the sampleTime field is set. + */ + @java.lang.Override + public boolean hasSampleTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The time at which the metric was measured.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The sampleTime. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ObservationSampleTime getSampleTime() { + return sampleTime_ == null + ? com.google.devicesandservices.health.v4.ObservationSampleTime.getDefaultInstance() + : sampleTime_; + } + + /** + * + * + *
+   * Required. The time at which the metric was measured.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ObservationSampleTimeOrBuilder + getSampleTimeOrBuilder() { + return sampleTime_ == null + ? com.google.devicesandservices.health.v4.ObservationSampleTime.getDefaultInstance() + : sampleTime_; + } + + public static final int RUN_VO2_MAX_FIELD_NUMBER = 2; + private double runVo2Max_ = 0D; + + /** + * + * + *
+   * Required. Run VO2 max value in ml/kg/min.
+   * 
+ * + * double run_vo2_max = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The runVo2Max. + */ + @java.lang.Override + public double getRunVo2Max() { + return runVo2Max_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getSampleTime()); + } + if (java.lang.Double.doubleToRawLongBits(runVo2Max_) != 0) { + output.writeDouble(2, runVo2Max_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getSampleTime()); + } + if (java.lang.Double.doubleToRawLongBits(runVo2Max_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(2, runVo2Max_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.RunVO2Max)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.RunVO2Max other = + (com.google.devicesandservices.health.v4.RunVO2Max) obj; + + if (hasSampleTime() != other.hasSampleTime()) return false; + if (hasSampleTime()) { + if (!getSampleTime().equals(other.getSampleTime())) return false; + } + if (java.lang.Double.doubleToLongBits(getRunVo2Max()) + != java.lang.Double.doubleToLongBits(other.getRunVo2Max())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasSampleTime()) { + hash = (37 * hash) + SAMPLE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getSampleTime().hashCode(); + } + hash = (37 * hash) + RUN_VO2_MAX_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getRunVo2Max())); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.RunVO2Max parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.RunVO2Max parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.RunVO2Max parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.RunVO2Max parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.RunVO2Max parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.RunVO2Max parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.RunVO2Max parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.RunVO2Max parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.RunVO2Max parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.RunVO2Max parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.RunVO2Max parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.RunVO2Max parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.devicesandservices.health.v4.RunVO2Max prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * VO2 max value calculated based on the user's running activity.
+   * Value stored in ml/kg/min.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.RunVO2Max} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.RunVO2Max) + com.google.devicesandservices.health.v4.RunVO2MaxOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_RunVO2Max_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_RunVO2Max_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.RunVO2Max.class, + com.google.devicesandservices.health.v4.RunVO2Max.Builder.class); + } + + // Construct using com.google.devicesandservices.health.v4.RunVO2Max.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetSampleTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + sampleTime_ = null; + if (sampleTimeBuilder_ != null) { + sampleTimeBuilder_.dispose(); + sampleTimeBuilder_ = null; + } + runVo2Max_ = 0D; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_RunVO2Max_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.RunVO2Max getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.RunVO2Max.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.RunVO2Max build() { + com.google.devicesandservices.health.v4.RunVO2Max result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.RunVO2Max buildPartial() { + com.google.devicesandservices.health.v4.RunVO2Max result = + new com.google.devicesandservices.health.v4.RunVO2Max(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.devicesandservices.health.v4.RunVO2Max result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.sampleTime_ = sampleTimeBuilder_ == null ? sampleTime_ : sampleTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.runVo2Max_ = runVo2Max_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.RunVO2Max) { + return mergeFrom((com.google.devicesandservices.health.v4.RunVO2Max) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.devicesandservices.health.v4.RunVO2Max other) { + if (other == com.google.devicesandservices.health.v4.RunVO2Max.getDefaultInstance()) + return this; + if (other.hasSampleTime()) { + mergeSampleTime(other.getSampleTime()); + } + if (java.lang.Double.doubleToRawLongBits(other.getRunVo2Max()) != 0) { + setRunVo2Max(other.getRunVo2Max()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetSampleTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 17: + { + runVo2Max_ = input.readDouble(); + bitField0_ |= 0x00000002; + break; + } // case 17 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.devicesandservices.health.v4.ObservationSampleTime sampleTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ObservationSampleTime, + com.google.devicesandservices.health.v4.ObservationSampleTime.Builder, + com.google.devicesandservices.health.v4.ObservationSampleTimeOrBuilder> + sampleTimeBuilder_; + + /** + * + * + *
+     * Required. The time at which the metric was measured.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the sampleTime field is set. + */ + public boolean hasSampleTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. The time at which the metric was measured.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The sampleTime. + */ + public com.google.devicesandservices.health.v4.ObservationSampleTime getSampleTime() { + if (sampleTimeBuilder_ == null) { + return sampleTime_ == null + ? com.google.devicesandservices.health.v4.ObservationSampleTime.getDefaultInstance() + : sampleTime_; + } else { + return sampleTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The time at which the metric was measured.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSampleTime( + com.google.devicesandservices.health.v4.ObservationSampleTime value) { + if (sampleTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sampleTime_ = value; + } else { + sampleTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The time at which the metric was measured.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSampleTime( + com.google.devicesandservices.health.v4.ObservationSampleTime.Builder builderForValue) { + if (sampleTimeBuilder_ == null) { + sampleTime_ = builderForValue.build(); + } else { + sampleTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The time at which the metric was measured.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeSampleTime( + com.google.devicesandservices.health.v4.ObservationSampleTime value) { + if (sampleTimeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && sampleTime_ != null + && sampleTime_ + != com.google.devicesandservices.health.v4.ObservationSampleTime + .getDefaultInstance()) { + getSampleTimeBuilder().mergeFrom(value); + } else { + sampleTime_ = value; + } + } else { + sampleTimeBuilder_.mergeFrom(value); + } + if (sampleTime_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The time at which the metric was measured.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearSampleTime() { + bitField0_ = (bitField0_ & ~0x00000001); + sampleTime_ = null; + if (sampleTimeBuilder_ != null) { + sampleTimeBuilder_.dispose(); + sampleTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The time at which the metric was measured.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.devicesandservices.health.v4.ObservationSampleTime.Builder + getSampleTimeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetSampleTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The time at which the metric was measured.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.devicesandservices.health.v4.ObservationSampleTimeOrBuilder + getSampleTimeOrBuilder() { + if (sampleTimeBuilder_ != null) { + return sampleTimeBuilder_.getMessageOrBuilder(); + } else { + return sampleTime_ == null + ? com.google.devicesandservices.health.v4.ObservationSampleTime.getDefaultInstance() + : sampleTime_; + } + } + + /** + * + * + *
+     * Required. The time at which the metric was measured.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ObservationSampleTime, + com.google.devicesandservices.health.v4.ObservationSampleTime.Builder, + com.google.devicesandservices.health.v4.ObservationSampleTimeOrBuilder> + internalGetSampleTimeFieldBuilder() { + if (sampleTimeBuilder_ == null) { + sampleTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ObservationSampleTime, + com.google.devicesandservices.health.v4.ObservationSampleTime.Builder, + com.google.devicesandservices.health.v4.ObservationSampleTimeOrBuilder>( + getSampleTime(), getParentForChildren(), isClean()); + sampleTime_ = null; + } + return sampleTimeBuilder_; + } + + private double runVo2Max_; + + /** + * + * + *
+     * Required. Run VO2 max value in ml/kg/min.
+     * 
+ * + * double run_vo2_max = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The runVo2Max. + */ + @java.lang.Override + public double getRunVo2Max() { + return runVo2Max_; + } + + /** + * + * + *
+     * Required. Run VO2 max value in ml/kg/min.
+     * 
+ * + * double run_vo2_max = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The runVo2Max to set. + * @return This builder for chaining. + */ + public Builder setRunVo2Max(double value) { + + runVo2Max_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Run VO2 max value in ml/kg/min.
+     * 
+ * + * double run_vo2_max = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearRunVo2Max() { + bitField0_ = (bitField0_ & ~0x00000002); + runVo2Max_ = 0D; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.RunVO2Max) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.RunVO2Max) + private static final com.google.devicesandservices.health.v4.RunVO2Max DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.RunVO2Max(); + } + + public static com.google.devicesandservices.health.v4.RunVO2Max getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RunVO2Max parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.RunVO2Max getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/RunVO2MaxOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/RunVO2MaxOrBuilder.java new file mode 100644 index 000000000000..6381ea583b83 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/RunVO2MaxOrBuilder.java @@ -0,0 +1,84 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface RunVO2MaxOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.RunVO2Max) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The time at which the metric was measured.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the sampleTime field is set. + */ + boolean hasSampleTime(); + + /** + * + * + *
+   * Required. The time at which the metric was measured.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The sampleTime. + */ + com.google.devicesandservices.health.v4.ObservationSampleTime getSampleTime(); + + /** + * + * + *
+   * Required. The time at which the metric was measured.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.devicesandservices.health.v4.ObservationSampleTimeOrBuilder getSampleTimeOrBuilder(); + + /** + * + * + *
+   * Required. Run VO2 max value in ml/kg/min.
+   * 
+ * + * double run_vo2_max = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The runVo2Max. + */ + double getRunVo2Max(); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/RunVO2MaxRollupValue.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/RunVO2MaxRollupValue.java new file mode 100644 index 000000000000..d437acc50230 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/RunVO2MaxRollupValue.java @@ -0,0 +1,716 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * Represents the result of the rollup of the user's daily heart rate
+ * variability personal range.
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.RunVO2MaxRollupValue} + */ +@com.google.protobuf.Generated +public final class RunVO2MaxRollupValue extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.RunVO2MaxRollupValue) + RunVO2MaxRollupValueOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "RunVO2MaxRollupValue"); + } + + // Use RunVO2MaxRollupValue.newBuilder() to construct. + private RunVO2MaxRollupValue(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private RunVO2MaxRollupValue() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_RunVO2MaxRollupValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_RunVO2MaxRollupValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.RunVO2MaxRollupValue.class, + com.google.devicesandservices.health.v4.RunVO2MaxRollupValue.Builder.class); + } + + public static final int RATE_MIN_FIELD_NUMBER = 1; + private double rateMin_ = 0D; + + /** + * + * + *
+   * Minimum value of run VO2 max in the interval..
+   * 
+ * + * double rate_min = 1; + * + * @return The rateMin. + */ + @java.lang.Override + public double getRateMin() { + return rateMin_; + } + + public static final int RATE_MAX_FIELD_NUMBER = 2; + private double rateMax_ = 0D; + + /** + * + * + *
+   * Maximum value of run VO2 max in the interval.
+   * 
+ * + * double rate_max = 2; + * + * @return The rateMax. + */ + @java.lang.Override + public double getRateMax() { + return rateMax_; + } + + public static final int RATE_AVG_FIELD_NUMBER = 3; + private double rateAvg_ = 0D; + + /** + * + * + *
+   * Average value of run VO2 max in the interval.
+   * 
+ * + * double rate_avg = 3; + * + * @return The rateAvg. + */ + @java.lang.Override + public double getRateAvg() { + return rateAvg_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (java.lang.Double.doubleToRawLongBits(rateMin_) != 0) { + output.writeDouble(1, rateMin_); + } + if (java.lang.Double.doubleToRawLongBits(rateMax_) != 0) { + output.writeDouble(2, rateMax_); + } + if (java.lang.Double.doubleToRawLongBits(rateAvg_) != 0) { + output.writeDouble(3, rateAvg_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (java.lang.Double.doubleToRawLongBits(rateMin_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(1, rateMin_); + } + if (java.lang.Double.doubleToRawLongBits(rateMax_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(2, rateMax_); + } + if (java.lang.Double.doubleToRawLongBits(rateAvg_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(3, rateAvg_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.RunVO2MaxRollupValue)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.RunVO2MaxRollupValue other = + (com.google.devicesandservices.health.v4.RunVO2MaxRollupValue) obj; + + if (java.lang.Double.doubleToLongBits(getRateMin()) + != java.lang.Double.doubleToLongBits(other.getRateMin())) return false; + if (java.lang.Double.doubleToLongBits(getRateMax()) + != java.lang.Double.doubleToLongBits(other.getRateMax())) return false; + if (java.lang.Double.doubleToLongBits(getRateAvg()) + != java.lang.Double.doubleToLongBits(other.getRateAvg())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + RATE_MIN_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getRateMin())); + hash = (37 * hash) + RATE_MAX_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getRateMax())); + hash = (37 * hash) + RATE_AVG_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getRateAvg())); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.RunVO2MaxRollupValue parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.RunVO2MaxRollupValue parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.RunVO2MaxRollupValue parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.RunVO2MaxRollupValue parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.RunVO2MaxRollupValue parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.RunVO2MaxRollupValue parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.RunVO2MaxRollupValue parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.RunVO2MaxRollupValue parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.RunVO2MaxRollupValue parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.RunVO2MaxRollupValue parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.RunVO2MaxRollupValue parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.RunVO2MaxRollupValue parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.RunVO2MaxRollupValue prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Represents the result of the rollup of the user's daily heart rate
+   * variability personal range.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.RunVO2MaxRollupValue} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.RunVO2MaxRollupValue) + com.google.devicesandservices.health.v4.RunVO2MaxRollupValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_RunVO2MaxRollupValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_RunVO2MaxRollupValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.RunVO2MaxRollupValue.class, + com.google.devicesandservices.health.v4.RunVO2MaxRollupValue.Builder.class); + } + + // Construct using com.google.devicesandservices.health.v4.RunVO2MaxRollupValue.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + rateMin_ = 0D; + rateMax_ = 0D; + rateAvg_ = 0D; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_RunVO2MaxRollupValue_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.RunVO2MaxRollupValue + getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.RunVO2MaxRollupValue.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.RunVO2MaxRollupValue build() { + com.google.devicesandservices.health.v4.RunVO2MaxRollupValue result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.RunVO2MaxRollupValue buildPartial() { + com.google.devicesandservices.health.v4.RunVO2MaxRollupValue result = + new com.google.devicesandservices.health.v4.RunVO2MaxRollupValue(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.devicesandservices.health.v4.RunVO2MaxRollupValue result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.rateMin_ = rateMin_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.rateMax_ = rateMax_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.rateAvg_ = rateAvg_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.RunVO2MaxRollupValue) { + return mergeFrom((com.google.devicesandservices.health.v4.RunVO2MaxRollupValue) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.devicesandservices.health.v4.RunVO2MaxRollupValue other) { + if (other + == com.google.devicesandservices.health.v4.RunVO2MaxRollupValue.getDefaultInstance()) + return this; + if (java.lang.Double.doubleToRawLongBits(other.getRateMin()) != 0) { + setRateMin(other.getRateMin()); + } + if (java.lang.Double.doubleToRawLongBits(other.getRateMax()) != 0) { + setRateMax(other.getRateMax()); + } + if (java.lang.Double.doubleToRawLongBits(other.getRateAvg()) != 0) { + setRateAvg(other.getRateAvg()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 9: + { + rateMin_ = input.readDouble(); + bitField0_ |= 0x00000001; + break; + } // case 9 + case 17: + { + rateMax_ = input.readDouble(); + bitField0_ |= 0x00000002; + break; + } // case 17 + case 25: + { + rateAvg_ = input.readDouble(); + bitField0_ |= 0x00000004; + break; + } // case 25 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private double rateMin_; + + /** + * + * + *
+     * Minimum value of run VO2 max in the interval..
+     * 
+ * + * double rate_min = 1; + * + * @return The rateMin. + */ + @java.lang.Override + public double getRateMin() { + return rateMin_; + } + + /** + * + * + *
+     * Minimum value of run VO2 max in the interval..
+     * 
+ * + * double rate_min = 1; + * + * @param value The rateMin to set. + * @return This builder for chaining. + */ + public Builder setRateMin(double value) { + + rateMin_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Minimum value of run VO2 max in the interval..
+     * 
+ * + * double rate_min = 1; + * + * @return This builder for chaining. + */ + public Builder clearRateMin() { + bitField0_ = (bitField0_ & ~0x00000001); + rateMin_ = 0D; + onChanged(); + return this; + } + + private double rateMax_; + + /** + * + * + *
+     * Maximum value of run VO2 max in the interval.
+     * 
+ * + * double rate_max = 2; + * + * @return The rateMax. + */ + @java.lang.Override + public double getRateMax() { + return rateMax_; + } + + /** + * + * + *
+     * Maximum value of run VO2 max in the interval.
+     * 
+ * + * double rate_max = 2; + * + * @param value The rateMax to set. + * @return This builder for chaining. + */ + public Builder setRateMax(double value) { + + rateMax_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Maximum value of run VO2 max in the interval.
+     * 
+ * + * double rate_max = 2; + * + * @return This builder for chaining. + */ + public Builder clearRateMax() { + bitField0_ = (bitField0_ & ~0x00000002); + rateMax_ = 0D; + onChanged(); + return this; + } + + private double rateAvg_; + + /** + * + * + *
+     * Average value of run VO2 max in the interval.
+     * 
+ * + * double rate_avg = 3; + * + * @return The rateAvg. + */ + @java.lang.Override + public double getRateAvg() { + return rateAvg_; + } + + /** + * + * + *
+     * Average value of run VO2 max in the interval.
+     * 
+ * + * double rate_avg = 3; + * + * @param value The rateAvg to set. + * @return This builder for chaining. + */ + public Builder setRateAvg(double value) { + + rateAvg_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Average value of run VO2 max in the interval.
+     * 
+ * + * double rate_avg = 3; + * + * @return This builder for chaining. + */ + public Builder clearRateAvg() { + bitField0_ = (bitField0_ & ~0x00000004); + rateAvg_ = 0D; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.RunVO2MaxRollupValue) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.RunVO2MaxRollupValue) + private static final com.google.devicesandservices.health.v4.RunVO2MaxRollupValue + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.RunVO2MaxRollupValue(); + } + + public static com.google.devicesandservices.health.v4.RunVO2MaxRollupValue getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RunVO2MaxRollupValue parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.RunVO2MaxRollupValue getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/RunVO2MaxRollupValueOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/RunVO2MaxRollupValueOrBuilder.java new file mode 100644 index 000000000000..bae4d75c8922 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/RunVO2MaxRollupValueOrBuilder.java @@ -0,0 +1,67 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface RunVO2MaxRollupValueOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.RunVO2MaxRollupValue) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Minimum value of run VO2 max in the interval..
+   * 
+ * + * double rate_min = 1; + * + * @return The rateMin. + */ + double getRateMin(); + + /** + * + * + *
+   * Maximum value of run VO2 max in the interval.
+   * 
+ * + * double rate_max = 2; + * + * @return The rateMax. + */ + double getRateMax(); + + /** + * + * + *
+   * Average value of run VO2 max in the interval.
+   * 
+ * + * double rate_avg = 3; + * + * @return The rateAvg. + */ + double getRateAvg(); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/SedentaryPeriod.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/SedentaryPeriod.java new file mode 100644 index 000000000000..dd391aa2876b --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/SedentaryPeriod.java @@ -0,0 +1,737 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * SedentaryPeriod
+ *
+ * SedentaryPeriod data represents the periods of time that the user was
+ * sedentary (i.e. not moving while wearing the device).
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.SedentaryPeriod} + */ +@com.google.protobuf.Generated +public final class SedentaryPeriod extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.SedentaryPeriod) + SedentaryPeriodOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SedentaryPeriod"); + } + + // Use SedentaryPeriod.newBuilder() to construct. + private SedentaryPeriod(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private SedentaryPeriod() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_SedentaryPeriod_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_SedentaryPeriod_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.SedentaryPeriod.class, + com.google.devicesandservices.health.v4.SedentaryPeriod.Builder.class); + } + + private int bitField0_; + public static final int INTERVAL_FIELD_NUMBER = 1; + private com.google.devicesandservices.health.v4.ObservationTimeInterval interval_; + + /** + * + * + *
+   * Required. Observed interval.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the interval field is set. + */ + @java.lang.Override + public boolean hasInterval() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. Observed interval.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The interval. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ObservationTimeInterval getInterval() { + return interval_ == null + ? com.google.devicesandservices.health.v4.ObservationTimeInterval.getDefaultInstance() + : interval_; + } + + /** + * + * + *
+   * Required. Observed interval.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ObservationTimeIntervalOrBuilder + getIntervalOrBuilder() { + return interval_ == null + ? com.google.devicesandservices.health.v4.ObservationTimeInterval.getDefaultInstance() + : interval_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getInterval()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getInterval()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.SedentaryPeriod)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.SedentaryPeriod other = + (com.google.devicesandservices.health.v4.SedentaryPeriod) obj; + + if (hasInterval() != other.hasInterval()) return false; + if (hasInterval()) { + if (!getInterval().equals(other.getInterval())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasInterval()) { + hash = (37 * hash) + INTERVAL_FIELD_NUMBER; + hash = (53 * hash) + getInterval().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.SedentaryPeriod parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.SedentaryPeriod parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.SedentaryPeriod parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.SedentaryPeriod parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.SedentaryPeriod parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.SedentaryPeriod parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.SedentaryPeriod parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.SedentaryPeriod parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.SedentaryPeriod parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.SedentaryPeriod parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.SedentaryPeriod parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.SedentaryPeriod parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.SedentaryPeriod prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * SedentaryPeriod
+   *
+   * SedentaryPeriod data represents the periods of time that the user was
+   * sedentary (i.e. not moving while wearing the device).
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.SedentaryPeriod} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.SedentaryPeriod) + com.google.devicesandservices.health.v4.SedentaryPeriodOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_SedentaryPeriod_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_SedentaryPeriod_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.SedentaryPeriod.class, + com.google.devicesandservices.health.v4.SedentaryPeriod.Builder.class); + } + + // Construct using com.google.devicesandservices.health.v4.SedentaryPeriod.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetIntervalFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + interval_ = null; + if (intervalBuilder_ != null) { + intervalBuilder_.dispose(); + intervalBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_SedentaryPeriod_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.SedentaryPeriod getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.SedentaryPeriod.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.SedentaryPeriod build() { + com.google.devicesandservices.health.v4.SedentaryPeriod result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.SedentaryPeriod buildPartial() { + com.google.devicesandservices.health.v4.SedentaryPeriod result = + new com.google.devicesandservices.health.v4.SedentaryPeriod(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.devicesandservices.health.v4.SedentaryPeriod result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.interval_ = intervalBuilder_ == null ? interval_ : intervalBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.SedentaryPeriod) { + return mergeFrom((com.google.devicesandservices.health.v4.SedentaryPeriod) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.devicesandservices.health.v4.SedentaryPeriod other) { + if (other == com.google.devicesandservices.health.v4.SedentaryPeriod.getDefaultInstance()) + return this; + if (other.hasInterval()) { + mergeInterval(other.getInterval()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetIntervalFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.devicesandservices.health.v4.ObservationTimeInterval interval_; + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ObservationTimeInterval, + com.google.devicesandservices.health.v4.ObservationTimeInterval.Builder, + com.google.devicesandservices.health.v4.ObservationTimeIntervalOrBuilder> + intervalBuilder_; + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the interval field is set. + */ + public boolean hasInterval() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The interval. + */ + public com.google.devicesandservices.health.v4.ObservationTimeInterval getInterval() { + if (intervalBuilder_ == null) { + return interval_ == null + ? com.google.devicesandservices.health.v4.ObservationTimeInterval.getDefaultInstance() + : interval_; + } else { + return intervalBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setInterval( + com.google.devicesandservices.health.v4.ObservationTimeInterval value) { + if (intervalBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + interval_ = value; + } else { + intervalBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setInterval( + com.google.devicesandservices.health.v4.ObservationTimeInterval.Builder builderForValue) { + if (intervalBuilder_ == null) { + interval_ = builderForValue.build(); + } else { + intervalBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeInterval( + com.google.devicesandservices.health.v4.ObservationTimeInterval value) { + if (intervalBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && interval_ != null + && interval_ + != com.google.devicesandservices.health.v4.ObservationTimeInterval + .getDefaultInstance()) { + getIntervalBuilder().mergeFrom(value); + } else { + interval_ = value; + } + } else { + intervalBuilder_.mergeFrom(value); + } + if (interval_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearInterval() { + bitField0_ = (bitField0_ & ~0x00000001); + interval_ = null; + if (intervalBuilder_ != null) { + intervalBuilder_.dispose(); + intervalBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.devicesandservices.health.v4.ObservationTimeInterval.Builder + getIntervalBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetIntervalFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.devicesandservices.health.v4.ObservationTimeIntervalOrBuilder + getIntervalOrBuilder() { + if (intervalBuilder_ != null) { + return intervalBuilder_.getMessageOrBuilder(); + } else { + return interval_ == null + ? com.google.devicesandservices.health.v4.ObservationTimeInterval.getDefaultInstance() + : interval_; + } + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ObservationTimeInterval, + com.google.devicesandservices.health.v4.ObservationTimeInterval.Builder, + com.google.devicesandservices.health.v4.ObservationTimeIntervalOrBuilder> + internalGetIntervalFieldBuilder() { + if (intervalBuilder_ == null) { + intervalBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ObservationTimeInterval, + com.google.devicesandservices.health.v4.ObservationTimeInterval.Builder, + com.google.devicesandservices.health.v4.ObservationTimeIntervalOrBuilder>( + getInterval(), getParentForChildren(), isClean()); + interval_ = null; + } + return intervalBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.SedentaryPeriod) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.SedentaryPeriod) + private static final com.google.devicesandservices.health.v4.SedentaryPeriod DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.SedentaryPeriod(); + } + + public static com.google.devicesandservices.health.v4.SedentaryPeriod getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SedentaryPeriod parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.SedentaryPeriod getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/SedentaryPeriodOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/SedentaryPeriodOrBuilder.java new file mode 100644 index 000000000000..4a0732dcca64 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/SedentaryPeriodOrBuilder.java @@ -0,0 +1,71 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface SedentaryPeriodOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.SedentaryPeriod) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Observed interval.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the interval field is set. + */ + boolean hasInterval(); + + /** + * + * + *
+   * Required. Observed interval.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The interval. + */ + com.google.devicesandservices.health.v4.ObservationTimeInterval getInterval(); + + /** + * + * + *
+   * Required. Observed interval.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.devicesandservices.health.v4.ObservationTimeIntervalOrBuilder getIntervalOrBuilder(); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/SedentaryPeriodRollupValue.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/SedentaryPeriodRollupValue.java new file mode 100644 index 000000000000..61e1867f2eef --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/SedentaryPeriodRollupValue.java @@ -0,0 +1,707 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * Represents the result of the rollup of the user's sedentary periods.
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.SedentaryPeriodRollupValue} + */ +@com.google.protobuf.Generated +public final class SedentaryPeriodRollupValue extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.SedentaryPeriodRollupValue) + SedentaryPeriodRollupValueOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SedentaryPeriodRollupValue"); + } + + // Use SedentaryPeriodRollupValue.newBuilder() to construct. + private SedentaryPeriodRollupValue(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private SedentaryPeriodRollupValue() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_SedentaryPeriodRollupValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_SedentaryPeriodRollupValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue.class, + com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue.Builder.class); + } + + private int bitField0_; + public static final int DURATION_SUM_FIELD_NUMBER = 1; + private com.google.protobuf.Duration durationSum_; + + /** + * + * + *
+   * The total time user spent sedentary during the interval.
+   * 
+ * + * .google.protobuf.Duration duration_sum = 1; + * + * @return Whether the durationSum field is set. + */ + @java.lang.Override + public boolean hasDurationSum() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * The total time user spent sedentary during the interval.
+   * 
+ * + * .google.protobuf.Duration duration_sum = 1; + * + * @return The durationSum. + */ + @java.lang.Override + public com.google.protobuf.Duration getDurationSum() { + return durationSum_ == null ? com.google.protobuf.Duration.getDefaultInstance() : durationSum_; + } + + /** + * + * + *
+   * The total time user spent sedentary during the interval.
+   * 
+ * + * .google.protobuf.Duration duration_sum = 1; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getDurationSumOrBuilder() { + return durationSum_ == null ? com.google.protobuf.Duration.getDefaultInstance() : durationSum_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getDurationSum()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getDurationSum()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue other = + (com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue) obj; + + if (hasDurationSum() != other.hasDurationSum()) return false; + if (hasDurationSum()) { + if (!getDurationSum().equals(other.getDurationSum())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasDurationSum()) { + hash = (37 * hash) + DURATION_SUM_FIELD_NUMBER; + hash = (53 * hash) + getDurationSum().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Represents the result of the rollup of the user's sedentary periods.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.SedentaryPeriodRollupValue} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.SedentaryPeriodRollupValue) + com.google.devicesandservices.health.v4.SedentaryPeriodRollupValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_SedentaryPeriodRollupValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_SedentaryPeriodRollupValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue.class, + com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue.Builder.class); + } + + // Construct using + // com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetDurationSumFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + durationSum_ = null; + if (durationSumBuilder_ != null) { + durationSumBuilder_.dispose(); + durationSumBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_SedentaryPeriodRollupValue_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue + getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue build() { + com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue buildPartial() { + com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue result = + new com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.durationSum_ = + durationSumBuilder_ == null ? durationSum_ : durationSumBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue) { + return mergeFrom( + (com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue other) { + if (other + == com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue + .getDefaultInstance()) return this; + if (other.hasDurationSum()) { + mergeDurationSum(other.getDurationSum()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetDurationSumFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.Duration durationSum_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + durationSumBuilder_; + + /** + * + * + *
+     * The total time user spent sedentary during the interval.
+     * 
+ * + * .google.protobuf.Duration duration_sum = 1; + * + * @return Whether the durationSum field is set. + */ + public boolean hasDurationSum() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * The total time user spent sedentary during the interval.
+     * 
+ * + * .google.protobuf.Duration duration_sum = 1; + * + * @return The durationSum. + */ + public com.google.protobuf.Duration getDurationSum() { + if (durationSumBuilder_ == null) { + return durationSum_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : durationSum_; + } else { + return durationSumBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * The total time user spent sedentary during the interval.
+     * 
+ * + * .google.protobuf.Duration duration_sum = 1; + */ + public Builder setDurationSum(com.google.protobuf.Duration value) { + if (durationSumBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + durationSum_ = value; + } else { + durationSumBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The total time user spent sedentary during the interval.
+     * 
+ * + * .google.protobuf.Duration duration_sum = 1; + */ + public Builder setDurationSum(com.google.protobuf.Duration.Builder builderForValue) { + if (durationSumBuilder_ == null) { + durationSum_ = builderForValue.build(); + } else { + durationSumBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The total time user spent sedentary during the interval.
+     * 
+ * + * .google.protobuf.Duration duration_sum = 1; + */ + public Builder mergeDurationSum(com.google.protobuf.Duration value) { + if (durationSumBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && durationSum_ != null + && durationSum_ != com.google.protobuf.Duration.getDefaultInstance()) { + getDurationSumBuilder().mergeFrom(value); + } else { + durationSum_ = value; + } + } else { + durationSumBuilder_.mergeFrom(value); + } + if (durationSum_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * The total time user spent sedentary during the interval.
+     * 
+ * + * .google.protobuf.Duration duration_sum = 1; + */ + public Builder clearDurationSum() { + bitField0_ = (bitField0_ & ~0x00000001); + durationSum_ = null; + if (durationSumBuilder_ != null) { + durationSumBuilder_.dispose(); + durationSumBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * The total time user spent sedentary during the interval.
+     * 
+ * + * .google.protobuf.Duration duration_sum = 1; + */ + public com.google.protobuf.Duration.Builder getDurationSumBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetDurationSumFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * The total time user spent sedentary during the interval.
+     * 
+ * + * .google.protobuf.Duration duration_sum = 1; + */ + public com.google.protobuf.DurationOrBuilder getDurationSumOrBuilder() { + if (durationSumBuilder_ != null) { + return durationSumBuilder_.getMessageOrBuilder(); + } else { + return durationSum_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : durationSum_; + } + } + + /** + * + * + *
+     * The total time user spent sedentary during the interval.
+     * 
+ * + * .google.protobuf.Duration duration_sum = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + internalGetDurationSumFieldBuilder() { + if (durationSumBuilder_ == null) { + durationSumBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getDurationSum(), getParentForChildren(), isClean()); + durationSum_ = null; + } + return durationSumBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.SedentaryPeriodRollupValue) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.SedentaryPeriodRollupValue) + private static final com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue(); + } + + public static com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SedentaryPeriodRollupValue parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.SedentaryPeriodRollupValue + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/SedentaryPeriodRollupValueOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/SedentaryPeriodRollupValueOrBuilder.java new file mode 100644 index 000000000000..6c45d0d3f43a --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/SedentaryPeriodRollupValueOrBuilder.java @@ -0,0 +1,65 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface SedentaryPeriodRollupValueOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.SedentaryPeriodRollupValue) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The total time user spent sedentary during the interval.
+   * 
+ * + * .google.protobuf.Duration duration_sum = 1; + * + * @return Whether the durationSum field is set. + */ + boolean hasDurationSum(); + + /** + * + * + *
+   * The total time user spent sedentary during the interval.
+   * 
+ * + * .google.protobuf.Duration duration_sum = 1; + * + * @return The durationSum. + */ + com.google.protobuf.Duration getDurationSum(); + + /** + * + * + *
+   * The total time user spent sedentary during the interval.
+   * 
+ * + * .google.protobuf.Duration duration_sum = 1; + */ + com.google.protobuf.DurationOrBuilder getDurationSumOrBuilder(); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/SessionTimeInterval.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/SessionTimeInterval.java new file mode 100644 index 000000000000..211c04d1e5e5 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/SessionTimeInterval.java @@ -0,0 +1,2252 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_coordinates.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * Represents a time interval of session data point, which bundles multiple
+ * observed metrics together.
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.SessionTimeInterval} + */ +@com.google.protobuf.Generated +public final class SessionTimeInterval extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.SessionTimeInterval) + SessionTimeIntervalOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SessionTimeInterval"); + } + + // Use SessionTimeInterval.newBuilder() to construct. + private SessionTimeInterval(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private SessionTimeInterval() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataCoordinatesProto + .internal_static_google_devicesandservices_health_v4_SessionTimeInterval_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataCoordinatesProto + .internal_static_google_devicesandservices_health_v4_SessionTimeInterval_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.SessionTimeInterval.class, + com.google.devicesandservices.health.v4.SessionTimeInterval.Builder.class); + } + + private int bitField0_; + public static final int START_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp startTime_; + + /** + * + * + *
+   * Required. The start time of the observed session.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the startTime field is set. + */ + @java.lang.Override + public boolean hasStartTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The start time of the observed session.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The startTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + + /** + * + * + *
+   * Required. The start time of the observed session.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + + public static final int START_UTC_OFFSET_FIELD_NUMBER = 2; + private com.google.protobuf.Duration startUtcOffset_; + + /** + * + * + *
+   * Required. The offset of the user's local time at the start of the session
+   * relative to the Coordinated Universal Time (UTC).
+   * 
+ * + * .google.protobuf.Duration start_utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the startUtcOffset field is set. + */ + @java.lang.Override + public boolean hasStartUtcOffset() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Required. The offset of the user's local time at the start of the session
+   * relative to the Coordinated Universal Time (UTC).
+   * 
+ * + * .google.protobuf.Duration start_utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The startUtcOffset. + */ + @java.lang.Override + public com.google.protobuf.Duration getStartUtcOffset() { + return startUtcOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : startUtcOffset_; + } + + /** + * + * + *
+   * Required. The offset of the user's local time at the start of the session
+   * relative to the Coordinated Universal Time (UTC).
+   * 
+ * + * .google.protobuf.Duration start_utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getStartUtcOffsetOrBuilder() { + return startUtcOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : startUtcOffset_; + } + + public static final int END_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp endTime_; + + /** + * + * + *
+   * Required. The end time of the observed session.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Required. The end time of the observed session.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + /** + * + * + *
+   * Required. The end time of the observed session.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + public static final int END_UTC_OFFSET_FIELD_NUMBER = 4; + private com.google.protobuf.Duration endUtcOffset_; + + /** + * + * + *
+   * Required. The offset of the user's local time at the end of the session
+   * relative to the Coordinated Universal Time (UTC).
+   * 
+ * + * .google.protobuf.Duration end_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the endUtcOffset field is set. + */ + @java.lang.Override + public boolean hasEndUtcOffset() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+   * Required. The offset of the user's local time at the end of the session
+   * relative to the Coordinated Universal Time (UTC).
+   * 
+ * + * .google.protobuf.Duration end_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The endUtcOffset. + */ + @java.lang.Override + public com.google.protobuf.Duration getEndUtcOffset() { + return endUtcOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : endUtcOffset_; + } + + /** + * + * + *
+   * Required. The offset of the user's local time at the end of the session
+   * relative to the Coordinated Universal Time (UTC).
+   * 
+ * + * .google.protobuf.Duration end_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getEndUtcOffsetOrBuilder() { + return endUtcOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : endUtcOffset_; + } + + public static final int CIVIL_START_TIME_FIELD_NUMBER = 5; + private com.google.devicesandservices.health.v4.CivilDateTime civilStartTime_; + + /** + * + * + *
+   * Output only. Session start time in civil time in the timezone the subject
+   * is in at the start of the session.
+   * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime civil_start_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the civilStartTime field is set. + */ + @java.lang.Override + public boolean hasCivilStartTime() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+   * Output only. Session start time in civil time in the timezone the subject
+   * is in at the start of the session.
+   * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime civil_start_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The civilStartTime. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.CivilDateTime getCivilStartTime() { + return civilStartTime_ == null + ? com.google.devicesandservices.health.v4.CivilDateTime.getDefaultInstance() + : civilStartTime_; + } + + /** + * + * + *
+   * Output only. Session start time in civil time in the timezone the subject
+   * is in at the start of the session.
+   * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime civil_start_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.CivilDateTimeOrBuilder + getCivilStartTimeOrBuilder() { + return civilStartTime_ == null + ? com.google.devicesandservices.health.v4.CivilDateTime.getDefaultInstance() + : civilStartTime_; + } + + public static final int CIVIL_END_TIME_FIELD_NUMBER = 6; + private com.google.devicesandservices.health.v4.CivilDateTime civilEndTime_; + + /** + * + * + *
+   * Output only. Session end time in civil time in the timezone the subject is
+   * in at the end of the session.
+   * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime civil_end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the civilEndTime field is set. + */ + @java.lang.Override + public boolean hasCivilEndTime() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+   * Output only. Session end time in civil time in the timezone the subject is
+   * in at the end of the session.
+   * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime civil_end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The civilEndTime. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.CivilDateTime getCivilEndTime() { + return civilEndTime_ == null + ? com.google.devicesandservices.health.v4.CivilDateTime.getDefaultInstance() + : civilEndTime_; + } + + /** + * + * + *
+   * Output only. Session end time in civil time in the timezone the subject is
+   * in at the end of the session.
+   * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime civil_end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.CivilDateTimeOrBuilder getCivilEndTimeOrBuilder() { + return civilEndTime_ == null + ? com.google.devicesandservices.health.v4.CivilDateTime.getDefaultInstance() + : civilEndTime_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getStartTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getStartUtcOffset()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(3, getEndTime()); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(4, getEndUtcOffset()); + } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeMessage(5, getCivilStartTime()); + } + if (((bitField0_ & 0x00000020) != 0)) { + output.writeMessage(6, getCivilEndTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getStartTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getStartUtcOffset()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getEndTime()); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getEndUtcOffset()); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getCivilStartTime()); + } + if (((bitField0_ & 0x00000020) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getCivilEndTime()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.SessionTimeInterval)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.SessionTimeInterval other = + (com.google.devicesandservices.health.v4.SessionTimeInterval) obj; + + if (hasStartTime() != other.hasStartTime()) return false; + if (hasStartTime()) { + if (!getStartTime().equals(other.getStartTime())) return false; + } + if (hasStartUtcOffset() != other.hasStartUtcOffset()) return false; + if (hasStartUtcOffset()) { + if (!getStartUtcOffset().equals(other.getStartUtcOffset())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime().equals(other.getEndTime())) return false; + } + if (hasEndUtcOffset() != other.hasEndUtcOffset()) return false; + if (hasEndUtcOffset()) { + if (!getEndUtcOffset().equals(other.getEndUtcOffset())) return false; + } + if (hasCivilStartTime() != other.hasCivilStartTime()) return false; + if (hasCivilStartTime()) { + if (!getCivilStartTime().equals(other.getCivilStartTime())) return false; + } + if (hasCivilEndTime() != other.hasCivilEndTime()) return false; + if (hasCivilEndTime()) { + if (!getCivilEndTime().equals(other.getCivilEndTime())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasStartTime()) { + hash = (37 * hash) + START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getStartTime().hashCode(); + } + if (hasStartUtcOffset()) { + hash = (37 * hash) + START_UTC_OFFSET_FIELD_NUMBER; + hash = (53 * hash) + getStartUtcOffset().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + if (hasEndUtcOffset()) { + hash = (37 * hash) + END_UTC_OFFSET_FIELD_NUMBER; + hash = (53 * hash) + getEndUtcOffset().hashCode(); + } + if (hasCivilStartTime()) { + hash = (37 * hash) + CIVIL_START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCivilStartTime().hashCode(); + } + if (hasCivilEndTime()) { + hash = (37 * hash) + CIVIL_END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCivilEndTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.SessionTimeInterval parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.SessionTimeInterval parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.SessionTimeInterval parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.SessionTimeInterval parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.SessionTimeInterval parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.SessionTimeInterval parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.SessionTimeInterval parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.SessionTimeInterval parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.SessionTimeInterval parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.SessionTimeInterval parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.SessionTimeInterval parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.SessionTimeInterval parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.SessionTimeInterval prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Represents a time interval of session data point, which bundles multiple
+   * observed metrics together.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.SessionTimeInterval} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.SessionTimeInterval) + com.google.devicesandservices.health.v4.SessionTimeIntervalOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataCoordinatesProto + .internal_static_google_devicesandservices_health_v4_SessionTimeInterval_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataCoordinatesProto + .internal_static_google_devicesandservices_health_v4_SessionTimeInterval_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.SessionTimeInterval.class, + com.google.devicesandservices.health.v4.SessionTimeInterval.Builder.class); + } + + // Construct using com.google.devicesandservices.health.v4.SessionTimeInterval.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetStartTimeFieldBuilder(); + internalGetStartUtcOffsetFieldBuilder(); + internalGetEndTimeFieldBuilder(); + internalGetEndUtcOffsetFieldBuilder(); + internalGetCivilStartTimeFieldBuilder(); + internalGetCivilEndTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + startUtcOffset_ = null; + if (startUtcOffsetBuilder_ != null) { + startUtcOffsetBuilder_.dispose(); + startUtcOffsetBuilder_ = null; + } + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + endUtcOffset_ = null; + if (endUtcOffsetBuilder_ != null) { + endUtcOffsetBuilder_.dispose(); + endUtcOffsetBuilder_ = null; + } + civilStartTime_ = null; + if (civilStartTimeBuilder_ != null) { + civilStartTimeBuilder_.dispose(); + civilStartTimeBuilder_ = null; + } + civilEndTime_ = null; + if (civilEndTimeBuilder_ != null) { + civilEndTimeBuilder_.dispose(); + civilEndTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataCoordinatesProto + .internal_static_google_devicesandservices_health_v4_SessionTimeInterval_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.SessionTimeInterval getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.SessionTimeInterval.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.SessionTimeInterval build() { + com.google.devicesandservices.health.v4.SessionTimeInterval result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.SessionTimeInterval buildPartial() { + com.google.devicesandservices.health.v4.SessionTimeInterval result = + new com.google.devicesandservices.health.v4.SessionTimeInterval(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.devicesandservices.health.v4.SessionTimeInterval result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.startTime_ = startTimeBuilder_ == null ? startTime_ : startTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.startUtcOffset_ = + startUtcOffsetBuilder_ == null ? startUtcOffset_ : startUtcOffsetBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.endTime_ = endTimeBuilder_ == null ? endTime_ : endTimeBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.endUtcOffset_ = + endUtcOffsetBuilder_ == null ? endUtcOffset_ : endUtcOffsetBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.civilStartTime_ = + civilStartTimeBuilder_ == null ? civilStartTime_ : civilStartTimeBuilder_.build(); + to_bitField0_ |= 0x00000010; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.civilEndTime_ = + civilEndTimeBuilder_ == null ? civilEndTime_ : civilEndTimeBuilder_.build(); + to_bitField0_ |= 0x00000020; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.SessionTimeInterval) { + return mergeFrom((com.google.devicesandservices.health.v4.SessionTimeInterval) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.devicesandservices.health.v4.SessionTimeInterval other) { + if (other == com.google.devicesandservices.health.v4.SessionTimeInterval.getDefaultInstance()) + return this; + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.hasStartUtcOffset()) { + mergeStartUtcOffset(other.getStartUtcOffset()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (other.hasEndUtcOffset()) { + mergeEndUtcOffset(other.getEndUtcOffset()); + } + if (other.hasCivilStartTime()) { + mergeCivilStartTime(other.getCivilStartTime()); + } + if (other.hasCivilEndTime()) { + mergeCivilEndTime(other.getCivilEndTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetStartTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetStartUtcOffsetFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(internalGetEndTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage( + internalGetEndUtcOffsetFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + input.readMessage( + internalGetCivilStartTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + input.readMessage( + internalGetCivilEndTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.Timestamp startTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + startTimeBuilder_; + + /** + * + * + *
+     * Required. The start time of the observed session.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. The start time of the observed session.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The startTime. + */ + public com.google.protobuf.Timestamp getStartTime() { + if (startTimeBuilder_ == null) { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } else { + return startTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The start time of the observed session.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + } else { + startTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The start time of the observed session.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The start time of the observed session.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && startTime_ != null + && startTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getStartTimeBuilder().mergeFrom(value); + } else { + startTime_ = value; + } + } else { + startTimeBuilder_.mergeFrom(value); + } + if (startTime_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The start time of the observed session.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearStartTime() { + bitField0_ = (bitField0_ & ~0x00000001); + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The start time of the observed session.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetStartTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The start time of the observed session.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + } + + /** + * + * + *
+     * Required. The start time of the observed session.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getStartTime(), getParentForChildren(), isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + private com.google.protobuf.Duration startUtcOffset_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + startUtcOffsetBuilder_; + + /** + * + * + *
+     * Required. The offset of the user's local time at the start of the session
+     * relative to the Coordinated Universal Time (UTC).
+     * 
+ * + * + * .google.protobuf.Duration start_utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the startUtcOffset field is set. + */ + public boolean hasStartUtcOffset() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Required. The offset of the user's local time at the start of the session
+     * relative to the Coordinated Universal Time (UTC).
+     * 
+ * + * + * .google.protobuf.Duration start_utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The startUtcOffset. + */ + public com.google.protobuf.Duration getStartUtcOffset() { + if (startUtcOffsetBuilder_ == null) { + return startUtcOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : startUtcOffset_; + } else { + return startUtcOffsetBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The offset of the user's local time at the start of the session
+     * relative to the Coordinated Universal Time (UTC).
+     * 
+ * + * + * .google.protobuf.Duration start_utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setStartUtcOffset(com.google.protobuf.Duration value) { + if (startUtcOffsetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startUtcOffset_ = value; + } else { + startUtcOffsetBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The offset of the user's local time at the start of the session
+     * relative to the Coordinated Universal Time (UTC).
+     * 
+ * + * + * .google.protobuf.Duration start_utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setStartUtcOffset(com.google.protobuf.Duration.Builder builderForValue) { + if (startUtcOffsetBuilder_ == null) { + startUtcOffset_ = builderForValue.build(); + } else { + startUtcOffsetBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The offset of the user's local time at the start of the session
+     * relative to the Coordinated Universal Time (UTC).
+     * 
+ * + * + * .google.protobuf.Duration start_utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeStartUtcOffset(com.google.protobuf.Duration value) { + if (startUtcOffsetBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && startUtcOffset_ != null + && startUtcOffset_ != com.google.protobuf.Duration.getDefaultInstance()) { + getStartUtcOffsetBuilder().mergeFrom(value); + } else { + startUtcOffset_ = value; + } + } else { + startUtcOffsetBuilder_.mergeFrom(value); + } + if (startUtcOffset_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The offset of the user's local time at the start of the session
+     * relative to the Coordinated Universal Time (UTC).
+     * 
+ * + * + * .google.protobuf.Duration start_utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearStartUtcOffset() { + bitField0_ = (bitField0_ & ~0x00000002); + startUtcOffset_ = null; + if (startUtcOffsetBuilder_ != null) { + startUtcOffsetBuilder_.dispose(); + startUtcOffsetBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The offset of the user's local time at the start of the session
+     * relative to the Coordinated Universal Time (UTC).
+     * 
+ * + * + * .google.protobuf.Duration start_utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.Duration.Builder getStartUtcOffsetBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetStartUtcOffsetFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The offset of the user's local time at the start of the session
+     * relative to the Coordinated Universal Time (UTC).
+     * 
+ * + * + * .google.protobuf.Duration start_utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.DurationOrBuilder getStartUtcOffsetOrBuilder() { + if (startUtcOffsetBuilder_ != null) { + return startUtcOffsetBuilder_.getMessageOrBuilder(); + } else { + return startUtcOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : startUtcOffset_; + } + } + + /** + * + * + *
+     * Required. The offset of the user's local time at the start of the session
+     * relative to the Coordinated Universal Time (UTC).
+     * 
+ * + * + * .google.protobuf.Duration start_utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + internalGetStartUtcOffsetFieldBuilder() { + if (startUtcOffsetBuilder_ == null) { + startUtcOffsetBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getStartUtcOffset(), getParentForChildren(), isClean()); + startUtcOffset_ = null; + } + return startUtcOffsetBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + + /** + * + * + *
+     * Required. The end time of the observed session.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Required. The end time of the observed session.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The end time of the observed session.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + } else { + endTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The end time of the observed session.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The end time of the observed session.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && endTime_ != null + && endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEndTimeBuilder().mergeFrom(value); + } else { + endTime_ = value; + } + } else { + endTimeBuilder_.mergeFrom(value); + } + if (endTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The end time of the observed session.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearEndTime() { + bitField0_ = (bitField0_ & ~0x00000004); + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The end time of the observed session.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetEndTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The end time of the observed session.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + + /** + * + * + *
+     * Required. The end time of the observed session.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + private com.google.protobuf.Duration endUtcOffset_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + endUtcOffsetBuilder_; + + /** + * + * + *
+     * Required. The offset of the user's local time at the end of the session
+     * relative to the Coordinated Universal Time (UTC).
+     * 
+ * + * .google.protobuf.Duration end_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the endUtcOffset field is set. + */ + public boolean hasEndUtcOffset() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+     * Required. The offset of the user's local time at the end of the session
+     * relative to the Coordinated Universal Time (UTC).
+     * 
+ * + * .google.protobuf.Duration end_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The endUtcOffset. + */ + public com.google.protobuf.Duration getEndUtcOffset() { + if (endUtcOffsetBuilder_ == null) { + return endUtcOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : endUtcOffset_; + } else { + return endUtcOffsetBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The offset of the user's local time at the end of the session
+     * relative to the Coordinated Universal Time (UTC).
+     * 
+ * + * .google.protobuf.Duration end_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setEndUtcOffset(com.google.protobuf.Duration value) { + if (endUtcOffsetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endUtcOffset_ = value; + } else { + endUtcOffsetBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The offset of the user's local time at the end of the session
+     * relative to the Coordinated Universal Time (UTC).
+     * 
+ * + * .google.protobuf.Duration end_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setEndUtcOffset(com.google.protobuf.Duration.Builder builderForValue) { + if (endUtcOffsetBuilder_ == null) { + endUtcOffset_ = builderForValue.build(); + } else { + endUtcOffsetBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The offset of the user's local time at the end of the session
+     * relative to the Coordinated Universal Time (UTC).
+     * 
+ * + * .google.protobuf.Duration end_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeEndUtcOffset(com.google.protobuf.Duration value) { + if (endUtcOffsetBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && endUtcOffset_ != null + && endUtcOffset_ != com.google.protobuf.Duration.getDefaultInstance()) { + getEndUtcOffsetBuilder().mergeFrom(value); + } else { + endUtcOffset_ = value; + } + } else { + endUtcOffsetBuilder_.mergeFrom(value); + } + if (endUtcOffset_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The offset of the user's local time at the end of the session
+     * relative to the Coordinated Universal Time (UTC).
+     * 
+ * + * .google.protobuf.Duration end_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearEndUtcOffset() { + bitField0_ = (bitField0_ & ~0x00000008); + endUtcOffset_ = null; + if (endUtcOffsetBuilder_ != null) { + endUtcOffsetBuilder_.dispose(); + endUtcOffsetBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The offset of the user's local time at the end of the session
+     * relative to the Coordinated Universal Time (UTC).
+     * 
+ * + * .google.protobuf.Duration end_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.Duration.Builder getEndUtcOffsetBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return internalGetEndUtcOffsetFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The offset of the user's local time at the end of the session
+     * relative to the Coordinated Universal Time (UTC).
+     * 
+ * + * .google.protobuf.Duration end_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.DurationOrBuilder getEndUtcOffsetOrBuilder() { + if (endUtcOffsetBuilder_ != null) { + return endUtcOffsetBuilder_.getMessageOrBuilder(); + } else { + return endUtcOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : endUtcOffset_; + } + } + + /** + * + * + *
+     * Required. The offset of the user's local time at the end of the session
+     * relative to the Coordinated Universal Time (UTC).
+     * 
+ * + * .google.protobuf.Duration end_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + internalGetEndUtcOffsetFieldBuilder() { + if (endUtcOffsetBuilder_ == null) { + endUtcOffsetBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getEndUtcOffset(), getParentForChildren(), isClean()); + endUtcOffset_ = null; + } + return endUtcOffsetBuilder_; + } + + private com.google.devicesandservices.health.v4.CivilDateTime civilStartTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.CivilDateTime, + com.google.devicesandservices.health.v4.CivilDateTime.Builder, + com.google.devicesandservices.health.v4.CivilDateTimeOrBuilder> + civilStartTimeBuilder_; + + /** + * + * + *
+     * Output only. Session start time in civil time in the timezone the subject
+     * is in at the start of the session.
+     * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime civil_start_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the civilStartTime field is set. + */ + public boolean hasCivilStartTime() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+     * Output only. Session start time in civil time in the timezone the subject
+     * is in at the start of the session.
+     * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime civil_start_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The civilStartTime. + */ + public com.google.devicesandservices.health.v4.CivilDateTime getCivilStartTime() { + if (civilStartTimeBuilder_ == null) { + return civilStartTime_ == null + ? com.google.devicesandservices.health.v4.CivilDateTime.getDefaultInstance() + : civilStartTime_; + } else { + return civilStartTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. Session start time in civil time in the timezone the subject
+     * is in at the start of the session.
+     * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime civil_start_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCivilStartTime(com.google.devicesandservices.health.v4.CivilDateTime value) { + if (civilStartTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + civilStartTime_ = value; + } else { + civilStartTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Session start time in civil time in the timezone the subject
+     * is in at the start of the session.
+     * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime civil_start_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCivilStartTime( + com.google.devicesandservices.health.v4.CivilDateTime.Builder builderForValue) { + if (civilStartTimeBuilder_ == null) { + civilStartTime_ = builderForValue.build(); + } else { + civilStartTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Session start time in civil time in the timezone the subject
+     * is in at the start of the session.
+     * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime civil_start_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCivilStartTime( + com.google.devicesandservices.health.v4.CivilDateTime value) { + if (civilStartTimeBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && civilStartTime_ != null + && civilStartTime_ + != com.google.devicesandservices.health.v4.CivilDateTime.getDefaultInstance()) { + getCivilStartTimeBuilder().mergeFrom(value); + } else { + civilStartTime_ = value; + } + } else { + civilStartTimeBuilder_.mergeFrom(value); + } + if (civilStartTime_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. Session start time in civil time in the timezone the subject
+     * is in at the start of the session.
+     * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime civil_start_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCivilStartTime() { + bitField0_ = (bitField0_ & ~0x00000010); + civilStartTime_ = null; + if (civilStartTimeBuilder_ != null) { + civilStartTimeBuilder_.dispose(); + civilStartTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Session start time in civil time in the timezone the subject
+     * is in at the start of the session.
+     * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime civil_start_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.devicesandservices.health.v4.CivilDateTime.Builder + getCivilStartTimeBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return internalGetCivilStartTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Session start time in civil time in the timezone the subject
+     * is in at the start of the session.
+     * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime civil_start_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.devicesandservices.health.v4.CivilDateTimeOrBuilder + getCivilStartTimeOrBuilder() { + if (civilStartTimeBuilder_ != null) { + return civilStartTimeBuilder_.getMessageOrBuilder(); + } else { + return civilStartTime_ == null + ? com.google.devicesandservices.health.v4.CivilDateTime.getDefaultInstance() + : civilStartTime_; + } + } + + /** + * + * + *
+     * Output only. Session start time in civil time in the timezone the subject
+     * is in at the start of the session.
+     * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime civil_start_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.CivilDateTime, + com.google.devicesandservices.health.v4.CivilDateTime.Builder, + com.google.devicesandservices.health.v4.CivilDateTimeOrBuilder> + internalGetCivilStartTimeFieldBuilder() { + if (civilStartTimeBuilder_ == null) { + civilStartTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.CivilDateTime, + com.google.devicesandservices.health.v4.CivilDateTime.Builder, + com.google.devicesandservices.health.v4.CivilDateTimeOrBuilder>( + getCivilStartTime(), getParentForChildren(), isClean()); + civilStartTime_ = null; + } + return civilStartTimeBuilder_; + } + + private com.google.devicesandservices.health.v4.CivilDateTime civilEndTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.CivilDateTime, + com.google.devicesandservices.health.v4.CivilDateTime.Builder, + com.google.devicesandservices.health.v4.CivilDateTimeOrBuilder> + civilEndTimeBuilder_; + + /** + * + * + *
+     * Output only. Session end time in civil time in the timezone the subject is
+     * in at the end of the session.
+     * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime civil_end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the civilEndTime field is set. + */ + public boolean hasCivilEndTime() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+     * Output only. Session end time in civil time in the timezone the subject is
+     * in at the end of the session.
+     * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime civil_end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The civilEndTime. + */ + public com.google.devicesandservices.health.v4.CivilDateTime getCivilEndTime() { + if (civilEndTimeBuilder_ == null) { + return civilEndTime_ == null + ? com.google.devicesandservices.health.v4.CivilDateTime.getDefaultInstance() + : civilEndTime_; + } else { + return civilEndTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. Session end time in civil time in the timezone the subject is
+     * in at the end of the session.
+     * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime civil_end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCivilEndTime(com.google.devicesandservices.health.v4.CivilDateTime value) { + if (civilEndTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + civilEndTime_ = value; + } else { + civilEndTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Session end time in civil time in the timezone the subject is
+     * in at the end of the session.
+     * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime civil_end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCivilEndTime( + com.google.devicesandservices.health.v4.CivilDateTime.Builder builderForValue) { + if (civilEndTimeBuilder_ == null) { + civilEndTime_ = builderForValue.build(); + } else { + civilEndTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Session end time in civil time in the timezone the subject is
+     * in at the end of the session.
+     * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime civil_end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCivilEndTime(com.google.devicesandservices.health.v4.CivilDateTime value) { + if (civilEndTimeBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && civilEndTime_ != null + && civilEndTime_ + != com.google.devicesandservices.health.v4.CivilDateTime.getDefaultInstance()) { + getCivilEndTimeBuilder().mergeFrom(value); + } else { + civilEndTime_ = value; + } + } else { + civilEndTimeBuilder_.mergeFrom(value); + } + if (civilEndTime_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. Session end time in civil time in the timezone the subject is
+     * in at the end of the session.
+     * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime civil_end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCivilEndTime() { + bitField0_ = (bitField0_ & ~0x00000020); + civilEndTime_ = null; + if (civilEndTimeBuilder_ != null) { + civilEndTimeBuilder_.dispose(); + civilEndTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Session end time in civil time in the timezone the subject is
+     * in at the end of the session.
+     * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime civil_end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.devicesandservices.health.v4.CivilDateTime.Builder getCivilEndTimeBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return internalGetCivilEndTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Session end time in civil time in the timezone the subject is
+     * in at the end of the session.
+     * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime civil_end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.devicesandservices.health.v4.CivilDateTimeOrBuilder + getCivilEndTimeOrBuilder() { + if (civilEndTimeBuilder_ != null) { + return civilEndTimeBuilder_.getMessageOrBuilder(); + } else { + return civilEndTime_ == null + ? com.google.devicesandservices.health.v4.CivilDateTime.getDefaultInstance() + : civilEndTime_; + } + } + + /** + * + * + *
+     * Output only. Session end time in civil time in the timezone the subject is
+     * in at the end of the session.
+     * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime civil_end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.CivilDateTime, + com.google.devicesandservices.health.v4.CivilDateTime.Builder, + com.google.devicesandservices.health.v4.CivilDateTimeOrBuilder> + internalGetCivilEndTimeFieldBuilder() { + if (civilEndTimeBuilder_ == null) { + civilEndTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.CivilDateTime, + com.google.devicesandservices.health.v4.CivilDateTime.Builder, + com.google.devicesandservices.health.v4.CivilDateTimeOrBuilder>( + getCivilEndTime(), getParentForChildren(), isClean()); + civilEndTime_ = null; + } + return civilEndTimeBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.SessionTimeInterval) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.SessionTimeInterval) + private static final com.google.devicesandservices.health.v4.SessionTimeInterval DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.SessionTimeInterval(); + } + + public static com.google.devicesandservices.health.v4.SessionTimeInterval getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SessionTimeInterval parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.SessionTimeInterval getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/SessionTimeIntervalOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/SessionTimeIntervalOrBuilder.java new file mode 100644 index 000000000000..9014ecc00b03 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/SessionTimeIntervalOrBuilder.java @@ -0,0 +1,283 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_coordinates.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface SessionTimeIntervalOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.SessionTimeInterval) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The start time of the observed session.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + + /** + * + * + *
+   * Required. The start time of the observed session.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The startTime. + */ + com.google.protobuf.Timestamp getStartTime(); + + /** + * + * + *
+   * Required. The start time of the observed session.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + + /** + * + * + *
+   * Required. The offset of the user's local time at the start of the session
+   * relative to the Coordinated Universal Time (UTC).
+   * 
+ * + * .google.protobuf.Duration start_utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the startUtcOffset field is set. + */ + boolean hasStartUtcOffset(); + + /** + * + * + *
+   * Required. The offset of the user's local time at the start of the session
+   * relative to the Coordinated Universal Time (UTC).
+   * 
+ * + * .google.protobuf.Duration start_utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The startUtcOffset. + */ + com.google.protobuf.Duration getStartUtcOffset(); + + /** + * + * + *
+   * Required. The offset of the user's local time at the start of the session
+   * relative to the Coordinated Universal Time (UTC).
+   * 
+ * + * .google.protobuf.Duration start_utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.DurationOrBuilder getStartUtcOffsetOrBuilder(); + + /** + * + * + *
+   * Required. The end time of the observed session.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + + /** + * + * + *
+   * Required. The end time of the observed session.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + + /** + * + * + *
+   * Required. The end time of the observed session.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + * + * + *
+   * Required. The offset of the user's local time at the end of the session
+   * relative to the Coordinated Universal Time (UTC).
+   * 
+ * + * .google.protobuf.Duration end_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the endUtcOffset field is set. + */ + boolean hasEndUtcOffset(); + + /** + * + * + *
+   * Required. The offset of the user's local time at the end of the session
+   * relative to the Coordinated Universal Time (UTC).
+   * 
+ * + * .google.protobuf.Duration end_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The endUtcOffset. + */ + com.google.protobuf.Duration getEndUtcOffset(); + + /** + * + * + *
+   * Required. The offset of the user's local time at the end of the session
+   * relative to the Coordinated Universal Time (UTC).
+   * 
+ * + * .google.protobuf.Duration end_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.DurationOrBuilder getEndUtcOffsetOrBuilder(); + + /** + * + * + *
+   * Output only. Session start time in civil time in the timezone the subject
+   * is in at the start of the session.
+   * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime civil_start_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the civilStartTime field is set. + */ + boolean hasCivilStartTime(); + + /** + * + * + *
+   * Output only. Session start time in civil time in the timezone the subject
+   * is in at the start of the session.
+   * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime civil_start_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The civilStartTime. + */ + com.google.devicesandservices.health.v4.CivilDateTime getCivilStartTime(); + + /** + * + * + *
+   * Output only. Session start time in civil time in the timezone the subject
+   * is in at the start of the session.
+   * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime civil_start_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.devicesandservices.health.v4.CivilDateTimeOrBuilder getCivilStartTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Session end time in civil time in the timezone the subject is
+   * in at the end of the session.
+   * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime civil_end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the civilEndTime field is set. + */ + boolean hasCivilEndTime(); + + /** + * + * + *
+   * Output only. Session end time in civil time in the timezone the subject is
+   * in at the end of the session.
+   * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime civil_end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The civilEndTime. + */ + com.google.devicesandservices.health.v4.CivilDateTime getCivilEndTime(); + + /** + * + * + *
+   * Output only. Session end time in civil time in the timezone the subject is
+   * in at the end of the session.
+   * 
+ * + * + * .google.devicesandservices.health.v4.CivilDateTime civil_end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.devicesandservices.health.v4.CivilDateTimeOrBuilder getCivilEndTimeOrBuilder(); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/Settings.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/Settings.java new file mode 100644 index 000000000000..90743787ae27 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/Settings.java @@ -0,0 +1,4582 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/health_profile.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * Settings details.
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.Settings} + */ +@com.google.protobuf.Generated +public final class Settings extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.Settings) + SettingsOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Settings"); + } + + // Use Settings.newBuilder() to construct. + private Settings(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Settings() { + name_ = ""; + distanceUnit_ = 0; + glucoseUnit_ = 0; + heightUnit_ = 0; + languageLocale_ = ""; + strideLengthWalkingType_ = 0; + strideLengthRunningType_ = 0; + swimUnit_ = 0; + temperatureUnit_ = 0; + timeZone_ = ""; + weightUnit_ = 0; + waterUnit_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.HealthProfileProto + .internal_static_google_devicesandservices_health_v4_Settings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.HealthProfileProto + .internal_static_google_devicesandservices_health_v4_Settings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.Settings.class, + com.google.devicesandservices.health.v4.Settings.Builder.class); + } + + /** + * + * + *
+   * The measurement unit defined in the user's account settings.
+   * 
+ * + * Protobuf enum {@code google.devicesandservices.health.v4.Settings.DistanceUnit} + */ + public enum DistanceUnit implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Distance unit is not specified.
+     * 
+ * + * DISTANCE_UNIT_UNSPECIFIED = 0; + */ + DISTANCE_UNIT_UNSPECIFIED(0), + /** + * + * + *
+     * Distance unit is miles.
+     * 
+ * + * DISTANCE_UNIT_MILES = 1; + */ + DISTANCE_UNIT_MILES(1), + /** + * + * + *
+     * Distance unit is kilometers.
+     * 
+ * + * DISTANCE_UNIT_KILOMETERS = 2; + */ + DISTANCE_UNIT_KILOMETERS(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DistanceUnit"); + } + + /** + * + * + *
+     * Distance unit is not specified.
+     * 
+ * + * DISTANCE_UNIT_UNSPECIFIED = 0; + */ + public static final int DISTANCE_UNIT_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Distance unit is miles.
+     * 
+ * + * DISTANCE_UNIT_MILES = 1; + */ + public static final int DISTANCE_UNIT_MILES_VALUE = 1; + + /** + * + * + *
+     * Distance unit is kilometers.
+     * 
+ * + * DISTANCE_UNIT_KILOMETERS = 2; + */ + public static final int DISTANCE_UNIT_KILOMETERS_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DistanceUnit valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static DistanceUnit forNumber(int value) { + switch (value) { + case 0: + return DISTANCE_UNIT_UNSPECIFIED; + case 1: + return DISTANCE_UNIT_MILES; + case 2: + return DISTANCE_UNIT_KILOMETERS; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public DistanceUnit findValueByNumber(int number) { + return DistanceUnit.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.devicesandservices.health.v4.Settings.getDescriptor().getEnumTypes().get(0); + } + + private static final DistanceUnit[] VALUES = values(); + + public static DistanceUnit valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private DistanceUnit(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.devicesandservices.health.v4.Settings.DistanceUnit) + } + + /** + * + * + *
+   * The measurement unit defined in the user's account settings.
+   * 
+ * + * Protobuf enum {@code google.devicesandservices.health.v4.Settings.GlucoseUnit} + */ + public enum GlucoseUnit implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Glucose unit is not specified.
+     * 
+ * + * GLUCOSE_UNIT_UNSPECIFIED = 0; + */ + GLUCOSE_UNIT_UNSPECIFIED(0), + /** + * + * + *
+     * Glucose unit is mg/dL.
+     * 
+ * + * GLUCOSE_UNIT_MG_DL = 1; + */ + GLUCOSE_UNIT_MG_DL(1), + /** + * + * + *
+     * Glucose unit is mmol/l.
+     * 
+ * + * GLUCOSE_UNIT_MMOL_L = 2; + */ + GLUCOSE_UNIT_MMOL_L(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GlucoseUnit"); + } + + /** + * + * + *
+     * Glucose unit is not specified.
+     * 
+ * + * GLUCOSE_UNIT_UNSPECIFIED = 0; + */ + public static final int GLUCOSE_UNIT_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Glucose unit is mg/dL.
+     * 
+ * + * GLUCOSE_UNIT_MG_DL = 1; + */ + public static final int GLUCOSE_UNIT_MG_DL_VALUE = 1; + + /** + * + * + *
+     * Glucose unit is mmol/l.
+     * 
+ * + * GLUCOSE_UNIT_MMOL_L = 2; + */ + public static final int GLUCOSE_UNIT_MMOL_L_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static GlucoseUnit valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static GlucoseUnit forNumber(int value) { + switch (value) { + case 0: + return GLUCOSE_UNIT_UNSPECIFIED; + case 1: + return GLUCOSE_UNIT_MG_DL; + case 2: + return GLUCOSE_UNIT_MMOL_L; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public GlucoseUnit findValueByNumber(int number) { + return GlucoseUnit.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.devicesandservices.health.v4.Settings.getDescriptor().getEnumTypes().get(1); + } + + private static final GlucoseUnit[] VALUES = values(); + + public static GlucoseUnit valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private GlucoseUnit(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.devicesandservices.health.v4.Settings.GlucoseUnit) + } + + /** + * + * + *
+   * The measurement unit defined in the user's account settings.
+   * 
+ * + * Protobuf enum {@code google.devicesandservices.health.v4.Settings.HeightUnit} + */ + public enum HeightUnit implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Height unit is not specified.
+     * 
+ * + * HEIGHT_UNIT_UNSPECIFIED = 0; + */ + HEIGHT_UNIT_UNSPECIFIED(0), + /** + * + * + *
+     * Height unit is inches.
+     * 
+ * + * HEIGHT_UNIT_INCHES = 1; + */ + HEIGHT_UNIT_INCHES(1), + /** + * + * + *
+     * Height unit is cm.
+     * 
+ * + * HEIGHT_UNIT_CENTIMETERS = 2; + */ + HEIGHT_UNIT_CENTIMETERS(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "HeightUnit"); + } + + /** + * + * + *
+     * Height unit is not specified.
+     * 
+ * + * HEIGHT_UNIT_UNSPECIFIED = 0; + */ + public static final int HEIGHT_UNIT_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Height unit is inches.
+     * 
+ * + * HEIGHT_UNIT_INCHES = 1; + */ + public static final int HEIGHT_UNIT_INCHES_VALUE = 1; + + /** + * + * + *
+     * Height unit is cm.
+     * 
+ * + * HEIGHT_UNIT_CENTIMETERS = 2; + */ + public static final int HEIGHT_UNIT_CENTIMETERS_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static HeightUnit valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static HeightUnit forNumber(int value) { + switch (value) { + case 0: + return HEIGHT_UNIT_UNSPECIFIED; + case 1: + return HEIGHT_UNIT_INCHES; + case 2: + return HEIGHT_UNIT_CENTIMETERS; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public HeightUnit findValueByNumber(int number) { + return HeightUnit.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.devicesandservices.health.v4.Settings.getDescriptor().getEnumTypes().get(2); + } + + private static final HeightUnit[] VALUES = values(); + + public static HeightUnit valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private HeightUnit(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.devicesandservices.health.v4.Settings.HeightUnit) + } + + /** + * + * + *
+   * The stride length type defined in the user's account settings. Specifies if
+   * the user's stride length is determined automatically (default) or manually
+   * as defined in the user's account settings.
+   * 
+ * + * Protobuf enum {@code google.devicesandservices.health.v4.Settings.StrideLengthType} + */ + public enum StrideLengthType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Stride length type is not specified.
+     * 
+ * + * STRIDE_LENGTH_TYPE_UNSPECIFIED = 0; + */ + STRIDE_LENGTH_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Stride length type is computed based on the user's gender and height.
+     * 
+ * + * STRIDE_LENGTH_TYPE_DEFAULT = 1; + */ + STRIDE_LENGTH_TYPE_DEFAULT(1), + /** + * + * + *
+     * Stride length type is manually set by the user.
+     * 
+ * + * STRIDE_LENGTH_TYPE_MANUAL = 2; + */ + STRIDE_LENGTH_TYPE_MANUAL(2), + /** + * + * + *
+     * Stride length type is determined automatically.
+     * 
+ * + * STRIDE_LENGTH_TYPE_AUTO = 3; + */ + STRIDE_LENGTH_TYPE_AUTO(3), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "StrideLengthType"); + } + + /** + * + * + *
+     * Stride length type is not specified.
+     * 
+ * + * STRIDE_LENGTH_TYPE_UNSPECIFIED = 0; + */ + public static final int STRIDE_LENGTH_TYPE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Stride length type is computed based on the user's gender and height.
+     * 
+ * + * STRIDE_LENGTH_TYPE_DEFAULT = 1; + */ + public static final int STRIDE_LENGTH_TYPE_DEFAULT_VALUE = 1; + + /** + * + * + *
+     * Stride length type is manually set by the user.
+     * 
+ * + * STRIDE_LENGTH_TYPE_MANUAL = 2; + */ + public static final int STRIDE_LENGTH_TYPE_MANUAL_VALUE = 2; + + /** + * + * + *
+     * Stride length type is determined automatically.
+     * 
+ * + * STRIDE_LENGTH_TYPE_AUTO = 3; + */ + public static final int STRIDE_LENGTH_TYPE_AUTO_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static StrideLengthType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static StrideLengthType forNumber(int value) { + switch (value) { + case 0: + return STRIDE_LENGTH_TYPE_UNSPECIFIED; + case 1: + return STRIDE_LENGTH_TYPE_DEFAULT; + case 2: + return STRIDE_LENGTH_TYPE_MANUAL; + case 3: + return STRIDE_LENGTH_TYPE_AUTO; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public StrideLengthType findValueByNumber(int number) { + return StrideLengthType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.devicesandservices.health.v4.Settings.getDescriptor().getEnumTypes().get(3); + } + + private static final StrideLengthType[] VALUES = values(); + + public static StrideLengthType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private StrideLengthType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.devicesandservices.health.v4.Settings.StrideLengthType) + } + + /** + * + * + *
+   * The swim unit defined in the user's account settings.
+   * 
+ * + * Protobuf enum {@code google.devicesandservices.health.v4.Settings.SwimUnit} + */ + public enum SwimUnit implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Swim unit is not specified.
+     * 
+ * + * SWIM_UNIT_UNSPECIFIED = 0; + */ + SWIM_UNIT_UNSPECIFIED(0), + /** + * + * + *
+     * Swim unit is meters.
+     * 
+ * + * SWIM_UNIT_METERS = 1; + */ + SWIM_UNIT_METERS(1), + /** + * + * + *
+     * Swim unit is yards.
+     * 
+ * + * SWIM_UNIT_YARDS = 2; + */ + SWIM_UNIT_YARDS(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SwimUnit"); + } + + /** + * + * + *
+     * Swim unit is not specified.
+     * 
+ * + * SWIM_UNIT_UNSPECIFIED = 0; + */ + public static final int SWIM_UNIT_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Swim unit is meters.
+     * 
+ * + * SWIM_UNIT_METERS = 1; + */ + public static final int SWIM_UNIT_METERS_VALUE = 1; + + /** + * + * + *
+     * Swim unit is yards.
+     * 
+ * + * SWIM_UNIT_YARDS = 2; + */ + public static final int SWIM_UNIT_YARDS_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static SwimUnit valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static SwimUnit forNumber(int value) { + switch (value) { + case 0: + return SWIM_UNIT_UNSPECIFIED; + case 1: + return SWIM_UNIT_METERS; + case 2: + return SWIM_UNIT_YARDS; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public SwimUnit findValueByNumber(int number) { + return SwimUnit.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.devicesandservices.health.v4.Settings.getDescriptor().getEnumTypes().get(4); + } + + private static final SwimUnit[] VALUES = values(); + + public static SwimUnit valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private SwimUnit(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.devicesandservices.health.v4.Settings.SwimUnit) + } + + /** + * + * + *
+   * The measurement unit defined in the user's account settings.
+   * 
+ * + * Protobuf enum {@code google.devicesandservices.health.v4.Settings.TemperatureUnit} + */ + public enum TemperatureUnit implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Temperature unit is not specified.
+     * 
+ * + * TEMPERATURE_UNIT_UNSPECIFIED = 0; + */ + TEMPERATURE_UNIT_UNSPECIFIED(0), + /** + * + * + *
+     * Temperature unit is Celsius.
+     * 
+ * + * TEMPERATURE_UNIT_CELSIUS = 1; + */ + TEMPERATURE_UNIT_CELSIUS(1), + /** + * + * + *
+     * Temperature unit is Fahrenheit.
+     * 
+ * + * TEMPERATURE_UNIT_FAHRENHEIT = 2; + */ + TEMPERATURE_UNIT_FAHRENHEIT(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "TemperatureUnit"); + } + + /** + * + * + *
+     * Temperature unit is not specified.
+     * 
+ * + * TEMPERATURE_UNIT_UNSPECIFIED = 0; + */ + public static final int TEMPERATURE_UNIT_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Temperature unit is Celsius.
+     * 
+ * + * TEMPERATURE_UNIT_CELSIUS = 1; + */ + public static final int TEMPERATURE_UNIT_CELSIUS_VALUE = 1; + + /** + * + * + *
+     * Temperature unit is Fahrenheit.
+     * 
+ * + * TEMPERATURE_UNIT_FAHRENHEIT = 2; + */ + public static final int TEMPERATURE_UNIT_FAHRENHEIT_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static TemperatureUnit valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static TemperatureUnit forNumber(int value) { + switch (value) { + case 0: + return TEMPERATURE_UNIT_UNSPECIFIED; + case 1: + return TEMPERATURE_UNIT_CELSIUS; + case 2: + return TEMPERATURE_UNIT_FAHRENHEIT; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public TemperatureUnit findValueByNumber(int number) { + return TemperatureUnit.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.devicesandservices.health.v4.Settings.getDescriptor().getEnumTypes().get(5); + } + + private static final TemperatureUnit[] VALUES = values(); + + public static TemperatureUnit valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private TemperatureUnit(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.devicesandservices.health.v4.Settings.TemperatureUnit) + } + + /** + * + * + *
+   * The measurement unit defined in the user's account settings.
+   * 
+ * + * Protobuf enum {@code google.devicesandservices.health.v4.Settings.WeightUnit} + */ + public enum WeightUnit implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Weight unit is not specified.
+     * 
+ * + * WEIGHT_UNIT_UNSPECIFIED = 0; + */ + WEIGHT_UNIT_UNSPECIFIED(0), + /** + * + * + *
+     * Weight unit is pounds.
+     * 
+ * + * WEIGHT_UNIT_POUNDS = 1; + */ + WEIGHT_UNIT_POUNDS(1), + /** + * + * + *
+     * Weight unit is stones.
+     * 
+ * + * WEIGHT_UNIT_STONE = 2; + */ + WEIGHT_UNIT_STONE(2), + /** + * + * + *
+     * Weight unit is kilograms.
+     * 
+ * + * WEIGHT_UNIT_KILOGRAMS = 3; + */ + WEIGHT_UNIT_KILOGRAMS(3), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "WeightUnit"); + } + + /** + * + * + *
+     * Weight unit is not specified.
+     * 
+ * + * WEIGHT_UNIT_UNSPECIFIED = 0; + */ + public static final int WEIGHT_UNIT_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Weight unit is pounds.
+     * 
+ * + * WEIGHT_UNIT_POUNDS = 1; + */ + public static final int WEIGHT_UNIT_POUNDS_VALUE = 1; + + /** + * + * + *
+     * Weight unit is stones.
+     * 
+ * + * WEIGHT_UNIT_STONE = 2; + */ + public static final int WEIGHT_UNIT_STONE_VALUE = 2; + + /** + * + * + *
+     * Weight unit is kilograms.
+     * 
+ * + * WEIGHT_UNIT_KILOGRAMS = 3; + */ + public static final int WEIGHT_UNIT_KILOGRAMS_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static WeightUnit valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static WeightUnit forNumber(int value) { + switch (value) { + case 0: + return WEIGHT_UNIT_UNSPECIFIED; + case 1: + return WEIGHT_UNIT_POUNDS; + case 2: + return WEIGHT_UNIT_STONE; + case 3: + return WEIGHT_UNIT_KILOGRAMS; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public WeightUnit findValueByNumber(int number) { + return WeightUnit.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.devicesandservices.health.v4.Settings.getDescriptor().getEnumTypes().get(6); + } + + private static final WeightUnit[] VALUES = values(); + + public static WeightUnit valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private WeightUnit(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.devicesandservices.health.v4.Settings.WeightUnit) + } + + /** + * + * + *
+   * The water measurement unit defined in the user's account settings.
+   * 
+ * + * Protobuf enum {@code google.devicesandservices.health.v4.Settings.WaterUnit} + */ + public enum WaterUnit implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Water unit is not specified.
+     * 
+ * + * WATER_UNIT_UNSPECIFIED = 0; + */ + WATER_UNIT_UNSPECIFIED(0), + /** + * + * + *
+     * Water unit is milliliters.
+     * 
+ * + * WATER_UNIT_ML = 1; + */ + WATER_UNIT_ML(1), + /** + * + * + *
+     * Water unit is fluid ounces.
+     * 
+ * + * WATER_UNIT_FL_OZ = 2; + */ + WATER_UNIT_FL_OZ(2), + /** + * + * + *
+     * Water unit is cups.
+     * 
+ * + * WATER_UNIT_CUP = 3; + */ + WATER_UNIT_CUP(3), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "WaterUnit"); + } + + /** + * + * + *
+     * Water unit is not specified.
+     * 
+ * + * WATER_UNIT_UNSPECIFIED = 0; + */ + public static final int WATER_UNIT_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Water unit is milliliters.
+     * 
+ * + * WATER_UNIT_ML = 1; + */ + public static final int WATER_UNIT_ML_VALUE = 1; + + /** + * + * + *
+     * Water unit is fluid ounces.
+     * 
+ * + * WATER_UNIT_FL_OZ = 2; + */ + public static final int WATER_UNIT_FL_OZ_VALUE = 2; + + /** + * + * + *
+     * Water unit is cups.
+     * 
+ * + * WATER_UNIT_CUP = 3; + */ + public static final int WATER_UNIT_CUP_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static WaterUnit valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static WaterUnit forNumber(int value) { + switch (value) { + case 0: + return WATER_UNIT_UNSPECIFIED; + case 1: + return WATER_UNIT_ML; + case 2: + return WATER_UNIT_FL_OZ; + case 3: + return WATER_UNIT_CUP; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public WaterUnit findValueByNumber(int number) { + return WaterUnit.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.devicesandservices.health.v4.Settings.getDescriptor().getEnumTypes().get(7); + } + + private static final WaterUnit[] VALUES = values(); + + public static WaterUnit valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private WaterUnit(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.devicesandservices.health.v4.Settings.WaterUnit) + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Identifier. The resource name of this Settings resource.
+   *
+   * Format: `users/{user}/settings`
+   * Example: `users/1234567890/settings` or `users/me/settings`
+   * The {user} ID is a system-generated Google Health API user ID, a string of
+   * 1-63 characters consisting of lowercase and uppercase letters, numbers, and
+   * hyphens. The literal `me` can also be used to refer to the authenticated
+   * user.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Identifier. The resource name of this Settings resource.
+   *
+   * Format: `users/{user}/settings`
+   * Example: `users/1234567890/settings` or `users/me/settings`
+   * The {user} ID is a system-generated Google Health API user ID, a string of
+   * 1-63 characters consisting of lowercase and uppercase letters, numbers, and
+   * hyphens. The literal `me` can also be used to refer to the authenticated
+   * user.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AUTO_STRIDE_ENABLED_FIELD_NUMBER = 2; + private boolean autoStrideEnabled_ = false; + + /** + * + * + *
+   * Optional. True if the user's stride length is determined automatically.
+   *
+   * Updates to this field are currently not supported.
+   * 
+ * + * bool auto_stride_enabled = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The autoStrideEnabled. + */ + @java.lang.Override + public boolean getAutoStrideEnabled() { + return autoStrideEnabled_; + } + + public static final int DISTANCE_UNIT_FIELD_NUMBER = 5; + private int distanceUnit_ = 0; + + /** + * + * + *
+   * Optional. The measurement unit defined in the user's account settings.
+   *
+   * Updates to this field are currently not supported.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Settings.DistanceUnit distance_unit = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for distanceUnit. + */ + @java.lang.Override + public int getDistanceUnitValue() { + return distanceUnit_; + } + + /** + * + * + *
+   * Optional. The measurement unit defined in the user's account settings.
+   *
+   * Updates to this field are currently not supported.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Settings.DistanceUnit distance_unit = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The distanceUnit. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Settings.DistanceUnit getDistanceUnit() { + com.google.devicesandservices.health.v4.Settings.DistanceUnit result = + com.google.devicesandservices.health.v4.Settings.DistanceUnit.forNumber(distanceUnit_); + return result == null + ? com.google.devicesandservices.health.v4.Settings.DistanceUnit.UNRECOGNIZED + : result; + } + + public static final int GLUCOSE_UNIT_FIELD_NUMBER = 7; + private int glucoseUnit_ = 0; + + /** + * + * + *
+   * Optional. The measurement unit defined in the user's account settings.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Settings.GlucoseUnit glucose_unit = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for glucoseUnit. + */ + @java.lang.Override + public int getGlucoseUnitValue() { + return glucoseUnit_; + } + + /** + * + * + *
+   * Optional. The measurement unit defined in the user's account settings.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Settings.GlucoseUnit glucose_unit = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The glucoseUnit. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Settings.GlucoseUnit getGlucoseUnit() { + com.google.devicesandservices.health.v4.Settings.GlucoseUnit result = + com.google.devicesandservices.health.v4.Settings.GlucoseUnit.forNumber(glucoseUnit_); + return result == null + ? com.google.devicesandservices.health.v4.Settings.GlucoseUnit.UNRECOGNIZED + : result; + } + + public static final int HEIGHT_UNIT_FIELD_NUMBER = 8; + private int heightUnit_ = 0; + + /** + * + * + *
+   * Optional. The measurement unit defined in the user's account settings.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Settings.HeightUnit height_unit = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for heightUnit. + */ + @java.lang.Override + public int getHeightUnitValue() { + return heightUnit_; + } + + /** + * + * + *
+   * Optional. The measurement unit defined in the user's account settings.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Settings.HeightUnit height_unit = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The heightUnit. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Settings.HeightUnit getHeightUnit() { + com.google.devicesandservices.health.v4.Settings.HeightUnit result = + com.google.devicesandservices.health.v4.Settings.HeightUnit.forNumber(heightUnit_); + return result == null + ? com.google.devicesandservices.health.v4.Settings.HeightUnit.UNRECOGNIZED + : result; + } + + public static final int LANGUAGE_LOCALE_FIELD_NUMBER = 9; + + @SuppressWarnings("serial") + private volatile java.lang.Object languageLocale_ = ""; + + /** + * + * + *
+   * Optional. The locale defined in the user's account settings.
+   *
+   * Updates to this field are currently not supported.
+   * 
+ * + * string language_locale = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The languageLocale. + */ + @java.lang.Override + public java.lang.String getLanguageLocale() { + java.lang.Object ref = languageLocale_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageLocale_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The locale defined in the user's account settings.
+   *
+   * Updates to this field are currently not supported.
+   * 
+ * + * string language_locale = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for languageLocale. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLanguageLocaleBytes() { + java.lang.Object ref = languageLocale_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageLocale_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UTC_OFFSET_FIELD_NUMBER = 10; + private com.google.protobuf.Duration utcOffset_; + + /** + * + * + *
+   * Optional. The user's timezone offset relative to UTC.
+   *
+   * Updates to this field are currently not supported.
+   * 
+ * + * .google.protobuf.Duration utc_offset = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the utcOffset field is set. + */ + @java.lang.Override + public boolean hasUtcOffset() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Optional. The user's timezone offset relative to UTC.
+   *
+   * Updates to this field are currently not supported.
+   * 
+ * + * .google.protobuf.Duration utc_offset = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The utcOffset. + */ + @java.lang.Override + public com.google.protobuf.Duration getUtcOffset() { + return utcOffset_ == null ? com.google.protobuf.Duration.getDefaultInstance() : utcOffset_; + } + + /** + * + * + *
+   * Optional. The user's timezone offset relative to UTC.
+   *
+   * Updates to this field are currently not supported.
+   * 
+ * + * .google.protobuf.Duration utc_offset = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getUtcOffsetOrBuilder() { + return utcOffset_ == null ? com.google.protobuf.Duration.getDefaultInstance() : utcOffset_; + } + + public static final int STRIDE_LENGTH_WALKING_TYPE_FIELD_NUMBER = 13; + private int strideLengthWalkingType_ = 0; + + /** + * + * + *
+   * Optional. The stride length type defined in the user's account settings for
+   * walking.
+   *
+   * Updates to this field are currently not supported.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Settings.StrideLengthType stride_length_walking_type = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for strideLengthWalkingType. + */ + @java.lang.Override + public int getStrideLengthWalkingTypeValue() { + return strideLengthWalkingType_; + } + + /** + * + * + *
+   * Optional. The stride length type defined in the user's account settings for
+   * walking.
+   *
+   * Updates to this field are currently not supported.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Settings.StrideLengthType stride_length_walking_type = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The strideLengthWalkingType. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Settings.StrideLengthType + getStrideLengthWalkingType() { + com.google.devicesandservices.health.v4.Settings.StrideLengthType result = + com.google.devicesandservices.health.v4.Settings.StrideLengthType.forNumber( + strideLengthWalkingType_); + return result == null + ? com.google.devicesandservices.health.v4.Settings.StrideLengthType.UNRECOGNIZED + : result; + } + + public static final int STRIDE_LENGTH_RUNNING_TYPE_FIELD_NUMBER = 14; + private int strideLengthRunningType_ = 0; + + /** + * + * + *
+   * Optional. The stride length type defined in the user's account settings for
+   * running.
+   *
+   * Updates to this field are currently not supported.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Settings.StrideLengthType stride_length_running_type = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for strideLengthRunningType. + */ + @java.lang.Override + public int getStrideLengthRunningTypeValue() { + return strideLengthRunningType_; + } + + /** + * + * + *
+   * Optional. The stride length type defined in the user's account settings for
+   * running.
+   *
+   * Updates to this field are currently not supported.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Settings.StrideLengthType stride_length_running_type = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The strideLengthRunningType. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Settings.StrideLengthType + getStrideLengthRunningType() { + com.google.devicesandservices.health.v4.Settings.StrideLengthType result = + com.google.devicesandservices.health.v4.Settings.StrideLengthType.forNumber( + strideLengthRunningType_); + return result == null + ? com.google.devicesandservices.health.v4.Settings.StrideLengthType.UNRECOGNIZED + : result; + } + + public static final int SWIM_UNIT_FIELD_NUMBER = 15; + private int swimUnit_ = 0; + + /** + * + * + *
+   * Optional. The measurement unit defined in the user's account settings.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Settings.SwimUnit swim_unit = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for swimUnit. + */ + @java.lang.Override + public int getSwimUnitValue() { + return swimUnit_; + } + + /** + * + * + *
+   * Optional. The measurement unit defined in the user's account settings.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Settings.SwimUnit swim_unit = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The swimUnit. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Settings.SwimUnit getSwimUnit() { + com.google.devicesandservices.health.v4.Settings.SwimUnit result = + com.google.devicesandservices.health.v4.Settings.SwimUnit.forNumber(swimUnit_); + return result == null + ? com.google.devicesandservices.health.v4.Settings.SwimUnit.UNRECOGNIZED + : result; + } + + public static final int TEMPERATURE_UNIT_FIELD_NUMBER = 16; + private int temperatureUnit_ = 0; + + /** + * + * + *
+   * Optional. The measurement unit defined in the user's account settings.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Settings.TemperatureUnit temperature_unit = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for temperatureUnit. + */ + @java.lang.Override + public int getTemperatureUnitValue() { + return temperatureUnit_; + } + + /** + * + * + *
+   * Optional. The measurement unit defined in the user's account settings.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Settings.TemperatureUnit temperature_unit = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The temperatureUnit. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Settings.TemperatureUnit getTemperatureUnit() { + com.google.devicesandservices.health.v4.Settings.TemperatureUnit result = + com.google.devicesandservices.health.v4.Settings.TemperatureUnit.forNumber( + temperatureUnit_); + return result == null + ? com.google.devicesandservices.health.v4.Settings.TemperatureUnit.UNRECOGNIZED + : result; + } + + public static final int TIME_ZONE_FIELD_NUMBER = 17; + + @SuppressWarnings("serial") + private volatile java.lang.Object timeZone_ = ""; + + /** + * + * + *
+   * Optional. The timezone defined in the user's account settings. This follows
+   * the IANA [Time Zone Database](https://www.iana.org/time-zones).
+   *
+   * Updates to this field are currently not supported.
+   * 
+ * + * string time_zone = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The timeZone. + */ + @java.lang.Override + public java.lang.String getTimeZone() { + java.lang.Object ref = timeZone_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + timeZone_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The timezone defined in the user's account settings. This follows
+   * the IANA [Time Zone Database](https://www.iana.org/time-zones).
+   *
+   * Updates to this field are currently not supported.
+   * 
+ * + * string time_zone = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for timeZone. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTimeZoneBytes() { + java.lang.Object ref = timeZone_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + timeZone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int WEIGHT_UNIT_FIELD_NUMBER = 18; + private int weightUnit_ = 0; + + /** + * + * + *
+   * Optional. The measurement unit defined in the user's account settings.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Settings.WeightUnit weight_unit = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for weightUnit. + */ + @java.lang.Override + public int getWeightUnitValue() { + return weightUnit_; + } + + /** + * + * + *
+   * Optional. The measurement unit defined in the user's account settings.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Settings.WeightUnit weight_unit = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The weightUnit. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Settings.WeightUnit getWeightUnit() { + com.google.devicesandservices.health.v4.Settings.WeightUnit result = + com.google.devicesandservices.health.v4.Settings.WeightUnit.forNumber(weightUnit_); + return result == null + ? com.google.devicesandservices.health.v4.Settings.WeightUnit.UNRECOGNIZED + : result; + } + + public static final int WATER_UNIT_FIELD_NUMBER = 19; + private int waterUnit_ = 0; + + /** + * + * + *
+   * Optional. The measurement unit defined in the user's account settings.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Settings.WaterUnit water_unit = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for waterUnit. + */ + @java.lang.Override + public int getWaterUnitValue() { + return waterUnit_; + } + + /** + * + * + *
+   * Optional. The measurement unit defined in the user's account settings.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Settings.WaterUnit water_unit = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The waterUnit. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Settings.WaterUnit getWaterUnit() { + com.google.devicesandservices.health.v4.Settings.WaterUnit result = + com.google.devicesandservices.health.v4.Settings.WaterUnit.forNumber(waterUnit_); + return result == null + ? com.google.devicesandservices.health.v4.Settings.WaterUnit.UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (autoStrideEnabled_ != false) { + output.writeBool(2, autoStrideEnabled_); + } + if (distanceUnit_ + != com.google.devicesandservices.health.v4.Settings.DistanceUnit.DISTANCE_UNIT_UNSPECIFIED + .getNumber()) { + output.writeEnum(5, distanceUnit_); + } + if (glucoseUnit_ + != com.google.devicesandservices.health.v4.Settings.GlucoseUnit.GLUCOSE_UNIT_UNSPECIFIED + .getNumber()) { + output.writeEnum(7, glucoseUnit_); + } + if (heightUnit_ + != com.google.devicesandservices.health.v4.Settings.HeightUnit.HEIGHT_UNIT_UNSPECIFIED + .getNumber()) { + output.writeEnum(8, heightUnit_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(languageLocale_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 9, languageLocale_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(10, getUtcOffset()); + } + if (strideLengthWalkingType_ + != com.google.devicesandservices.health.v4.Settings.StrideLengthType + .STRIDE_LENGTH_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(13, strideLengthWalkingType_); + } + if (strideLengthRunningType_ + != com.google.devicesandservices.health.v4.Settings.StrideLengthType + .STRIDE_LENGTH_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(14, strideLengthRunningType_); + } + if (swimUnit_ + != com.google.devicesandservices.health.v4.Settings.SwimUnit.SWIM_UNIT_UNSPECIFIED + .getNumber()) { + output.writeEnum(15, swimUnit_); + } + if (temperatureUnit_ + != com.google.devicesandservices.health.v4.Settings.TemperatureUnit + .TEMPERATURE_UNIT_UNSPECIFIED + .getNumber()) { + output.writeEnum(16, temperatureUnit_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(timeZone_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 17, timeZone_); + } + if (weightUnit_ + != com.google.devicesandservices.health.v4.Settings.WeightUnit.WEIGHT_UNIT_UNSPECIFIED + .getNumber()) { + output.writeEnum(18, weightUnit_); + } + if (waterUnit_ + != com.google.devicesandservices.health.v4.Settings.WaterUnit.WATER_UNIT_UNSPECIFIED + .getNumber()) { + output.writeEnum(19, waterUnit_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (autoStrideEnabled_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, autoStrideEnabled_); + } + if (distanceUnit_ + != com.google.devicesandservices.health.v4.Settings.DistanceUnit.DISTANCE_UNIT_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, distanceUnit_); + } + if (glucoseUnit_ + != com.google.devicesandservices.health.v4.Settings.GlucoseUnit.GLUCOSE_UNIT_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(7, glucoseUnit_); + } + if (heightUnit_ + != com.google.devicesandservices.health.v4.Settings.HeightUnit.HEIGHT_UNIT_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(8, heightUnit_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(languageLocale_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(9, languageLocale_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getUtcOffset()); + } + if (strideLengthWalkingType_ + != com.google.devicesandservices.health.v4.Settings.StrideLengthType + .STRIDE_LENGTH_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(13, strideLengthWalkingType_); + } + if (strideLengthRunningType_ + != com.google.devicesandservices.health.v4.Settings.StrideLengthType + .STRIDE_LENGTH_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(14, strideLengthRunningType_); + } + if (swimUnit_ + != com.google.devicesandservices.health.v4.Settings.SwimUnit.SWIM_UNIT_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(15, swimUnit_); + } + if (temperatureUnit_ + != com.google.devicesandservices.health.v4.Settings.TemperatureUnit + .TEMPERATURE_UNIT_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(16, temperatureUnit_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(timeZone_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(17, timeZone_); + } + if (weightUnit_ + != com.google.devicesandservices.health.v4.Settings.WeightUnit.WEIGHT_UNIT_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(18, weightUnit_); + } + if (waterUnit_ + != com.google.devicesandservices.health.v4.Settings.WaterUnit.WATER_UNIT_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(19, waterUnit_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.Settings)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.Settings other = + (com.google.devicesandservices.health.v4.Settings) obj; + + if (!getName().equals(other.getName())) return false; + if (getAutoStrideEnabled() != other.getAutoStrideEnabled()) return false; + if (distanceUnit_ != other.distanceUnit_) return false; + if (glucoseUnit_ != other.glucoseUnit_) return false; + if (heightUnit_ != other.heightUnit_) return false; + if (!getLanguageLocale().equals(other.getLanguageLocale())) return false; + if (hasUtcOffset() != other.hasUtcOffset()) return false; + if (hasUtcOffset()) { + if (!getUtcOffset().equals(other.getUtcOffset())) return false; + } + if (strideLengthWalkingType_ != other.strideLengthWalkingType_) return false; + if (strideLengthRunningType_ != other.strideLengthRunningType_) return false; + if (swimUnit_ != other.swimUnit_) return false; + if (temperatureUnit_ != other.temperatureUnit_) return false; + if (!getTimeZone().equals(other.getTimeZone())) return false; + if (weightUnit_ != other.weightUnit_) return false; + if (waterUnit_ != other.waterUnit_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + AUTO_STRIDE_ENABLED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAutoStrideEnabled()); + hash = (37 * hash) + DISTANCE_UNIT_FIELD_NUMBER; + hash = (53 * hash) + distanceUnit_; + hash = (37 * hash) + GLUCOSE_UNIT_FIELD_NUMBER; + hash = (53 * hash) + glucoseUnit_; + hash = (37 * hash) + HEIGHT_UNIT_FIELD_NUMBER; + hash = (53 * hash) + heightUnit_; + hash = (37 * hash) + LANGUAGE_LOCALE_FIELD_NUMBER; + hash = (53 * hash) + getLanguageLocale().hashCode(); + if (hasUtcOffset()) { + hash = (37 * hash) + UTC_OFFSET_FIELD_NUMBER; + hash = (53 * hash) + getUtcOffset().hashCode(); + } + hash = (37 * hash) + STRIDE_LENGTH_WALKING_TYPE_FIELD_NUMBER; + hash = (53 * hash) + strideLengthWalkingType_; + hash = (37 * hash) + STRIDE_LENGTH_RUNNING_TYPE_FIELD_NUMBER; + hash = (53 * hash) + strideLengthRunningType_; + hash = (37 * hash) + SWIM_UNIT_FIELD_NUMBER; + hash = (53 * hash) + swimUnit_; + hash = (37 * hash) + TEMPERATURE_UNIT_FIELD_NUMBER; + hash = (53 * hash) + temperatureUnit_; + hash = (37 * hash) + TIME_ZONE_FIELD_NUMBER; + hash = (53 * hash) + getTimeZone().hashCode(); + hash = (37 * hash) + WEIGHT_UNIT_FIELD_NUMBER; + hash = (53 * hash) + weightUnit_; + hash = (37 * hash) + WATER_UNIT_FIELD_NUMBER; + hash = (53 * hash) + waterUnit_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.Settings parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.Settings parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Settings parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.Settings parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Settings parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.Settings parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Settings parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.Settings parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Settings parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.Settings parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Settings parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.Settings parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.devicesandservices.health.v4.Settings prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Settings details.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.Settings} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.Settings) + com.google.devicesandservices.health.v4.SettingsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.HealthProfileProto + .internal_static_google_devicesandservices_health_v4_Settings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.HealthProfileProto + .internal_static_google_devicesandservices_health_v4_Settings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.Settings.class, + com.google.devicesandservices.health.v4.Settings.Builder.class); + } + + // Construct using com.google.devicesandservices.health.v4.Settings.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetUtcOffsetFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + autoStrideEnabled_ = false; + distanceUnit_ = 0; + glucoseUnit_ = 0; + heightUnit_ = 0; + languageLocale_ = ""; + utcOffset_ = null; + if (utcOffsetBuilder_ != null) { + utcOffsetBuilder_.dispose(); + utcOffsetBuilder_ = null; + } + strideLengthWalkingType_ = 0; + strideLengthRunningType_ = 0; + swimUnit_ = 0; + temperatureUnit_ = 0; + timeZone_ = ""; + weightUnit_ = 0; + waterUnit_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.HealthProfileProto + .internal_static_google_devicesandservices_health_v4_Settings_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.Settings getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.Settings.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.Settings build() { + com.google.devicesandservices.health.v4.Settings result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.Settings buildPartial() { + com.google.devicesandservices.health.v4.Settings result = + new com.google.devicesandservices.health.v4.Settings(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.devicesandservices.health.v4.Settings result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.autoStrideEnabled_ = autoStrideEnabled_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.distanceUnit_ = distanceUnit_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.glucoseUnit_ = glucoseUnit_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.heightUnit_ = heightUnit_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.languageLocale_ = languageLocale_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000040) != 0)) { + result.utcOffset_ = utcOffsetBuilder_ == null ? utcOffset_ : utcOffsetBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.strideLengthWalkingType_ = strideLengthWalkingType_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.strideLengthRunningType_ = strideLengthRunningType_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.swimUnit_ = swimUnit_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.temperatureUnit_ = temperatureUnit_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.timeZone_ = timeZone_; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.weightUnit_ = weightUnit_; + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.waterUnit_ = waterUnit_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.Settings) { + return mergeFrom((com.google.devicesandservices.health.v4.Settings) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.devicesandservices.health.v4.Settings other) { + if (other == com.google.devicesandservices.health.v4.Settings.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getAutoStrideEnabled() != false) { + setAutoStrideEnabled(other.getAutoStrideEnabled()); + } + if (other.distanceUnit_ != 0) { + setDistanceUnitValue(other.getDistanceUnitValue()); + } + if (other.glucoseUnit_ != 0) { + setGlucoseUnitValue(other.getGlucoseUnitValue()); + } + if (other.heightUnit_ != 0) { + setHeightUnitValue(other.getHeightUnitValue()); + } + if (!other.getLanguageLocale().isEmpty()) { + languageLocale_ = other.languageLocale_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (other.hasUtcOffset()) { + mergeUtcOffset(other.getUtcOffset()); + } + if (other.strideLengthWalkingType_ != 0) { + setStrideLengthWalkingTypeValue(other.getStrideLengthWalkingTypeValue()); + } + if (other.strideLengthRunningType_ != 0) { + setStrideLengthRunningTypeValue(other.getStrideLengthRunningTypeValue()); + } + if (other.swimUnit_ != 0) { + setSwimUnitValue(other.getSwimUnitValue()); + } + if (other.temperatureUnit_ != 0) { + setTemperatureUnitValue(other.getTemperatureUnitValue()); + } + if (!other.getTimeZone().isEmpty()) { + timeZone_ = other.timeZone_; + bitField0_ |= 0x00000800; + onChanged(); + } + if (other.weightUnit_ != 0) { + setWeightUnitValue(other.getWeightUnitValue()); + } + if (other.waterUnit_ != 0) { + setWaterUnitValue(other.getWaterUnitValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + autoStrideEnabled_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 40: + { + distanceUnit_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 40 + case 56: + { + glucoseUnit_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 56 + case 64: + { + heightUnit_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } // case 64 + case 74: + { + languageLocale_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 74 + case 82: + { + input.readMessage( + internalGetUtcOffsetFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 82 + case 104: + { + strideLengthWalkingType_ = input.readEnum(); + bitField0_ |= 0x00000080; + break; + } // case 104 + case 112: + { + strideLengthRunningType_ = input.readEnum(); + bitField0_ |= 0x00000100; + break; + } // case 112 + case 120: + { + swimUnit_ = input.readEnum(); + bitField0_ |= 0x00000200; + break; + } // case 120 + case 128: + { + temperatureUnit_ = input.readEnum(); + bitField0_ |= 0x00000400; + break; + } // case 128 + case 138: + { + timeZone_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000800; + break; + } // case 138 + case 144: + { + weightUnit_ = input.readEnum(); + bitField0_ |= 0x00001000; + break; + } // case 144 + case 152: + { + waterUnit_ = input.readEnum(); + bitField0_ |= 0x00002000; + break; + } // case 152 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Identifier. The resource name of this Settings resource.
+     *
+     * Format: `users/{user}/settings`
+     * Example: `users/1234567890/settings` or `users/me/settings`
+     * The {user} ID is a system-generated Google Health API user ID, a string of
+     * 1-63 characters consisting of lowercase and uppercase letters, numbers, and
+     * hyphens. The literal `me` can also be used to refer to the authenticated
+     * user.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Identifier. The resource name of this Settings resource.
+     *
+     * Format: `users/{user}/settings`
+     * Example: `users/1234567890/settings` or `users/me/settings`
+     * The {user} ID is a system-generated Google Health API user ID, a string of
+     * 1-63 characters consisting of lowercase and uppercase letters, numbers, and
+     * hyphens. The literal `me` can also be used to refer to the authenticated
+     * user.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Identifier. The resource name of this Settings resource.
+     *
+     * Format: `users/{user}/settings`
+     * Example: `users/1234567890/settings` or `users/me/settings`
+     * The {user} ID is a system-generated Google Health API user ID, a string of
+     * 1-63 characters consisting of lowercase and uppercase letters, numbers, and
+     * hyphens. The literal `me` can also be used to refer to the authenticated
+     * user.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. The resource name of this Settings resource.
+     *
+     * Format: `users/{user}/settings`
+     * Example: `users/1234567890/settings` or `users/me/settings`
+     * The {user} ID is a system-generated Google Health API user ID, a string of
+     * 1-63 characters consisting of lowercase and uppercase letters, numbers, and
+     * hyphens. The literal `me` can also be used to refer to the authenticated
+     * user.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. The resource name of this Settings resource.
+     *
+     * Format: `users/{user}/settings`
+     * Example: `users/1234567890/settings` or `users/me/settings`
+     * The {user} ID is a system-generated Google Health API user ID, a string of
+     * 1-63 characters consisting of lowercase and uppercase letters, numbers, and
+     * hyphens. The literal `me` can also be used to refer to the authenticated
+     * user.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private boolean autoStrideEnabled_; + + /** + * + * + *
+     * Optional. True if the user's stride length is determined automatically.
+     *
+     * Updates to this field are currently not supported.
+     * 
+ * + * bool auto_stride_enabled = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The autoStrideEnabled. + */ + @java.lang.Override + public boolean getAutoStrideEnabled() { + return autoStrideEnabled_; + } + + /** + * + * + *
+     * Optional. True if the user's stride length is determined automatically.
+     *
+     * Updates to this field are currently not supported.
+     * 
+ * + * bool auto_stride_enabled = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The autoStrideEnabled to set. + * @return This builder for chaining. + */ + public Builder setAutoStrideEnabled(boolean value) { + + autoStrideEnabled_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. True if the user's stride length is determined automatically.
+     *
+     * Updates to this field are currently not supported.
+     * 
+ * + * bool auto_stride_enabled = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearAutoStrideEnabled() { + bitField0_ = (bitField0_ & ~0x00000002); + autoStrideEnabled_ = false; + onChanged(); + return this; + } + + private int distanceUnit_ = 0; + + /** + * + * + *
+     * Optional. The measurement unit defined in the user's account settings.
+     *
+     * Updates to this field are currently not supported.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Settings.DistanceUnit distance_unit = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for distanceUnit. + */ + @java.lang.Override + public int getDistanceUnitValue() { + return distanceUnit_; + } + + /** + * + * + *
+     * Optional. The measurement unit defined in the user's account settings.
+     *
+     * Updates to this field are currently not supported.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Settings.DistanceUnit distance_unit = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for distanceUnit to set. + * @return This builder for chaining. + */ + public Builder setDistanceUnitValue(int value) { + distanceUnit_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The measurement unit defined in the user's account settings.
+     *
+     * Updates to this field are currently not supported.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Settings.DistanceUnit distance_unit = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The distanceUnit. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Settings.DistanceUnit getDistanceUnit() { + com.google.devicesandservices.health.v4.Settings.DistanceUnit result = + com.google.devicesandservices.health.v4.Settings.DistanceUnit.forNumber(distanceUnit_); + return result == null + ? com.google.devicesandservices.health.v4.Settings.DistanceUnit.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Optional. The measurement unit defined in the user's account settings.
+     *
+     * Updates to this field are currently not supported.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Settings.DistanceUnit distance_unit = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The distanceUnit to set. + * @return This builder for chaining. + */ + public Builder setDistanceUnit( + com.google.devicesandservices.health.v4.Settings.DistanceUnit value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + distanceUnit_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The measurement unit defined in the user's account settings.
+     *
+     * Updates to this field are currently not supported.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Settings.DistanceUnit distance_unit = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearDistanceUnit() { + bitField0_ = (bitField0_ & ~0x00000004); + distanceUnit_ = 0; + onChanged(); + return this; + } + + private int glucoseUnit_ = 0; + + /** + * + * + *
+     * Optional. The measurement unit defined in the user's account settings.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Settings.GlucoseUnit glucose_unit = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for glucoseUnit. + */ + @java.lang.Override + public int getGlucoseUnitValue() { + return glucoseUnit_; + } + + /** + * + * + *
+     * Optional. The measurement unit defined in the user's account settings.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Settings.GlucoseUnit glucose_unit = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for glucoseUnit to set. + * @return This builder for chaining. + */ + public Builder setGlucoseUnitValue(int value) { + glucoseUnit_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The measurement unit defined in the user's account settings.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Settings.GlucoseUnit glucose_unit = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The glucoseUnit. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Settings.GlucoseUnit getGlucoseUnit() { + com.google.devicesandservices.health.v4.Settings.GlucoseUnit result = + com.google.devicesandservices.health.v4.Settings.GlucoseUnit.forNumber(glucoseUnit_); + return result == null + ? com.google.devicesandservices.health.v4.Settings.GlucoseUnit.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Optional. The measurement unit defined in the user's account settings.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Settings.GlucoseUnit glucose_unit = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The glucoseUnit to set. + * @return This builder for chaining. + */ + public Builder setGlucoseUnit( + com.google.devicesandservices.health.v4.Settings.GlucoseUnit value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + glucoseUnit_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The measurement unit defined in the user's account settings.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Settings.GlucoseUnit glucose_unit = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearGlucoseUnit() { + bitField0_ = (bitField0_ & ~0x00000008); + glucoseUnit_ = 0; + onChanged(); + return this; + } + + private int heightUnit_ = 0; + + /** + * + * + *
+     * Optional. The measurement unit defined in the user's account settings.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Settings.HeightUnit height_unit = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for heightUnit. + */ + @java.lang.Override + public int getHeightUnitValue() { + return heightUnit_; + } + + /** + * + * + *
+     * Optional. The measurement unit defined in the user's account settings.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Settings.HeightUnit height_unit = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for heightUnit to set. + * @return This builder for chaining. + */ + public Builder setHeightUnitValue(int value) { + heightUnit_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The measurement unit defined in the user's account settings.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Settings.HeightUnit height_unit = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The heightUnit. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Settings.HeightUnit getHeightUnit() { + com.google.devicesandservices.health.v4.Settings.HeightUnit result = + com.google.devicesandservices.health.v4.Settings.HeightUnit.forNumber(heightUnit_); + return result == null + ? com.google.devicesandservices.health.v4.Settings.HeightUnit.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Optional. The measurement unit defined in the user's account settings.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Settings.HeightUnit height_unit = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The heightUnit to set. + * @return This builder for chaining. + */ + public Builder setHeightUnit( + com.google.devicesandservices.health.v4.Settings.HeightUnit value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + heightUnit_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The measurement unit defined in the user's account settings.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Settings.HeightUnit height_unit = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearHeightUnit() { + bitField0_ = (bitField0_ & ~0x00000010); + heightUnit_ = 0; + onChanged(); + return this; + } + + private java.lang.Object languageLocale_ = ""; + + /** + * + * + *
+     * Optional. The locale defined in the user's account settings.
+     *
+     * Updates to this field are currently not supported.
+     * 
+ * + * string language_locale = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The languageLocale. + */ + public java.lang.String getLanguageLocale() { + java.lang.Object ref = languageLocale_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageLocale_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The locale defined in the user's account settings.
+     *
+     * Updates to this field are currently not supported.
+     * 
+ * + * string language_locale = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for languageLocale. + */ + public com.google.protobuf.ByteString getLanguageLocaleBytes() { + java.lang.Object ref = languageLocale_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageLocale_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The locale defined in the user's account settings.
+     *
+     * Updates to this field are currently not supported.
+     * 
+ * + * string language_locale = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The languageLocale to set. + * @return This builder for chaining. + */ + public Builder setLanguageLocale(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + languageLocale_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The locale defined in the user's account settings.
+     *
+     * Updates to this field are currently not supported.
+     * 
+ * + * string language_locale = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearLanguageLocale() { + languageLocale_ = getDefaultInstance().getLanguageLocale(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The locale defined in the user's account settings.
+     *
+     * Updates to this field are currently not supported.
+     * 
+ * + * string language_locale = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for languageLocale to set. + * @return This builder for chaining. + */ + public Builder setLanguageLocaleBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + languageLocale_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private com.google.protobuf.Duration utcOffset_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + utcOffsetBuilder_; + + /** + * + * + *
+     * Optional. The user's timezone offset relative to UTC.
+     *
+     * Updates to this field are currently not supported.
+     * 
+ * + * .google.protobuf.Duration utc_offset = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the utcOffset field is set. + */ + public boolean hasUtcOffset() { + return ((bitField0_ & 0x00000040) != 0); + } + + /** + * + * + *
+     * Optional. The user's timezone offset relative to UTC.
+     *
+     * Updates to this field are currently not supported.
+     * 
+ * + * .google.protobuf.Duration utc_offset = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The utcOffset. + */ + public com.google.protobuf.Duration getUtcOffset() { + if (utcOffsetBuilder_ == null) { + return utcOffset_ == null ? com.google.protobuf.Duration.getDefaultInstance() : utcOffset_; + } else { + return utcOffsetBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. The user's timezone offset relative to UTC.
+     *
+     * Updates to this field are currently not supported.
+     * 
+ * + * .google.protobuf.Duration utc_offset = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUtcOffset(com.google.protobuf.Duration value) { + if (utcOffsetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + utcOffset_ = value; + } else { + utcOffsetBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The user's timezone offset relative to UTC.
+     *
+     * Updates to this field are currently not supported.
+     * 
+ * + * .google.protobuf.Duration utc_offset = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUtcOffset(com.google.protobuf.Duration.Builder builderForValue) { + if (utcOffsetBuilder_ == null) { + utcOffset_ = builderForValue.build(); + } else { + utcOffsetBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The user's timezone offset relative to UTC.
+     *
+     * Updates to this field are currently not supported.
+     * 
+ * + * .google.protobuf.Duration utc_offset = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeUtcOffset(com.google.protobuf.Duration value) { + if (utcOffsetBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && utcOffset_ != null + && utcOffset_ != com.google.protobuf.Duration.getDefaultInstance()) { + getUtcOffsetBuilder().mergeFrom(value); + } else { + utcOffset_ = value; + } + } else { + utcOffsetBuilder_.mergeFrom(value); + } + if (utcOffset_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. The user's timezone offset relative to UTC.
+     *
+     * Updates to this field are currently not supported.
+     * 
+ * + * .google.protobuf.Duration utc_offset = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearUtcOffset() { + bitField0_ = (bitField0_ & ~0x00000040); + utcOffset_ = null; + if (utcOffsetBuilder_ != null) { + utcOffsetBuilder_.dispose(); + utcOffsetBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The user's timezone offset relative to UTC.
+     *
+     * Updates to this field are currently not supported.
+     * 
+ * + * .google.protobuf.Duration utc_offset = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Duration.Builder getUtcOffsetBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return internalGetUtcOffsetFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. The user's timezone offset relative to UTC.
+     *
+     * Updates to this field are currently not supported.
+     * 
+ * + * .google.protobuf.Duration utc_offset = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.DurationOrBuilder getUtcOffsetOrBuilder() { + if (utcOffsetBuilder_ != null) { + return utcOffsetBuilder_.getMessageOrBuilder(); + } else { + return utcOffset_ == null ? com.google.protobuf.Duration.getDefaultInstance() : utcOffset_; + } + } + + /** + * + * + *
+     * Optional. The user's timezone offset relative to UTC.
+     *
+     * Updates to this field are currently not supported.
+     * 
+ * + * .google.protobuf.Duration utc_offset = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + internalGetUtcOffsetFieldBuilder() { + if (utcOffsetBuilder_ == null) { + utcOffsetBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getUtcOffset(), getParentForChildren(), isClean()); + utcOffset_ = null; + } + return utcOffsetBuilder_; + } + + private int strideLengthWalkingType_ = 0; + + /** + * + * + *
+     * Optional. The stride length type defined in the user's account settings for
+     * walking.
+     *
+     * Updates to this field are currently not supported.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Settings.StrideLengthType stride_length_walking_type = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for strideLengthWalkingType. + */ + @java.lang.Override + public int getStrideLengthWalkingTypeValue() { + return strideLengthWalkingType_; + } + + /** + * + * + *
+     * Optional. The stride length type defined in the user's account settings for
+     * walking.
+     *
+     * Updates to this field are currently not supported.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Settings.StrideLengthType stride_length_walking_type = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for strideLengthWalkingType to set. + * @return This builder for chaining. + */ + public Builder setStrideLengthWalkingTypeValue(int value) { + strideLengthWalkingType_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The stride length type defined in the user's account settings for
+     * walking.
+     *
+     * Updates to this field are currently not supported.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Settings.StrideLengthType stride_length_walking_type = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The strideLengthWalkingType. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Settings.StrideLengthType + getStrideLengthWalkingType() { + com.google.devicesandservices.health.v4.Settings.StrideLengthType result = + com.google.devicesandservices.health.v4.Settings.StrideLengthType.forNumber( + strideLengthWalkingType_); + return result == null + ? com.google.devicesandservices.health.v4.Settings.StrideLengthType.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Optional. The stride length type defined in the user's account settings for
+     * walking.
+     *
+     * Updates to this field are currently not supported.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Settings.StrideLengthType stride_length_walking_type = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The strideLengthWalkingType to set. + * @return This builder for chaining. + */ + public Builder setStrideLengthWalkingType( + com.google.devicesandservices.health.v4.Settings.StrideLengthType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000080; + strideLengthWalkingType_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The stride length type defined in the user's account settings for
+     * walking.
+     *
+     * Updates to this field are currently not supported.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Settings.StrideLengthType stride_length_walking_type = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearStrideLengthWalkingType() { + bitField0_ = (bitField0_ & ~0x00000080); + strideLengthWalkingType_ = 0; + onChanged(); + return this; + } + + private int strideLengthRunningType_ = 0; + + /** + * + * + *
+     * Optional. The stride length type defined in the user's account settings for
+     * running.
+     *
+     * Updates to this field are currently not supported.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Settings.StrideLengthType stride_length_running_type = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for strideLengthRunningType. + */ + @java.lang.Override + public int getStrideLengthRunningTypeValue() { + return strideLengthRunningType_; + } + + /** + * + * + *
+     * Optional. The stride length type defined in the user's account settings for
+     * running.
+     *
+     * Updates to this field are currently not supported.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Settings.StrideLengthType stride_length_running_type = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for strideLengthRunningType to set. + * @return This builder for chaining. + */ + public Builder setStrideLengthRunningTypeValue(int value) { + strideLengthRunningType_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The stride length type defined in the user's account settings for
+     * running.
+     *
+     * Updates to this field are currently not supported.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Settings.StrideLengthType stride_length_running_type = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The strideLengthRunningType. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Settings.StrideLengthType + getStrideLengthRunningType() { + com.google.devicesandservices.health.v4.Settings.StrideLengthType result = + com.google.devicesandservices.health.v4.Settings.StrideLengthType.forNumber( + strideLengthRunningType_); + return result == null + ? com.google.devicesandservices.health.v4.Settings.StrideLengthType.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Optional. The stride length type defined in the user's account settings for
+     * running.
+     *
+     * Updates to this field are currently not supported.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Settings.StrideLengthType stride_length_running_type = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The strideLengthRunningType to set. + * @return This builder for chaining. + */ + public Builder setStrideLengthRunningType( + com.google.devicesandservices.health.v4.Settings.StrideLengthType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000100; + strideLengthRunningType_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The stride length type defined in the user's account settings for
+     * running.
+     *
+     * Updates to this field are currently not supported.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Settings.StrideLengthType stride_length_running_type = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearStrideLengthRunningType() { + bitField0_ = (bitField0_ & ~0x00000100); + strideLengthRunningType_ = 0; + onChanged(); + return this; + } + + private int swimUnit_ = 0; + + /** + * + * + *
+     * Optional. The measurement unit defined in the user's account settings.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Settings.SwimUnit swim_unit = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for swimUnit. + */ + @java.lang.Override + public int getSwimUnitValue() { + return swimUnit_; + } + + /** + * + * + *
+     * Optional. The measurement unit defined in the user's account settings.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Settings.SwimUnit swim_unit = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for swimUnit to set. + * @return This builder for chaining. + */ + public Builder setSwimUnitValue(int value) { + swimUnit_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The measurement unit defined in the user's account settings.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Settings.SwimUnit swim_unit = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The swimUnit. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Settings.SwimUnit getSwimUnit() { + com.google.devicesandservices.health.v4.Settings.SwimUnit result = + com.google.devicesandservices.health.v4.Settings.SwimUnit.forNumber(swimUnit_); + return result == null + ? com.google.devicesandservices.health.v4.Settings.SwimUnit.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Optional. The measurement unit defined in the user's account settings.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Settings.SwimUnit swim_unit = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The swimUnit to set. + * @return This builder for chaining. + */ + public Builder setSwimUnit(com.google.devicesandservices.health.v4.Settings.SwimUnit value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000200; + swimUnit_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The measurement unit defined in the user's account settings.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Settings.SwimUnit swim_unit = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearSwimUnit() { + bitField0_ = (bitField0_ & ~0x00000200); + swimUnit_ = 0; + onChanged(); + return this; + } + + private int temperatureUnit_ = 0; + + /** + * + * + *
+     * Optional. The measurement unit defined in the user's account settings.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Settings.TemperatureUnit temperature_unit = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for temperatureUnit. + */ + @java.lang.Override + public int getTemperatureUnitValue() { + return temperatureUnit_; + } + + /** + * + * + *
+     * Optional. The measurement unit defined in the user's account settings.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Settings.TemperatureUnit temperature_unit = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for temperatureUnit to set. + * @return This builder for chaining. + */ + public Builder setTemperatureUnitValue(int value) { + temperatureUnit_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The measurement unit defined in the user's account settings.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Settings.TemperatureUnit temperature_unit = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The temperatureUnit. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Settings.TemperatureUnit getTemperatureUnit() { + com.google.devicesandservices.health.v4.Settings.TemperatureUnit result = + com.google.devicesandservices.health.v4.Settings.TemperatureUnit.forNumber( + temperatureUnit_); + return result == null + ? com.google.devicesandservices.health.v4.Settings.TemperatureUnit.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Optional. The measurement unit defined in the user's account settings.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Settings.TemperatureUnit temperature_unit = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The temperatureUnit to set. + * @return This builder for chaining. + */ + public Builder setTemperatureUnit( + com.google.devicesandservices.health.v4.Settings.TemperatureUnit value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000400; + temperatureUnit_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The measurement unit defined in the user's account settings.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Settings.TemperatureUnit temperature_unit = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearTemperatureUnit() { + bitField0_ = (bitField0_ & ~0x00000400); + temperatureUnit_ = 0; + onChanged(); + return this; + } + + private java.lang.Object timeZone_ = ""; + + /** + * + * + *
+     * Optional. The timezone defined in the user's account settings. This follows
+     * the IANA [Time Zone Database](https://www.iana.org/time-zones).
+     *
+     * Updates to this field are currently not supported.
+     * 
+ * + * string time_zone = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The timeZone. + */ + public java.lang.String getTimeZone() { + java.lang.Object ref = timeZone_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + timeZone_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The timezone defined in the user's account settings. This follows
+     * the IANA [Time Zone Database](https://www.iana.org/time-zones).
+     *
+     * Updates to this field are currently not supported.
+     * 
+ * + * string time_zone = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for timeZone. + */ + public com.google.protobuf.ByteString getTimeZoneBytes() { + java.lang.Object ref = timeZone_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + timeZone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The timezone defined in the user's account settings. This follows
+     * the IANA [Time Zone Database](https://www.iana.org/time-zones).
+     *
+     * Updates to this field are currently not supported.
+     * 
+ * + * string time_zone = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The timeZone to set. + * @return This builder for chaining. + */ + public Builder setTimeZone(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + timeZone_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The timezone defined in the user's account settings. This follows
+     * the IANA [Time Zone Database](https://www.iana.org/time-zones).
+     *
+     * Updates to this field are currently not supported.
+     * 
+ * + * string time_zone = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearTimeZone() { + timeZone_ = getDefaultInstance().getTimeZone(); + bitField0_ = (bitField0_ & ~0x00000800); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The timezone defined in the user's account settings. This follows
+     * the IANA [Time Zone Database](https://www.iana.org/time-zones).
+     *
+     * Updates to this field are currently not supported.
+     * 
+ * + * string time_zone = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for timeZone to set. + * @return This builder for chaining. + */ + public Builder setTimeZoneBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + timeZone_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + + private int weightUnit_ = 0; + + /** + * + * + *
+     * Optional. The measurement unit defined in the user's account settings.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Settings.WeightUnit weight_unit = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for weightUnit. + */ + @java.lang.Override + public int getWeightUnitValue() { + return weightUnit_; + } + + /** + * + * + *
+     * Optional. The measurement unit defined in the user's account settings.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Settings.WeightUnit weight_unit = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for weightUnit to set. + * @return This builder for chaining. + */ + public Builder setWeightUnitValue(int value) { + weightUnit_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The measurement unit defined in the user's account settings.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Settings.WeightUnit weight_unit = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The weightUnit. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Settings.WeightUnit getWeightUnit() { + com.google.devicesandservices.health.v4.Settings.WeightUnit result = + com.google.devicesandservices.health.v4.Settings.WeightUnit.forNumber(weightUnit_); + return result == null + ? com.google.devicesandservices.health.v4.Settings.WeightUnit.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Optional. The measurement unit defined in the user's account settings.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Settings.WeightUnit weight_unit = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The weightUnit to set. + * @return This builder for chaining. + */ + public Builder setWeightUnit( + com.google.devicesandservices.health.v4.Settings.WeightUnit value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00001000; + weightUnit_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The measurement unit defined in the user's account settings.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Settings.WeightUnit weight_unit = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearWeightUnit() { + bitField0_ = (bitField0_ & ~0x00001000); + weightUnit_ = 0; + onChanged(); + return this; + } + + private int waterUnit_ = 0; + + /** + * + * + *
+     * Optional. The measurement unit defined in the user's account settings.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Settings.WaterUnit water_unit = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for waterUnit. + */ + @java.lang.Override + public int getWaterUnitValue() { + return waterUnit_; + } + + /** + * + * + *
+     * Optional. The measurement unit defined in the user's account settings.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Settings.WaterUnit water_unit = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for waterUnit to set. + * @return This builder for chaining. + */ + public Builder setWaterUnitValue(int value) { + waterUnit_ = value; + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The measurement unit defined in the user's account settings.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Settings.WaterUnit water_unit = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The waterUnit. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Settings.WaterUnit getWaterUnit() { + com.google.devicesandservices.health.v4.Settings.WaterUnit result = + com.google.devicesandservices.health.v4.Settings.WaterUnit.forNumber(waterUnit_); + return result == null + ? com.google.devicesandservices.health.v4.Settings.WaterUnit.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Optional. The measurement unit defined in the user's account settings.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Settings.WaterUnit water_unit = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The waterUnit to set. + * @return This builder for chaining. + */ + public Builder setWaterUnit(com.google.devicesandservices.health.v4.Settings.WaterUnit value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00002000; + waterUnit_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The measurement unit defined in the user's account settings.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Settings.WaterUnit water_unit = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearWaterUnit() { + bitField0_ = (bitField0_ & ~0x00002000); + waterUnit_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.Settings) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.Settings) + private static final com.google.devicesandservices.health.v4.Settings DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.Settings(); + } + + public static com.google.devicesandservices.health.v4.Settings getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Settings parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.Settings getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/SettingsName.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/SettingsName.java new file mode 100644 index 000000000000..ea7815b2139f --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/SettingsName.java @@ -0,0 +1,168 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class SettingsName implements ResourceName { + private static final PathTemplate USER = + PathTemplate.createWithoutUrlEncoding("users/{user}/settings"); + private volatile Map fieldValuesMap; + private final String user; + + @Deprecated + protected SettingsName() { + user = null; + } + + private SettingsName(Builder builder) { + user = Preconditions.checkNotNull(builder.getUser()); + } + + public String getUser() { + return user; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static SettingsName of(String user) { + return newBuilder().setUser(user).build(); + } + + public static String format(String user) { + return newBuilder().setUser(user).build().toString(); + } + + public static SettingsName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + USER.validatedMatch( + formattedString, "SettingsName.parse: formattedString not in valid format"); + return of(matchMap.get("user")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (SettingsName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return USER.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (user != null) { + fieldMapBuilder.put("user", user); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return USER.instantiate("user", user); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + SettingsName that = ((SettingsName) o); + return Objects.equals(this.user, that.user); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(user); + return h; + } + + /** Builder for users/{user}/settings. */ + public static class Builder { + private String user; + + protected Builder() {} + + public String getUser() { + return user; + } + + public Builder setUser(String user) { + this.user = user; + return this; + } + + private Builder(SettingsName settingsName) { + this.user = settingsName.user; + } + + public SettingsName build() { + return new SettingsName(this); + } + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/SettingsOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/SettingsOrBuilder.java new file mode 100644 index 000000000000..937019b21a93 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/SettingsOrBuilder.java @@ -0,0 +1,477 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/health_profile.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface SettingsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.Settings) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Identifier. The resource name of this Settings resource.
+   *
+   * Format: `users/{user}/settings`
+   * Example: `users/1234567890/settings` or `users/me/settings`
+   * The {user} ID is a system-generated Google Health API user ID, a string of
+   * 1-63 characters consisting of lowercase and uppercase letters, numbers, and
+   * hyphens. The literal `me` can also be used to refer to the authenticated
+   * user.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Identifier. The resource name of this Settings resource.
+   *
+   * Format: `users/{user}/settings`
+   * Example: `users/1234567890/settings` or `users/me/settings`
+   * The {user} ID is a system-generated Google Health API user ID, a string of
+   * 1-63 characters consisting of lowercase and uppercase letters, numbers, and
+   * hyphens. The literal `me` can also be used to refer to the authenticated
+   * user.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. True if the user's stride length is determined automatically.
+   *
+   * Updates to this field are currently not supported.
+   * 
+ * + * bool auto_stride_enabled = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The autoStrideEnabled. + */ + boolean getAutoStrideEnabled(); + + /** + * + * + *
+   * Optional. The measurement unit defined in the user's account settings.
+   *
+   * Updates to this field are currently not supported.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Settings.DistanceUnit distance_unit = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for distanceUnit. + */ + int getDistanceUnitValue(); + + /** + * + * + *
+   * Optional. The measurement unit defined in the user's account settings.
+   *
+   * Updates to this field are currently not supported.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Settings.DistanceUnit distance_unit = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The distanceUnit. + */ + com.google.devicesandservices.health.v4.Settings.DistanceUnit getDistanceUnit(); + + /** + * + * + *
+   * Optional. The measurement unit defined in the user's account settings.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Settings.GlucoseUnit glucose_unit = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for glucoseUnit. + */ + int getGlucoseUnitValue(); + + /** + * + * + *
+   * Optional. The measurement unit defined in the user's account settings.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Settings.GlucoseUnit glucose_unit = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The glucoseUnit. + */ + com.google.devicesandservices.health.v4.Settings.GlucoseUnit getGlucoseUnit(); + + /** + * + * + *
+   * Optional. The measurement unit defined in the user's account settings.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Settings.HeightUnit height_unit = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for heightUnit. + */ + int getHeightUnitValue(); + + /** + * + * + *
+   * Optional. The measurement unit defined in the user's account settings.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Settings.HeightUnit height_unit = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The heightUnit. + */ + com.google.devicesandservices.health.v4.Settings.HeightUnit getHeightUnit(); + + /** + * + * + *
+   * Optional. The locale defined in the user's account settings.
+   *
+   * Updates to this field are currently not supported.
+   * 
+ * + * string language_locale = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The languageLocale. + */ + java.lang.String getLanguageLocale(); + + /** + * + * + *
+   * Optional. The locale defined in the user's account settings.
+   *
+   * Updates to this field are currently not supported.
+   * 
+ * + * string language_locale = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for languageLocale. + */ + com.google.protobuf.ByteString getLanguageLocaleBytes(); + + /** + * + * + *
+   * Optional. The user's timezone offset relative to UTC.
+   *
+   * Updates to this field are currently not supported.
+   * 
+ * + * .google.protobuf.Duration utc_offset = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the utcOffset field is set. + */ + boolean hasUtcOffset(); + + /** + * + * + *
+   * Optional. The user's timezone offset relative to UTC.
+   *
+   * Updates to this field are currently not supported.
+   * 
+ * + * .google.protobuf.Duration utc_offset = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The utcOffset. + */ + com.google.protobuf.Duration getUtcOffset(); + + /** + * + * + *
+   * Optional. The user's timezone offset relative to UTC.
+   *
+   * Updates to this field are currently not supported.
+   * 
+ * + * .google.protobuf.Duration utc_offset = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.DurationOrBuilder getUtcOffsetOrBuilder(); + + /** + * + * + *
+   * Optional. The stride length type defined in the user's account settings for
+   * walking.
+   *
+   * Updates to this field are currently not supported.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Settings.StrideLengthType stride_length_walking_type = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for strideLengthWalkingType. + */ + int getStrideLengthWalkingTypeValue(); + + /** + * + * + *
+   * Optional. The stride length type defined in the user's account settings for
+   * walking.
+   *
+   * Updates to this field are currently not supported.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Settings.StrideLengthType stride_length_walking_type = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The strideLengthWalkingType. + */ + com.google.devicesandservices.health.v4.Settings.StrideLengthType getStrideLengthWalkingType(); + + /** + * + * + *
+   * Optional. The stride length type defined in the user's account settings for
+   * running.
+   *
+   * Updates to this field are currently not supported.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Settings.StrideLengthType stride_length_running_type = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for strideLengthRunningType. + */ + int getStrideLengthRunningTypeValue(); + + /** + * + * + *
+   * Optional. The stride length type defined in the user's account settings for
+   * running.
+   *
+   * Updates to this field are currently not supported.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Settings.StrideLengthType stride_length_running_type = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The strideLengthRunningType. + */ + com.google.devicesandservices.health.v4.Settings.StrideLengthType getStrideLengthRunningType(); + + /** + * + * + *
+   * Optional. The measurement unit defined in the user's account settings.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Settings.SwimUnit swim_unit = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for swimUnit. + */ + int getSwimUnitValue(); + + /** + * + * + *
+   * Optional. The measurement unit defined in the user's account settings.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Settings.SwimUnit swim_unit = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The swimUnit. + */ + com.google.devicesandservices.health.v4.Settings.SwimUnit getSwimUnit(); + + /** + * + * + *
+   * Optional. The measurement unit defined in the user's account settings.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Settings.TemperatureUnit temperature_unit = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for temperatureUnit. + */ + int getTemperatureUnitValue(); + + /** + * + * + *
+   * Optional. The measurement unit defined in the user's account settings.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Settings.TemperatureUnit temperature_unit = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The temperatureUnit. + */ + com.google.devicesandservices.health.v4.Settings.TemperatureUnit getTemperatureUnit(); + + /** + * + * + *
+   * Optional. The timezone defined in the user's account settings. This follows
+   * the IANA [Time Zone Database](https://www.iana.org/time-zones).
+   *
+   * Updates to this field are currently not supported.
+   * 
+ * + * string time_zone = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The timeZone. + */ + java.lang.String getTimeZone(); + + /** + * + * + *
+   * Optional. The timezone defined in the user's account settings. This follows
+   * the IANA [Time Zone Database](https://www.iana.org/time-zones).
+   *
+   * Updates to this field are currently not supported.
+   * 
+ * + * string time_zone = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for timeZone. + */ + com.google.protobuf.ByteString getTimeZoneBytes(); + + /** + * + * + *
+   * Optional. The measurement unit defined in the user's account settings.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Settings.WeightUnit weight_unit = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for weightUnit. + */ + int getWeightUnitValue(); + + /** + * + * + *
+   * Optional. The measurement unit defined in the user's account settings.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Settings.WeightUnit weight_unit = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The weightUnit. + */ + com.google.devicesandservices.health.v4.Settings.WeightUnit getWeightUnit(); + + /** + * + * + *
+   * Optional. The measurement unit defined in the user's account settings.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Settings.WaterUnit water_unit = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for waterUnit. + */ + int getWaterUnitValue(); + + /** + * + * + *
+   * Optional. The measurement unit defined in the user's account settings.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Settings.WaterUnit water_unit = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The waterUnit. + */ + com.google.devicesandservices.health.v4.Settings.WaterUnit getWaterUnit(); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/Sleep.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/Sleep.java new file mode 100644 index 000000000000..e472f2a59894 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/Sleep.java @@ -0,0 +1,12582 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * A sleep session possibly including stages.
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.Sleep} + */ +@com.google.protobuf.Generated +public final class Sleep extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.Sleep) + SleepOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Sleep"); + } + + // Use Sleep.newBuilder() to construct. + private Sleep(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Sleep() { + type_ = 0; + stages_ = java.util.Collections.emptyList(); + outOfBedSegments_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_Sleep_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_Sleep_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.Sleep.class, + com.google.devicesandservices.health.v4.Sleep.Builder.class); + } + + /** + * + * + *
+   * Sleep type: classic or stages.
+   * 
+ * + * Protobuf enum {@code google.devicesandservices.health.v4.Sleep.SleepType} + */ + public enum SleepType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Sleep type is unspecified.
+     * 
+ * + * SLEEP_TYPE_UNSPECIFIED = 0; + */ + SLEEP_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Classic sleep is a sleep with 3 stages types: AWAKE, RESTLESS and ASLEEP.
+     * 
+ * + * CLASSIC = 1; + */ + CLASSIC(1), + /** + * + * + *
+     * On top of "classic" sleep stages an additional processing pass can
+     * calculate stages more precisely, overwriting the prior stages with AWAKE,
+     * LIGHT, REM and DEEP.
+     * 
+ * + * STAGES = 2; + */ + STAGES(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SleepType"); + } + + /** + * + * + *
+     * Sleep type is unspecified.
+     * 
+ * + * SLEEP_TYPE_UNSPECIFIED = 0; + */ + public static final int SLEEP_TYPE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Classic sleep is a sleep with 3 stages types: AWAKE, RESTLESS and ASLEEP.
+     * 
+ * + * CLASSIC = 1; + */ + public static final int CLASSIC_VALUE = 1; + + /** + * + * + *
+     * On top of "classic" sleep stages an additional processing pass can
+     * calculate stages more precisely, overwriting the prior stages with AWAKE,
+     * LIGHT, REM and DEEP.
+     * 
+ * + * STAGES = 2; + */ + public static final int STAGES_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static SleepType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static SleepType forNumber(int value) { + switch (value) { + case 0: + return SLEEP_TYPE_UNSPECIFIED; + case 1: + return CLASSIC; + case 2: + return STAGES; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public SleepType findValueByNumber(int number) { + return SleepType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.devicesandservices.health.v4.Sleep.getDescriptor().getEnumTypes().get(0); + } + + private static final SleepType[] VALUES = values(); + + public static SleepType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private SleepType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.devicesandservices.health.v4.Sleep.SleepType) + } + + /** + * + * + *
+   * Sleep stage type: AWAKE, DEEP, REM, LIGHT etc.
+   * 
+ * + * Protobuf enum {@code google.devicesandservices.health.v4.Sleep.SleepStageType} + */ + public enum SleepStageType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The default unset value.
+     * 
+ * + * SLEEP_STAGE_TYPE_UNSPECIFIED = 0; + */ + SLEEP_STAGE_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Sleep stage AWAKE.
+     * 
+ * + * AWAKE = 1; + */ + AWAKE(1), + /** + * + * + *
+     * Sleep stage LIGHT.
+     * 
+ * + * LIGHT = 2; + */ + LIGHT(2), + /** + * + * + *
+     * Sleep stage DEEP.
+     * 
+ * + * DEEP = 3; + */ + DEEP(3), + /** + * + * + *
+     * Sleep stage REM.
+     * 
+ * + * REM = 4; + */ + REM(4), + /** + * + * + *
+     * Sleep stage ASLEEP.
+     * 
+ * + * ASLEEP = 5; + */ + ASLEEP(5), + /** + * + * + *
+     * Sleep stage RESTLESS.
+     * 
+ * + * RESTLESS = 6; + */ + RESTLESS(6), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SleepStageType"); + } + + /** + * + * + *
+     * The default unset value.
+     * 
+ * + * SLEEP_STAGE_TYPE_UNSPECIFIED = 0; + */ + public static final int SLEEP_STAGE_TYPE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Sleep stage AWAKE.
+     * 
+ * + * AWAKE = 1; + */ + public static final int AWAKE_VALUE = 1; + + /** + * + * + *
+     * Sleep stage LIGHT.
+     * 
+ * + * LIGHT = 2; + */ + public static final int LIGHT_VALUE = 2; + + /** + * + * + *
+     * Sleep stage DEEP.
+     * 
+ * + * DEEP = 3; + */ + public static final int DEEP_VALUE = 3; + + /** + * + * + *
+     * Sleep stage REM.
+     * 
+ * + * REM = 4; + */ + public static final int REM_VALUE = 4; + + /** + * + * + *
+     * Sleep stage ASLEEP.
+     * 
+ * + * ASLEEP = 5; + */ + public static final int ASLEEP_VALUE = 5; + + /** + * + * + *
+     * Sleep stage RESTLESS.
+     * 
+ * + * RESTLESS = 6; + */ + public static final int RESTLESS_VALUE = 6; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static SleepStageType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static SleepStageType forNumber(int value) { + switch (value) { + case 0: + return SLEEP_STAGE_TYPE_UNSPECIFIED; + case 1: + return AWAKE; + case 2: + return LIGHT; + case 3: + return DEEP; + case 4: + return REM; + case 5: + return ASLEEP; + case 6: + return RESTLESS; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public SleepStageType findValueByNumber(int number) { + return SleepStageType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.devicesandservices.health.v4.Sleep.getDescriptor().getEnumTypes().get(1); + } + + private static final SleepStageType[] VALUES = values(); + + public static SleepStageType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private SleepStageType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.devicesandservices.health.v4.Sleep.SleepStageType) + } + + public interface SleepStageOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.Sleep.SleepStage) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. Sleep stage start time.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + + /** + * + * + *
+     * Required. Sleep stage start time.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The startTime. + */ + com.google.protobuf.Timestamp getStartTime(); + + /** + * + * + *
+     * Required. Sleep stage start time.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + + /** + * + * + *
+     * Required. The offset of the user's local time at the start of the sleep
+     * stage relative to the Coordinated Universal Time (UTC).
+     * 
+ * + * + * .google.protobuf.Duration start_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the startUtcOffset field is set. + */ + boolean hasStartUtcOffset(); + + /** + * + * + *
+     * Required. The offset of the user's local time at the start of the sleep
+     * stage relative to the Coordinated Universal Time (UTC).
+     * 
+ * + * + * .google.protobuf.Duration start_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The startUtcOffset. + */ + com.google.protobuf.Duration getStartUtcOffset(); + + /** + * + * + *
+     * Required. The offset of the user's local time at the start of the sleep
+     * stage relative to the Coordinated Universal Time (UTC).
+     * 
+ * + * + * .google.protobuf.Duration start_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.DurationOrBuilder getStartUtcOffsetOrBuilder(); + + /** + * + * + *
+     * Required. Sleep stage end time.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + + /** + * + * + *
+     * Required. Sleep stage end time.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + + /** + * + * + *
+     * Required. Sleep stage end time.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + * + * + *
+     * Required. The offset of the user's local time at the end of the sleep
+     * stage relative to the Coordinated Universal Time (UTC).
+     * 
+ * + * .google.protobuf.Duration end_utc_offset = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the endUtcOffset field is set. + */ + boolean hasEndUtcOffset(); + + /** + * + * + *
+     * Required. The offset of the user's local time at the end of the sleep
+     * stage relative to the Coordinated Universal Time (UTC).
+     * 
+ * + * .google.protobuf.Duration end_utc_offset = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The endUtcOffset. + */ + com.google.protobuf.Duration getEndUtcOffset(); + + /** + * + * + *
+     * Required. The offset of the user's local time at the end of the sleep
+     * stage relative to the Coordinated Universal Time (UTC).
+     * 
+ * + * .google.protobuf.Duration end_utc_offset = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.DurationOrBuilder getEndUtcOffsetOrBuilder(); + + /** + * + * + *
+     * Required. Sleep stage type: AWAKE, DEEP, REM, LIGHT etc.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Sleep.SleepStageType type = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + + /** + * + * + *
+     * Required. Sleep stage type: AWAKE, DEEP, REM, LIGHT etc.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Sleep.SleepStageType type = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The type. + */ + com.google.devicesandservices.health.v4.Sleep.SleepStageType getType(); + + /** + * + * + *
+     * Output only. Creation time of this sleep stages segment.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + + /** + * + * + *
+     * Output only. Creation time of this sleep stages segment.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
+     * Output only. Creation time of this sleep stages segment.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+     * Output only. Last update time of this sleep stages segment.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + + /** + * + * + *
+     * Output only. Last update time of this sleep stages segment.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + + /** + * + * + *
+     * Output only. Last update time of this sleep stages segment.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + } + + /** + * + * + *
+   * Sleep stage segment.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.Sleep.SleepStage} + */ + public static final class SleepStage extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.Sleep.SleepStage) + SleepStageOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SleepStage"); + } + + // Use SleepStage.newBuilder() to construct. + private SleepStage(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private SleepStage() { + type_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_Sleep_SleepStage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_Sleep_SleepStage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.Sleep.SleepStage.class, + com.google.devicesandservices.health.v4.Sleep.SleepStage.Builder.class); + } + + private int bitField0_; + public static final int START_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp startTime_; + + /** + * + * + *
+     * Required. Sleep stage start time.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the startTime field is set. + */ + @java.lang.Override + public boolean hasStartTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. Sleep stage start time.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The startTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + + /** + * + * + *
+     * Required. Sleep stage start time.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + + public static final int START_UTC_OFFSET_FIELD_NUMBER = 4; + private com.google.protobuf.Duration startUtcOffset_; + + /** + * + * + *
+     * Required. The offset of the user's local time at the start of the sleep
+     * stage relative to the Coordinated Universal Time (UTC).
+     * 
+ * + * + * .google.protobuf.Duration start_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the startUtcOffset field is set. + */ + @java.lang.Override + public boolean hasStartUtcOffset() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Required. The offset of the user's local time at the start of the sleep
+     * stage relative to the Coordinated Universal Time (UTC).
+     * 
+ * + * + * .google.protobuf.Duration start_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The startUtcOffset. + */ + @java.lang.Override + public com.google.protobuf.Duration getStartUtcOffset() { + return startUtcOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : startUtcOffset_; + } + + /** + * + * + *
+     * Required. The offset of the user's local time at the start of the sleep
+     * stage relative to the Coordinated Universal Time (UTC).
+     * 
+ * + * + * .google.protobuf.Duration start_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getStartUtcOffsetOrBuilder() { + return startUtcOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : startUtcOffset_; + } + + public static final int END_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp endTime_; + + /** + * + * + *
+     * Required. Sleep stage end time.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Required. Sleep stage end time.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + /** + * + * + *
+     * Required. Sleep stage end time.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + public static final int END_UTC_OFFSET_FIELD_NUMBER = 6; + private com.google.protobuf.Duration endUtcOffset_; + + /** + * + * + *
+     * Required. The offset of the user's local time at the end of the sleep
+     * stage relative to the Coordinated Universal Time (UTC).
+     * 
+ * + * .google.protobuf.Duration end_utc_offset = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the endUtcOffset field is set. + */ + @java.lang.Override + public boolean hasEndUtcOffset() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+     * Required. The offset of the user's local time at the end of the sleep
+     * stage relative to the Coordinated Universal Time (UTC).
+     * 
+ * + * .google.protobuf.Duration end_utc_offset = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The endUtcOffset. + */ + @java.lang.Override + public com.google.protobuf.Duration getEndUtcOffset() { + return endUtcOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : endUtcOffset_; + } + + /** + * + * + *
+     * Required. The offset of the user's local time at the end of the sleep
+     * stage relative to the Coordinated Universal Time (UTC).
+     * 
+ * + * .google.protobuf.Duration end_utc_offset = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getEndUtcOffsetOrBuilder() { + return endUtcOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : endUtcOffset_; + } + + public static final int TYPE_FIELD_NUMBER = 7; + private int type_ = 0; + + /** + * + * + *
+     * Required. Sleep stage type: AWAKE, DEEP, REM, LIGHT etc.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Sleep.SleepStageType type = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + + /** + * + * + *
+     * Required. Sleep stage type: AWAKE, DEEP, REM, LIGHT etc.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Sleep.SleepStageType type = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Sleep.SleepStageType getType() { + com.google.devicesandservices.health.v4.Sleep.SleepStageType result = + com.google.devicesandservices.health.v4.Sleep.SleepStageType.forNumber(type_); + return result == null + ? com.google.devicesandservices.health.v4.Sleep.SleepStageType.UNRECOGNIZED + : result; + } + + public static final int CREATE_TIME_FIELD_NUMBER = 8; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
+     * Output only. Creation time of this sleep stages segment.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+     * Output only. Creation time of this sleep stages segment.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + /** + * + * + *
+     * Output only. Creation time of this sleep stages segment.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 9; + private com.google.protobuf.Timestamp updateTime_; + + /** + * + * + *
+     * Output only. Last update time of this sleep stages segment.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+     * Output only. Last update time of this sleep stages segment.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + /** + * + * + *
+     * Output only. Last update time of this sleep stages segment.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getStartTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(4, getStartUtcOffset()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(5, getEndTime()); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(6, getEndUtcOffset()); + } + if (type_ + != com.google.devicesandservices.health.v4.Sleep.SleepStageType + .SLEEP_STAGE_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(7, type_); + } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeMessage(8, getCreateTime()); + } + if (((bitField0_ & 0x00000020) != 0)) { + output.writeMessage(9, getUpdateTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getStartTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getStartUtcOffset()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getEndTime()); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getEndUtcOffset()); + } + if (type_ + != com.google.devicesandservices.health.v4.Sleep.SleepStageType + .SLEEP_STAGE_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(7, type_); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getCreateTime()); + } + if (((bitField0_ & 0x00000020) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getUpdateTime()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.Sleep.SleepStage)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.Sleep.SleepStage other = + (com.google.devicesandservices.health.v4.Sleep.SleepStage) obj; + + if (hasStartTime() != other.hasStartTime()) return false; + if (hasStartTime()) { + if (!getStartTime().equals(other.getStartTime())) return false; + } + if (hasStartUtcOffset() != other.hasStartUtcOffset()) return false; + if (hasStartUtcOffset()) { + if (!getStartUtcOffset().equals(other.getStartUtcOffset())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime().equals(other.getEndTime())) return false; + } + if (hasEndUtcOffset() != other.hasEndUtcOffset()) return false; + if (hasEndUtcOffset()) { + if (!getEndUtcOffset().equals(other.getEndUtcOffset())) return false; + } + if (type_ != other.type_) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasStartTime()) { + hash = (37 * hash) + START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getStartTime().hashCode(); + } + if (hasStartUtcOffset()) { + hash = (37 * hash) + START_UTC_OFFSET_FIELD_NUMBER; + hash = (53 * hash) + getStartUtcOffset().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + if (hasEndUtcOffset()) { + hash = (37 * hash) + END_UTC_OFFSET_FIELD_NUMBER; + hash = (53 * hash) + getEndUtcOffset().hashCode(); + } + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.Sleep.SleepStage parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.Sleep.SleepStage parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Sleep.SleepStage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.Sleep.SleepStage parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Sleep.SleepStage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.Sleep.SleepStage parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Sleep.SleepStage parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.Sleep.SleepStage parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Sleep.SleepStage parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.Sleep.SleepStage parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Sleep.SleepStage parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.Sleep.SleepStage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.Sleep.SleepStage prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+     * Sleep stage segment.
+     * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.Sleep.SleepStage} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.Sleep.SleepStage) + com.google.devicesandservices.health.v4.Sleep.SleepStageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_Sleep_SleepStage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_Sleep_SleepStage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.Sleep.SleepStage.class, + com.google.devicesandservices.health.v4.Sleep.SleepStage.Builder.class); + } + + // Construct using com.google.devicesandservices.health.v4.Sleep.SleepStage.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetStartTimeFieldBuilder(); + internalGetStartUtcOffsetFieldBuilder(); + internalGetEndTimeFieldBuilder(); + internalGetEndUtcOffsetFieldBuilder(); + internalGetCreateTimeFieldBuilder(); + internalGetUpdateTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + startUtcOffset_ = null; + if (startUtcOffsetBuilder_ != null) { + startUtcOffsetBuilder_.dispose(); + startUtcOffsetBuilder_ = null; + } + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + endUtcOffset_ = null; + if (endUtcOffsetBuilder_ != null) { + endUtcOffsetBuilder_.dispose(); + endUtcOffsetBuilder_ = null; + } + type_ = 0; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_Sleep_SleepStage_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.Sleep.SleepStage getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.Sleep.SleepStage.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.Sleep.SleepStage build() { + com.google.devicesandservices.health.v4.Sleep.SleepStage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.Sleep.SleepStage buildPartial() { + com.google.devicesandservices.health.v4.Sleep.SleepStage result = + new com.google.devicesandservices.health.v4.Sleep.SleepStage(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.devicesandservices.health.v4.Sleep.SleepStage result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.startTime_ = startTimeBuilder_ == null ? startTime_ : startTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.startUtcOffset_ = + startUtcOffsetBuilder_ == null ? startUtcOffset_ : startUtcOffsetBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.endTime_ = endTimeBuilder_ == null ? endTime_ : endTimeBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.endUtcOffset_ = + endUtcOffsetBuilder_ == null ? endUtcOffset_ : endUtcOffsetBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.type_ = type_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.createTime_ = + createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000010; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.updateTime_ = + updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000020; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.Sleep.SleepStage) { + return mergeFrom((com.google.devicesandservices.health.v4.Sleep.SleepStage) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.devicesandservices.health.v4.Sleep.SleepStage other) { + if (other == com.google.devicesandservices.health.v4.Sleep.SleepStage.getDefaultInstance()) + return this; + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.hasStartUtcOffset()) { + mergeStartUtcOffset(other.getStartUtcOffset()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (other.hasEndUtcOffset()) { + mergeEndUtcOffset(other.getEndUtcOffset()); + } + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 26: + { + input.readMessage( + internalGetStartTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 26 + case 34: + { + input.readMessage( + internalGetStartUtcOffsetFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 34 + case 42: + { + input.readMessage( + internalGetEndTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 42 + case 50: + { + input.readMessage( + internalGetEndUtcOffsetFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 50 + case 56: + { + type_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } // case 56 + case 66: + { + input.readMessage( + internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 66 + case 74: + { + input.readMessage( + internalGetUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 74 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.Timestamp startTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + startTimeBuilder_; + + /** + * + * + *
+       * Required. Sleep stage start time.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+       * Required. Sleep stage start time.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The startTime. + */ + public com.google.protobuf.Timestamp getStartTime() { + if (startTimeBuilder_ == null) { + return startTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : startTime_; + } else { + return startTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+       * Required. Sleep stage start time.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + } else { + startTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. Sleep stage start time.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. Sleep stage start time.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && startTime_ != null + && startTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getStartTimeBuilder().mergeFrom(value); + } else { + startTime_ = value; + } + } else { + startTimeBuilder_.mergeFrom(value); + } + if (startTime_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * Required. Sleep stage start time.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearStartTime() { + bitField0_ = (bitField0_ & ~0x00000001); + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. Sleep stage start time.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetStartTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * Required. Sleep stage start time.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : startTime_; + } + } + + /** + * + * + *
+       * Required. Sleep stage start time.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getStartTime(), getParentForChildren(), isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + private com.google.protobuf.Duration startUtcOffset_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + startUtcOffsetBuilder_; + + /** + * + * + *
+       * Required. The offset of the user's local time at the start of the sleep
+       * stage relative to the Coordinated Universal Time (UTC).
+       * 
+ * + * + * .google.protobuf.Duration start_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the startUtcOffset field is set. + */ + public boolean hasStartUtcOffset() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+       * Required. The offset of the user's local time at the start of the sleep
+       * stage relative to the Coordinated Universal Time (UTC).
+       * 
+ * + * + * .google.protobuf.Duration start_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The startUtcOffset. + */ + public com.google.protobuf.Duration getStartUtcOffset() { + if (startUtcOffsetBuilder_ == null) { + return startUtcOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : startUtcOffset_; + } else { + return startUtcOffsetBuilder_.getMessage(); + } + } + + /** + * + * + *
+       * Required. The offset of the user's local time at the start of the sleep
+       * stage relative to the Coordinated Universal Time (UTC).
+       * 
+ * + * + * .google.protobuf.Duration start_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setStartUtcOffset(com.google.protobuf.Duration value) { + if (startUtcOffsetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startUtcOffset_ = value; + } else { + startUtcOffsetBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The offset of the user's local time at the start of the sleep
+       * stage relative to the Coordinated Universal Time (UTC).
+       * 
+ * + * + * .google.protobuf.Duration start_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setStartUtcOffset(com.google.protobuf.Duration.Builder builderForValue) { + if (startUtcOffsetBuilder_ == null) { + startUtcOffset_ = builderForValue.build(); + } else { + startUtcOffsetBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The offset of the user's local time at the start of the sleep
+       * stage relative to the Coordinated Universal Time (UTC).
+       * 
+ * + * + * .google.protobuf.Duration start_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeStartUtcOffset(com.google.protobuf.Duration value) { + if (startUtcOffsetBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && startUtcOffset_ != null + && startUtcOffset_ != com.google.protobuf.Duration.getDefaultInstance()) { + getStartUtcOffsetBuilder().mergeFrom(value); + } else { + startUtcOffset_ = value; + } + } else { + startUtcOffsetBuilder_.mergeFrom(value); + } + if (startUtcOffset_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * Required. The offset of the user's local time at the start of the sleep
+       * stage relative to the Coordinated Universal Time (UTC).
+       * 
+ * + * + * .google.protobuf.Duration start_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearStartUtcOffset() { + bitField0_ = (bitField0_ & ~0x00000002); + startUtcOffset_ = null; + if (startUtcOffsetBuilder_ != null) { + startUtcOffsetBuilder_.dispose(); + startUtcOffsetBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The offset of the user's local time at the start of the sleep
+       * stage relative to the Coordinated Universal Time (UTC).
+       * 
+ * + * + * .google.protobuf.Duration start_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.Duration.Builder getStartUtcOffsetBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetStartUtcOffsetFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * Required. The offset of the user's local time at the start of the sleep
+       * stage relative to the Coordinated Universal Time (UTC).
+       * 
+ * + * + * .google.protobuf.Duration start_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.DurationOrBuilder getStartUtcOffsetOrBuilder() { + if (startUtcOffsetBuilder_ != null) { + return startUtcOffsetBuilder_.getMessageOrBuilder(); + } else { + return startUtcOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : startUtcOffset_; + } + } + + /** + * + * + *
+       * Required. The offset of the user's local time at the start of the sleep
+       * stage relative to the Coordinated Universal Time (UTC).
+       * 
+ * + * + * .google.protobuf.Duration start_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + internalGetStartUtcOffsetFieldBuilder() { + if (startUtcOffsetBuilder_ == null) { + startUtcOffsetBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getStartUtcOffset(), getParentForChildren(), isClean()); + startUtcOffset_ = null; + } + return startUtcOffsetBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + + /** + * + * + *
+       * Required. Sleep stage end time.
+       * 
+ * + * .google.protobuf.Timestamp end_time = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+       * Required. Sleep stage end time.
+       * 
+ * + * .google.protobuf.Timestamp end_time = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+       * Required. Sleep stage end time.
+       * 
+ * + * .google.protobuf.Timestamp end_time = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + } else { + endTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. Sleep stage end time.
+       * 
+ * + * .google.protobuf.Timestamp end_time = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. Sleep stage end time.
+       * 
+ * + * .google.protobuf.Timestamp end_time = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && endTime_ != null + && endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEndTimeBuilder().mergeFrom(value); + } else { + endTime_ = value; + } + } else { + endTimeBuilder_.mergeFrom(value); + } + if (endTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * Required. Sleep stage end time.
+       * 
+ * + * .google.protobuf.Timestamp end_time = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearEndTime() { + bitField0_ = (bitField0_ & ~0x00000004); + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. Sleep stage end time.
+       * 
+ * + * .google.protobuf.Timestamp end_time = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetEndTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * Required. Sleep stage end time.
+       * 
+ * + * .google.protobuf.Timestamp end_time = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + + /** + * + * + *
+       * Required. Sleep stage end time.
+       * 
+ * + * .google.protobuf.Timestamp end_time = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + private com.google.protobuf.Duration endUtcOffset_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + endUtcOffsetBuilder_; + + /** + * + * + *
+       * Required. The offset of the user's local time at the end of the sleep
+       * stage relative to the Coordinated Universal Time (UTC).
+       * 
+ * + * + * .google.protobuf.Duration end_utc_offset = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the endUtcOffset field is set. + */ + public boolean hasEndUtcOffset() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+       * Required. The offset of the user's local time at the end of the sleep
+       * stage relative to the Coordinated Universal Time (UTC).
+       * 
+ * + * + * .google.protobuf.Duration end_utc_offset = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The endUtcOffset. + */ + public com.google.protobuf.Duration getEndUtcOffset() { + if (endUtcOffsetBuilder_ == null) { + return endUtcOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : endUtcOffset_; + } else { + return endUtcOffsetBuilder_.getMessage(); + } + } + + /** + * + * + *
+       * Required. The offset of the user's local time at the end of the sleep
+       * stage relative to the Coordinated Universal Time (UTC).
+       * 
+ * + * + * .google.protobuf.Duration end_utc_offset = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setEndUtcOffset(com.google.protobuf.Duration value) { + if (endUtcOffsetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endUtcOffset_ = value; + } else { + endUtcOffsetBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The offset of the user's local time at the end of the sleep
+       * stage relative to the Coordinated Universal Time (UTC).
+       * 
+ * + * + * .google.protobuf.Duration end_utc_offset = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setEndUtcOffset(com.google.protobuf.Duration.Builder builderForValue) { + if (endUtcOffsetBuilder_ == null) { + endUtcOffset_ = builderForValue.build(); + } else { + endUtcOffsetBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The offset of the user's local time at the end of the sleep
+       * stage relative to the Coordinated Universal Time (UTC).
+       * 
+ * + * + * .google.protobuf.Duration end_utc_offset = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeEndUtcOffset(com.google.protobuf.Duration value) { + if (endUtcOffsetBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && endUtcOffset_ != null + && endUtcOffset_ != com.google.protobuf.Duration.getDefaultInstance()) { + getEndUtcOffsetBuilder().mergeFrom(value); + } else { + endUtcOffset_ = value; + } + } else { + endUtcOffsetBuilder_.mergeFrom(value); + } + if (endUtcOffset_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * Required. The offset of the user's local time at the end of the sleep
+       * stage relative to the Coordinated Universal Time (UTC).
+       * 
+ * + * + * .google.protobuf.Duration end_utc_offset = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearEndUtcOffset() { + bitField0_ = (bitField0_ & ~0x00000008); + endUtcOffset_ = null; + if (endUtcOffsetBuilder_ != null) { + endUtcOffsetBuilder_.dispose(); + endUtcOffsetBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The offset of the user's local time at the end of the sleep
+       * stage relative to the Coordinated Universal Time (UTC).
+       * 
+ * + * + * .google.protobuf.Duration end_utc_offset = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.Duration.Builder getEndUtcOffsetBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return internalGetEndUtcOffsetFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * Required. The offset of the user's local time at the end of the sleep
+       * stage relative to the Coordinated Universal Time (UTC).
+       * 
+ * + * + * .google.protobuf.Duration end_utc_offset = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.DurationOrBuilder getEndUtcOffsetOrBuilder() { + if (endUtcOffsetBuilder_ != null) { + return endUtcOffsetBuilder_.getMessageOrBuilder(); + } else { + return endUtcOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : endUtcOffset_; + } + } + + /** + * + * + *
+       * Required. The offset of the user's local time at the end of the sleep
+       * stage relative to the Coordinated Universal Time (UTC).
+       * 
+ * + * + * .google.protobuf.Duration end_utc_offset = 6 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + internalGetEndUtcOffsetFieldBuilder() { + if (endUtcOffsetBuilder_ == null) { + endUtcOffsetBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getEndUtcOffset(), getParentForChildren(), isClean()); + endUtcOffset_ = null; + } + return endUtcOffsetBuilder_; + } + + private int type_ = 0; + + /** + * + * + *
+       * Required. Sleep stage type: AWAKE, DEEP, REM, LIGHT etc.
+       * 
+ * + * + * .google.devicesandservices.health.v4.Sleep.SleepStageType type = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + + /** + * + * + *
+       * Required. Sleep stage type: AWAKE, DEEP, REM, LIGHT etc.
+       * 
+ * + * + * .google.devicesandservices.health.v4.Sleep.SleepStageType type = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + type_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. Sleep stage type: AWAKE, DEEP, REM, LIGHT etc.
+       * 
+ * + * + * .google.devicesandservices.health.v4.Sleep.SleepStageType type = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Sleep.SleepStageType getType() { + com.google.devicesandservices.health.v4.Sleep.SleepStageType result = + com.google.devicesandservices.health.v4.Sleep.SleepStageType.forNumber(type_); + return result == null + ? com.google.devicesandservices.health.v4.Sleep.SleepStageType.UNRECOGNIZED + : result; + } + + /** + * + * + *
+       * Required. Sleep stage type: AWAKE, DEEP, REM, LIGHT etc.
+       * 
+ * + * + * .google.devicesandservices.health.v4.Sleep.SleepStageType type = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.devicesandservices.health.v4.Sleep.SleepStageType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + type_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. Sleep stage type: AWAKE, DEEP, REM, LIGHT etc.
+       * 
+ * + * + * .google.devicesandservices.health.v4.Sleep.SleepStageType type = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000010); + type_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
+       * Output only. Creation time of this sleep stages segment.
+       * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+       * Output only. Creation time of this sleep stages segment.
+       * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+       * Output only. Creation time of this sleep stages segment.
+       * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. Creation time of this sleep stages segment.
+       * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. Creation time of this sleep stages segment.
+       * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * Output only. Creation time of this sleep stages segment.
+       * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000020); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. Creation time of this sleep stages segment.
+       * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return internalGetCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * Output only. Creation time of this sleep stages segment.
+       * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + + /** + * + * + *
+       * Output only. Creation time of this sleep stages segment.
+       * 
+ * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + + /** + * + * + *
+       * Output only. Last update time of this sleep stages segment.
+       * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000040) != 0); + } + + /** + * + * + *
+       * Output only. Last update time of this sleep stages segment.
+       * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+       * Output only. Last update time of this sleep stages segment.
+       * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. Last update time of this sleep stages segment.
+       * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. Last update time of this sleep stages segment.
+       * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * Output only. Last update time of this sleep stages segment.
+       * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000040); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. Last update time of this sleep stages segment.
+       * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return internalGetUpdateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * Output only. Last update time of this sleep stages segment.
+       * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + + /** + * + * + *
+       * Output only. Last update time of this sleep stages segment.
+       * 
+ * + * + * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.Sleep.SleepStage) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.Sleep.SleepStage) + private static final com.google.devicesandservices.health.v4.Sleep.SleepStage DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.Sleep.SleepStage(); + } + + public static com.google.devicesandservices.health.v4.Sleep.SleepStage getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SleepStage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.Sleep.SleepStage getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface OutOfBedSegmentOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.Sleep.OutOfBedSegment) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. Segment tart time.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + + /** + * + * + *
+     * Required. Segment tart time.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The startTime. + */ + com.google.protobuf.Timestamp getStartTime(); + + /** + * + * + *
+     * Required. Segment tart time.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + + /** + * + * + *
+     * Required. The offset of the user's local time at the start of the segment
+     * relative to the Coordinated Universal Time (UTC).
+     * 
+ * + * + * .google.protobuf.Duration start_utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the startUtcOffset field is set. + */ + boolean hasStartUtcOffset(); + + /** + * + * + *
+     * Required. The offset of the user's local time at the start of the segment
+     * relative to the Coordinated Universal Time (UTC).
+     * 
+ * + * + * .google.protobuf.Duration start_utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The startUtcOffset. + */ + com.google.protobuf.Duration getStartUtcOffset(); + + /** + * + * + *
+     * Required. The offset of the user's local time at the start of the segment
+     * relative to the Coordinated Universal Time (UTC).
+     * 
+ * + * + * .google.protobuf.Duration start_utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.DurationOrBuilder getStartUtcOffsetOrBuilder(); + + /** + * + * + *
+     * Required. Segment end time.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + + /** + * + * + *
+     * Required. Segment end time.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + + /** + * + * + *
+     * Required. Segment end time.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + * + * + *
+     * Required. The offset of the user's local time at the end of the segment
+     * relative to the Coordinated Universal Time (UTC).
+     * 
+ * + * .google.protobuf.Duration end_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the endUtcOffset field is set. + */ + boolean hasEndUtcOffset(); + + /** + * + * + *
+     * Required. The offset of the user's local time at the end of the segment
+     * relative to the Coordinated Universal Time (UTC).
+     * 
+ * + * .google.protobuf.Duration end_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The endUtcOffset. + */ + com.google.protobuf.Duration getEndUtcOffset(); + + /** + * + * + *
+     * Required. The offset of the user's local time at the end of the segment
+     * relative to the Coordinated Universal Time (UTC).
+     * 
+ * + * .google.protobuf.Duration end_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.DurationOrBuilder getEndUtcOffsetOrBuilder(); + } + + /** + * + * + *
+   * A time interval to represent an out-of-bed segment.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.Sleep.OutOfBedSegment} + */ + public static final class OutOfBedSegment extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.Sleep.OutOfBedSegment) + OutOfBedSegmentOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "OutOfBedSegment"); + } + + // Use OutOfBedSegment.newBuilder() to construct. + private OutOfBedSegment(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private OutOfBedSegment() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_Sleep_OutOfBedSegment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_Sleep_OutOfBedSegment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.Sleep.OutOfBedSegment.class, + com.google.devicesandservices.health.v4.Sleep.OutOfBedSegment.Builder.class); + } + + private int bitField0_; + public static final int START_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp startTime_; + + /** + * + * + *
+     * Required. Segment tart time.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the startTime field is set. + */ + @java.lang.Override + public boolean hasStartTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. Segment tart time.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The startTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + + /** + * + * + *
+     * Required. Segment tart time.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + + public static final int START_UTC_OFFSET_FIELD_NUMBER = 2; + private com.google.protobuf.Duration startUtcOffset_; + + /** + * + * + *
+     * Required. The offset of the user's local time at the start of the segment
+     * relative to the Coordinated Universal Time (UTC).
+     * 
+ * + * + * .google.protobuf.Duration start_utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the startUtcOffset field is set. + */ + @java.lang.Override + public boolean hasStartUtcOffset() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Required. The offset of the user's local time at the start of the segment
+     * relative to the Coordinated Universal Time (UTC).
+     * 
+ * + * + * .google.protobuf.Duration start_utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The startUtcOffset. + */ + @java.lang.Override + public com.google.protobuf.Duration getStartUtcOffset() { + return startUtcOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : startUtcOffset_; + } + + /** + * + * + *
+     * Required. The offset of the user's local time at the start of the segment
+     * relative to the Coordinated Universal Time (UTC).
+     * 
+ * + * + * .google.protobuf.Duration start_utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getStartUtcOffsetOrBuilder() { + return startUtcOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : startUtcOffset_; + } + + public static final int END_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp endTime_; + + /** + * + * + *
+     * Required. Segment end time.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Required. Segment end time.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + /** + * + * + *
+     * Required. Segment end time.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + public static final int END_UTC_OFFSET_FIELD_NUMBER = 4; + private com.google.protobuf.Duration endUtcOffset_; + + /** + * + * + *
+     * Required. The offset of the user's local time at the end of the segment
+     * relative to the Coordinated Universal Time (UTC).
+     * 
+ * + * .google.protobuf.Duration end_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the endUtcOffset field is set. + */ + @java.lang.Override + public boolean hasEndUtcOffset() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+     * Required. The offset of the user's local time at the end of the segment
+     * relative to the Coordinated Universal Time (UTC).
+     * 
+ * + * .google.protobuf.Duration end_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The endUtcOffset. + */ + @java.lang.Override + public com.google.protobuf.Duration getEndUtcOffset() { + return endUtcOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : endUtcOffset_; + } + + /** + * + * + *
+     * Required. The offset of the user's local time at the end of the segment
+     * relative to the Coordinated Universal Time (UTC).
+     * 
+ * + * .google.protobuf.Duration end_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getEndUtcOffsetOrBuilder() { + return endUtcOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : endUtcOffset_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getStartTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getStartUtcOffset()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(3, getEndTime()); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(4, getEndUtcOffset()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getStartTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getStartUtcOffset()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getEndTime()); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getEndUtcOffset()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.Sleep.OutOfBedSegment)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.Sleep.OutOfBedSegment other = + (com.google.devicesandservices.health.v4.Sleep.OutOfBedSegment) obj; + + if (hasStartTime() != other.hasStartTime()) return false; + if (hasStartTime()) { + if (!getStartTime().equals(other.getStartTime())) return false; + } + if (hasStartUtcOffset() != other.hasStartUtcOffset()) return false; + if (hasStartUtcOffset()) { + if (!getStartUtcOffset().equals(other.getStartUtcOffset())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime().equals(other.getEndTime())) return false; + } + if (hasEndUtcOffset() != other.hasEndUtcOffset()) return false; + if (hasEndUtcOffset()) { + if (!getEndUtcOffset().equals(other.getEndUtcOffset())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasStartTime()) { + hash = (37 * hash) + START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getStartTime().hashCode(); + } + if (hasStartUtcOffset()) { + hash = (37 * hash) + START_UTC_OFFSET_FIELD_NUMBER; + hash = (53 * hash) + getStartUtcOffset().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + if (hasEndUtcOffset()) { + hash = (37 * hash) + END_UTC_OFFSET_FIELD_NUMBER; + hash = (53 * hash) + getEndUtcOffset().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.Sleep.OutOfBedSegment parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.Sleep.OutOfBedSegment parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Sleep.OutOfBedSegment parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.Sleep.OutOfBedSegment parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Sleep.OutOfBedSegment parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.Sleep.OutOfBedSegment parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Sleep.OutOfBedSegment parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.Sleep.OutOfBedSegment parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Sleep.OutOfBedSegment parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.Sleep.OutOfBedSegment parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Sleep.OutOfBedSegment parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.Sleep.OutOfBedSegment parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.Sleep.OutOfBedSegment prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+     * A time interval to represent an out-of-bed segment.
+     * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.Sleep.OutOfBedSegment} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.Sleep.OutOfBedSegment) + com.google.devicesandservices.health.v4.Sleep.OutOfBedSegmentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_Sleep_OutOfBedSegment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_Sleep_OutOfBedSegment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.Sleep.OutOfBedSegment.class, + com.google.devicesandservices.health.v4.Sleep.OutOfBedSegment.Builder.class); + } + + // Construct using com.google.devicesandservices.health.v4.Sleep.OutOfBedSegment.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetStartTimeFieldBuilder(); + internalGetStartUtcOffsetFieldBuilder(); + internalGetEndTimeFieldBuilder(); + internalGetEndUtcOffsetFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + startUtcOffset_ = null; + if (startUtcOffsetBuilder_ != null) { + startUtcOffsetBuilder_.dispose(); + startUtcOffsetBuilder_ = null; + } + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + endUtcOffset_ = null; + if (endUtcOffsetBuilder_ != null) { + endUtcOffsetBuilder_.dispose(); + endUtcOffsetBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_Sleep_OutOfBedSegment_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.Sleep.OutOfBedSegment + getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.Sleep.OutOfBedSegment.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.Sleep.OutOfBedSegment build() { + com.google.devicesandservices.health.v4.Sleep.OutOfBedSegment result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.Sleep.OutOfBedSegment buildPartial() { + com.google.devicesandservices.health.v4.Sleep.OutOfBedSegment result = + new com.google.devicesandservices.health.v4.Sleep.OutOfBedSegment(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.devicesandservices.health.v4.Sleep.OutOfBedSegment result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.startTime_ = startTimeBuilder_ == null ? startTime_ : startTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.startUtcOffset_ = + startUtcOffsetBuilder_ == null ? startUtcOffset_ : startUtcOffsetBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.endTime_ = endTimeBuilder_ == null ? endTime_ : endTimeBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.endUtcOffset_ = + endUtcOffsetBuilder_ == null ? endUtcOffset_ : endUtcOffsetBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.Sleep.OutOfBedSegment) { + return mergeFrom((com.google.devicesandservices.health.v4.Sleep.OutOfBedSegment) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.devicesandservices.health.v4.Sleep.OutOfBedSegment other) { + if (other + == com.google.devicesandservices.health.v4.Sleep.OutOfBedSegment.getDefaultInstance()) + return this; + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.hasStartUtcOffset()) { + mergeStartUtcOffset(other.getStartUtcOffset()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (other.hasEndUtcOffset()) { + mergeEndUtcOffset(other.getEndUtcOffset()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetStartTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetStartUtcOffsetFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetEndTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage( + internalGetEndUtcOffsetFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.Timestamp startTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + startTimeBuilder_; + + /** + * + * + *
+       * Required. Segment tart time.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+       * Required. Segment tart time.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The startTime. + */ + public com.google.protobuf.Timestamp getStartTime() { + if (startTimeBuilder_ == null) { + return startTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : startTime_; + } else { + return startTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+       * Required. Segment tart time.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + } else { + startTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. Segment tart time.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. Segment tart time.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && startTime_ != null + && startTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getStartTimeBuilder().mergeFrom(value); + } else { + startTime_ = value; + } + } else { + startTimeBuilder_.mergeFrom(value); + } + if (startTime_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * Required. Segment tart time.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearStartTime() { + bitField0_ = (bitField0_ & ~0x00000001); + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. Segment tart time.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetStartTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * Required. Segment tart time.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : startTime_; + } + } + + /** + * + * + *
+       * Required. Segment tart time.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getStartTime(), getParentForChildren(), isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + private com.google.protobuf.Duration startUtcOffset_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + startUtcOffsetBuilder_; + + /** + * + * + *
+       * Required. The offset of the user's local time at the start of the segment
+       * relative to the Coordinated Universal Time (UTC).
+       * 
+ * + * + * .google.protobuf.Duration start_utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the startUtcOffset field is set. + */ + public boolean hasStartUtcOffset() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+       * Required. The offset of the user's local time at the start of the segment
+       * relative to the Coordinated Universal Time (UTC).
+       * 
+ * + * + * .google.protobuf.Duration start_utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The startUtcOffset. + */ + public com.google.protobuf.Duration getStartUtcOffset() { + if (startUtcOffsetBuilder_ == null) { + return startUtcOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : startUtcOffset_; + } else { + return startUtcOffsetBuilder_.getMessage(); + } + } + + /** + * + * + *
+       * Required. The offset of the user's local time at the start of the segment
+       * relative to the Coordinated Universal Time (UTC).
+       * 
+ * + * + * .google.protobuf.Duration start_utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setStartUtcOffset(com.google.protobuf.Duration value) { + if (startUtcOffsetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startUtcOffset_ = value; + } else { + startUtcOffsetBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The offset of the user's local time at the start of the segment
+       * relative to the Coordinated Universal Time (UTC).
+       * 
+ * + * + * .google.protobuf.Duration start_utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setStartUtcOffset(com.google.protobuf.Duration.Builder builderForValue) { + if (startUtcOffsetBuilder_ == null) { + startUtcOffset_ = builderForValue.build(); + } else { + startUtcOffsetBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The offset of the user's local time at the start of the segment
+       * relative to the Coordinated Universal Time (UTC).
+       * 
+ * + * + * .google.protobuf.Duration start_utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeStartUtcOffset(com.google.protobuf.Duration value) { + if (startUtcOffsetBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && startUtcOffset_ != null + && startUtcOffset_ != com.google.protobuf.Duration.getDefaultInstance()) { + getStartUtcOffsetBuilder().mergeFrom(value); + } else { + startUtcOffset_ = value; + } + } else { + startUtcOffsetBuilder_.mergeFrom(value); + } + if (startUtcOffset_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * Required. The offset of the user's local time at the start of the segment
+       * relative to the Coordinated Universal Time (UTC).
+       * 
+ * + * + * .google.protobuf.Duration start_utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearStartUtcOffset() { + bitField0_ = (bitField0_ & ~0x00000002); + startUtcOffset_ = null; + if (startUtcOffsetBuilder_ != null) { + startUtcOffsetBuilder_.dispose(); + startUtcOffsetBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The offset of the user's local time at the start of the segment
+       * relative to the Coordinated Universal Time (UTC).
+       * 
+ * + * + * .google.protobuf.Duration start_utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.Duration.Builder getStartUtcOffsetBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetStartUtcOffsetFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * Required. The offset of the user's local time at the start of the segment
+       * relative to the Coordinated Universal Time (UTC).
+       * 
+ * + * + * .google.protobuf.Duration start_utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.DurationOrBuilder getStartUtcOffsetOrBuilder() { + if (startUtcOffsetBuilder_ != null) { + return startUtcOffsetBuilder_.getMessageOrBuilder(); + } else { + return startUtcOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : startUtcOffset_; + } + } + + /** + * + * + *
+       * Required. The offset of the user's local time at the start of the segment
+       * relative to the Coordinated Universal Time (UTC).
+       * 
+ * + * + * .google.protobuf.Duration start_utc_offset = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + internalGetStartUtcOffsetFieldBuilder() { + if (startUtcOffsetBuilder_ == null) { + startUtcOffsetBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getStartUtcOffset(), getParentForChildren(), isClean()); + startUtcOffset_ = null; + } + return startUtcOffsetBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + + /** + * + * + *
+       * Required. Segment end time.
+       * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+       * Required. Segment end time.
+       * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+       * Required. Segment end time.
+       * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + } else { + endTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. Segment end time.
+       * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. Segment end time.
+       * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && endTime_ != null + && endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEndTimeBuilder().mergeFrom(value); + } else { + endTime_ = value; + } + } else { + endTimeBuilder_.mergeFrom(value); + } + if (endTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * Required. Segment end time.
+       * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearEndTime() { + bitField0_ = (bitField0_ & ~0x00000004); + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. Segment end time.
+       * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetEndTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * Required. Segment end time.
+       * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + + /** + * + * + *
+       * Required. Segment end time.
+       * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + private com.google.protobuf.Duration endUtcOffset_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + endUtcOffsetBuilder_; + + /** + * + * + *
+       * Required. The offset of the user's local time at the end of the segment
+       * relative to the Coordinated Universal Time (UTC).
+       * 
+ * + * + * .google.protobuf.Duration end_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the endUtcOffset field is set. + */ + public boolean hasEndUtcOffset() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+       * Required. The offset of the user's local time at the end of the segment
+       * relative to the Coordinated Universal Time (UTC).
+       * 
+ * + * + * .google.protobuf.Duration end_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The endUtcOffset. + */ + public com.google.protobuf.Duration getEndUtcOffset() { + if (endUtcOffsetBuilder_ == null) { + return endUtcOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : endUtcOffset_; + } else { + return endUtcOffsetBuilder_.getMessage(); + } + } + + /** + * + * + *
+       * Required. The offset of the user's local time at the end of the segment
+       * relative to the Coordinated Universal Time (UTC).
+       * 
+ * + * + * .google.protobuf.Duration end_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setEndUtcOffset(com.google.protobuf.Duration value) { + if (endUtcOffsetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endUtcOffset_ = value; + } else { + endUtcOffsetBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The offset of the user's local time at the end of the segment
+       * relative to the Coordinated Universal Time (UTC).
+       * 
+ * + * + * .google.protobuf.Duration end_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setEndUtcOffset(com.google.protobuf.Duration.Builder builderForValue) { + if (endUtcOffsetBuilder_ == null) { + endUtcOffset_ = builderForValue.build(); + } else { + endUtcOffsetBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The offset of the user's local time at the end of the segment
+       * relative to the Coordinated Universal Time (UTC).
+       * 
+ * + * + * .google.protobuf.Duration end_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeEndUtcOffset(com.google.protobuf.Duration value) { + if (endUtcOffsetBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && endUtcOffset_ != null + && endUtcOffset_ != com.google.protobuf.Duration.getDefaultInstance()) { + getEndUtcOffsetBuilder().mergeFrom(value); + } else { + endUtcOffset_ = value; + } + } else { + endUtcOffsetBuilder_.mergeFrom(value); + } + if (endUtcOffset_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * Required. The offset of the user's local time at the end of the segment
+       * relative to the Coordinated Universal Time (UTC).
+       * 
+ * + * + * .google.protobuf.Duration end_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearEndUtcOffset() { + bitField0_ = (bitField0_ & ~0x00000008); + endUtcOffset_ = null; + if (endUtcOffsetBuilder_ != null) { + endUtcOffsetBuilder_.dispose(); + endUtcOffsetBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The offset of the user's local time at the end of the segment
+       * relative to the Coordinated Universal Time (UTC).
+       * 
+ * + * + * .google.protobuf.Duration end_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.Duration.Builder getEndUtcOffsetBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return internalGetEndUtcOffsetFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * Required. The offset of the user's local time at the end of the segment
+       * relative to the Coordinated Universal Time (UTC).
+       * 
+ * + * + * .google.protobuf.Duration end_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.DurationOrBuilder getEndUtcOffsetOrBuilder() { + if (endUtcOffsetBuilder_ != null) { + return endUtcOffsetBuilder_.getMessageOrBuilder(); + } else { + return endUtcOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : endUtcOffset_; + } + } + + /** + * + * + *
+       * Required. The offset of the user's local time at the end of the segment
+       * relative to the Coordinated Universal Time (UTC).
+       * 
+ * + * + * .google.protobuf.Duration end_utc_offset = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + internalGetEndUtcOffsetFieldBuilder() { + if (endUtcOffsetBuilder_ == null) { + endUtcOffsetBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getEndUtcOffset(), getParentForChildren(), isClean()); + endUtcOffset_ = null; + } + return endUtcOffsetBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.Sleep.OutOfBedSegment) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.Sleep.OutOfBedSegment) + private static final com.google.devicesandservices.health.v4.Sleep.OutOfBedSegment + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.Sleep.OutOfBedSegment(); + } + + public static com.google.devicesandservices.health.v4.Sleep.OutOfBedSegment + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OutOfBedSegment parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.Sleep.OutOfBedSegment + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface SleepMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.Sleep.SleepMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Output only. Sleep stages algorithm processing status.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Sleep.SleepMetadata.StagesState stages_status = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for stagesStatus. + */ + int getStagesStatusValue(); + + /** + * + * + *
+     * Output only. Sleep stages algorithm processing status.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Sleep.SleepMetadata.StagesState stages_status = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The stagesStatus. + */ + com.google.devicesandservices.health.v4.Sleep.SleepMetadata.StagesState getStagesStatus(); + + /** + * + * + *
+     * Output only. Sleep and sleep stages algorithms finished processing.
+     * 
+ * + * bool processed = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The processed. + */ + boolean getProcessed(); + + /** + * + * + *
+     * Output only. Naps are sleeps without stages and relatively short
+     * durations.
+     * 
+ * + * bool nap = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The nap. + */ + boolean getNap(); + + /** + * + * + *
+     * Output only. Some sleeps autodetected by algorithms can be manually
+     * edited by users.
+     * 
+ * + * bool manually_edited = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The manuallyEdited. + */ + boolean getManuallyEdited(); + + /** + * + * + *
+     * Optional. Sleep identifier relevant in the context of the data source.
+     * 
+ * + * string external_id = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The externalId. + */ + java.lang.String getExternalId(); + + /** + * + * + *
+     * Optional. Sleep identifier relevant in the context of the data source.
+     * 
+ * + * string external_id = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for externalId. + */ + com.google.protobuf.ByteString getExternalIdBytes(); + } + + /** + * + * + *
+   * Additional information about how the sleep was processed.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.Sleep.SleepMetadata} + */ + public static final class SleepMetadata extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.Sleep.SleepMetadata) + SleepMetadataOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SleepMetadata"); + } + + // Use SleepMetadata.newBuilder() to construct. + private SleepMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private SleepMetadata() { + stagesStatus_ = 0; + externalId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_Sleep_SleepMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_Sleep_SleepMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.Sleep.SleepMetadata.class, + com.google.devicesandservices.health.v4.Sleep.SleepMetadata.Builder.class); + } + + /** + * + * + *
+     * Sleep stages algorithm processing status.
+     * 
+ * + * Protobuf enum {@code google.devicesandservices.health.v4.Sleep.SleepMetadata.StagesState} + */ + public enum StagesState implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Output only. Sleep stages status is unspecified.
+       * 
+ * + * STAGES_STATE_UNSPECIFIED = 0; + */ + STAGES_STATE_UNSPECIFIED(0), + /** + * + * + *
+       * Output only. Sleep stages cannot be computed due to low RR coverage.
+       * 
+ * + * REJECTED_COVERAGE = 1; + */ + REJECTED_COVERAGE(1), + /** + * + * + *
+       * Output only. Sleep stages cannot be computed due to the large middle
+       * gap (2h).
+       * 
+ * + * REJECTED_MAX_GAP = 2; + */ + REJECTED_MAX_GAP(2), + /** + * + * + *
+       * Output only. Sleep stages cannot be computed due to the large start
+       * gap (1h).
+       * 
+ * + * REJECTED_START_GAP = 3; + */ + REJECTED_START_GAP(3), + /** + * + * + *
+       * Output only. Sleep stages cannot be computed due to the large end gap
+       * (1h).
+       * 
+ * + * REJECTED_END_GAP = 4; + */ + REJECTED_END_GAP(4), + /** + * + * + *
+       * Output only. Sleep stages cannot be computed because the sleep log is a
+       * nap (has < 3h duration).
+       * 
+ * + * REJECTED_NAP = 5; + */ + REJECTED_NAP(5), + /** + * + * + *
+       * Output only. Sleep stages cannot be computed because input data is not
+       * available (PPGV2, wake magnitude, etc).
+       * 
+ * + * REJECTED_SERVER = 6; + */ + REJECTED_SERVER(6), + /** + * + * + *
+       * Output only. Sleep stages cannot be computed due to server timeout.
+       * 
+ * + * TIMEOUT = 7; + */ + TIMEOUT(7), + /** + * + * + *
+       * Output only. Sleep stages successfully computed.
+       * 
+ * + * SUCCEEDED = 8; + */ + SUCCEEDED(8), + /** + * + * + *
+       * Output only. Sleep stages cannot be computed due to server internal
+       * error.
+       * 
+ * + * PROCESSING_INTERNAL_ERROR = 9; + */ + PROCESSING_INTERNAL_ERROR(9), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "StagesState"); + } + + /** + * + * + *
+       * Output only. Sleep stages status is unspecified.
+       * 
+ * + * STAGES_STATE_UNSPECIFIED = 0; + */ + public static final int STAGES_STATE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+       * Output only. Sleep stages cannot be computed due to low RR coverage.
+       * 
+ * + * REJECTED_COVERAGE = 1; + */ + public static final int REJECTED_COVERAGE_VALUE = 1; + + /** + * + * + *
+       * Output only. Sleep stages cannot be computed due to the large middle
+       * gap (2h).
+       * 
+ * + * REJECTED_MAX_GAP = 2; + */ + public static final int REJECTED_MAX_GAP_VALUE = 2; + + /** + * + * + *
+       * Output only. Sleep stages cannot be computed due to the large start
+       * gap (1h).
+       * 
+ * + * REJECTED_START_GAP = 3; + */ + public static final int REJECTED_START_GAP_VALUE = 3; + + /** + * + * + *
+       * Output only. Sleep stages cannot be computed due to the large end gap
+       * (1h).
+       * 
+ * + * REJECTED_END_GAP = 4; + */ + public static final int REJECTED_END_GAP_VALUE = 4; + + /** + * + * + *
+       * Output only. Sleep stages cannot be computed because the sleep log is a
+       * nap (has < 3h duration).
+       * 
+ * + * REJECTED_NAP = 5; + */ + public static final int REJECTED_NAP_VALUE = 5; + + /** + * + * + *
+       * Output only. Sleep stages cannot be computed because input data is not
+       * available (PPGV2, wake magnitude, etc).
+       * 
+ * + * REJECTED_SERVER = 6; + */ + public static final int REJECTED_SERVER_VALUE = 6; + + /** + * + * + *
+       * Output only. Sleep stages cannot be computed due to server timeout.
+       * 
+ * + * TIMEOUT = 7; + */ + public static final int TIMEOUT_VALUE = 7; + + /** + * + * + *
+       * Output only. Sleep stages successfully computed.
+       * 
+ * + * SUCCEEDED = 8; + */ + public static final int SUCCEEDED_VALUE = 8; + + /** + * + * + *
+       * Output only. Sleep stages cannot be computed due to server internal
+       * error.
+       * 
+ * + * PROCESSING_INTERNAL_ERROR = 9; + */ + public static final int PROCESSING_INTERNAL_ERROR_VALUE = 9; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static StagesState valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static StagesState forNumber(int value) { + switch (value) { + case 0: + return STAGES_STATE_UNSPECIFIED; + case 1: + return REJECTED_COVERAGE; + case 2: + return REJECTED_MAX_GAP; + case 3: + return REJECTED_START_GAP; + case 4: + return REJECTED_END_GAP; + case 5: + return REJECTED_NAP; + case 6: + return REJECTED_SERVER; + case 7: + return TIMEOUT; + case 8: + return SUCCEEDED; + case 9: + return PROCESSING_INTERNAL_ERROR; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public StagesState findValueByNumber(int number) { + return StagesState.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.devicesandservices.health.v4.Sleep.SleepMetadata.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final StagesState[] VALUES = values(); + + public static StagesState valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private StagesState(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.devicesandservices.health.v4.Sleep.SleepMetadata.StagesState) + } + + public static final int STAGES_STATUS_FIELD_NUMBER = 1; + private int stagesStatus_ = 0; + + /** + * + * + *
+     * Output only. Sleep stages algorithm processing status.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Sleep.SleepMetadata.StagesState stages_status = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for stagesStatus. + */ + @java.lang.Override + public int getStagesStatusValue() { + return stagesStatus_; + } + + /** + * + * + *
+     * Output only. Sleep stages algorithm processing status.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Sleep.SleepMetadata.StagesState stages_status = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The stagesStatus. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Sleep.SleepMetadata.StagesState + getStagesStatus() { + com.google.devicesandservices.health.v4.Sleep.SleepMetadata.StagesState result = + com.google.devicesandservices.health.v4.Sleep.SleepMetadata.StagesState.forNumber( + stagesStatus_); + return result == null + ? com.google.devicesandservices.health.v4.Sleep.SleepMetadata.StagesState.UNRECOGNIZED + : result; + } + + public static final int PROCESSED_FIELD_NUMBER = 2; + private boolean processed_ = false; + + /** + * + * + *
+     * Output only. Sleep and sleep stages algorithms finished processing.
+     * 
+ * + * bool processed = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The processed. + */ + @java.lang.Override + public boolean getProcessed() { + return processed_; + } + + public static final int NAP_FIELD_NUMBER = 5; + private boolean nap_ = false; + + /** + * + * + *
+     * Output only. Naps are sleeps without stages and relatively short
+     * durations.
+     * 
+ * + * bool nap = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The nap. + */ + @java.lang.Override + public boolean getNap() { + return nap_; + } + + public static final int MANUALLY_EDITED_FIELD_NUMBER = 6; + private boolean manuallyEdited_ = false; + + /** + * + * + *
+     * Output only. Some sleeps autodetected by algorithms can be manually
+     * edited by users.
+     * 
+ * + * bool manually_edited = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The manuallyEdited. + */ + @java.lang.Override + public boolean getManuallyEdited() { + return manuallyEdited_; + } + + public static final int EXTERNAL_ID_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object externalId_ = ""; + + /** + * + * + *
+     * Optional. Sleep identifier relevant in the context of the data source.
+     * 
+ * + * string external_id = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The externalId. + */ + @java.lang.Override + public java.lang.String getExternalId() { + java.lang.Object ref = externalId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + externalId_ = s; + return s; + } + } + + /** + * + * + *
+     * Optional. Sleep identifier relevant in the context of the data source.
+     * 
+ * + * string external_id = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for externalId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getExternalIdBytes() { + java.lang.Object ref = externalId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + externalId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (stagesStatus_ + != com.google.devicesandservices.health.v4.Sleep.SleepMetadata.StagesState + .STAGES_STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, stagesStatus_); + } + if (processed_ != false) { + output.writeBool(2, processed_); + } + if (nap_ != false) { + output.writeBool(5, nap_); + } + if (manuallyEdited_ != false) { + output.writeBool(6, manuallyEdited_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(externalId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 7, externalId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (stagesStatus_ + != com.google.devicesandservices.health.v4.Sleep.SleepMetadata.StagesState + .STAGES_STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, stagesStatus_); + } + if (processed_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, processed_); + } + if (nap_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, nap_); + } + if (manuallyEdited_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, manuallyEdited_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(externalId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(7, externalId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.Sleep.SleepMetadata)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.Sleep.SleepMetadata other = + (com.google.devicesandservices.health.v4.Sleep.SleepMetadata) obj; + + if (stagesStatus_ != other.stagesStatus_) return false; + if (getProcessed() != other.getProcessed()) return false; + if (getNap() != other.getNap()) return false; + if (getManuallyEdited() != other.getManuallyEdited()) return false; + if (!getExternalId().equals(other.getExternalId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + STAGES_STATUS_FIELD_NUMBER; + hash = (53 * hash) + stagesStatus_; + hash = (37 * hash) + PROCESSED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getProcessed()); + hash = (37 * hash) + NAP_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getNap()); + hash = (37 * hash) + MANUALLY_EDITED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getManuallyEdited()); + hash = (37 * hash) + EXTERNAL_ID_FIELD_NUMBER; + hash = (53 * hash) + getExternalId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.Sleep.SleepMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.Sleep.SleepMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Sleep.SleepMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.Sleep.SleepMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Sleep.SleepMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.Sleep.SleepMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Sleep.SleepMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.Sleep.SleepMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Sleep.SleepMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.Sleep.SleepMetadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Sleep.SleepMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.Sleep.SleepMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.Sleep.SleepMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+     * Additional information about how the sleep was processed.
+     * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.Sleep.SleepMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.Sleep.SleepMetadata) + com.google.devicesandservices.health.v4.Sleep.SleepMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_Sleep_SleepMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_Sleep_SleepMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.Sleep.SleepMetadata.class, + com.google.devicesandservices.health.v4.Sleep.SleepMetadata.Builder.class); + } + + // Construct using com.google.devicesandservices.health.v4.Sleep.SleepMetadata.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + stagesStatus_ = 0; + processed_ = false; + nap_ = false; + manuallyEdited_ = false; + externalId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_Sleep_SleepMetadata_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.Sleep.SleepMetadata + getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.Sleep.SleepMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.Sleep.SleepMetadata build() { + com.google.devicesandservices.health.v4.Sleep.SleepMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.Sleep.SleepMetadata buildPartial() { + com.google.devicesandservices.health.v4.Sleep.SleepMetadata result = + new com.google.devicesandservices.health.v4.Sleep.SleepMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.devicesandservices.health.v4.Sleep.SleepMetadata result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.stagesStatus_ = stagesStatus_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.processed_ = processed_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.nap_ = nap_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.manuallyEdited_ = manuallyEdited_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.externalId_ = externalId_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.Sleep.SleepMetadata) { + return mergeFrom((com.google.devicesandservices.health.v4.Sleep.SleepMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.devicesandservices.health.v4.Sleep.SleepMetadata other) { + if (other + == com.google.devicesandservices.health.v4.Sleep.SleepMetadata.getDefaultInstance()) + return this; + if (other.stagesStatus_ != 0) { + setStagesStatusValue(other.getStagesStatusValue()); + } + if (other.getProcessed() != false) { + setProcessed(other.getProcessed()); + } + if (other.getNap() != false) { + setNap(other.getNap()); + } + if (other.getManuallyEdited() != false) { + setManuallyEdited(other.getManuallyEdited()); + } + if (!other.getExternalId().isEmpty()) { + externalId_ = other.externalId_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + stagesStatus_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + processed_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 40: + { + nap_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 40 + case 48: + { + manuallyEdited_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 48 + case 58: + { + externalId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 58 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int stagesStatus_ = 0; + + /** + * + * + *
+       * Output only. Sleep stages algorithm processing status.
+       * 
+ * + * + * .google.devicesandservices.health.v4.Sleep.SleepMetadata.StagesState stages_status = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for stagesStatus. + */ + @java.lang.Override + public int getStagesStatusValue() { + return stagesStatus_; + } + + /** + * + * + *
+       * Output only. Sleep stages algorithm processing status.
+       * 
+ * + * + * .google.devicesandservices.health.v4.Sleep.SleepMetadata.StagesState stages_status = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for stagesStatus to set. + * @return This builder for chaining. + */ + public Builder setStagesStatusValue(int value) { + stagesStatus_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. Sleep stages algorithm processing status.
+       * 
+ * + * + * .google.devicesandservices.health.v4.Sleep.SleepMetadata.StagesState stages_status = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The stagesStatus. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Sleep.SleepMetadata.StagesState + getStagesStatus() { + com.google.devicesandservices.health.v4.Sleep.SleepMetadata.StagesState result = + com.google.devicesandservices.health.v4.Sleep.SleepMetadata.StagesState.forNumber( + stagesStatus_); + return result == null + ? com.google.devicesandservices.health.v4.Sleep.SleepMetadata.StagesState.UNRECOGNIZED + : result; + } + + /** + * + * + *
+       * Output only. Sleep stages algorithm processing status.
+       * 
+ * + * + * .google.devicesandservices.health.v4.Sleep.SleepMetadata.StagesState stages_status = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The stagesStatus to set. + * @return This builder for chaining. + */ + public Builder setStagesStatus( + com.google.devicesandservices.health.v4.Sleep.SleepMetadata.StagesState value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + stagesStatus_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. Sleep stages algorithm processing status.
+       * 
+ * + * + * .google.devicesandservices.health.v4.Sleep.SleepMetadata.StagesState stages_status = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearStagesStatus() { + bitField0_ = (bitField0_ & ~0x00000001); + stagesStatus_ = 0; + onChanged(); + return this; + } + + private boolean processed_; + + /** + * + * + *
+       * Output only. Sleep and sleep stages algorithms finished processing.
+       * 
+ * + * bool processed = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The processed. + */ + @java.lang.Override + public boolean getProcessed() { + return processed_; + } + + /** + * + * + *
+       * Output only. Sleep and sleep stages algorithms finished processing.
+       * 
+ * + * bool processed = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The processed to set. + * @return This builder for chaining. + */ + public Builder setProcessed(boolean value) { + + processed_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. Sleep and sleep stages algorithms finished processing.
+       * 
+ * + * bool processed = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearProcessed() { + bitField0_ = (bitField0_ & ~0x00000002); + processed_ = false; + onChanged(); + return this; + } + + private boolean nap_; + + /** + * + * + *
+       * Output only. Naps are sleeps without stages and relatively short
+       * durations.
+       * 
+ * + * bool nap = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The nap. + */ + @java.lang.Override + public boolean getNap() { + return nap_; + } + + /** + * + * + *
+       * Output only. Naps are sleeps without stages and relatively short
+       * durations.
+       * 
+ * + * bool nap = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The nap to set. + * @return This builder for chaining. + */ + public Builder setNap(boolean value) { + + nap_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. Naps are sleeps without stages and relatively short
+       * durations.
+       * 
+ * + * bool nap = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearNap() { + bitField0_ = (bitField0_ & ~0x00000004); + nap_ = false; + onChanged(); + return this; + } + + private boolean manuallyEdited_; + + /** + * + * + *
+       * Output only. Some sleeps autodetected by algorithms can be manually
+       * edited by users.
+       * 
+ * + * bool manually_edited = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The manuallyEdited. + */ + @java.lang.Override + public boolean getManuallyEdited() { + return manuallyEdited_; + } + + /** + * + * + *
+       * Output only. Some sleeps autodetected by algorithms can be manually
+       * edited by users.
+       * 
+ * + * bool manually_edited = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The manuallyEdited to set. + * @return This builder for chaining. + */ + public Builder setManuallyEdited(boolean value) { + + manuallyEdited_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. Some sleeps autodetected by algorithms can be manually
+       * edited by users.
+       * 
+ * + * bool manually_edited = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearManuallyEdited() { + bitField0_ = (bitField0_ & ~0x00000008); + manuallyEdited_ = false; + onChanged(); + return this; + } + + private java.lang.Object externalId_ = ""; + + /** + * + * + *
+       * Optional. Sleep identifier relevant in the context of the data source.
+       * 
+ * + * string external_id = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The externalId. + */ + public java.lang.String getExternalId() { + java.lang.Object ref = externalId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + externalId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * Optional. Sleep identifier relevant in the context of the data source.
+       * 
+ * + * string external_id = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for externalId. + */ + public com.google.protobuf.ByteString getExternalIdBytes() { + java.lang.Object ref = externalId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + externalId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * Optional. Sleep identifier relevant in the context of the data source.
+       * 
+ * + * string external_id = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The externalId to set. + * @return This builder for chaining. + */ + public Builder setExternalId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + externalId_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. Sleep identifier relevant in the context of the data source.
+       * 
+ * + * string external_id = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearExternalId() { + externalId_ = getDefaultInstance().getExternalId(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. Sleep identifier relevant in the context of the data source.
+       * 
+ * + * string external_id = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for externalId to set. + * @return This builder for chaining. + */ + public Builder setExternalIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + externalId_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.Sleep.SleepMetadata) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.Sleep.SleepMetadata) + private static final com.google.devicesandservices.health.v4.Sleep.SleepMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.Sleep.SleepMetadata(); + } + + public static com.google.devicesandservices.health.v4.Sleep.SleepMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SleepMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.Sleep.SleepMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface SleepSummaryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.Sleep.SleepSummary) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Output only. Delta between wake time and bedtime. It is the sum of all
+     * stages.
+     * 
+ * + * + * optional int64 minutes_in_sleep_period = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the minutesInSleepPeriod field is set. + */ + boolean hasMinutesInSleepPeriod(); + + /** + * + * + *
+     * Output only. Delta between wake time and bedtime. It is the sum of all
+     * stages.
+     * 
+ * + * + * optional int64 minutes_in_sleep_period = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The minutesInSleepPeriod. + */ + long getMinutesInSleepPeriod(); + + /** + * + * + *
+     * Output only. Minutes after wake up calculated by restlessness algorithm.
+     * 
+ * + * optional int64 minutes_after_wake_up = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the minutesAfterWakeUp field is set. + */ + boolean hasMinutesAfterWakeUp(); + + /** + * + * + *
+     * Output only. Minutes after wake up calculated by restlessness algorithm.
+     * 
+ * + * optional int64 minutes_after_wake_up = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The minutesAfterWakeUp. + */ + long getMinutesAfterWakeUp(); + + /** + * + * + *
+     * Output only. Minutes to fall asleep calculated by restlessness algorithm.
+     * 
+ * + * optional int64 minutes_to_fall_asleep = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the minutesToFallAsleep field is set. + */ + boolean hasMinutesToFallAsleep(); + + /** + * + * + *
+     * Output only. Minutes to fall asleep calculated by restlessness algorithm.
+     * 
+ * + * optional int64 minutes_to_fall_asleep = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The minutesToFallAsleep. + */ + long getMinutesToFallAsleep(); + + /** + * + * + *
+     * Output only. Total number of minutes asleep.
+     * For classic sleep it is the sum of ASLEEP stages (excluding AWAKE and
+     * RESTLESS). For "stages" sleep it is the sum of LIGHT, REM and DEEP stages
+     * (excluding AWAKE).
+     * 
+ * + * optional int64 minutes_asleep = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the minutesAsleep field is set. + */ + boolean hasMinutesAsleep(); + + /** + * + * + *
+     * Output only. Total number of minutes asleep.
+     * For classic sleep it is the sum of ASLEEP stages (excluding AWAKE and
+     * RESTLESS). For "stages" sleep it is the sum of LIGHT, REM and DEEP stages
+     * (excluding AWAKE).
+     * 
+ * + * optional int64 minutes_asleep = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The minutesAsleep. + */ + long getMinutesAsleep(); + + /** + * + * + *
+     * Output only. Total number of minutes awake. It is a sum of all AWAKE
+     * stages.
+     * 
+ * + * optional int64 minutes_awake = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the minutesAwake field is set. + */ + boolean hasMinutesAwake(); + + /** + * + * + *
+     * Output only. Total number of minutes awake. It is a sum of all AWAKE
+     * stages.
+     * 
+ * + * optional int64 minutes_awake = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The minutesAwake. + */ + long getMinutesAwake(); + + /** + * + * + *
+     * Output only. List of summaries (total duration and segment count) per
+     * each sleep stage type.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary stages_summary = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getStagesSummaryList(); + + /** + * + * + *
+     * Output only. List of summaries (total duration and segment count) per
+     * each sleep stage type.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary stages_summary = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary getStagesSummary( + int index); + + /** + * + * + *
+     * Output only. List of summaries (total duration and segment count) per
+     * each sleep stage type.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary stages_summary = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getStagesSummaryCount(); + + /** + * + * + *
+     * Output only. List of summaries (total duration and segment count) per
+     * each sleep stage type.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary stages_summary = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List< + ? extends + com.google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummaryOrBuilder> + getStagesSummaryOrBuilderList(); + + /** + * + * + *
+     * Output only. List of summaries (total duration and segment count) per
+     * each sleep stage type.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary stages_summary = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummaryOrBuilder + getStagesSummaryOrBuilder(int index); + } + + /** + * + * + *
+   *
+   * Sleep summary: metrics and stages summary.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.Sleep.SleepSummary} + */ + public static final class SleepSummary extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.Sleep.SleepSummary) + SleepSummaryOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SleepSummary"); + } + + // Use SleepSummary.newBuilder() to construct. + private SleepSummary(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private SleepSummary() { + stagesSummary_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_Sleep_SleepSummary_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_Sleep_SleepSummary_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.Sleep.SleepSummary.class, + com.google.devicesandservices.health.v4.Sleep.SleepSummary.Builder.class); + } + + public interface StageSummaryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Output only. Sleep stage type: AWAKE, DEEP, REM, LIGHT etc.
+       * 
+ * + * + * .google.devicesandservices.health.v4.Sleep.SleepStageType type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + + /** + * + * + *
+       * Output only. Sleep stage type: AWAKE, DEEP, REM, LIGHT etc.
+       * 
+ * + * + * .google.devicesandservices.health.v4.Sleep.SleepStageType type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The type. + */ + com.google.devicesandservices.health.v4.Sleep.SleepStageType getType(); + + /** + * + * + *
+       * Output only. Total duration in minutes of a sleep stage.
+       * 
+ * + * int64 minutes = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The minutes. + */ + long getMinutes(); + + /** + * + * + *
+       * Output only. Number of sleep stages segments.
+       * 
+ * + * int64 count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count. + */ + long getCount(); + } + + /** + * + * + *
+     * Total duration and segment count for a stage.
+     * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary} + */ + public static final class StageSummary extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary) + StageSummaryOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "StageSummary"); + } + + // Use StageSummary.newBuilder() to construct. + private StageSummary(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private StageSummary() { + type_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_Sleep_SleepSummary_StageSummary_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_Sleep_SleepSummary_StageSummary_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary.class, + com.google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary.Builder + .class); + } + + public static final int TYPE_FIELD_NUMBER = 1; + private int type_ = 0; + + /** + * + * + *
+       * Output only. Sleep stage type: AWAKE, DEEP, REM, LIGHT etc.
+       * 
+ * + * + * .google.devicesandservices.health.v4.Sleep.SleepStageType type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + + /** + * + * + *
+       * Output only. Sleep stage type: AWAKE, DEEP, REM, LIGHT etc.
+       * 
+ * + * + * .google.devicesandservices.health.v4.Sleep.SleepStageType type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Sleep.SleepStageType getType() { + com.google.devicesandservices.health.v4.Sleep.SleepStageType result = + com.google.devicesandservices.health.v4.Sleep.SleepStageType.forNumber(type_); + return result == null + ? com.google.devicesandservices.health.v4.Sleep.SleepStageType.UNRECOGNIZED + : result; + } + + public static final int MINUTES_FIELD_NUMBER = 2; + private long minutes_ = 0L; + + /** + * + * + *
+       * Output only. Total duration in minutes of a sleep stage.
+       * 
+ * + * int64 minutes = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The minutes. + */ + @java.lang.Override + public long getMinutes() { + return minutes_; + } + + public static final int COUNT_FIELD_NUMBER = 3; + private long count_ = 0L; + + /** + * + * + *
+       * Output only. Number of sleep stages segments.
+       * 
+ * + * int64 count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count. + */ + @java.lang.Override + public long getCount() { + return count_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (type_ + != com.google.devicesandservices.health.v4.Sleep.SleepStageType + .SLEEP_STAGE_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, type_); + } + if (minutes_ != 0L) { + output.writeInt64(2, minutes_); + } + if (count_ != 0L) { + output.writeInt64(3, count_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (type_ + != com.google.devicesandservices.health.v4.Sleep.SleepStageType + .SLEEP_STAGE_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, type_); + } + if (minutes_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, minutes_); + } + if (count_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, count_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary other = + (com.google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary) obj; + + if (type_ != other.type_) return false; + if (getMinutes() != other.getMinutes()) return false; + if (getCount() != other.getCount()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (37 * hash) + MINUTES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getMinutes()); + hash = (37 * hash) + COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getCount()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+       * Total duration and segment count for a stage.
+       * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary) + com.google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummaryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_Sleep_SleepSummary_StageSummary_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_Sleep_SleepSummary_StageSummary_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary.class, + com.google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary.Builder + .class); + } + + // Construct using + // com.google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + type_ = 0; + minutes_ = 0L; + count_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_Sleep_SleepSummary_StageSummary_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary + getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary build() { + com.google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary + buildPartial() { + com.google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary result = + new com.google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.type_ = type_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.minutes_ = minutes_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.count_ = count_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary) { + return mergeFrom( + (com.google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary other) { + if (other + == com.google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary + .getDefaultInstance()) return this; + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (other.getMinutes() != 0L) { + setMinutes(other.getMinutes()); + } + if (other.getCount() != 0L) { + setCount(other.getCount()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + type_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + minutes_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + count_ = input.readInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int type_ = 0; + + /** + * + * + *
+         * Output only. Sleep stage type: AWAKE, DEEP, REM, LIGHT etc.
+         * 
+ * + * + * .google.devicesandservices.health.v4.Sleep.SleepStageType type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + + /** + * + * + *
+         * Output only. Sleep stage type: AWAKE, DEEP, REM, LIGHT etc.
+         * 
+ * + * + * .google.devicesandservices.health.v4.Sleep.SleepStageType type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + type_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+         * Output only. Sleep stage type: AWAKE, DEEP, REM, LIGHT etc.
+         * 
+ * + * + * .google.devicesandservices.health.v4.Sleep.SleepStageType type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Sleep.SleepStageType getType() { + com.google.devicesandservices.health.v4.Sleep.SleepStageType result = + com.google.devicesandservices.health.v4.Sleep.SleepStageType.forNumber(type_); + return result == null + ? com.google.devicesandservices.health.v4.Sleep.SleepStageType.UNRECOGNIZED + : result; + } + + /** + * + * + *
+         * Output only. Sleep stage type: AWAKE, DEEP, REM, LIGHT etc.
+         * 
+ * + * + * .google.devicesandservices.health.v4.Sleep.SleepStageType type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.devicesandservices.health.v4.Sleep.SleepStageType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + type_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+         * Output only. Sleep stage type: AWAKE, DEEP, REM, LIGHT etc.
+         * 
+ * + * + * .google.devicesandservices.health.v4.Sleep.SleepStageType type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000001); + type_ = 0; + onChanged(); + return this; + } + + private long minutes_; + + /** + * + * + *
+         * Output only. Total duration in minutes of a sleep stage.
+         * 
+ * + * int64 minutes = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The minutes. + */ + @java.lang.Override + public long getMinutes() { + return minutes_; + } + + /** + * + * + *
+         * Output only. Total duration in minutes of a sleep stage.
+         * 
+ * + * int64 minutes = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The minutes to set. + * @return This builder for chaining. + */ + public Builder setMinutes(long value) { + + minutes_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+         * Output only. Total duration in minutes of a sleep stage.
+         * 
+ * + * int64 minutes = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearMinutes() { + bitField0_ = (bitField0_ & ~0x00000002); + minutes_ = 0L; + onChanged(); + return this; + } + + private long count_; + + /** + * + * + *
+         * Output only. Number of sleep stages segments.
+         * 
+ * + * int64 count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count. + */ + @java.lang.Override + public long getCount() { + return count_; + } + + /** + * + * + *
+         * Output only. Number of sleep stages segments.
+         * 
+ * + * int64 count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The count to set. + * @return This builder for chaining. + */ + public Builder setCount(long value) { + + count_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+         * Output only. Number of sleep stages segments.
+         * 
+ * + * int64 count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearCount() { + bitField0_ = (bitField0_ & ~0x00000004); + count_ = 0L; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary) + private static final com.google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary(); + } + + public static com.google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StageSummary parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int MINUTES_IN_SLEEP_PERIOD_FIELD_NUMBER = 1; + private long minutesInSleepPeriod_ = 0L; + + /** + * + * + *
+     * Output only. Delta between wake time and bedtime. It is the sum of all
+     * stages.
+     * 
+ * + * + * optional int64 minutes_in_sleep_period = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the minutesInSleepPeriod field is set. + */ + @java.lang.Override + public boolean hasMinutesInSleepPeriod() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Output only. Delta between wake time and bedtime. It is the sum of all
+     * stages.
+     * 
+ * + * + * optional int64 minutes_in_sleep_period = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The minutesInSleepPeriod. + */ + @java.lang.Override + public long getMinutesInSleepPeriod() { + return minutesInSleepPeriod_; + } + + public static final int MINUTES_AFTER_WAKE_UP_FIELD_NUMBER = 2; + private long minutesAfterWakeUp_ = 0L; + + /** + * + * + *
+     * Output only. Minutes after wake up calculated by restlessness algorithm.
+     * 
+ * + * optional int64 minutes_after_wake_up = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the minutesAfterWakeUp field is set. + */ + @java.lang.Override + public boolean hasMinutesAfterWakeUp() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Output only. Minutes after wake up calculated by restlessness algorithm.
+     * 
+ * + * optional int64 minutes_after_wake_up = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The minutesAfterWakeUp. + */ + @java.lang.Override + public long getMinutesAfterWakeUp() { + return minutesAfterWakeUp_; + } + + public static final int MINUTES_TO_FALL_ASLEEP_FIELD_NUMBER = 3; + private long minutesToFallAsleep_ = 0L; + + /** + * + * + *
+     * Output only. Minutes to fall asleep calculated by restlessness algorithm.
+     * 
+ * + * optional int64 minutes_to_fall_asleep = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the minutesToFallAsleep field is set. + */ + @java.lang.Override + public boolean hasMinutesToFallAsleep() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Output only. Minutes to fall asleep calculated by restlessness algorithm.
+     * 
+ * + * optional int64 minutes_to_fall_asleep = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The minutesToFallAsleep. + */ + @java.lang.Override + public long getMinutesToFallAsleep() { + return minutesToFallAsleep_; + } + + public static final int MINUTES_ASLEEP_FIELD_NUMBER = 4; + private long minutesAsleep_ = 0L; + + /** + * + * + *
+     * Output only. Total number of minutes asleep.
+     * For classic sleep it is the sum of ASLEEP stages (excluding AWAKE and
+     * RESTLESS). For "stages" sleep it is the sum of LIGHT, REM and DEEP stages
+     * (excluding AWAKE).
+     * 
+ * + * optional int64 minutes_asleep = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the minutesAsleep field is set. + */ + @java.lang.Override + public boolean hasMinutesAsleep() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+     * Output only. Total number of minutes asleep.
+     * For classic sleep it is the sum of ASLEEP stages (excluding AWAKE and
+     * RESTLESS). For "stages" sleep it is the sum of LIGHT, REM and DEEP stages
+     * (excluding AWAKE).
+     * 
+ * + * optional int64 minutes_asleep = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The minutesAsleep. + */ + @java.lang.Override + public long getMinutesAsleep() { + return minutesAsleep_; + } + + public static final int MINUTES_AWAKE_FIELD_NUMBER = 5; + private long minutesAwake_ = 0L; + + /** + * + * + *
+     * Output only. Total number of minutes awake. It is a sum of all AWAKE
+     * stages.
+     * 
+ * + * optional int64 minutes_awake = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the minutesAwake field is set. + */ + @java.lang.Override + public boolean hasMinutesAwake() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+     * Output only. Total number of minutes awake. It is a sum of all AWAKE
+     * stages.
+     * 
+ * + * optional int64 minutes_awake = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The minutesAwake. + */ + @java.lang.Override + public long getMinutesAwake() { + return minutesAwake_; + } + + public static final int STAGES_SUMMARY_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private java.util.List + stagesSummary_; + + /** + * + * + *
+     * Output only. List of summaries (total duration and segment count) per
+     * each sleep stage type.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary stages_summary = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getStagesSummaryList() { + return stagesSummary_; + } + + /** + * + * + *
+     * Output only. List of summaries (total duration and segment count) per
+     * each sleep stage type.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary stages_summary = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummaryOrBuilder> + getStagesSummaryOrBuilderList() { + return stagesSummary_; + } + + /** + * + * + *
+     * Output only. List of summaries (total duration and segment count) per
+     * each sleep stage type.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary stages_summary = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getStagesSummaryCount() { + return stagesSummary_.size(); + } + + /** + * + * + *
+     * Output only. List of summaries (total duration and segment count) per
+     * each sleep stage type.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary stages_summary = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary getStagesSummary( + int index) { + return stagesSummary_.get(index); + } + + /** + * + * + *
+     * Output only. List of summaries (total duration and segment count) per
+     * each sleep stage type.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary stages_summary = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummaryOrBuilder + getStagesSummaryOrBuilder(int index) { + return stagesSummary_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeInt64(1, minutesInSleepPeriod_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeInt64(2, minutesAfterWakeUp_); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeInt64(3, minutesToFallAsleep_); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeInt64(4, minutesAsleep_); + } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeInt64(5, minutesAwake_); + } + for (int i = 0; i < stagesSummary_.size(); i++) { + output.writeMessage(6, stagesSummary_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, minutesInSleepPeriod_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, minutesAfterWakeUp_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, minutesToFallAsleep_); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, minutesAsleep_); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(5, minutesAwake_); + } + for (int i = 0; i < stagesSummary_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, stagesSummary_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.Sleep.SleepSummary)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.Sleep.SleepSummary other = + (com.google.devicesandservices.health.v4.Sleep.SleepSummary) obj; + + if (hasMinutesInSleepPeriod() != other.hasMinutesInSleepPeriod()) return false; + if (hasMinutesInSleepPeriod()) { + if (getMinutesInSleepPeriod() != other.getMinutesInSleepPeriod()) return false; + } + if (hasMinutesAfterWakeUp() != other.hasMinutesAfterWakeUp()) return false; + if (hasMinutesAfterWakeUp()) { + if (getMinutesAfterWakeUp() != other.getMinutesAfterWakeUp()) return false; + } + if (hasMinutesToFallAsleep() != other.hasMinutesToFallAsleep()) return false; + if (hasMinutesToFallAsleep()) { + if (getMinutesToFallAsleep() != other.getMinutesToFallAsleep()) return false; + } + if (hasMinutesAsleep() != other.hasMinutesAsleep()) return false; + if (hasMinutesAsleep()) { + if (getMinutesAsleep() != other.getMinutesAsleep()) return false; + } + if (hasMinutesAwake() != other.hasMinutesAwake()) return false; + if (hasMinutesAwake()) { + if (getMinutesAwake() != other.getMinutesAwake()) return false; + } + if (!getStagesSummaryList().equals(other.getStagesSummaryList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasMinutesInSleepPeriod()) { + hash = (37 * hash) + MINUTES_IN_SLEEP_PERIOD_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getMinutesInSleepPeriod()); + } + if (hasMinutesAfterWakeUp()) { + hash = (37 * hash) + MINUTES_AFTER_WAKE_UP_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getMinutesAfterWakeUp()); + } + if (hasMinutesToFallAsleep()) { + hash = (37 * hash) + MINUTES_TO_FALL_ASLEEP_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getMinutesToFallAsleep()); + } + if (hasMinutesAsleep()) { + hash = (37 * hash) + MINUTES_ASLEEP_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getMinutesAsleep()); + } + if (hasMinutesAwake()) { + hash = (37 * hash) + MINUTES_AWAKE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getMinutesAwake()); + } + if (getStagesSummaryCount() > 0) { + hash = (37 * hash) + STAGES_SUMMARY_FIELD_NUMBER; + hash = (53 * hash) + getStagesSummaryList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.Sleep.SleepSummary parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.Sleep.SleepSummary parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Sleep.SleepSummary parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.Sleep.SleepSummary parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Sleep.SleepSummary parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.Sleep.SleepSummary parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Sleep.SleepSummary parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.Sleep.SleepSummary parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Sleep.SleepSummary parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.Sleep.SleepSummary parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Sleep.SleepSummary parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.Sleep.SleepSummary parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.Sleep.SleepSummary prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+     *
+     * Sleep summary: metrics and stages summary.
+     * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.Sleep.SleepSummary} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.Sleep.SleepSummary) + com.google.devicesandservices.health.v4.Sleep.SleepSummaryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_Sleep_SleepSummary_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_Sleep_SleepSummary_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.Sleep.SleepSummary.class, + com.google.devicesandservices.health.v4.Sleep.SleepSummary.Builder.class); + } + + // Construct using com.google.devicesandservices.health.v4.Sleep.SleepSummary.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + minutesInSleepPeriod_ = 0L; + minutesAfterWakeUp_ = 0L; + minutesToFallAsleep_ = 0L; + minutesAsleep_ = 0L; + minutesAwake_ = 0L; + if (stagesSummaryBuilder_ == null) { + stagesSummary_ = java.util.Collections.emptyList(); + } else { + stagesSummary_ = null; + stagesSummaryBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000020); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_Sleep_SleepSummary_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.Sleep.SleepSummary + getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.Sleep.SleepSummary.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.Sleep.SleepSummary build() { + com.google.devicesandservices.health.v4.Sleep.SleepSummary result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.Sleep.SleepSummary buildPartial() { + com.google.devicesandservices.health.v4.Sleep.SleepSummary result = + new com.google.devicesandservices.health.v4.Sleep.SleepSummary(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.devicesandservices.health.v4.Sleep.SleepSummary result) { + if (stagesSummaryBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0)) { + stagesSummary_ = java.util.Collections.unmodifiableList(stagesSummary_); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.stagesSummary_ = stagesSummary_; + } else { + result.stagesSummary_ = stagesSummaryBuilder_.build(); + } + } + + private void buildPartial0( + com.google.devicesandservices.health.v4.Sleep.SleepSummary result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.minutesInSleepPeriod_ = minutesInSleepPeriod_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.minutesAfterWakeUp_ = minutesAfterWakeUp_; + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.minutesToFallAsleep_ = minutesToFallAsleep_; + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.minutesAsleep_ = minutesAsleep_; + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.minutesAwake_ = minutesAwake_; + to_bitField0_ |= 0x00000010; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.Sleep.SleepSummary) { + return mergeFrom((com.google.devicesandservices.health.v4.Sleep.SleepSummary) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.devicesandservices.health.v4.Sleep.SleepSummary other) { + if (other + == com.google.devicesandservices.health.v4.Sleep.SleepSummary.getDefaultInstance()) + return this; + if (other.hasMinutesInSleepPeriod()) { + setMinutesInSleepPeriod(other.getMinutesInSleepPeriod()); + } + if (other.hasMinutesAfterWakeUp()) { + setMinutesAfterWakeUp(other.getMinutesAfterWakeUp()); + } + if (other.hasMinutesToFallAsleep()) { + setMinutesToFallAsleep(other.getMinutesToFallAsleep()); + } + if (other.hasMinutesAsleep()) { + setMinutesAsleep(other.getMinutesAsleep()); + } + if (other.hasMinutesAwake()) { + setMinutesAwake(other.getMinutesAwake()); + } + if (stagesSummaryBuilder_ == null) { + if (!other.stagesSummary_.isEmpty()) { + if (stagesSummary_.isEmpty()) { + stagesSummary_ = other.stagesSummary_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensureStagesSummaryIsMutable(); + stagesSummary_.addAll(other.stagesSummary_); + } + onChanged(); + } + } else { + if (!other.stagesSummary_.isEmpty()) { + if (stagesSummaryBuilder_.isEmpty()) { + stagesSummaryBuilder_.dispose(); + stagesSummaryBuilder_ = null; + stagesSummary_ = other.stagesSummary_; + bitField0_ = (bitField0_ & ~0x00000020); + stagesSummaryBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetStagesSummaryFieldBuilder() + : null; + } else { + stagesSummaryBuilder_.addAllMessages(other.stagesSummary_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + minutesInSleepPeriod_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + minutesAfterWakeUp_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + minutesToFallAsleep_ = input.readInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: + { + minutesAsleep_ = input.readInt64(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: + { + minutesAwake_ = input.readInt64(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 50: + { + com.google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary m = + input.readMessage( + com.google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary + .parser(), + extensionRegistry); + if (stagesSummaryBuilder_ == null) { + ensureStagesSummaryIsMutable(); + stagesSummary_.add(m); + } else { + stagesSummaryBuilder_.addMessage(m); + } + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private long minutesInSleepPeriod_; + + /** + * + * + *
+       * Output only. Delta between wake time and bedtime. It is the sum of all
+       * stages.
+       * 
+ * + * + * optional int64 minutes_in_sleep_period = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the minutesInSleepPeriod field is set. + */ + @java.lang.Override + public boolean hasMinutesInSleepPeriod() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+       * Output only. Delta between wake time and bedtime. It is the sum of all
+       * stages.
+       * 
+ * + * + * optional int64 minutes_in_sleep_period = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The minutesInSleepPeriod. + */ + @java.lang.Override + public long getMinutesInSleepPeriod() { + return minutesInSleepPeriod_; + } + + /** + * + * + *
+       * Output only. Delta between wake time and bedtime. It is the sum of all
+       * stages.
+       * 
+ * + * + * optional int64 minutes_in_sleep_period = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The minutesInSleepPeriod to set. + * @return This builder for chaining. + */ + public Builder setMinutesInSleepPeriod(long value) { + + minutesInSleepPeriod_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. Delta between wake time and bedtime. It is the sum of all
+       * stages.
+       * 
+ * + * + * optional int64 minutes_in_sleep_period = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearMinutesInSleepPeriod() { + bitField0_ = (bitField0_ & ~0x00000001); + minutesInSleepPeriod_ = 0L; + onChanged(); + return this; + } + + private long minutesAfterWakeUp_; + + /** + * + * + *
+       * Output only. Minutes after wake up calculated by restlessness algorithm.
+       * 
+ * + * + * optional int64 minutes_after_wake_up = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the minutesAfterWakeUp field is set. + */ + @java.lang.Override + public boolean hasMinutesAfterWakeUp() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+       * Output only. Minutes after wake up calculated by restlessness algorithm.
+       * 
+ * + * + * optional int64 minutes_after_wake_up = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The minutesAfterWakeUp. + */ + @java.lang.Override + public long getMinutesAfterWakeUp() { + return minutesAfterWakeUp_; + } + + /** + * + * + *
+       * Output only. Minutes after wake up calculated by restlessness algorithm.
+       * 
+ * + * + * optional int64 minutes_after_wake_up = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The minutesAfterWakeUp to set. + * @return This builder for chaining. + */ + public Builder setMinutesAfterWakeUp(long value) { + + minutesAfterWakeUp_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. Minutes after wake up calculated by restlessness algorithm.
+       * 
+ * + * + * optional int64 minutes_after_wake_up = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearMinutesAfterWakeUp() { + bitField0_ = (bitField0_ & ~0x00000002); + minutesAfterWakeUp_ = 0L; + onChanged(); + return this; + } + + private long minutesToFallAsleep_; + + /** + * + * + *
+       * Output only. Minutes to fall asleep calculated by restlessness algorithm.
+       * 
+ * + * + * optional int64 minutes_to_fall_asleep = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the minutesToFallAsleep field is set. + */ + @java.lang.Override + public boolean hasMinutesToFallAsleep() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+       * Output only. Minutes to fall asleep calculated by restlessness algorithm.
+       * 
+ * + * + * optional int64 minutes_to_fall_asleep = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The minutesToFallAsleep. + */ + @java.lang.Override + public long getMinutesToFallAsleep() { + return minutesToFallAsleep_; + } + + /** + * + * + *
+       * Output only. Minutes to fall asleep calculated by restlessness algorithm.
+       * 
+ * + * + * optional int64 minutes_to_fall_asleep = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The minutesToFallAsleep to set. + * @return This builder for chaining. + */ + public Builder setMinutesToFallAsleep(long value) { + + minutesToFallAsleep_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. Minutes to fall asleep calculated by restlessness algorithm.
+       * 
+ * + * + * optional int64 minutes_to_fall_asleep = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearMinutesToFallAsleep() { + bitField0_ = (bitField0_ & ~0x00000004); + minutesToFallAsleep_ = 0L; + onChanged(); + return this; + } + + private long minutesAsleep_; + + /** + * + * + *
+       * Output only. Total number of minutes asleep.
+       * For classic sleep it is the sum of ASLEEP stages (excluding AWAKE and
+       * RESTLESS). For "stages" sleep it is the sum of LIGHT, REM and DEEP stages
+       * (excluding AWAKE).
+       * 
+ * + * optional int64 minutes_asleep = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the minutesAsleep field is set. + */ + @java.lang.Override + public boolean hasMinutesAsleep() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+       * Output only. Total number of minutes asleep.
+       * For classic sleep it is the sum of ASLEEP stages (excluding AWAKE and
+       * RESTLESS). For "stages" sleep it is the sum of LIGHT, REM and DEEP stages
+       * (excluding AWAKE).
+       * 
+ * + * optional int64 minutes_asleep = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The minutesAsleep. + */ + @java.lang.Override + public long getMinutesAsleep() { + return minutesAsleep_; + } + + /** + * + * + *
+       * Output only. Total number of minutes asleep.
+       * For classic sleep it is the sum of ASLEEP stages (excluding AWAKE and
+       * RESTLESS). For "stages" sleep it is the sum of LIGHT, REM and DEEP stages
+       * (excluding AWAKE).
+       * 
+ * + * optional int64 minutes_asleep = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The minutesAsleep to set. + * @return This builder for chaining. + */ + public Builder setMinutesAsleep(long value) { + + minutesAsleep_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. Total number of minutes asleep.
+       * For classic sleep it is the sum of ASLEEP stages (excluding AWAKE and
+       * RESTLESS). For "stages" sleep it is the sum of LIGHT, REM and DEEP stages
+       * (excluding AWAKE).
+       * 
+ * + * optional int64 minutes_asleep = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearMinutesAsleep() { + bitField0_ = (bitField0_ & ~0x00000008); + minutesAsleep_ = 0L; + onChanged(); + return this; + } + + private long minutesAwake_; + + /** + * + * + *
+       * Output only. Total number of minutes awake. It is a sum of all AWAKE
+       * stages.
+       * 
+ * + * optional int64 minutes_awake = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the minutesAwake field is set. + */ + @java.lang.Override + public boolean hasMinutesAwake() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+       * Output only. Total number of minutes awake. It is a sum of all AWAKE
+       * stages.
+       * 
+ * + * optional int64 minutes_awake = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The minutesAwake. + */ + @java.lang.Override + public long getMinutesAwake() { + return minutesAwake_; + } + + /** + * + * + *
+       * Output only. Total number of minutes awake. It is a sum of all AWAKE
+       * stages.
+       * 
+ * + * optional int64 minutes_awake = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The minutesAwake to set. + * @return This builder for chaining. + */ + public Builder setMinutesAwake(long value) { + + minutesAwake_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. Total number of minutes awake. It is a sum of all AWAKE
+       * stages.
+       * 
+ * + * optional int64 minutes_awake = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearMinutesAwake() { + bitField0_ = (bitField0_ & ~0x00000010); + minutesAwake_ = 0L; + onChanged(); + return this; + } + + private java.util.List< + com.google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary> + stagesSummary_ = java.util.Collections.emptyList(); + + private void ensureStagesSummaryIsMutable() { + if (!((bitField0_ & 0x00000020) != 0)) { + stagesSummary_ = + new java.util.ArrayList< + com.google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary>( + stagesSummary_); + bitField0_ |= 0x00000020; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary, + com.google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary.Builder, + com.google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummaryOrBuilder> + stagesSummaryBuilder_; + + /** + * + * + *
+       * Output only. List of summaries (total duration and segment count) per
+       * each sleep stage type.
+       * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary stages_summary = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getStagesSummaryList() { + if (stagesSummaryBuilder_ == null) { + return java.util.Collections.unmodifiableList(stagesSummary_); + } else { + return stagesSummaryBuilder_.getMessageList(); + } + } + + /** + * + * + *
+       * Output only. List of summaries (total duration and segment count) per
+       * each sleep stage type.
+       * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary stages_summary = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getStagesSummaryCount() { + if (stagesSummaryBuilder_ == null) { + return stagesSummary_.size(); + } else { + return stagesSummaryBuilder_.getCount(); + } + } + + /** + * + * + *
+       * Output only. List of summaries (total duration and segment count) per
+       * each sleep stage type.
+       * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary stages_summary = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary + getStagesSummary(int index) { + if (stagesSummaryBuilder_ == null) { + return stagesSummary_.get(index); + } else { + return stagesSummaryBuilder_.getMessage(index); + } + } + + /** + * + * + *
+       * Output only. List of summaries (total duration and segment count) per
+       * each sleep stage type.
+       * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary stages_summary = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setStagesSummary( + int index, + com.google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary value) { + if (stagesSummaryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStagesSummaryIsMutable(); + stagesSummary_.set(index, value); + onChanged(); + } else { + stagesSummaryBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+       * Output only. List of summaries (total duration and segment count) per
+       * each sleep stage type.
+       * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary stages_summary = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setStagesSummary( + int index, + com.google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary.Builder + builderForValue) { + if (stagesSummaryBuilder_ == null) { + ensureStagesSummaryIsMutable(); + stagesSummary_.set(index, builderForValue.build()); + onChanged(); + } else { + stagesSummaryBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+       * Output only. List of summaries (total duration and segment count) per
+       * each sleep stage type.
+       * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary stages_summary = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addStagesSummary( + com.google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary value) { + if (stagesSummaryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStagesSummaryIsMutable(); + stagesSummary_.add(value); + onChanged(); + } else { + stagesSummaryBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+       * Output only. List of summaries (total duration and segment count) per
+       * each sleep stage type.
+       * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary stages_summary = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addStagesSummary( + int index, + com.google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary value) { + if (stagesSummaryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStagesSummaryIsMutable(); + stagesSummary_.add(index, value); + onChanged(); + } else { + stagesSummaryBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+       * Output only. List of summaries (total duration and segment count) per
+       * each sleep stage type.
+       * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary stages_summary = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addStagesSummary( + com.google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary.Builder + builderForValue) { + if (stagesSummaryBuilder_ == null) { + ensureStagesSummaryIsMutable(); + stagesSummary_.add(builderForValue.build()); + onChanged(); + } else { + stagesSummaryBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+       * Output only. List of summaries (total duration and segment count) per
+       * each sleep stage type.
+       * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary stages_summary = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addStagesSummary( + int index, + com.google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary.Builder + builderForValue) { + if (stagesSummaryBuilder_ == null) { + ensureStagesSummaryIsMutable(); + stagesSummary_.add(index, builderForValue.build()); + onChanged(); + } else { + stagesSummaryBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+       * Output only. List of summaries (total duration and segment count) per
+       * each sleep stage type.
+       * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary stages_summary = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllStagesSummary( + java.lang.Iterable< + ? extends com.google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary> + values) { + if (stagesSummaryBuilder_ == null) { + ensureStagesSummaryIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, stagesSummary_); + onChanged(); + } else { + stagesSummaryBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+       * Output only. List of summaries (total duration and segment count) per
+       * each sleep stage type.
+       * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary stages_summary = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearStagesSummary() { + if (stagesSummaryBuilder_ == null) { + stagesSummary_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + } else { + stagesSummaryBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+       * Output only. List of summaries (total duration and segment count) per
+       * each sleep stage type.
+       * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary stages_summary = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeStagesSummary(int index) { + if (stagesSummaryBuilder_ == null) { + ensureStagesSummaryIsMutable(); + stagesSummary_.remove(index); + onChanged(); + } else { + stagesSummaryBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+       * Output only. List of summaries (total duration and segment count) per
+       * each sleep stage type.
+       * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary stages_summary = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary.Builder + getStagesSummaryBuilder(int index) { + return internalGetStagesSummaryFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+       * Output only. List of summaries (total duration and segment count) per
+       * each sleep stage type.
+       * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary stages_summary = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummaryOrBuilder + getStagesSummaryOrBuilder(int index) { + if (stagesSummaryBuilder_ == null) { + return stagesSummary_.get(index); + } else { + return stagesSummaryBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+       * Output only. List of summaries (total duration and segment count) per
+       * each sleep stage type.
+       * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary stages_summary = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List< + ? extends + com.google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummaryOrBuilder> + getStagesSummaryOrBuilderList() { + if (stagesSummaryBuilder_ != null) { + return stagesSummaryBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(stagesSummary_); + } + } + + /** + * + * + *
+       * Output only. List of summaries (total duration and segment count) per
+       * each sleep stage type.
+       * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary stages_summary = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary.Builder + addStagesSummaryBuilder() { + return internalGetStagesSummaryFieldBuilder() + .addBuilder( + com.google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary + .getDefaultInstance()); + } + + /** + * + * + *
+       * Output only. List of summaries (total duration and segment count) per
+       * each sleep stage type.
+       * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary stages_summary = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary.Builder + addStagesSummaryBuilder(int index) { + return internalGetStagesSummaryFieldBuilder() + .addBuilder( + index, + com.google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary + .getDefaultInstance()); + } + + /** + * + * + *
+       * Output only. List of summaries (total duration and segment count) per
+       * each sleep stage type.
+       * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary stages_summary = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List< + com.google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary.Builder> + getStagesSummaryBuilderList() { + return internalGetStagesSummaryFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary, + com.google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary.Builder, + com.google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummaryOrBuilder> + internalGetStagesSummaryFieldBuilder() { + if (stagesSummaryBuilder_ == null) { + stagesSummaryBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary, + com.google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummary.Builder, + com.google.devicesandservices.health.v4.Sleep.SleepSummary.StageSummaryOrBuilder>( + stagesSummary_, + ((bitField0_ & 0x00000020) != 0), + getParentForChildren(), + isClean()); + stagesSummary_ = null; + } + return stagesSummaryBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.Sleep.SleepSummary) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.Sleep.SleepSummary) + private static final com.google.devicesandservices.health.v4.Sleep.SleepSummary + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.Sleep.SleepSummary(); + } + + public static com.google.devicesandservices.health.v4.Sleep.SleepSummary getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SleepSummary parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.Sleep.SleepSummary getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int INTERVAL_FIELD_NUMBER = 3; + private com.google.devicesandservices.health.v4.SessionTimeInterval interval_; + + /** + * + * + *
+   * Required. Observed sleep interval.
+   * 
+ * + * + * .google.devicesandservices.health.v4.SessionTimeInterval interval = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the interval field is set. + */ + @java.lang.Override + public boolean hasInterval() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. Observed sleep interval.
+   * 
+ * + * + * .google.devicesandservices.health.v4.SessionTimeInterval interval = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The interval. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.SessionTimeInterval getInterval() { + return interval_ == null + ? com.google.devicesandservices.health.v4.SessionTimeInterval.getDefaultInstance() + : interval_; + } + + /** + * + * + *
+   * Required. Observed sleep interval.
+   * 
+ * + * + * .google.devicesandservices.health.v4.SessionTimeInterval interval = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.SessionTimeIntervalOrBuilder + getIntervalOrBuilder() { + return interval_ == null + ? com.google.devicesandservices.health.v4.SessionTimeInterval.getDefaultInstance() + : interval_; + } + + public static final int TYPE_FIELD_NUMBER = 4; + private int type_ = 0; + + /** + * + * + *
+   * Optional. SleepType: classic or stages.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Sleep.SleepType type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + + /** + * + * + *
+   * Optional. SleepType: classic or stages.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Sleep.SleepType type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Sleep.SleepType getType() { + com.google.devicesandservices.health.v4.Sleep.SleepType result = + com.google.devicesandservices.health.v4.Sleep.SleepType.forNumber(type_); + return result == null + ? com.google.devicesandservices.health.v4.Sleep.SleepType.UNRECOGNIZED + : result; + } + + public static final int STAGES_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private java.util.List stages_; + + /** + * + * + *
+   * Optional. List of non-overlapping contiguous sleep stage segments that
+   * cover the sleep period.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.SleepStage stages = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List getStagesList() { + return stages_; + } + + /** + * + * + *
+   * Optional. List of non-overlapping contiguous sleep stage segments that
+   * cover the sleep period.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.SleepStage stages = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getStagesOrBuilderList() { + return stages_; + } + + /** + * + * + *
+   * Optional. List of non-overlapping contiguous sleep stage segments that
+   * cover the sleep period.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.SleepStage stages = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getStagesCount() { + return stages_.size(); + } + + /** + * + * + *
+   * Optional. List of non-overlapping contiguous sleep stage segments that
+   * cover the sleep period.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.SleepStage stages = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Sleep.SleepStage getStages(int index) { + return stages_.get(index); + } + + /** + * + * + *
+   * Optional. List of non-overlapping contiguous sleep stage segments that
+   * cover the sleep period.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.SleepStage stages = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Sleep.SleepStageOrBuilder getStagesOrBuilder( + int index) { + return stages_.get(index); + } + + public static final int OUT_OF_BED_SEGMENTS_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private java.util.List + outOfBedSegments_; + + /** + * + * + *
+   * Optional.
+   * “Out of bed” segments that can overlap with sleep stages.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.OutOfBedSegment out_of_bed_segments = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getOutOfBedSegmentsList() { + return outOfBedSegments_; + } + + /** + * + * + *
+   * Optional.
+   * “Out of bed” segments that can overlap with sleep stages.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.OutOfBedSegment out_of_bed_segments = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.devicesandservices.health.v4.Sleep.OutOfBedSegmentOrBuilder> + getOutOfBedSegmentsOrBuilderList() { + return outOfBedSegments_; + } + + /** + * + * + *
+   * Optional.
+   * “Out of bed” segments that can overlap with sleep stages.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.OutOfBedSegment out_of_bed_segments = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getOutOfBedSegmentsCount() { + return outOfBedSegments_.size(); + } + + /** + * + * + *
+   * Optional.
+   * “Out of bed” segments that can overlap with sleep stages.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.OutOfBedSegment out_of_bed_segments = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Sleep.OutOfBedSegment getOutOfBedSegments( + int index) { + return outOfBedSegments_.get(index); + } + + /** + * + * + *
+   * Optional.
+   * “Out of bed” segments that can overlap with sleep stages.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.OutOfBedSegment out_of_bed_segments = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Sleep.OutOfBedSegmentOrBuilder + getOutOfBedSegmentsOrBuilder(int index) { + return outOfBedSegments_.get(index); + } + + public static final int METADATA_FIELD_NUMBER = 8; + private com.google.devicesandservices.health.v4.Sleep.SleepMetadata metadata_; + + /** + * + * + *
+   * Optional. Sleep metadata: processing, main, manually edited, stages status.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Sleep.SleepMetadata metadata = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the metadata field is set. + */ + @java.lang.Override + public boolean hasMetadata() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Optional. Sleep metadata: processing, main, manually edited, stages status.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Sleep.SleepMetadata metadata = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The metadata. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Sleep.SleepMetadata getMetadata() { + return metadata_ == null + ? com.google.devicesandservices.health.v4.Sleep.SleepMetadata.getDefaultInstance() + : metadata_; + } + + /** + * + * + *
+   * Optional. Sleep metadata: processing, main, manually edited, stages status.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Sleep.SleepMetadata metadata = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Sleep.SleepMetadataOrBuilder + getMetadataOrBuilder() { + return metadata_ == null + ? com.google.devicesandservices.health.v4.Sleep.SleepMetadata.getDefaultInstance() + : metadata_; + } + + public static final int SUMMARY_FIELD_NUMBER = 9; + private com.google.devicesandservices.health.v4.Sleep.SleepSummary summary_; + + /** + * + * + *
+   * Output only. Sleep summary: metrics and stages summary.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Sleep.SleepSummary summary = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the summary field is set. + */ + @java.lang.Override + public boolean hasSummary() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Output only. Sleep summary: metrics and stages summary.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Sleep.SleepSummary summary = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The summary. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Sleep.SleepSummary getSummary() { + return summary_ == null + ? com.google.devicesandservices.health.v4.Sleep.SleepSummary.getDefaultInstance() + : summary_; + } + + /** + * + * + *
+   * Output only. Sleep summary: metrics and stages summary.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Sleep.SleepSummary summary = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Sleep.SleepSummaryOrBuilder getSummaryOrBuilder() { + return summary_ == null + ? com.google.devicesandservices.health.v4.Sleep.SleepSummary.getDefaultInstance() + : summary_; + } + + public static final int CREATE_TIME_FIELD_NUMBER = 10; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
+   * Output only. Creation time of this sleep observation.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+   * Output only. Creation time of this sleep observation.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + /** + * + * + *
+   * Output only. Creation time of this sleep observation.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 11; + private com.google.protobuf.Timestamp updateTime_; + + /** + * + * + *
+   * Output only. Last update time of this sleep observation.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+   * Output only. Last update time of this sleep observation.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + /** + * + * + *
+   * Output only. Last update time of this sleep observation.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getInterval()); + } + if (type_ + != com.google.devicesandservices.health.v4.Sleep.SleepType.SLEEP_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(4, type_); + } + for (int i = 0; i < stages_.size(); i++) { + output.writeMessage(5, stages_.get(i)); + } + for (int i = 0; i < outOfBedSegments_.size(); i++) { + output.writeMessage(6, outOfBedSegments_.get(i)); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(8, getMetadata()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(9, getSummary()); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(10, getCreateTime()); + } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeMessage(11, getUpdateTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getInterval()); + } + if (type_ + != com.google.devicesandservices.health.v4.Sleep.SleepType.SLEEP_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, type_); + } + for (int i = 0; i < stages_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, stages_.get(i)); + } + for (int i = 0; i < outOfBedSegments_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, outOfBedSegments_.get(i)); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getMetadata()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getSummary()); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getCreateTime()); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getUpdateTime()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.Sleep)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.Sleep other = + (com.google.devicesandservices.health.v4.Sleep) obj; + + if (hasInterval() != other.hasInterval()) return false; + if (hasInterval()) { + if (!getInterval().equals(other.getInterval())) return false; + } + if (type_ != other.type_) return false; + if (!getStagesList().equals(other.getStagesList())) return false; + if (!getOutOfBedSegmentsList().equals(other.getOutOfBedSegmentsList())) return false; + if (hasMetadata() != other.hasMetadata()) return false; + if (hasMetadata()) { + if (!getMetadata().equals(other.getMetadata())) return false; + } + if (hasSummary() != other.hasSummary()) return false; + if (hasSummary()) { + if (!getSummary().equals(other.getSummary())) return false; + } + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasInterval()) { + hash = (37 * hash) + INTERVAL_FIELD_NUMBER; + hash = (53 * hash) + getInterval().hashCode(); + } + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + if (getStagesCount() > 0) { + hash = (37 * hash) + STAGES_FIELD_NUMBER; + hash = (53 * hash) + getStagesList().hashCode(); + } + if (getOutOfBedSegmentsCount() > 0) { + hash = (37 * hash) + OUT_OF_BED_SEGMENTS_FIELD_NUMBER; + hash = (53 * hash) + getOutOfBedSegmentsList().hashCode(); + } + if (hasMetadata()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + getMetadata().hashCode(); + } + if (hasSummary()) { + hash = (37 * hash) + SUMMARY_FIELD_NUMBER; + hash = (53 * hash) + getSummary().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.Sleep parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.Sleep parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Sleep parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.Sleep parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Sleep parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.Sleep parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Sleep parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.Sleep parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Sleep parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.Sleep parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Sleep parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.Sleep parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.devicesandservices.health.v4.Sleep prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A sleep session possibly including stages.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.Sleep} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.Sleep) + com.google.devicesandservices.health.v4.SleepOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_Sleep_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_Sleep_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.Sleep.class, + com.google.devicesandservices.health.v4.Sleep.Builder.class); + } + + // Construct using com.google.devicesandservices.health.v4.Sleep.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetIntervalFieldBuilder(); + internalGetStagesFieldBuilder(); + internalGetOutOfBedSegmentsFieldBuilder(); + internalGetMetadataFieldBuilder(); + internalGetSummaryFieldBuilder(); + internalGetCreateTimeFieldBuilder(); + internalGetUpdateTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + interval_ = null; + if (intervalBuilder_ != null) { + intervalBuilder_.dispose(); + intervalBuilder_ = null; + } + type_ = 0; + if (stagesBuilder_ == null) { + stages_ = java.util.Collections.emptyList(); + } else { + stages_ = null; + stagesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + if (outOfBedSegmentsBuilder_ == null) { + outOfBedSegments_ = java.util.Collections.emptyList(); + } else { + outOfBedSegments_ = null; + outOfBedSegmentsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + summary_ = null; + if (summaryBuilder_ != null) { + summaryBuilder_.dispose(); + summaryBuilder_ = null; + } + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_Sleep_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.Sleep getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.Sleep.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.Sleep build() { + com.google.devicesandservices.health.v4.Sleep result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.Sleep buildPartial() { + com.google.devicesandservices.health.v4.Sleep result = + new com.google.devicesandservices.health.v4.Sleep(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.devicesandservices.health.v4.Sleep result) { + if (stagesBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + stages_ = java.util.Collections.unmodifiableList(stages_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.stages_ = stages_; + } else { + result.stages_ = stagesBuilder_.build(); + } + if (outOfBedSegmentsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + outOfBedSegments_ = java.util.Collections.unmodifiableList(outOfBedSegments_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.outOfBedSegments_ = outOfBedSegments_; + } else { + result.outOfBedSegments_ = outOfBedSegmentsBuilder_.build(); + } + } + + private void buildPartial0(com.google.devicesandservices.health.v4.Sleep result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.interval_ = intervalBuilder_ == null ? interval_ : intervalBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.type_ = type_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.metadata_ = metadataBuilder_ == null ? metadata_ : metadataBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.summary_ = summaryBuilder_ == null ? summary_ : summaryBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000010; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.Sleep) { + return mergeFrom((com.google.devicesandservices.health.v4.Sleep) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.devicesandservices.health.v4.Sleep other) { + if (other == com.google.devicesandservices.health.v4.Sleep.getDefaultInstance()) return this; + if (other.hasInterval()) { + mergeInterval(other.getInterval()); + } + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (stagesBuilder_ == null) { + if (!other.stages_.isEmpty()) { + if (stages_.isEmpty()) { + stages_ = other.stages_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureStagesIsMutable(); + stages_.addAll(other.stages_); + } + onChanged(); + } + } else { + if (!other.stages_.isEmpty()) { + if (stagesBuilder_.isEmpty()) { + stagesBuilder_.dispose(); + stagesBuilder_ = null; + stages_ = other.stages_; + bitField0_ = (bitField0_ & ~0x00000004); + stagesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetStagesFieldBuilder() + : null; + } else { + stagesBuilder_.addAllMessages(other.stages_); + } + } + } + if (outOfBedSegmentsBuilder_ == null) { + if (!other.outOfBedSegments_.isEmpty()) { + if (outOfBedSegments_.isEmpty()) { + outOfBedSegments_ = other.outOfBedSegments_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureOutOfBedSegmentsIsMutable(); + outOfBedSegments_.addAll(other.outOfBedSegments_); + } + onChanged(); + } + } else { + if (!other.outOfBedSegments_.isEmpty()) { + if (outOfBedSegmentsBuilder_.isEmpty()) { + outOfBedSegmentsBuilder_.dispose(); + outOfBedSegmentsBuilder_ = null; + outOfBedSegments_ = other.outOfBedSegments_; + bitField0_ = (bitField0_ & ~0x00000008); + outOfBedSegmentsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetOutOfBedSegmentsFieldBuilder() + : null; + } else { + outOfBedSegmentsBuilder_.addAllMessages(other.outOfBedSegments_); + } + } + } + if (other.hasMetadata()) { + mergeMetadata(other.getMetadata()); + } + if (other.hasSummary()) { + mergeSummary(other.getSummary()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 26: + { + input.readMessage( + internalGetIntervalFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 26 + case 32: + { + type_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 32 + case 42: + { + com.google.devicesandservices.health.v4.Sleep.SleepStage m = + input.readMessage( + com.google.devicesandservices.health.v4.Sleep.SleepStage.parser(), + extensionRegistry); + if (stagesBuilder_ == null) { + ensureStagesIsMutable(); + stages_.add(m); + } else { + stagesBuilder_.addMessage(m); + } + break; + } // case 42 + case 50: + { + com.google.devicesandservices.health.v4.Sleep.OutOfBedSegment m = + input.readMessage( + com.google.devicesandservices.health.v4.Sleep.OutOfBedSegment.parser(), + extensionRegistry); + if (outOfBedSegmentsBuilder_ == null) { + ensureOutOfBedSegmentsIsMutable(); + outOfBedSegments_.add(m); + } else { + outOfBedSegmentsBuilder_.addMessage(m); + } + break; + } // case 50 + case 66: + { + input.readMessage( + internalGetMetadataFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 66 + case 74: + { + input.readMessage(internalGetSummaryFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 74 + case 82: + { + input.readMessage( + internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 82 + case 90: + { + input.readMessage( + internalGetUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 90 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.devicesandservices.health.v4.SessionTimeInterval interval_; + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.SessionTimeInterval, + com.google.devicesandservices.health.v4.SessionTimeInterval.Builder, + com.google.devicesandservices.health.v4.SessionTimeIntervalOrBuilder> + intervalBuilder_; + + /** + * + * + *
+     * Required. Observed sleep interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.SessionTimeInterval interval = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the interval field is set. + */ + public boolean hasInterval() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. Observed sleep interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.SessionTimeInterval interval = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The interval. + */ + public com.google.devicesandservices.health.v4.SessionTimeInterval getInterval() { + if (intervalBuilder_ == null) { + return interval_ == null + ? com.google.devicesandservices.health.v4.SessionTimeInterval.getDefaultInstance() + : interval_; + } else { + return intervalBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. Observed sleep interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.SessionTimeInterval interval = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setInterval(com.google.devicesandservices.health.v4.SessionTimeInterval value) { + if (intervalBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + interval_ = value; + } else { + intervalBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Observed sleep interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.SessionTimeInterval interval = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setInterval( + com.google.devicesandservices.health.v4.SessionTimeInterval.Builder builderForValue) { + if (intervalBuilder_ == null) { + interval_ = builderForValue.build(); + } else { + intervalBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Observed sleep interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.SessionTimeInterval interval = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeInterval( + com.google.devicesandservices.health.v4.SessionTimeInterval value) { + if (intervalBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && interval_ != null + && interval_ + != com.google.devicesandservices.health.v4.SessionTimeInterval + .getDefaultInstance()) { + getIntervalBuilder().mergeFrom(value); + } else { + interval_ = value; + } + } else { + intervalBuilder_.mergeFrom(value); + } + if (interval_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. Observed sleep interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.SessionTimeInterval interval = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearInterval() { + bitField0_ = (bitField0_ & ~0x00000001); + interval_ = null; + if (intervalBuilder_ != null) { + intervalBuilder_.dispose(); + intervalBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Observed sleep interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.SessionTimeInterval interval = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.devicesandservices.health.v4.SessionTimeInterval.Builder + getIntervalBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetIntervalFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. Observed sleep interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.SessionTimeInterval interval = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.devicesandservices.health.v4.SessionTimeIntervalOrBuilder + getIntervalOrBuilder() { + if (intervalBuilder_ != null) { + return intervalBuilder_.getMessageOrBuilder(); + } else { + return interval_ == null + ? com.google.devicesandservices.health.v4.SessionTimeInterval.getDefaultInstance() + : interval_; + } + } + + /** + * + * + *
+     * Required. Observed sleep interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.SessionTimeInterval interval = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.SessionTimeInterval, + com.google.devicesandservices.health.v4.SessionTimeInterval.Builder, + com.google.devicesandservices.health.v4.SessionTimeIntervalOrBuilder> + internalGetIntervalFieldBuilder() { + if (intervalBuilder_ == null) { + intervalBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.SessionTimeInterval, + com.google.devicesandservices.health.v4.SessionTimeInterval.Builder, + com.google.devicesandservices.health.v4.SessionTimeIntervalOrBuilder>( + getInterval(), getParentForChildren(), isClean()); + interval_ = null; + } + return intervalBuilder_; + } + + private int type_ = 0; + + /** + * + * + *
+     * Optional. SleepType: classic or stages.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Sleep.SleepType type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + + /** + * + * + *
+     * Optional. SleepType: classic or stages.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Sleep.SleepType type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + type_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. SleepType: classic or stages.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Sleep.SleepType type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Sleep.SleepType getType() { + com.google.devicesandservices.health.v4.Sleep.SleepType result = + com.google.devicesandservices.health.v4.Sleep.SleepType.forNumber(type_); + return result == null + ? com.google.devicesandservices.health.v4.Sleep.SleepType.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Optional. SleepType: classic or stages.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Sleep.SleepType type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.devicesandservices.health.v4.Sleep.SleepType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + type_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. SleepType: classic or stages.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Sleep.SleepType type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000002); + type_ = 0; + onChanged(); + return this; + } + + private java.util.List stages_ = + java.util.Collections.emptyList(); + + private void ensureStagesIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + stages_ = + new java.util.ArrayList( + stages_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.devicesandservices.health.v4.Sleep.SleepStage, + com.google.devicesandservices.health.v4.Sleep.SleepStage.Builder, + com.google.devicesandservices.health.v4.Sleep.SleepStageOrBuilder> + stagesBuilder_; + + /** + * + * + *
+     * Optional. List of non-overlapping contiguous sleep stage segments that
+     * cover the sleep period.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.SleepStage stages = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getStagesList() { + if (stagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(stages_); + } else { + return stagesBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Optional. List of non-overlapping contiguous sleep stage segments that
+     * cover the sleep period.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.SleepStage stages = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getStagesCount() { + if (stagesBuilder_ == null) { + return stages_.size(); + } else { + return stagesBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Optional. List of non-overlapping contiguous sleep stage segments that
+     * cover the sleep period.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.SleepStage stages = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.devicesandservices.health.v4.Sleep.SleepStage getStages(int index) { + if (stagesBuilder_ == null) { + return stages_.get(index); + } else { + return stagesBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Optional. List of non-overlapping contiguous sleep stage segments that
+     * cover the sleep period.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.SleepStage stages = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setStages( + int index, com.google.devicesandservices.health.v4.Sleep.SleepStage value) { + if (stagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStagesIsMutable(); + stages_.set(index, value); + onChanged(); + } else { + stagesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. List of non-overlapping contiguous sleep stage segments that
+     * cover the sleep period.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.SleepStage stages = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setStages( + int index, + com.google.devicesandservices.health.v4.Sleep.SleepStage.Builder builderForValue) { + if (stagesBuilder_ == null) { + ensureStagesIsMutable(); + stages_.set(index, builderForValue.build()); + onChanged(); + } else { + stagesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. List of non-overlapping contiguous sleep stage segments that
+     * cover the sleep period.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.SleepStage stages = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addStages(com.google.devicesandservices.health.v4.Sleep.SleepStage value) { + if (stagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStagesIsMutable(); + stages_.add(value); + onChanged(); + } else { + stagesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Optional. List of non-overlapping contiguous sleep stage segments that
+     * cover the sleep period.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.SleepStage stages = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addStages( + int index, com.google.devicesandservices.health.v4.Sleep.SleepStage value) { + if (stagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStagesIsMutable(); + stages_.add(index, value); + onChanged(); + } else { + stagesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. List of non-overlapping contiguous sleep stage segments that
+     * cover the sleep period.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.SleepStage stages = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addStages( + com.google.devicesandservices.health.v4.Sleep.SleepStage.Builder builderForValue) { + if (stagesBuilder_ == null) { + ensureStagesIsMutable(); + stages_.add(builderForValue.build()); + onChanged(); + } else { + stagesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. List of non-overlapping contiguous sleep stage segments that
+     * cover the sleep period.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.SleepStage stages = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addStages( + int index, + com.google.devicesandservices.health.v4.Sleep.SleepStage.Builder builderForValue) { + if (stagesBuilder_ == null) { + ensureStagesIsMutable(); + stages_.add(index, builderForValue.build()); + onChanged(); + } else { + stagesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. List of non-overlapping contiguous sleep stage segments that
+     * cover the sleep period.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.SleepStage stages = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllStages( + java.lang.Iterable + values) { + if (stagesBuilder_ == null) { + ensureStagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, stages_); + onChanged(); + } else { + stagesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Optional. List of non-overlapping contiguous sleep stage segments that
+     * cover the sleep period.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.SleepStage stages = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearStages() { + if (stagesBuilder_ == null) { + stages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + stagesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. List of non-overlapping contiguous sleep stage segments that
+     * cover the sleep period.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.SleepStage stages = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeStages(int index) { + if (stagesBuilder_ == null) { + ensureStagesIsMutable(); + stages_.remove(index); + onChanged(); + } else { + stagesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Optional. List of non-overlapping contiguous sleep stage segments that
+     * cover the sleep period.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.SleepStage stages = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.devicesandservices.health.v4.Sleep.SleepStage.Builder getStagesBuilder( + int index) { + return internalGetStagesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Optional. List of non-overlapping contiguous sleep stage segments that
+     * cover the sleep period.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.SleepStage stages = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.devicesandservices.health.v4.Sleep.SleepStageOrBuilder getStagesOrBuilder( + int index) { + if (stagesBuilder_ == null) { + return stages_.get(index); + } else { + return stagesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Optional. List of non-overlapping contiguous sleep stage segments that
+     * cover the sleep period.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.SleepStage stages = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List< + ? extends com.google.devicesandservices.health.v4.Sleep.SleepStageOrBuilder> + getStagesOrBuilderList() { + if (stagesBuilder_ != null) { + return stagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(stages_); + } + } + + /** + * + * + *
+     * Optional. List of non-overlapping contiguous sleep stage segments that
+     * cover the sleep period.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.SleepStage stages = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.devicesandservices.health.v4.Sleep.SleepStage.Builder addStagesBuilder() { + return internalGetStagesFieldBuilder() + .addBuilder( + com.google.devicesandservices.health.v4.Sleep.SleepStage.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. List of non-overlapping contiguous sleep stage segments that
+     * cover the sleep period.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.SleepStage stages = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.devicesandservices.health.v4.Sleep.SleepStage.Builder addStagesBuilder( + int index) { + return internalGetStagesFieldBuilder() + .addBuilder( + index, com.google.devicesandservices.health.v4.Sleep.SleepStage.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. List of non-overlapping contiguous sleep stage segments that
+     * cover the sleep period.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.SleepStage stages = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getStagesBuilderList() { + return internalGetStagesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.devicesandservices.health.v4.Sleep.SleepStage, + com.google.devicesandservices.health.v4.Sleep.SleepStage.Builder, + com.google.devicesandservices.health.v4.Sleep.SleepStageOrBuilder> + internalGetStagesFieldBuilder() { + if (stagesBuilder_ == null) { + stagesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.devicesandservices.health.v4.Sleep.SleepStage, + com.google.devicesandservices.health.v4.Sleep.SleepStage.Builder, + com.google.devicesandservices.health.v4.Sleep.SleepStageOrBuilder>( + stages_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); + stages_ = null; + } + return stagesBuilder_; + } + + private java.util.List + outOfBedSegments_ = java.util.Collections.emptyList(); + + private void ensureOutOfBedSegmentsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + outOfBedSegments_ = + new java.util.ArrayList( + outOfBedSegments_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.devicesandservices.health.v4.Sleep.OutOfBedSegment, + com.google.devicesandservices.health.v4.Sleep.OutOfBedSegment.Builder, + com.google.devicesandservices.health.v4.Sleep.OutOfBedSegmentOrBuilder> + outOfBedSegmentsBuilder_; + + /** + * + * + *
+     * Optional.
+     * “Out of bed” segments that can overlap with sleep stages.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.OutOfBedSegment out_of_bed_segments = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getOutOfBedSegmentsList() { + if (outOfBedSegmentsBuilder_ == null) { + return java.util.Collections.unmodifiableList(outOfBedSegments_); + } else { + return outOfBedSegmentsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Optional.
+     * “Out of bed” segments that can overlap with sleep stages.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.OutOfBedSegment out_of_bed_segments = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getOutOfBedSegmentsCount() { + if (outOfBedSegmentsBuilder_ == null) { + return outOfBedSegments_.size(); + } else { + return outOfBedSegmentsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Optional.
+     * “Out of bed” segments that can overlap with sleep stages.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.OutOfBedSegment out_of_bed_segments = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.devicesandservices.health.v4.Sleep.OutOfBedSegment getOutOfBedSegments( + int index) { + if (outOfBedSegmentsBuilder_ == null) { + return outOfBedSegments_.get(index); + } else { + return outOfBedSegmentsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Optional.
+     * “Out of bed” segments that can overlap with sleep stages.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.OutOfBedSegment out_of_bed_segments = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setOutOfBedSegments( + int index, com.google.devicesandservices.health.v4.Sleep.OutOfBedSegment value) { + if (outOfBedSegmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOutOfBedSegmentsIsMutable(); + outOfBedSegments_.set(index, value); + onChanged(); + } else { + outOfBedSegmentsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional.
+     * “Out of bed” segments that can overlap with sleep stages.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.OutOfBedSegment out_of_bed_segments = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setOutOfBedSegments( + int index, + com.google.devicesandservices.health.v4.Sleep.OutOfBedSegment.Builder builderForValue) { + if (outOfBedSegmentsBuilder_ == null) { + ensureOutOfBedSegmentsIsMutable(); + outOfBedSegments_.set(index, builderForValue.build()); + onChanged(); + } else { + outOfBedSegmentsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional.
+     * “Out of bed” segments that can overlap with sleep stages.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.OutOfBedSegment out_of_bed_segments = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addOutOfBedSegments( + com.google.devicesandservices.health.v4.Sleep.OutOfBedSegment value) { + if (outOfBedSegmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOutOfBedSegmentsIsMutable(); + outOfBedSegments_.add(value); + onChanged(); + } else { + outOfBedSegmentsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Optional.
+     * “Out of bed” segments that can overlap with sleep stages.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.OutOfBedSegment out_of_bed_segments = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addOutOfBedSegments( + int index, com.google.devicesandservices.health.v4.Sleep.OutOfBedSegment value) { + if (outOfBedSegmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOutOfBedSegmentsIsMutable(); + outOfBedSegments_.add(index, value); + onChanged(); + } else { + outOfBedSegmentsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional.
+     * “Out of bed” segments that can overlap with sleep stages.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.OutOfBedSegment out_of_bed_segments = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addOutOfBedSegments( + com.google.devicesandservices.health.v4.Sleep.OutOfBedSegment.Builder builderForValue) { + if (outOfBedSegmentsBuilder_ == null) { + ensureOutOfBedSegmentsIsMutable(); + outOfBedSegments_.add(builderForValue.build()); + onChanged(); + } else { + outOfBedSegmentsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional.
+     * “Out of bed” segments that can overlap with sleep stages.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.OutOfBedSegment out_of_bed_segments = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addOutOfBedSegments( + int index, + com.google.devicesandservices.health.v4.Sleep.OutOfBedSegment.Builder builderForValue) { + if (outOfBedSegmentsBuilder_ == null) { + ensureOutOfBedSegmentsIsMutable(); + outOfBedSegments_.add(index, builderForValue.build()); + onChanged(); + } else { + outOfBedSegmentsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional.
+     * “Out of bed” segments that can overlap with sleep stages.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.OutOfBedSegment out_of_bed_segments = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllOutOfBedSegments( + java.lang.Iterable + values) { + if (outOfBedSegmentsBuilder_ == null) { + ensureOutOfBedSegmentsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, outOfBedSegments_); + onChanged(); + } else { + outOfBedSegmentsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Optional.
+     * “Out of bed” segments that can overlap with sleep stages.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.OutOfBedSegment out_of_bed_segments = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearOutOfBedSegments() { + if (outOfBedSegmentsBuilder_ == null) { + outOfBedSegments_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + outOfBedSegmentsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional.
+     * “Out of bed” segments that can overlap with sleep stages.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.OutOfBedSegment out_of_bed_segments = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeOutOfBedSegments(int index) { + if (outOfBedSegmentsBuilder_ == null) { + ensureOutOfBedSegmentsIsMutable(); + outOfBedSegments_.remove(index); + onChanged(); + } else { + outOfBedSegmentsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Optional.
+     * “Out of bed” segments that can overlap with sleep stages.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.OutOfBedSegment out_of_bed_segments = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.devicesandservices.health.v4.Sleep.OutOfBedSegment.Builder + getOutOfBedSegmentsBuilder(int index) { + return internalGetOutOfBedSegmentsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Optional.
+     * “Out of bed” segments that can overlap with sleep stages.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.OutOfBedSegment out_of_bed_segments = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.devicesandservices.health.v4.Sleep.OutOfBedSegmentOrBuilder + getOutOfBedSegmentsOrBuilder(int index) { + if (outOfBedSegmentsBuilder_ == null) { + return outOfBedSegments_.get(index); + } else { + return outOfBedSegmentsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Optional.
+     * “Out of bed” segments that can overlap with sleep stages.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.OutOfBedSegment out_of_bed_segments = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List< + ? extends com.google.devicesandservices.health.v4.Sleep.OutOfBedSegmentOrBuilder> + getOutOfBedSegmentsOrBuilderList() { + if (outOfBedSegmentsBuilder_ != null) { + return outOfBedSegmentsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(outOfBedSegments_); + } + } + + /** + * + * + *
+     * Optional.
+     * “Out of bed” segments that can overlap with sleep stages.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.OutOfBedSegment out_of_bed_segments = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.devicesandservices.health.v4.Sleep.OutOfBedSegment.Builder + addOutOfBedSegmentsBuilder() { + return internalGetOutOfBedSegmentsFieldBuilder() + .addBuilder( + com.google.devicesandservices.health.v4.Sleep.OutOfBedSegment.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional.
+     * “Out of bed” segments that can overlap with sleep stages.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.OutOfBedSegment out_of_bed_segments = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.devicesandservices.health.v4.Sleep.OutOfBedSegment.Builder + addOutOfBedSegmentsBuilder(int index) { + return internalGetOutOfBedSegmentsFieldBuilder() + .addBuilder( + index, + com.google.devicesandservices.health.v4.Sleep.OutOfBedSegment.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional.
+     * “Out of bed” segments that can overlap with sleep stages.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.OutOfBedSegment out_of_bed_segments = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getOutOfBedSegmentsBuilderList() { + return internalGetOutOfBedSegmentsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.devicesandservices.health.v4.Sleep.OutOfBedSegment, + com.google.devicesandservices.health.v4.Sleep.OutOfBedSegment.Builder, + com.google.devicesandservices.health.v4.Sleep.OutOfBedSegmentOrBuilder> + internalGetOutOfBedSegmentsFieldBuilder() { + if (outOfBedSegmentsBuilder_ == null) { + outOfBedSegmentsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.devicesandservices.health.v4.Sleep.OutOfBedSegment, + com.google.devicesandservices.health.v4.Sleep.OutOfBedSegment.Builder, + com.google.devicesandservices.health.v4.Sleep.OutOfBedSegmentOrBuilder>( + outOfBedSegments_, + ((bitField0_ & 0x00000008) != 0), + getParentForChildren(), + isClean()); + outOfBedSegments_ = null; + } + return outOfBedSegmentsBuilder_; + } + + private com.google.devicesandservices.health.v4.Sleep.SleepMetadata metadata_; + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.Sleep.SleepMetadata, + com.google.devicesandservices.health.v4.Sleep.SleepMetadata.Builder, + com.google.devicesandservices.health.v4.Sleep.SleepMetadataOrBuilder> + metadataBuilder_; + + /** + * + * + *
+     * Optional. Sleep metadata: processing, main, manually edited, stages status.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Sleep.SleepMetadata metadata = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the metadata field is set. + */ + public boolean hasMetadata() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+     * Optional. Sleep metadata: processing, main, manually edited, stages status.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Sleep.SleepMetadata metadata = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The metadata. + */ + public com.google.devicesandservices.health.v4.Sleep.SleepMetadata getMetadata() { + if (metadataBuilder_ == null) { + return metadata_ == null + ? com.google.devicesandservices.health.v4.Sleep.SleepMetadata.getDefaultInstance() + : metadata_; + } else { + return metadataBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. Sleep metadata: processing, main, manually edited, stages status.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Sleep.SleepMetadata metadata = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setMetadata(com.google.devicesandservices.health.v4.Sleep.SleepMetadata value) { + if (metadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metadata_ = value; + } else { + metadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Sleep metadata: processing, main, manually edited, stages status.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Sleep.SleepMetadata metadata = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setMetadata( + com.google.devicesandservices.health.v4.Sleep.SleepMetadata.Builder builderForValue) { + if (metadataBuilder_ == null) { + metadata_ = builderForValue.build(); + } else { + metadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Sleep metadata: processing, main, manually edited, stages status.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Sleep.SleepMetadata metadata = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeMetadata( + com.google.devicesandservices.health.v4.Sleep.SleepMetadata value) { + if (metadataBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && metadata_ != null + && metadata_ + != com.google.devicesandservices.health.v4.Sleep.SleepMetadata + .getDefaultInstance()) { + getMetadataBuilder().mergeFrom(value); + } else { + metadata_ = value; + } + } else { + metadataBuilder_.mergeFrom(value); + } + if (metadata_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. Sleep metadata: processing, main, manually edited, stages status.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Sleep.SleepMetadata metadata = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearMetadata() { + bitField0_ = (bitField0_ & ~0x00000010); + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Sleep metadata: processing, main, manually edited, stages status.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Sleep.SleepMetadata metadata = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.devicesandservices.health.v4.Sleep.SleepMetadata.Builder + getMetadataBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return internalGetMetadataFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Sleep metadata: processing, main, manually edited, stages status.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Sleep.SleepMetadata metadata = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.devicesandservices.health.v4.Sleep.SleepMetadataOrBuilder + getMetadataOrBuilder() { + if (metadataBuilder_ != null) { + return metadataBuilder_.getMessageOrBuilder(); + } else { + return metadata_ == null + ? com.google.devicesandservices.health.v4.Sleep.SleepMetadata.getDefaultInstance() + : metadata_; + } + } + + /** + * + * + *
+     * Optional. Sleep metadata: processing, main, manually edited, stages status.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Sleep.SleepMetadata metadata = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.Sleep.SleepMetadata, + com.google.devicesandservices.health.v4.Sleep.SleepMetadata.Builder, + com.google.devicesandservices.health.v4.Sleep.SleepMetadataOrBuilder> + internalGetMetadataFieldBuilder() { + if (metadataBuilder_ == null) { + metadataBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.Sleep.SleepMetadata, + com.google.devicesandservices.health.v4.Sleep.SleepMetadata.Builder, + com.google.devicesandservices.health.v4.Sleep.SleepMetadataOrBuilder>( + getMetadata(), getParentForChildren(), isClean()); + metadata_ = null; + } + return metadataBuilder_; + } + + private com.google.devicesandservices.health.v4.Sleep.SleepSummary summary_; + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.Sleep.SleepSummary, + com.google.devicesandservices.health.v4.Sleep.SleepSummary.Builder, + com.google.devicesandservices.health.v4.Sleep.SleepSummaryOrBuilder> + summaryBuilder_; + + /** + * + * + *
+     * Output only. Sleep summary: metrics and stages summary.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Sleep.SleepSummary summary = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the summary field is set. + */ + public boolean hasSummary() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+     * Output only. Sleep summary: metrics and stages summary.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Sleep.SleepSummary summary = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The summary. + */ + public com.google.devicesandservices.health.v4.Sleep.SleepSummary getSummary() { + if (summaryBuilder_ == null) { + return summary_ == null + ? com.google.devicesandservices.health.v4.Sleep.SleepSummary.getDefaultInstance() + : summary_; + } else { + return summaryBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. Sleep summary: metrics and stages summary.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Sleep.SleepSummary summary = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setSummary(com.google.devicesandservices.health.v4.Sleep.SleepSummary value) { + if (summaryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + summary_ = value; + } else { + summaryBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Sleep summary: metrics and stages summary.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Sleep.SleepSummary summary = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setSummary( + com.google.devicesandservices.health.v4.Sleep.SleepSummary.Builder builderForValue) { + if (summaryBuilder_ == null) { + summary_ = builderForValue.build(); + } else { + summaryBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Sleep summary: metrics and stages summary.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Sleep.SleepSummary summary = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeSummary(com.google.devicesandservices.health.v4.Sleep.SleepSummary value) { + if (summaryBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && summary_ != null + && summary_ + != com.google.devicesandservices.health.v4.Sleep.SleepSummary + .getDefaultInstance()) { + getSummaryBuilder().mergeFrom(value); + } else { + summary_ = value; + } + } else { + summaryBuilder_.mergeFrom(value); + } + if (summary_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. Sleep summary: metrics and stages summary.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Sleep.SleepSummary summary = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearSummary() { + bitField0_ = (bitField0_ & ~0x00000020); + summary_ = null; + if (summaryBuilder_ != null) { + summaryBuilder_.dispose(); + summaryBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Sleep summary: metrics and stages summary.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Sleep.SleepSummary summary = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.devicesandservices.health.v4.Sleep.SleepSummary.Builder getSummaryBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return internalGetSummaryFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Sleep summary: metrics and stages summary.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Sleep.SleepSummary summary = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.devicesandservices.health.v4.Sleep.SleepSummaryOrBuilder + getSummaryOrBuilder() { + if (summaryBuilder_ != null) { + return summaryBuilder_.getMessageOrBuilder(); + } else { + return summary_ == null + ? com.google.devicesandservices.health.v4.Sleep.SleepSummary.getDefaultInstance() + : summary_; + } + } + + /** + * + * + *
+     * Output only. Sleep summary: metrics and stages summary.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Sleep.SleepSummary summary = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.Sleep.SleepSummary, + com.google.devicesandservices.health.v4.Sleep.SleepSummary.Builder, + com.google.devicesandservices.health.v4.Sleep.SleepSummaryOrBuilder> + internalGetSummaryFieldBuilder() { + if (summaryBuilder_ == null) { + summaryBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.Sleep.SleepSummary, + com.google.devicesandservices.health.v4.Sleep.SleepSummary.Builder, + com.google.devicesandservices.health.v4.Sleep.SleepSummaryOrBuilder>( + getSummary(), getParentForChildren(), isClean()); + summary_ = null; + } + return summaryBuilder_; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
+     * Output only. Creation time of this sleep observation.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000040) != 0); + } + + /** + * + * + *
+     * Output only. Creation time of this sleep observation.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. Creation time of this sleep observation.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Creation time of this sleep observation.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Creation time of this sleep observation.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. Creation time of this sleep observation.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000040); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Creation time of this sleep observation.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return internalGetCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Creation time of this sleep observation.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + + /** + * + * + *
+     * Output only. Creation time of this sleep observation.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + + /** + * + * + *
+     * Output only. Last update time of this sleep observation.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000080) != 0); + } + + /** + * + * + *
+     * Output only. Last update time of this sleep observation.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. Last update time of this sleep observation.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Last update time of this sleep observation.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Last update time of this sleep observation.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000080; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. Last update time of this sleep observation.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000080); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Last update time of this sleep observation.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return internalGetUpdateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Last update time of this sleep observation.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + + /** + * + * + *
+     * Output only. Last update time of this sleep observation.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.Sleep) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.Sleep) + private static final com.google.devicesandservices.health.v4.Sleep DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.Sleep(); + } + + public static com.google.devicesandservices.health.v4.Sleep getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Sleep parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.Sleep getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/SleepOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/SleepOrBuilder.java new file mode 100644 index 000000000000..5981b3fd3399 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/SleepOrBuilder.java @@ -0,0 +1,411 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface SleepOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.Sleep) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Observed sleep interval.
+   * 
+ * + * + * .google.devicesandservices.health.v4.SessionTimeInterval interval = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the interval field is set. + */ + boolean hasInterval(); + + /** + * + * + *
+   * Required. Observed sleep interval.
+   * 
+ * + * + * .google.devicesandservices.health.v4.SessionTimeInterval interval = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The interval. + */ + com.google.devicesandservices.health.v4.SessionTimeInterval getInterval(); + + /** + * + * + *
+   * Required. Observed sleep interval.
+   * 
+ * + * + * .google.devicesandservices.health.v4.SessionTimeInterval interval = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.devicesandservices.health.v4.SessionTimeIntervalOrBuilder getIntervalOrBuilder(); + + /** + * + * + *
+   * Optional. SleepType: classic or stages.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Sleep.SleepType type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + + /** + * + * + *
+   * Optional. SleepType: classic or stages.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Sleep.SleepType type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The type. + */ + com.google.devicesandservices.health.v4.Sleep.SleepType getType(); + + /** + * + * + *
+   * Optional. List of non-overlapping contiguous sleep stage segments that
+   * cover the sleep period.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.SleepStage stages = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getStagesList(); + + /** + * + * + *
+   * Optional. List of non-overlapping contiguous sleep stage segments that
+   * cover the sleep period.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.SleepStage stages = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.devicesandservices.health.v4.Sleep.SleepStage getStages(int index); + + /** + * + * + *
+   * Optional. List of non-overlapping contiguous sleep stage segments that
+   * cover the sleep period.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.SleepStage stages = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getStagesCount(); + + /** + * + * + *
+   * Optional. List of non-overlapping contiguous sleep stage segments that
+   * cover the sleep period.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.SleepStage stages = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getStagesOrBuilderList(); + + /** + * + * + *
+   * Optional. List of non-overlapping contiguous sleep stage segments that
+   * cover the sleep period.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.SleepStage stages = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.devicesandservices.health.v4.Sleep.SleepStageOrBuilder getStagesOrBuilder(int index); + + /** + * + * + *
+   * Optional.
+   * “Out of bed” segments that can overlap with sleep stages.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.OutOfBedSegment out_of_bed_segments = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getOutOfBedSegmentsList(); + + /** + * + * + *
+   * Optional.
+   * “Out of bed” segments that can overlap with sleep stages.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.OutOfBedSegment out_of_bed_segments = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.devicesandservices.health.v4.Sleep.OutOfBedSegment getOutOfBedSegments(int index); + + /** + * + * + *
+   * Optional.
+   * “Out of bed” segments that can overlap with sleep stages.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.OutOfBedSegment out_of_bed_segments = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getOutOfBedSegmentsCount(); + + /** + * + * + *
+   * Optional.
+   * “Out of bed” segments that can overlap with sleep stages.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.OutOfBedSegment out_of_bed_segments = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getOutOfBedSegmentsOrBuilderList(); + + /** + * + * + *
+   * Optional.
+   * “Out of bed” segments that can overlap with sleep stages.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.Sleep.OutOfBedSegment out_of_bed_segments = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.devicesandservices.health.v4.Sleep.OutOfBedSegmentOrBuilder + getOutOfBedSegmentsOrBuilder(int index); + + /** + * + * + *
+   * Optional. Sleep metadata: processing, main, manually edited, stages status.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Sleep.SleepMetadata metadata = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the metadata field is set. + */ + boolean hasMetadata(); + + /** + * + * + *
+   * Optional. Sleep metadata: processing, main, manually edited, stages status.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Sleep.SleepMetadata metadata = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The metadata. + */ + com.google.devicesandservices.health.v4.Sleep.SleepMetadata getMetadata(); + + /** + * + * + *
+   * Optional. Sleep metadata: processing, main, manually edited, stages status.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Sleep.SleepMetadata metadata = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.devicesandservices.health.v4.Sleep.SleepMetadataOrBuilder getMetadataOrBuilder(); + + /** + * + * + *
+   * Output only. Sleep summary: metrics and stages summary.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Sleep.SleepSummary summary = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the summary field is set. + */ + boolean hasSummary(); + + /** + * + * + *
+   * Output only. Sleep summary: metrics and stages summary.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Sleep.SleepSummary summary = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The summary. + */ + com.google.devicesandservices.health.v4.Sleep.SleepSummary getSummary(); + + /** + * + * + *
+   * Output only. Sleep summary: metrics and stages summary.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Sleep.SleepSummary summary = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.devicesandservices.health.v4.Sleep.SleepSummaryOrBuilder getSummaryOrBuilder(); + + /** + * + * + *
+   * Output only. Creation time of this sleep observation.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + + /** + * + * + *
+   * Output only. Creation time of this sleep observation.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
+   * Output only. Creation time of this sleep observation.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Last update time of this sleep observation.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + + /** + * + * + *
+   * Output only. Last update time of this sleep observation.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + + /** + * + * + *
+   * Output only. Last update time of this sleep observation.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/Steps.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/Steps.java new file mode 100644 index 000000000000..de6879893af3 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/Steps.java @@ -0,0 +1,826 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * Step count over the time interval.
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.Steps} + */ +@com.google.protobuf.Generated +public final class Steps extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.Steps) + StepsOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Steps"); + } + + // Use Steps.newBuilder() to construct. + private Steps(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Steps() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_Steps_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_Steps_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.Steps.class, + com.google.devicesandservices.health.v4.Steps.Builder.class); + } + + private int bitField0_; + public static final int INTERVAL_FIELD_NUMBER = 2; + private com.google.devicesandservices.health.v4.ObservationTimeInterval interval_; + + /** + * + * + *
+   * Required. Observed interval.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the interval field is set. + */ + @java.lang.Override + public boolean hasInterval() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. Observed interval.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The interval. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ObservationTimeInterval getInterval() { + return interval_ == null + ? com.google.devicesandservices.health.v4.ObservationTimeInterval.getDefaultInstance() + : interval_; + } + + /** + * + * + *
+   * Required. Observed interval.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ObservationTimeIntervalOrBuilder + getIntervalOrBuilder() { + return interval_ == null + ? com.google.devicesandservices.health.v4.ObservationTimeInterval.getDefaultInstance() + : interval_; + } + + public static final int COUNT_FIELD_NUMBER = 4; + private long count_ = 0L; + + /** + * + * + *
+   * Required. Number of steps in the recorded interval.
+   * 
+ * + * int64 count = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count. + */ + @java.lang.Override + public long getCount() { + return count_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getInterval()); + } + if (count_ != 0L) { + output.writeInt64(4, count_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getInterval()); + } + if (count_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, count_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.Steps)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.Steps other = + (com.google.devicesandservices.health.v4.Steps) obj; + + if (hasInterval() != other.hasInterval()) return false; + if (hasInterval()) { + if (!getInterval().equals(other.getInterval())) return false; + } + if (getCount() != other.getCount()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasInterval()) { + hash = (37 * hash) + INTERVAL_FIELD_NUMBER; + hash = (53 * hash) + getInterval().hashCode(); + } + hash = (37 * hash) + COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getCount()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.Steps parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.Steps parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Steps parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.Steps parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Steps parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.Steps parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Steps parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.Steps parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Steps parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.Steps parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Steps parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.Steps parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.devicesandservices.health.v4.Steps prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Step count over the time interval.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.Steps} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.Steps) + com.google.devicesandservices.health.v4.StepsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_Steps_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_Steps_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.Steps.class, + com.google.devicesandservices.health.v4.Steps.Builder.class); + } + + // Construct using com.google.devicesandservices.health.v4.Steps.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetIntervalFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + interval_ = null; + if (intervalBuilder_ != null) { + intervalBuilder_.dispose(); + intervalBuilder_ = null; + } + count_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_Steps_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.Steps getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.Steps.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.Steps build() { + com.google.devicesandservices.health.v4.Steps result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.Steps buildPartial() { + com.google.devicesandservices.health.v4.Steps result = + new com.google.devicesandservices.health.v4.Steps(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.devicesandservices.health.v4.Steps result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.interval_ = intervalBuilder_ == null ? interval_ : intervalBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.count_ = count_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.Steps) { + return mergeFrom((com.google.devicesandservices.health.v4.Steps) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.devicesandservices.health.v4.Steps other) { + if (other == com.google.devicesandservices.health.v4.Steps.getDefaultInstance()) return this; + if (other.hasInterval()) { + mergeInterval(other.getInterval()); + } + if (other.getCount() != 0L) { + setCount(other.getCount()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + input.readMessage( + internalGetIntervalFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 18 + case 32: + { + count_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.devicesandservices.health.v4.ObservationTimeInterval interval_; + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ObservationTimeInterval, + com.google.devicesandservices.health.v4.ObservationTimeInterval.Builder, + com.google.devicesandservices.health.v4.ObservationTimeIntervalOrBuilder> + intervalBuilder_; + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the interval field is set. + */ + public boolean hasInterval() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The interval. + */ + public com.google.devicesandservices.health.v4.ObservationTimeInterval getInterval() { + if (intervalBuilder_ == null) { + return interval_ == null + ? com.google.devicesandservices.health.v4.ObservationTimeInterval.getDefaultInstance() + : interval_; + } else { + return intervalBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setInterval( + com.google.devicesandservices.health.v4.ObservationTimeInterval value) { + if (intervalBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + interval_ = value; + } else { + intervalBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setInterval( + com.google.devicesandservices.health.v4.ObservationTimeInterval.Builder builderForValue) { + if (intervalBuilder_ == null) { + interval_ = builderForValue.build(); + } else { + intervalBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeInterval( + com.google.devicesandservices.health.v4.ObservationTimeInterval value) { + if (intervalBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && interval_ != null + && interval_ + != com.google.devicesandservices.health.v4.ObservationTimeInterval + .getDefaultInstance()) { + getIntervalBuilder().mergeFrom(value); + } else { + interval_ = value; + } + } else { + intervalBuilder_.mergeFrom(value); + } + if (interval_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearInterval() { + bitField0_ = (bitField0_ & ~0x00000001); + interval_ = null; + if (intervalBuilder_ != null) { + intervalBuilder_.dispose(); + intervalBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.devicesandservices.health.v4.ObservationTimeInterval.Builder + getIntervalBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetIntervalFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.devicesandservices.health.v4.ObservationTimeIntervalOrBuilder + getIntervalOrBuilder() { + if (intervalBuilder_ != null) { + return intervalBuilder_.getMessageOrBuilder(); + } else { + return interval_ == null + ? com.google.devicesandservices.health.v4.ObservationTimeInterval.getDefaultInstance() + : interval_; + } + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ObservationTimeInterval, + com.google.devicesandservices.health.v4.ObservationTimeInterval.Builder, + com.google.devicesandservices.health.v4.ObservationTimeIntervalOrBuilder> + internalGetIntervalFieldBuilder() { + if (intervalBuilder_ == null) { + intervalBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ObservationTimeInterval, + com.google.devicesandservices.health.v4.ObservationTimeInterval.Builder, + com.google.devicesandservices.health.v4.ObservationTimeIntervalOrBuilder>( + getInterval(), getParentForChildren(), isClean()); + interval_ = null; + } + return intervalBuilder_; + } + + private long count_; + + /** + * + * + *
+     * Required. Number of steps in the recorded interval.
+     * 
+ * + * int64 count = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count. + */ + @java.lang.Override + public long getCount() { + return count_; + } + + /** + * + * + *
+     * Required. Number of steps in the recorded interval.
+     * 
+ * + * int64 count = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The count to set. + * @return This builder for chaining. + */ + public Builder setCount(long value) { + + count_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Number of steps in the recorded interval.
+     * 
+ * + * int64 count = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearCount() { + bitField0_ = (bitField0_ & ~0x00000002); + count_ = 0L; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.Steps) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.Steps) + private static final com.google.devicesandservices.health.v4.Steps DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.Steps(); + } + + public static com.google.devicesandservices.health.v4.Steps getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Steps parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.Steps getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/StepsOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/StepsOrBuilder.java new file mode 100644 index 000000000000..08104c84f8c0 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/StepsOrBuilder.java @@ -0,0 +1,84 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface StepsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.Steps) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Observed interval.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the interval field is set. + */ + boolean hasInterval(); + + /** + * + * + *
+   * Required. Observed interval.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The interval. + */ + com.google.devicesandservices.health.v4.ObservationTimeInterval getInterval(); + + /** + * + * + *
+   * Required. Observed interval.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.devicesandservices.health.v4.ObservationTimeIntervalOrBuilder getIntervalOrBuilder(); + + /** + * + * + *
+   * Required. Number of steps in the recorded interval.
+   * 
+ * + * int64 count = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count. + */ + long getCount(); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/StepsRollupValue.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/StepsRollupValue.java new file mode 100644 index 000000000000..4d0f858c4047 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/StepsRollupValue.java @@ -0,0 +1,504 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * Represents the result of the rollup of the steps data type.
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.StepsRollupValue} + */ +@com.google.protobuf.Generated +public final class StepsRollupValue extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.StepsRollupValue) + StepsRollupValueOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "StepsRollupValue"); + } + + // Use StepsRollupValue.newBuilder() to construct. + private StepsRollupValue(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private StepsRollupValue() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_StepsRollupValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_StepsRollupValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.StepsRollupValue.class, + com.google.devicesandservices.health.v4.StepsRollupValue.Builder.class); + } + + public static final int COUNT_SUM_FIELD_NUMBER = 1; + private long countSum_ = 0L; + + /** + * + * + *
+   * Total number of steps in the interval.
+   * 
+ * + * int64 count_sum = 1; + * + * @return The countSum. + */ + @java.lang.Override + public long getCountSum() { + return countSum_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (countSum_ != 0L) { + output.writeInt64(1, countSum_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (countSum_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, countSum_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.StepsRollupValue)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.StepsRollupValue other = + (com.google.devicesandservices.health.v4.StepsRollupValue) obj; + + if (getCountSum() != other.getCountSum()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + COUNT_SUM_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getCountSum()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.StepsRollupValue parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.StepsRollupValue parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.StepsRollupValue parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.StepsRollupValue parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.StepsRollupValue parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.StepsRollupValue parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.StepsRollupValue parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.StepsRollupValue parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.StepsRollupValue parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.StepsRollupValue parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.StepsRollupValue parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.StepsRollupValue parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.StepsRollupValue prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Represents the result of the rollup of the steps data type.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.StepsRollupValue} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.StepsRollupValue) + com.google.devicesandservices.health.v4.StepsRollupValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_StepsRollupValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_StepsRollupValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.StepsRollupValue.class, + com.google.devicesandservices.health.v4.StepsRollupValue.Builder.class); + } + + // Construct using com.google.devicesandservices.health.v4.StepsRollupValue.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + countSum_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_StepsRollupValue_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.StepsRollupValue getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.StepsRollupValue.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.StepsRollupValue build() { + com.google.devicesandservices.health.v4.StepsRollupValue result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.StepsRollupValue buildPartial() { + com.google.devicesandservices.health.v4.StepsRollupValue result = + new com.google.devicesandservices.health.v4.StepsRollupValue(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.devicesandservices.health.v4.StepsRollupValue result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.countSum_ = countSum_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.StepsRollupValue) { + return mergeFrom((com.google.devicesandservices.health.v4.StepsRollupValue) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.devicesandservices.health.v4.StepsRollupValue other) { + if (other == com.google.devicesandservices.health.v4.StepsRollupValue.getDefaultInstance()) + return this; + if (other.getCountSum() != 0L) { + setCountSum(other.getCountSum()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + countSum_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private long countSum_; + + /** + * + * + *
+     * Total number of steps in the interval.
+     * 
+ * + * int64 count_sum = 1; + * + * @return The countSum. + */ + @java.lang.Override + public long getCountSum() { + return countSum_; + } + + /** + * + * + *
+     * Total number of steps in the interval.
+     * 
+ * + * int64 count_sum = 1; + * + * @param value The countSum to set. + * @return This builder for chaining. + */ + public Builder setCountSum(long value) { + + countSum_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Total number of steps in the interval.
+     * 
+ * + * int64 count_sum = 1; + * + * @return This builder for chaining. + */ + public Builder clearCountSum() { + bitField0_ = (bitField0_ & ~0x00000001); + countSum_ = 0L; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.StepsRollupValue) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.StepsRollupValue) + private static final com.google.devicesandservices.health.v4.StepsRollupValue DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.StepsRollupValue(); + } + + public static com.google.devicesandservices.health.v4.StepsRollupValue getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StepsRollupValue parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.StepsRollupValue getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/StepsRollupValueOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/StepsRollupValueOrBuilder.java new file mode 100644 index 000000000000..828d747ac193 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/StepsRollupValueOrBuilder.java @@ -0,0 +1,41 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface StepsRollupValueOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.StepsRollupValue) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Total number of steps in the interval.
+   * 
+ * + * int64 count_sum = 1; + * + * @return The countSum. + */ + long getCountSum(); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/SwimLengthsData.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/SwimLengthsData.java new file mode 100644 index 000000000000..d6d9e8dcce91 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/SwimLengthsData.java @@ -0,0 +1,1230 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * Swim lengths data over the time interval.
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.SwimLengthsData} + */ +@com.google.protobuf.Generated +public final class SwimLengthsData extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.SwimLengthsData) + SwimLengthsDataOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SwimLengthsData"); + } + + // Use SwimLengthsData.newBuilder() to construct. + private SwimLengthsData(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private SwimLengthsData() { + swimStrokeType_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_SwimLengthsData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_SwimLengthsData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.SwimLengthsData.class, + com.google.devicesandservices.health.v4.SwimLengthsData.Builder.class); + } + + /** + * + * + *
+   * Swim stroke type.
+   * 
+ * + * Protobuf enum {@code google.devicesandservices.health.v4.SwimLengthsData.SwimStrokeType} + */ + public enum SwimStrokeType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Swim stroke type is unspecified.
+     * 
+ * + * SWIM_STROKE_TYPE_UNSPECIFIED = 0; + */ + SWIM_STROKE_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Freestyle swim stroke type.
+     * 
+ * + * FREESTYLE = 1; + */ + FREESTYLE(1), + /** + * + * + *
+     * Backstroke swim stroke type.
+     * 
+ * + * BACKSTROKE = 2; + */ + BACKSTROKE(2), + /** + * + * + *
+     * Breaststroke swim stroke type.
+     * 
+ * + * BREASTSTROKE = 3; + */ + BREASTSTROKE(3), + /** + * + * + *
+     * Butterfly swim stroke type.
+     * 
+ * + * BUTTERFLY = 4; + */ + BUTTERFLY(4), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SwimStrokeType"); + } + + /** + * + * + *
+     * Swim stroke type is unspecified.
+     * 
+ * + * SWIM_STROKE_TYPE_UNSPECIFIED = 0; + */ + public static final int SWIM_STROKE_TYPE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Freestyle swim stroke type.
+     * 
+ * + * FREESTYLE = 1; + */ + public static final int FREESTYLE_VALUE = 1; + + /** + * + * + *
+     * Backstroke swim stroke type.
+     * 
+ * + * BACKSTROKE = 2; + */ + public static final int BACKSTROKE_VALUE = 2; + + /** + * + * + *
+     * Breaststroke swim stroke type.
+     * 
+ * + * BREASTSTROKE = 3; + */ + public static final int BREASTSTROKE_VALUE = 3; + + /** + * + * + *
+     * Butterfly swim stroke type.
+     * 
+ * + * BUTTERFLY = 4; + */ + public static final int BUTTERFLY_VALUE = 4; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static SwimStrokeType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static SwimStrokeType forNumber(int value) { + switch (value) { + case 0: + return SWIM_STROKE_TYPE_UNSPECIFIED; + case 1: + return FREESTYLE; + case 2: + return BACKSTROKE; + case 3: + return BREASTSTROKE; + case 4: + return BUTTERFLY; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public SwimStrokeType findValueByNumber(int number) { + return SwimStrokeType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.devicesandservices.health.v4.SwimLengthsData.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final SwimStrokeType[] VALUES = values(); + + public static SwimStrokeType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private SwimStrokeType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.devicesandservices.health.v4.SwimLengthsData.SwimStrokeType) + } + + private int bitField0_; + public static final int INTERVAL_FIELD_NUMBER = 1; + private com.google.devicesandservices.health.v4.ObservationTimeInterval interval_; + + /** + * + * + *
+   * Required. Observed interval.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the interval field is set. + */ + @java.lang.Override + public boolean hasInterval() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. Observed interval.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The interval. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ObservationTimeInterval getInterval() { + return interval_ == null + ? com.google.devicesandservices.health.v4.ObservationTimeInterval.getDefaultInstance() + : interval_; + } + + /** + * + * + *
+   * Required. Observed interval.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ObservationTimeIntervalOrBuilder + getIntervalOrBuilder() { + return interval_ == null + ? com.google.devicesandservices.health.v4.ObservationTimeInterval.getDefaultInstance() + : interval_; + } + + public static final int SWIM_STROKE_TYPE_FIELD_NUMBER = 2; + private int swimStrokeType_ = 0; + + /** + * + * + *
+   * Required. Swim stroke type.
+   * 
+ * + * + * .google.devicesandservices.health.v4.SwimLengthsData.SwimStrokeType swim_stroke_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for swimStrokeType. + */ + @java.lang.Override + public int getSwimStrokeTypeValue() { + return swimStrokeType_; + } + + /** + * + * + *
+   * Required. Swim stroke type.
+   * 
+ * + * + * .google.devicesandservices.health.v4.SwimLengthsData.SwimStrokeType swim_stroke_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The swimStrokeType. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.SwimLengthsData.SwimStrokeType + getSwimStrokeType() { + com.google.devicesandservices.health.v4.SwimLengthsData.SwimStrokeType result = + com.google.devicesandservices.health.v4.SwimLengthsData.SwimStrokeType.forNumber( + swimStrokeType_); + return result == null + ? com.google.devicesandservices.health.v4.SwimLengthsData.SwimStrokeType.UNRECOGNIZED + : result; + } + + public static final int STROKE_COUNT_FIELD_NUMBER = 3; + private long strokeCount_ = 0L; + + /** + * + * + *
+   * Required. Number of strokes in the lap.
+   * 
+ * + * int64 stroke_count = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The strokeCount. + */ + @java.lang.Override + public long getStrokeCount() { + return strokeCount_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getInterval()); + } + if (swimStrokeType_ + != com.google.devicesandservices.health.v4.SwimLengthsData.SwimStrokeType + .SWIM_STROKE_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, swimStrokeType_); + } + if (strokeCount_ != 0L) { + output.writeInt64(3, strokeCount_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getInterval()); + } + if (swimStrokeType_ + != com.google.devicesandservices.health.v4.SwimLengthsData.SwimStrokeType + .SWIM_STROKE_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, swimStrokeType_); + } + if (strokeCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, strokeCount_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.SwimLengthsData)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.SwimLengthsData other = + (com.google.devicesandservices.health.v4.SwimLengthsData) obj; + + if (hasInterval() != other.hasInterval()) return false; + if (hasInterval()) { + if (!getInterval().equals(other.getInterval())) return false; + } + if (swimStrokeType_ != other.swimStrokeType_) return false; + if (getStrokeCount() != other.getStrokeCount()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasInterval()) { + hash = (37 * hash) + INTERVAL_FIELD_NUMBER; + hash = (53 * hash) + getInterval().hashCode(); + } + hash = (37 * hash) + SWIM_STROKE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + swimStrokeType_; + hash = (37 * hash) + STROKE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getStrokeCount()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.SwimLengthsData parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.SwimLengthsData parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.SwimLengthsData parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.SwimLengthsData parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.SwimLengthsData parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.SwimLengthsData parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.SwimLengthsData parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.SwimLengthsData parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.SwimLengthsData parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.SwimLengthsData parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.SwimLengthsData parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.SwimLengthsData parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.SwimLengthsData prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Swim lengths data over the time interval.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.SwimLengthsData} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.SwimLengthsData) + com.google.devicesandservices.health.v4.SwimLengthsDataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_SwimLengthsData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_SwimLengthsData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.SwimLengthsData.class, + com.google.devicesandservices.health.v4.SwimLengthsData.Builder.class); + } + + // Construct using com.google.devicesandservices.health.v4.SwimLengthsData.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetIntervalFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + interval_ = null; + if (intervalBuilder_ != null) { + intervalBuilder_.dispose(); + intervalBuilder_ = null; + } + swimStrokeType_ = 0; + strokeCount_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_SwimLengthsData_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.SwimLengthsData getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.SwimLengthsData.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.SwimLengthsData build() { + com.google.devicesandservices.health.v4.SwimLengthsData result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.SwimLengthsData buildPartial() { + com.google.devicesandservices.health.v4.SwimLengthsData result = + new com.google.devicesandservices.health.v4.SwimLengthsData(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.devicesandservices.health.v4.SwimLengthsData result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.interval_ = intervalBuilder_ == null ? interval_ : intervalBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.swimStrokeType_ = swimStrokeType_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.strokeCount_ = strokeCount_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.SwimLengthsData) { + return mergeFrom((com.google.devicesandservices.health.v4.SwimLengthsData) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.devicesandservices.health.v4.SwimLengthsData other) { + if (other == com.google.devicesandservices.health.v4.SwimLengthsData.getDefaultInstance()) + return this; + if (other.hasInterval()) { + mergeInterval(other.getInterval()); + } + if (other.swimStrokeType_ != 0) { + setSwimStrokeTypeValue(other.getSwimStrokeTypeValue()); + } + if (other.getStrokeCount() != 0L) { + setStrokeCount(other.getStrokeCount()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetIntervalFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + swimStrokeType_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + strokeCount_ = input.readInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.devicesandservices.health.v4.ObservationTimeInterval interval_; + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ObservationTimeInterval, + com.google.devicesandservices.health.v4.ObservationTimeInterval.Builder, + com.google.devicesandservices.health.v4.ObservationTimeIntervalOrBuilder> + intervalBuilder_; + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the interval field is set. + */ + public boolean hasInterval() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The interval. + */ + public com.google.devicesandservices.health.v4.ObservationTimeInterval getInterval() { + if (intervalBuilder_ == null) { + return interval_ == null + ? com.google.devicesandservices.health.v4.ObservationTimeInterval.getDefaultInstance() + : interval_; + } else { + return intervalBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setInterval( + com.google.devicesandservices.health.v4.ObservationTimeInterval value) { + if (intervalBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + interval_ = value; + } else { + intervalBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setInterval( + com.google.devicesandservices.health.v4.ObservationTimeInterval.Builder builderForValue) { + if (intervalBuilder_ == null) { + interval_ = builderForValue.build(); + } else { + intervalBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeInterval( + com.google.devicesandservices.health.v4.ObservationTimeInterval value) { + if (intervalBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && interval_ != null + && interval_ + != com.google.devicesandservices.health.v4.ObservationTimeInterval + .getDefaultInstance()) { + getIntervalBuilder().mergeFrom(value); + } else { + interval_ = value; + } + } else { + intervalBuilder_.mergeFrom(value); + } + if (interval_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearInterval() { + bitField0_ = (bitField0_ & ~0x00000001); + interval_ = null; + if (intervalBuilder_ != null) { + intervalBuilder_.dispose(); + intervalBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.devicesandservices.health.v4.ObservationTimeInterval.Builder + getIntervalBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetIntervalFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.devicesandservices.health.v4.ObservationTimeIntervalOrBuilder + getIntervalOrBuilder() { + if (intervalBuilder_ != null) { + return intervalBuilder_.getMessageOrBuilder(); + } else { + return interval_ == null + ? com.google.devicesandservices.health.v4.ObservationTimeInterval.getDefaultInstance() + : interval_; + } + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ObservationTimeInterval, + com.google.devicesandservices.health.v4.ObservationTimeInterval.Builder, + com.google.devicesandservices.health.v4.ObservationTimeIntervalOrBuilder> + internalGetIntervalFieldBuilder() { + if (intervalBuilder_ == null) { + intervalBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ObservationTimeInterval, + com.google.devicesandservices.health.v4.ObservationTimeInterval.Builder, + com.google.devicesandservices.health.v4.ObservationTimeIntervalOrBuilder>( + getInterval(), getParentForChildren(), isClean()); + interval_ = null; + } + return intervalBuilder_; + } + + private int swimStrokeType_ = 0; + + /** + * + * + *
+     * Required. Swim stroke type.
+     * 
+ * + * + * .google.devicesandservices.health.v4.SwimLengthsData.SwimStrokeType swim_stroke_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for swimStrokeType. + */ + @java.lang.Override + public int getSwimStrokeTypeValue() { + return swimStrokeType_; + } + + /** + * + * + *
+     * Required. Swim stroke type.
+     * 
+ * + * + * .google.devicesandservices.health.v4.SwimLengthsData.SwimStrokeType swim_stroke_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for swimStrokeType to set. + * @return This builder for chaining. + */ + public Builder setSwimStrokeTypeValue(int value) { + swimStrokeType_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Swim stroke type.
+     * 
+ * + * + * .google.devicesandservices.health.v4.SwimLengthsData.SwimStrokeType swim_stroke_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The swimStrokeType. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.SwimLengthsData.SwimStrokeType + getSwimStrokeType() { + com.google.devicesandservices.health.v4.SwimLengthsData.SwimStrokeType result = + com.google.devicesandservices.health.v4.SwimLengthsData.SwimStrokeType.forNumber( + swimStrokeType_); + return result == null + ? com.google.devicesandservices.health.v4.SwimLengthsData.SwimStrokeType.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Required. Swim stroke type.
+     * 
+ * + * + * .google.devicesandservices.health.v4.SwimLengthsData.SwimStrokeType swim_stroke_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The swimStrokeType to set. + * @return This builder for chaining. + */ + public Builder setSwimStrokeType( + com.google.devicesandservices.health.v4.SwimLengthsData.SwimStrokeType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + swimStrokeType_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Swim stroke type.
+     * 
+ * + * + * .google.devicesandservices.health.v4.SwimLengthsData.SwimStrokeType swim_stroke_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearSwimStrokeType() { + bitField0_ = (bitField0_ & ~0x00000002); + swimStrokeType_ = 0; + onChanged(); + return this; + } + + private long strokeCount_; + + /** + * + * + *
+     * Required. Number of strokes in the lap.
+     * 
+ * + * int64 stroke_count = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The strokeCount. + */ + @java.lang.Override + public long getStrokeCount() { + return strokeCount_; + } + + /** + * + * + *
+     * Required. Number of strokes in the lap.
+     * 
+ * + * int64 stroke_count = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The strokeCount to set. + * @return This builder for chaining. + */ + public Builder setStrokeCount(long value) { + + strokeCount_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Number of strokes in the lap.
+     * 
+ * + * int64 stroke_count = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearStrokeCount() { + bitField0_ = (bitField0_ & ~0x00000004); + strokeCount_ = 0L; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.SwimLengthsData) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.SwimLengthsData) + private static final com.google.devicesandservices.health.v4.SwimLengthsData DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.SwimLengthsData(); + } + + public static com.google.devicesandservices.health.v4.SwimLengthsData getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SwimLengthsData parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.SwimLengthsData getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/SwimLengthsDataOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/SwimLengthsDataOrBuilder.java new file mode 100644 index 000000000000..3582de424d64 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/SwimLengthsDataOrBuilder.java @@ -0,0 +1,114 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface SwimLengthsDataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.SwimLengthsData) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Observed interval.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the interval field is set. + */ + boolean hasInterval(); + + /** + * + * + *
+   * Required. Observed interval.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The interval. + */ + com.google.devicesandservices.health.v4.ObservationTimeInterval getInterval(); + + /** + * + * + *
+   * Required. Observed interval.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.devicesandservices.health.v4.ObservationTimeIntervalOrBuilder getIntervalOrBuilder(); + + /** + * + * + *
+   * Required. Swim stroke type.
+   * 
+ * + * + * .google.devicesandservices.health.v4.SwimLengthsData.SwimStrokeType swim_stroke_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for swimStrokeType. + */ + int getSwimStrokeTypeValue(); + + /** + * + * + *
+   * Required. Swim stroke type.
+   * 
+ * + * + * .google.devicesandservices.health.v4.SwimLengthsData.SwimStrokeType swim_stroke_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The swimStrokeType. + */ + com.google.devicesandservices.health.v4.SwimLengthsData.SwimStrokeType getSwimStrokeType(); + + /** + * + * + *
+   * Required. Number of strokes in the lap.
+   * 
+ * + * int64 stroke_count = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The strokeCount. + */ + long getStrokeCount(); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/SwimLengthsDataRollupValue.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/SwimLengthsDataRollupValue.java new file mode 100644 index 000000000000..526c0f3f168e --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/SwimLengthsDataRollupValue.java @@ -0,0 +1,515 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * Represents the result of the rollup of the swim lengths data type.
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.SwimLengthsDataRollupValue} + */ +@com.google.protobuf.Generated +public final class SwimLengthsDataRollupValue extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.SwimLengthsDataRollupValue) + SwimLengthsDataRollupValueOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SwimLengthsDataRollupValue"); + } + + // Use SwimLengthsDataRollupValue.newBuilder() to construct. + private SwimLengthsDataRollupValue(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private SwimLengthsDataRollupValue() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_SwimLengthsDataRollupValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_SwimLengthsDataRollupValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue.class, + com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue.Builder.class); + } + + public static final int STROKE_COUNT_SUM_FIELD_NUMBER = 1; + private long strokeCountSum_ = 0L; + + /** + * + * + *
+   * Total number of swim strokes in the interval.
+   * 
+ * + * int64 stroke_count_sum = 1; + * + * @return The strokeCountSum. + */ + @java.lang.Override + public long getStrokeCountSum() { + return strokeCountSum_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (strokeCountSum_ != 0L) { + output.writeInt64(1, strokeCountSum_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (strokeCountSum_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, strokeCountSum_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue other = + (com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue) obj; + + if (getStrokeCountSum() != other.getStrokeCountSum()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + STROKE_COUNT_SUM_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getStrokeCountSum()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Represents the result of the rollup of the swim lengths data type.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.SwimLengthsDataRollupValue} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.SwimLengthsDataRollupValue) + com.google.devicesandservices.health.v4.SwimLengthsDataRollupValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_SwimLengthsDataRollupValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_SwimLengthsDataRollupValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue.class, + com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue.Builder.class); + } + + // Construct using + // com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + strokeCountSum_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_SwimLengthsDataRollupValue_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue + getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue build() { + com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue buildPartial() { + com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue result = + new com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.strokeCountSum_ = strokeCountSum_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue) { + return mergeFrom( + (com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue other) { + if (other + == com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue + .getDefaultInstance()) return this; + if (other.getStrokeCountSum() != 0L) { + setStrokeCountSum(other.getStrokeCountSum()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + strokeCountSum_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private long strokeCountSum_; + + /** + * + * + *
+     * Total number of swim strokes in the interval.
+     * 
+ * + * int64 stroke_count_sum = 1; + * + * @return The strokeCountSum. + */ + @java.lang.Override + public long getStrokeCountSum() { + return strokeCountSum_; + } + + /** + * + * + *
+     * Total number of swim strokes in the interval.
+     * 
+ * + * int64 stroke_count_sum = 1; + * + * @param value The strokeCountSum to set. + * @return This builder for chaining. + */ + public Builder setStrokeCountSum(long value) { + + strokeCountSum_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Total number of swim strokes in the interval.
+     * 
+ * + * int64 stroke_count_sum = 1; + * + * @return This builder for chaining. + */ + public Builder clearStrokeCountSum() { + bitField0_ = (bitField0_ & ~0x00000001); + strokeCountSum_ = 0L; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.SwimLengthsDataRollupValue) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.SwimLengthsDataRollupValue) + private static final com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue(); + } + + public static com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SwimLengthsDataRollupValue parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.SwimLengthsDataRollupValue + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/SwimLengthsDataRollupValueOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/SwimLengthsDataRollupValueOrBuilder.java new file mode 100644 index 000000000000..c0d502f0e7a1 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/SwimLengthsDataRollupValueOrBuilder.java @@ -0,0 +1,41 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface SwimLengthsDataRollupValueOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.SwimLengthsDataRollupValue) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Total number of swim strokes in the interval.
+   * 
+ * + * int64 stroke_count_sum = 1; + * + * @return The strokeCountSum. + */ + long getStrokeCountSum(); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/TimeInHeartRateZone.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/TimeInHeartRateZone.java new file mode 100644 index 000000000000..bb2742f34aa0 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/TimeInHeartRateZone.java @@ -0,0 +1,914 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * Time in heart rate zone record. It's an interval spent in specific heart
+ * rate zone.
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.TimeInHeartRateZone} + */ +@com.google.protobuf.Generated +public final class TimeInHeartRateZone extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.TimeInHeartRateZone) + TimeInHeartRateZoneOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "TimeInHeartRateZone"); + } + + // Use TimeInHeartRateZone.newBuilder() to construct. + private TimeInHeartRateZone(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private TimeInHeartRateZone() { + heartRateZoneType_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_TimeInHeartRateZone_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_TimeInHeartRateZone_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.TimeInHeartRateZone.class, + com.google.devicesandservices.health.v4.TimeInHeartRateZone.Builder.class); + } + + private int bitField0_; + public static final int INTERVAL_FIELD_NUMBER = 1; + private com.google.devicesandservices.health.v4.ObservationTimeInterval interval_; + + /** + * + * + *
+   * Required. Observed interval.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the interval field is set. + */ + @java.lang.Override + public boolean hasInterval() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. Observed interval.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The interval. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ObservationTimeInterval getInterval() { + return interval_ == null + ? com.google.devicesandservices.health.v4.ObservationTimeInterval.getDefaultInstance() + : interval_; + } + + /** + * + * + *
+   * Required. Observed interval.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ObservationTimeIntervalOrBuilder + getIntervalOrBuilder() { + return interval_ == null + ? com.google.devicesandservices.health.v4.ObservationTimeInterval.getDefaultInstance() + : interval_; + } + + public static final int HEART_RATE_ZONE_TYPE_FIELD_NUMBER = 2; + private int heartRateZoneType_ = 0; + + /** + * + * + *
+   * Required. Heart rate zone type.
+   * 
+ * + * + * .google.devicesandservices.health.v4.HeartRateZoneType heart_rate_zone_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for heartRateZoneType. + */ + @java.lang.Override + public int getHeartRateZoneTypeValue() { + return heartRateZoneType_; + } + + /** + * + * + *
+   * Required. Heart rate zone type.
+   * 
+ * + * + * .google.devicesandservices.health.v4.HeartRateZoneType heart_rate_zone_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The heartRateZoneType. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.HeartRateZoneType getHeartRateZoneType() { + com.google.devicesandservices.health.v4.HeartRateZoneType result = + com.google.devicesandservices.health.v4.HeartRateZoneType.forNumber(heartRateZoneType_); + return result == null + ? com.google.devicesandservices.health.v4.HeartRateZoneType.UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getInterval()); + } + if (heartRateZoneType_ + != com.google.devicesandservices.health.v4.HeartRateZoneType + .HEART_RATE_ZONE_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, heartRateZoneType_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getInterval()); + } + if (heartRateZoneType_ + != com.google.devicesandservices.health.v4.HeartRateZoneType + .HEART_RATE_ZONE_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, heartRateZoneType_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.TimeInHeartRateZone)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.TimeInHeartRateZone other = + (com.google.devicesandservices.health.v4.TimeInHeartRateZone) obj; + + if (hasInterval() != other.hasInterval()) return false; + if (hasInterval()) { + if (!getInterval().equals(other.getInterval())) return false; + } + if (heartRateZoneType_ != other.heartRateZoneType_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasInterval()) { + hash = (37 * hash) + INTERVAL_FIELD_NUMBER; + hash = (53 * hash) + getInterval().hashCode(); + } + hash = (37 * hash) + HEART_RATE_ZONE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + heartRateZoneType_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.TimeInHeartRateZone parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.TimeInHeartRateZone parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.TimeInHeartRateZone parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.TimeInHeartRateZone parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.TimeInHeartRateZone parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.TimeInHeartRateZone parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.TimeInHeartRateZone parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.TimeInHeartRateZone parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.TimeInHeartRateZone parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.TimeInHeartRateZone parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.TimeInHeartRateZone parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.TimeInHeartRateZone parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.TimeInHeartRateZone prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Time in heart rate zone record. It's an interval spent in specific heart
+   * rate zone.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.TimeInHeartRateZone} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.TimeInHeartRateZone) + com.google.devicesandservices.health.v4.TimeInHeartRateZoneOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_TimeInHeartRateZone_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_TimeInHeartRateZone_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.TimeInHeartRateZone.class, + com.google.devicesandservices.health.v4.TimeInHeartRateZone.Builder.class); + } + + // Construct using com.google.devicesandservices.health.v4.TimeInHeartRateZone.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetIntervalFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + interval_ = null; + if (intervalBuilder_ != null) { + intervalBuilder_.dispose(); + intervalBuilder_ = null; + } + heartRateZoneType_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_TimeInHeartRateZone_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.TimeInHeartRateZone getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.TimeInHeartRateZone.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.TimeInHeartRateZone build() { + com.google.devicesandservices.health.v4.TimeInHeartRateZone result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.TimeInHeartRateZone buildPartial() { + com.google.devicesandservices.health.v4.TimeInHeartRateZone result = + new com.google.devicesandservices.health.v4.TimeInHeartRateZone(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.devicesandservices.health.v4.TimeInHeartRateZone result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.interval_ = intervalBuilder_ == null ? interval_ : intervalBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.heartRateZoneType_ = heartRateZoneType_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.TimeInHeartRateZone) { + return mergeFrom((com.google.devicesandservices.health.v4.TimeInHeartRateZone) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.devicesandservices.health.v4.TimeInHeartRateZone other) { + if (other == com.google.devicesandservices.health.v4.TimeInHeartRateZone.getDefaultInstance()) + return this; + if (other.hasInterval()) { + mergeInterval(other.getInterval()); + } + if (other.heartRateZoneType_ != 0) { + setHeartRateZoneTypeValue(other.getHeartRateZoneTypeValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetIntervalFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + heartRateZoneType_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.devicesandservices.health.v4.ObservationTimeInterval interval_; + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ObservationTimeInterval, + com.google.devicesandservices.health.v4.ObservationTimeInterval.Builder, + com.google.devicesandservices.health.v4.ObservationTimeIntervalOrBuilder> + intervalBuilder_; + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the interval field is set. + */ + public boolean hasInterval() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The interval. + */ + public com.google.devicesandservices.health.v4.ObservationTimeInterval getInterval() { + if (intervalBuilder_ == null) { + return interval_ == null + ? com.google.devicesandservices.health.v4.ObservationTimeInterval.getDefaultInstance() + : interval_; + } else { + return intervalBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setInterval( + com.google.devicesandservices.health.v4.ObservationTimeInterval value) { + if (intervalBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + interval_ = value; + } else { + intervalBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setInterval( + com.google.devicesandservices.health.v4.ObservationTimeInterval.Builder builderForValue) { + if (intervalBuilder_ == null) { + interval_ = builderForValue.build(); + } else { + intervalBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeInterval( + com.google.devicesandservices.health.v4.ObservationTimeInterval value) { + if (intervalBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && interval_ != null + && interval_ + != com.google.devicesandservices.health.v4.ObservationTimeInterval + .getDefaultInstance()) { + getIntervalBuilder().mergeFrom(value); + } else { + interval_ = value; + } + } else { + intervalBuilder_.mergeFrom(value); + } + if (interval_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearInterval() { + bitField0_ = (bitField0_ & ~0x00000001); + interval_ = null; + if (intervalBuilder_ != null) { + intervalBuilder_.dispose(); + intervalBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.devicesandservices.health.v4.ObservationTimeInterval.Builder + getIntervalBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetIntervalFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.devicesandservices.health.v4.ObservationTimeIntervalOrBuilder + getIntervalOrBuilder() { + if (intervalBuilder_ != null) { + return intervalBuilder_.getMessageOrBuilder(); + } else { + return interval_ == null + ? com.google.devicesandservices.health.v4.ObservationTimeInterval.getDefaultInstance() + : interval_; + } + } + + /** + * + * + *
+     * Required. Observed interval.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ObservationTimeInterval, + com.google.devicesandservices.health.v4.ObservationTimeInterval.Builder, + com.google.devicesandservices.health.v4.ObservationTimeIntervalOrBuilder> + internalGetIntervalFieldBuilder() { + if (intervalBuilder_ == null) { + intervalBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ObservationTimeInterval, + com.google.devicesandservices.health.v4.ObservationTimeInterval.Builder, + com.google.devicesandservices.health.v4.ObservationTimeIntervalOrBuilder>( + getInterval(), getParentForChildren(), isClean()); + interval_ = null; + } + return intervalBuilder_; + } + + private int heartRateZoneType_ = 0; + + /** + * + * + *
+     * Required. Heart rate zone type.
+     * 
+ * + * + * .google.devicesandservices.health.v4.HeartRateZoneType heart_rate_zone_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for heartRateZoneType. + */ + @java.lang.Override + public int getHeartRateZoneTypeValue() { + return heartRateZoneType_; + } + + /** + * + * + *
+     * Required. Heart rate zone type.
+     * 
+ * + * + * .google.devicesandservices.health.v4.HeartRateZoneType heart_rate_zone_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for heartRateZoneType to set. + * @return This builder for chaining. + */ + public Builder setHeartRateZoneTypeValue(int value) { + heartRateZoneType_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Heart rate zone type.
+     * 
+ * + * + * .google.devicesandservices.health.v4.HeartRateZoneType heart_rate_zone_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The heartRateZoneType. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.HeartRateZoneType getHeartRateZoneType() { + com.google.devicesandservices.health.v4.HeartRateZoneType result = + com.google.devicesandservices.health.v4.HeartRateZoneType.forNumber(heartRateZoneType_); + return result == null + ? com.google.devicesandservices.health.v4.HeartRateZoneType.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Required. Heart rate zone type.
+     * 
+ * + * + * .google.devicesandservices.health.v4.HeartRateZoneType heart_rate_zone_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The heartRateZoneType to set. + * @return This builder for chaining. + */ + public Builder setHeartRateZoneType( + com.google.devicesandservices.health.v4.HeartRateZoneType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + heartRateZoneType_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Heart rate zone type.
+     * 
+ * + * + * .google.devicesandservices.health.v4.HeartRateZoneType heart_rate_zone_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearHeartRateZoneType() { + bitField0_ = (bitField0_ & ~0x00000002); + heartRateZoneType_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.TimeInHeartRateZone) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.TimeInHeartRateZone) + private static final com.google.devicesandservices.health.v4.TimeInHeartRateZone DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.TimeInHeartRateZone(); + } + + public static com.google.devicesandservices.health.v4.TimeInHeartRateZone getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TimeInHeartRateZone parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.TimeInHeartRateZone getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/TimeInHeartRateZoneOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/TimeInHeartRateZoneOrBuilder.java new file mode 100644 index 000000000000..ce746f2b2aa7 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/TimeInHeartRateZoneOrBuilder.java @@ -0,0 +1,101 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface TimeInHeartRateZoneOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.TimeInHeartRateZone) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Observed interval.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the interval field is set. + */ + boolean hasInterval(); + + /** + * + * + *
+   * Required. Observed interval.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The interval. + */ + com.google.devicesandservices.health.v4.ObservationTimeInterval getInterval(); + + /** + * + * + *
+   * Required. Observed interval.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationTimeInterval interval = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.devicesandservices.health.v4.ObservationTimeIntervalOrBuilder getIntervalOrBuilder(); + + /** + * + * + *
+   * Required. Heart rate zone type.
+   * 
+ * + * + * .google.devicesandservices.health.v4.HeartRateZoneType heart_rate_zone_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for heartRateZoneType. + */ + int getHeartRateZoneTypeValue(); + + /** + * + * + *
+   * Required. Heart rate zone type.
+   * 
+ * + * + * .google.devicesandservices.health.v4.HeartRateZoneType heart_rate_zone_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The heartRateZoneType. + */ + com.google.devicesandservices.health.v4.HeartRateZoneType getHeartRateZoneType(); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/TimeInHeartRateZoneRollupValue.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/TimeInHeartRateZoneRollupValue.java new file mode 100644 index 000000000000..0225589328e4 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/TimeInHeartRateZoneRollupValue.java @@ -0,0 +1,2039 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * Represents the result of the rollup of the time in heart rate zone data
+ * type.
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue} + */ +@com.google.protobuf.Generated +public final class TimeInHeartRateZoneRollupValue extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue) + TimeInHeartRateZoneRollupValueOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "TimeInHeartRateZoneRollupValue"); + } + + // Use TimeInHeartRateZoneRollupValue.newBuilder() to construct. + private TimeInHeartRateZoneRollupValue(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private TimeInHeartRateZoneRollupValue() { + timeInHeartRateZones_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_TimeInHeartRateZoneRollupValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_TimeInHeartRateZoneRollupValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue.class, + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue.Builder.class); + } + + public interface TimeInHeartRateZoneValueOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue.TimeInHeartRateZoneValue) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The heart rate zone.
+     * 
+ * + * .google.devicesandservices.health.v4.HeartRateZoneType heart_rate_zone = 1; + * + * @return The enum numeric value on the wire for heartRateZone. + */ + int getHeartRateZoneValue(); + + /** + * + * + *
+     * The heart rate zone.
+     * 
+ * + * .google.devicesandservices.health.v4.HeartRateZoneType heart_rate_zone = 1; + * + * @return The heartRateZone. + */ + com.google.devicesandservices.health.v4.HeartRateZoneType getHeartRateZone(); + + /** + * + * + *
+     * The total time spent in the specified heart rate zone.
+     * 
+ * + * .google.protobuf.Duration duration = 2; + * + * @return Whether the duration field is set. + */ + boolean hasDuration(); + + /** + * + * + *
+     * The total time spent in the specified heart rate zone.
+     * 
+ * + * .google.protobuf.Duration duration = 2; + * + * @return The duration. + */ + com.google.protobuf.Duration getDuration(); + + /** + * + * + *
+     * The total time spent in the specified heart rate zone.
+     * 
+ * + * .google.protobuf.Duration duration = 2; + */ + com.google.protobuf.DurationOrBuilder getDurationOrBuilder(); + } + + /** + * + * + *
+   * Represents the total time spent in a specific heart rate zone.
+   * 
+ * + * Protobuf type {@code + * google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue.TimeInHeartRateZoneValue} + */ + public static final class TimeInHeartRateZoneValue extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue.TimeInHeartRateZoneValue) + TimeInHeartRateZoneValueOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "TimeInHeartRateZoneValue"); + } + + // Use TimeInHeartRateZoneValue.newBuilder() to construct. + private TimeInHeartRateZoneValue(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private TimeInHeartRateZoneValue() { + heartRateZone_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_TimeInHeartRateZoneRollupValue_TimeInHeartRateZoneValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_TimeInHeartRateZoneRollupValue_TimeInHeartRateZoneValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .TimeInHeartRateZoneValue.class, + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .TimeInHeartRateZoneValue.Builder.class); + } + + private int bitField0_; + public static final int HEART_RATE_ZONE_FIELD_NUMBER = 1; + private int heartRateZone_ = 0; + + /** + * + * + *
+     * The heart rate zone.
+     * 
+ * + * .google.devicesandservices.health.v4.HeartRateZoneType heart_rate_zone = 1; + * + * @return The enum numeric value on the wire for heartRateZone. + */ + @java.lang.Override + public int getHeartRateZoneValue() { + return heartRateZone_; + } + + /** + * + * + *
+     * The heart rate zone.
+     * 
+ * + * .google.devicesandservices.health.v4.HeartRateZoneType heart_rate_zone = 1; + * + * @return The heartRateZone. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.HeartRateZoneType getHeartRateZone() { + com.google.devicesandservices.health.v4.HeartRateZoneType result = + com.google.devicesandservices.health.v4.HeartRateZoneType.forNumber(heartRateZone_); + return result == null + ? com.google.devicesandservices.health.v4.HeartRateZoneType.UNRECOGNIZED + : result; + } + + public static final int DURATION_FIELD_NUMBER = 2; + private com.google.protobuf.Duration duration_; + + /** + * + * + *
+     * The total time spent in the specified heart rate zone.
+     * 
+ * + * .google.protobuf.Duration duration = 2; + * + * @return Whether the duration field is set. + */ + @java.lang.Override + public boolean hasDuration() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * The total time spent in the specified heart rate zone.
+     * 
+ * + * .google.protobuf.Duration duration = 2; + * + * @return The duration. + */ + @java.lang.Override + public com.google.protobuf.Duration getDuration() { + return duration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : duration_; + } + + /** + * + * + *
+     * The total time spent in the specified heart rate zone.
+     * 
+ * + * .google.protobuf.Duration duration = 2; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getDurationOrBuilder() { + return duration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : duration_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (heartRateZone_ + != com.google.devicesandservices.health.v4.HeartRateZoneType + .HEART_RATE_ZONE_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, heartRateZone_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getDuration()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (heartRateZone_ + != com.google.devicesandservices.health.v4.HeartRateZoneType + .HEART_RATE_ZONE_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, heartRateZone_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDuration()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .TimeInHeartRateZoneValue)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .TimeInHeartRateZoneValue + other = + (com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .TimeInHeartRateZoneValue) + obj; + + if (heartRateZone_ != other.heartRateZone_) return false; + if (hasDuration() != other.hasDuration()) return false; + if (hasDuration()) { + if (!getDuration().equals(other.getDuration())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + HEART_RATE_ZONE_FIELD_NUMBER; + hash = (53 * hash) + heartRateZone_; + if (hasDuration()) { + hash = (37 * hash) + DURATION_FIELD_NUMBER; + hash = (53 * hash) + getDuration().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .TimeInHeartRateZoneValue + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .TimeInHeartRateZoneValue + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .TimeInHeartRateZoneValue + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .TimeInHeartRateZoneValue + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .TimeInHeartRateZoneValue + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .TimeInHeartRateZoneValue + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .TimeInHeartRateZoneValue + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .TimeInHeartRateZoneValue + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .TimeInHeartRateZoneValue + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .TimeInHeartRateZoneValue + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .TimeInHeartRateZoneValue + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .TimeInHeartRateZoneValue + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .TimeInHeartRateZoneValue + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+     * Represents the total time spent in a specific heart rate zone.
+     * 
+ * + * Protobuf type {@code + * google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue.TimeInHeartRateZoneValue} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue.TimeInHeartRateZoneValue) + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .TimeInHeartRateZoneValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_TimeInHeartRateZoneRollupValue_TimeInHeartRateZoneValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_TimeInHeartRateZoneRollupValue_TimeInHeartRateZoneValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .TimeInHeartRateZoneValue.class, + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .TimeInHeartRateZoneValue.Builder.class); + } + + // Construct using + // com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue.TimeInHeartRateZoneValue.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetDurationFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + heartRateZone_ = 0; + duration_ = null; + if (durationBuilder_ != null) { + durationBuilder_.dispose(); + durationBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_TimeInHeartRateZoneRollupValue_TimeInHeartRateZoneValue_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .TimeInHeartRateZoneValue + getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .TimeInHeartRateZoneValue.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .TimeInHeartRateZoneValue + build() { + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .TimeInHeartRateZoneValue + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .TimeInHeartRateZoneValue + buildPartial() { + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .TimeInHeartRateZoneValue + result = + new com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .TimeInHeartRateZoneValue(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .TimeInHeartRateZoneValue + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.heartRateZone_ = heartRateZone_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.duration_ = durationBuilder_ == null ? duration_ : durationBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .TimeInHeartRateZoneValue) { + return mergeFrom( + (com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .TimeInHeartRateZoneValue) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .TimeInHeartRateZoneValue + other) { + if (other + == com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .TimeInHeartRateZoneValue.getDefaultInstance()) return this; + if (other.heartRateZone_ != 0) { + setHeartRateZoneValue(other.getHeartRateZoneValue()); + } + if (other.hasDuration()) { + mergeDuration(other.getDuration()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + heartRateZone_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + input.readMessage( + internalGetDurationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int heartRateZone_ = 0; + + /** + * + * + *
+       * The heart rate zone.
+       * 
+ * + * .google.devicesandservices.health.v4.HeartRateZoneType heart_rate_zone = 1; + * + * @return The enum numeric value on the wire for heartRateZone. + */ + @java.lang.Override + public int getHeartRateZoneValue() { + return heartRateZone_; + } + + /** + * + * + *
+       * The heart rate zone.
+       * 
+ * + * .google.devicesandservices.health.v4.HeartRateZoneType heart_rate_zone = 1; + * + * @param value The enum numeric value on the wire for heartRateZone to set. + * @return This builder for chaining. + */ + public Builder setHeartRateZoneValue(int value) { + heartRateZone_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * The heart rate zone.
+       * 
+ * + * .google.devicesandservices.health.v4.HeartRateZoneType heart_rate_zone = 1; + * + * @return The heartRateZone. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.HeartRateZoneType getHeartRateZone() { + com.google.devicesandservices.health.v4.HeartRateZoneType result = + com.google.devicesandservices.health.v4.HeartRateZoneType.forNumber(heartRateZone_); + return result == null + ? com.google.devicesandservices.health.v4.HeartRateZoneType.UNRECOGNIZED + : result; + } + + /** + * + * + *
+       * The heart rate zone.
+       * 
+ * + * .google.devicesandservices.health.v4.HeartRateZoneType heart_rate_zone = 1; + * + * @param value The heartRateZone to set. + * @return This builder for chaining. + */ + public Builder setHeartRateZone( + com.google.devicesandservices.health.v4.HeartRateZoneType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + heartRateZone_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+       * The heart rate zone.
+       * 
+ * + * .google.devicesandservices.health.v4.HeartRateZoneType heart_rate_zone = 1; + * + * @return This builder for chaining. + */ + public Builder clearHeartRateZone() { + bitField0_ = (bitField0_ & ~0x00000001); + heartRateZone_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Duration duration_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + durationBuilder_; + + /** + * + * + *
+       * The total time spent in the specified heart rate zone.
+       * 
+ * + * .google.protobuf.Duration duration = 2; + * + * @return Whether the duration field is set. + */ + public boolean hasDuration() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+       * The total time spent in the specified heart rate zone.
+       * 
+ * + * .google.protobuf.Duration duration = 2; + * + * @return The duration. + */ + public com.google.protobuf.Duration getDuration() { + if (durationBuilder_ == null) { + return duration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : duration_; + } else { + return durationBuilder_.getMessage(); + } + } + + /** + * + * + *
+       * The total time spent in the specified heart rate zone.
+       * 
+ * + * .google.protobuf.Duration duration = 2; + */ + public Builder setDuration(com.google.protobuf.Duration value) { + if (durationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + duration_ = value; + } else { + durationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * The total time spent in the specified heart rate zone.
+       * 
+ * + * .google.protobuf.Duration duration = 2; + */ + public Builder setDuration(com.google.protobuf.Duration.Builder builderForValue) { + if (durationBuilder_ == null) { + duration_ = builderForValue.build(); + } else { + durationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * The total time spent in the specified heart rate zone.
+       * 
+ * + * .google.protobuf.Duration duration = 2; + */ + public Builder mergeDuration(com.google.protobuf.Duration value) { + if (durationBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && duration_ != null + && duration_ != com.google.protobuf.Duration.getDefaultInstance()) { + getDurationBuilder().mergeFrom(value); + } else { + duration_ = value; + } + } else { + durationBuilder_.mergeFrom(value); + } + if (duration_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * The total time spent in the specified heart rate zone.
+       * 
+ * + * .google.protobuf.Duration duration = 2; + */ + public Builder clearDuration() { + bitField0_ = (bitField0_ & ~0x00000002); + duration_ = null; + if (durationBuilder_ != null) { + durationBuilder_.dispose(); + durationBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+       * The total time spent in the specified heart rate zone.
+       * 
+ * + * .google.protobuf.Duration duration = 2; + */ + public com.google.protobuf.Duration.Builder getDurationBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetDurationFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * The total time spent in the specified heart rate zone.
+       * 
+ * + * .google.protobuf.Duration duration = 2; + */ + public com.google.protobuf.DurationOrBuilder getDurationOrBuilder() { + if (durationBuilder_ != null) { + return durationBuilder_.getMessageOrBuilder(); + } else { + return duration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : duration_; + } + } + + /** + * + * + *
+       * The total time spent in the specified heart rate zone.
+       * 
+ * + * .google.protobuf.Duration duration = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + internalGetDurationFieldBuilder() { + if (durationBuilder_ == null) { + durationBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getDuration(), getParentForChildren(), isClean()); + duration_ = null; + } + return durationBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue.TimeInHeartRateZoneValue) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue.TimeInHeartRateZoneValue) + private static final com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .TimeInHeartRateZoneValue + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .TimeInHeartRateZoneValue(); + } + + public static com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .TimeInHeartRateZoneValue + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TimeInHeartRateZoneValue parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .TimeInHeartRateZoneValue + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int TIME_IN_HEART_RATE_ZONES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List< + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .TimeInHeartRateZoneValue> + timeInHeartRateZones_; + + /** + * + * + *
+   * List of time spent in each heart rate zone.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue.TimeInHeartRateZoneValue time_in_heart_rate_zones = 1; + * + */ + @java.lang.Override + public java.util.List< + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .TimeInHeartRateZoneValue> + getTimeInHeartRateZonesList() { + return timeInHeartRateZones_; + } + + /** + * + * + *
+   * List of time spent in each heart rate zone.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue.TimeInHeartRateZoneValue time_in_heart_rate_zones = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .TimeInHeartRateZoneValueOrBuilder> + getTimeInHeartRateZonesOrBuilderList() { + return timeInHeartRateZones_; + } + + /** + * + * + *
+   * List of time spent in each heart rate zone.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue.TimeInHeartRateZoneValue time_in_heart_rate_zones = 1; + * + */ + @java.lang.Override + public int getTimeInHeartRateZonesCount() { + return timeInHeartRateZones_.size(); + } + + /** + * + * + *
+   * List of time spent in each heart rate zone.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue.TimeInHeartRateZoneValue time_in_heart_rate_zones = 1; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .TimeInHeartRateZoneValue + getTimeInHeartRateZones(int index) { + return timeInHeartRateZones_.get(index); + } + + /** + * + * + *
+   * List of time spent in each heart rate zone.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue.TimeInHeartRateZoneValue time_in_heart_rate_zones = 1; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .TimeInHeartRateZoneValueOrBuilder + getTimeInHeartRateZonesOrBuilder(int index) { + return timeInHeartRateZones_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < timeInHeartRateZones_.size(); i++) { + output.writeMessage(1, timeInHeartRateZones_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < timeInHeartRateZones_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, timeInHeartRateZones_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue other = + (com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue) obj; + + if (!getTimeInHeartRateZonesList().equals(other.getTimeInHeartRateZonesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getTimeInHeartRateZonesCount() > 0) { + hash = (37 * hash) + TIME_IN_HEART_RATE_ZONES_FIELD_NUMBER; + hash = (53 * hash) + getTimeInHeartRateZonesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Represents the result of the rollup of the time in heart rate zone data
+   * type.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue) + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_TimeInHeartRateZoneRollupValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_TimeInHeartRateZoneRollupValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue.class, + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue.Builder.class); + } + + // Construct using + // com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (timeInHeartRateZonesBuilder_ == null) { + timeInHeartRateZones_ = java.util.Collections.emptyList(); + } else { + timeInHeartRateZones_ = null; + timeInHeartRateZonesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_TimeInHeartRateZoneRollupValue_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue build() { + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue buildPartial() { + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue result = + new com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue result) { + if (timeInHeartRateZonesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + timeInHeartRateZones_ = java.util.Collections.unmodifiableList(timeInHeartRateZones_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.timeInHeartRateZones_ = timeInHeartRateZones_; + } else { + result.timeInHeartRateZones_ = timeInHeartRateZonesBuilder_.build(); + } + } + + private void buildPartial0( + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue) { + return mergeFrom( + (com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue other) { + if (other + == com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .getDefaultInstance()) return this; + if (timeInHeartRateZonesBuilder_ == null) { + if (!other.timeInHeartRateZones_.isEmpty()) { + if (timeInHeartRateZones_.isEmpty()) { + timeInHeartRateZones_ = other.timeInHeartRateZones_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTimeInHeartRateZonesIsMutable(); + timeInHeartRateZones_.addAll(other.timeInHeartRateZones_); + } + onChanged(); + } + } else { + if (!other.timeInHeartRateZones_.isEmpty()) { + if (timeInHeartRateZonesBuilder_.isEmpty()) { + timeInHeartRateZonesBuilder_.dispose(); + timeInHeartRateZonesBuilder_ = null; + timeInHeartRateZones_ = other.timeInHeartRateZones_; + bitField0_ = (bitField0_ & ~0x00000001); + timeInHeartRateZonesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetTimeInHeartRateZonesFieldBuilder() + : null; + } else { + timeInHeartRateZonesBuilder_.addAllMessages(other.timeInHeartRateZones_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .TimeInHeartRateZoneValue + m = + input.readMessage( + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .TimeInHeartRateZoneValue.parser(), + extensionRegistry); + if (timeInHeartRateZonesBuilder_ == null) { + ensureTimeInHeartRateZonesIsMutable(); + timeInHeartRateZones_.add(m); + } else { + timeInHeartRateZonesBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List< + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .TimeInHeartRateZoneValue> + timeInHeartRateZones_ = java.util.Collections.emptyList(); + + private void ensureTimeInHeartRateZonesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + timeInHeartRateZones_ = + new java.util.ArrayList< + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .TimeInHeartRateZoneValue>(timeInHeartRateZones_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .TimeInHeartRateZoneValue, + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .TimeInHeartRateZoneValue.Builder, + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .TimeInHeartRateZoneValueOrBuilder> + timeInHeartRateZonesBuilder_; + + /** + * + * + *
+     * List of time spent in each heart rate zone.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue.TimeInHeartRateZoneValue time_in_heart_rate_zones = 1; + * + */ + public java.util.List< + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .TimeInHeartRateZoneValue> + getTimeInHeartRateZonesList() { + if (timeInHeartRateZonesBuilder_ == null) { + return java.util.Collections.unmodifiableList(timeInHeartRateZones_); + } else { + return timeInHeartRateZonesBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * List of time spent in each heart rate zone.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue.TimeInHeartRateZoneValue time_in_heart_rate_zones = 1; + * + */ + public int getTimeInHeartRateZonesCount() { + if (timeInHeartRateZonesBuilder_ == null) { + return timeInHeartRateZones_.size(); + } else { + return timeInHeartRateZonesBuilder_.getCount(); + } + } + + /** + * + * + *
+     * List of time spent in each heart rate zone.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue.TimeInHeartRateZoneValue time_in_heart_rate_zones = 1; + * + */ + public com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .TimeInHeartRateZoneValue + getTimeInHeartRateZones(int index) { + if (timeInHeartRateZonesBuilder_ == null) { + return timeInHeartRateZones_.get(index); + } else { + return timeInHeartRateZonesBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * List of time spent in each heart rate zone.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue.TimeInHeartRateZoneValue time_in_heart_rate_zones = 1; + * + */ + public Builder setTimeInHeartRateZones( + int index, + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .TimeInHeartRateZoneValue + value) { + if (timeInHeartRateZonesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTimeInHeartRateZonesIsMutable(); + timeInHeartRateZones_.set(index, value); + onChanged(); + } else { + timeInHeartRateZonesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * List of time spent in each heart rate zone.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue.TimeInHeartRateZoneValue time_in_heart_rate_zones = 1; + * + */ + public Builder setTimeInHeartRateZones( + int index, + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .TimeInHeartRateZoneValue.Builder + builderForValue) { + if (timeInHeartRateZonesBuilder_ == null) { + ensureTimeInHeartRateZonesIsMutable(); + timeInHeartRateZones_.set(index, builderForValue.build()); + onChanged(); + } else { + timeInHeartRateZonesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * List of time spent in each heart rate zone.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue.TimeInHeartRateZoneValue time_in_heart_rate_zones = 1; + * + */ + public Builder addTimeInHeartRateZones( + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .TimeInHeartRateZoneValue + value) { + if (timeInHeartRateZonesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTimeInHeartRateZonesIsMutable(); + timeInHeartRateZones_.add(value); + onChanged(); + } else { + timeInHeartRateZonesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * List of time spent in each heart rate zone.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue.TimeInHeartRateZoneValue time_in_heart_rate_zones = 1; + * + */ + public Builder addTimeInHeartRateZones( + int index, + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .TimeInHeartRateZoneValue + value) { + if (timeInHeartRateZonesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTimeInHeartRateZonesIsMutable(); + timeInHeartRateZones_.add(index, value); + onChanged(); + } else { + timeInHeartRateZonesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * List of time spent in each heart rate zone.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue.TimeInHeartRateZoneValue time_in_heart_rate_zones = 1; + * + */ + public Builder addTimeInHeartRateZones( + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .TimeInHeartRateZoneValue.Builder + builderForValue) { + if (timeInHeartRateZonesBuilder_ == null) { + ensureTimeInHeartRateZonesIsMutable(); + timeInHeartRateZones_.add(builderForValue.build()); + onChanged(); + } else { + timeInHeartRateZonesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * List of time spent in each heart rate zone.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue.TimeInHeartRateZoneValue time_in_heart_rate_zones = 1; + * + */ + public Builder addTimeInHeartRateZones( + int index, + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .TimeInHeartRateZoneValue.Builder + builderForValue) { + if (timeInHeartRateZonesBuilder_ == null) { + ensureTimeInHeartRateZonesIsMutable(); + timeInHeartRateZones_.add(index, builderForValue.build()); + onChanged(); + } else { + timeInHeartRateZonesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * List of time spent in each heart rate zone.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue.TimeInHeartRateZoneValue time_in_heart_rate_zones = 1; + * + */ + public Builder addAllTimeInHeartRateZones( + java.lang.Iterable< + ? extends + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .TimeInHeartRateZoneValue> + values) { + if (timeInHeartRateZonesBuilder_ == null) { + ensureTimeInHeartRateZonesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, timeInHeartRateZones_); + onChanged(); + } else { + timeInHeartRateZonesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * List of time spent in each heart rate zone.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue.TimeInHeartRateZoneValue time_in_heart_rate_zones = 1; + * + */ + public Builder clearTimeInHeartRateZones() { + if (timeInHeartRateZonesBuilder_ == null) { + timeInHeartRateZones_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + timeInHeartRateZonesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * List of time spent in each heart rate zone.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue.TimeInHeartRateZoneValue time_in_heart_rate_zones = 1; + * + */ + public Builder removeTimeInHeartRateZones(int index) { + if (timeInHeartRateZonesBuilder_ == null) { + ensureTimeInHeartRateZonesIsMutable(); + timeInHeartRateZones_.remove(index); + onChanged(); + } else { + timeInHeartRateZonesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * List of time spent in each heart rate zone.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue.TimeInHeartRateZoneValue time_in_heart_rate_zones = 1; + * + */ + public com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .TimeInHeartRateZoneValue.Builder + getTimeInHeartRateZonesBuilder(int index) { + return internalGetTimeInHeartRateZonesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * List of time spent in each heart rate zone.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue.TimeInHeartRateZoneValue time_in_heart_rate_zones = 1; + * + */ + public com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .TimeInHeartRateZoneValueOrBuilder + getTimeInHeartRateZonesOrBuilder(int index) { + if (timeInHeartRateZonesBuilder_ == null) { + return timeInHeartRateZones_.get(index); + } else { + return timeInHeartRateZonesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * List of time spent in each heart rate zone.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue.TimeInHeartRateZoneValue time_in_heart_rate_zones = 1; + * + */ + public java.util.List< + ? extends + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .TimeInHeartRateZoneValueOrBuilder> + getTimeInHeartRateZonesOrBuilderList() { + if (timeInHeartRateZonesBuilder_ != null) { + return timeInHeartRateZonesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(timeInHeartRateZones_); + } + } + + /** + * + * + *
+     * List of time spent in each heart rate zone.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue.TimeInHeartRateZoneValue time_in_heart_rate_zones = 1; + * + */ + public com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .TimeInHeartRateZoneValue.Builder + addTimeInHeartRateZonesBuilder() { + return internalGetTimeInHeartRateZonesFieldBuilder() + .addBuilder( + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .TimeInHeartRateZoneValue.getDefaultInstance()); + } + + /** + * + * + *
+     * List of time spent in each heart rate zone.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue.TimeInHeartRateZoneValue time_in_heart_rate_zones = 1; + * + */ + public com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .TimeInHeartRateZoneValue.Builder + addTimeInHeartRateZonesBuilder(int index) { + return internalGetTimeInHeartRateZonesFieldBuilder() + .addBuilder( + index, + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .TimeInHeartRateZoneValue.getDefaultInstance()); + } + + /** + * + * + *
+     * List of time spent in each heart rate zone.
+     * 
+ * + * + * repeated .google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue.TimeInHeartRateZoneValue time_in_heart_rate_zones = 1; + * + */ + public java.util.List< + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .TimeInHeartRateZoneValue.Builder> + getTimeInHeartRateZonesBuilderList() { + return internalGetTimeInHeartRateZonesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .TimeInHeartRateZoneValue, + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .TimeInHeartRateZoneValue.Builder, + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .TimeInHeartRateZoneValueOrBuilder> + internalGetTimeInHeartRateZonesFieldBuilder() { + if (timeInHeartRateZonesBuilder_ == null) { + timeInHeartRateZonesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .TimeInHeartRateZoneValue, + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .TimeInHeartRateZoneValue.Builder, + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .TimeInHeartRateZoneValueOrBuilder>( + timeInHeartRateZones_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + timeInHeartRateZones_ = null; + } + return timeInHeartRateZonesBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue) + private static final com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue(); + } + + public static com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TimeInHeartRateZoneRollupValue parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/TimeInHeartRateZoneRollupValueOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/TimeInHeartRateZoneRollupValueOrBuilder.java new file mode 100644 index 000000000000..c9effdc15894 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/TimeInHeartRateZoneRollupValueOrBuilder.java @@ -0,0 +1,103 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface TimeInHeartRateZoneRollupValueOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * List of time spent in each heart rate zone.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue.TimeInHeartRateZoneValue time_in_heart_rate_zones = 1; + * + */ + java.util.List< + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .TimeInHeartRateZoneValue> + getTimeInHeartRateZonesList(); + + /** + * + * + *
+   * List of time spent in each heart rate zone.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue.TimeInHeartRateZoneValue time_in_heart_rate_zones = 1; + * + */ + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue.TimeInHeartRateZoneValue + getTimeInHeartRateZones(int index); + + /** + * + * + *
+   * List of time spent in each heart rate zone.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue.TimeInHeartRateZoneValue time_in_heart_rate_zones = 1; + * + */ + int getTimeInHeartRateZonesCount(); + + /** + * + * + *
+   * List of time spent in each heart rate zone.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue.TimeInHeartRateZoneValue time_in_heart_rate_zones = 1; + * + */ + java.util.List< + ? extends + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .TimeInHeartRateZoneValueOrBuilder> + getTimeInHeartRateZonesOrBuilderList(); + + /** + * + * + *
+   * List of time spent in each heart rate zone.
+   * 
+ * + * + * repeated .google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue.TimeInHeartRateZoneValue time_in_heart_rate_zones = 1; + * + */ + com.google.devicesandservices.health.v4.TimeInHeartRateZoneRollupValue + .TimeInHeartRateZoneValueOrBuilder + getTimeInHeartRateZonesOrBuilder(int index); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/TotalCaloriesRollupValue.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/TotalCaloriesRollupValue.java new file mode 100644 index 000000000000..87519efe82c0 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/TotalCaloriesRollupValue.java @@ -0,0 +1,515 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * Represents the result of the rollup of the user's total calories.
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.TotalCaloriesRollupValue} + */ +@com.google.protobuf.Generated +public final class TotalCaloriesRollupValue extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.TotalCaloriesRollupValue) + TotalCaloriesRollupValueOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "TotalCaloriesRollupValue"); + } + + // Use TotalCaloriesRollupValue.newBuilder() to construct. + private TotalCaloriesRollupValue(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private TotalCaloriesRollupValue() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_TotalCaloriesRollupValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_TotalCaloriesRollupValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.TotalCaloriesRollupValue.class, + com.google.devicesandservices.health.v4.TotalCaloriesRollupValue.Builder.class); + } + + public static final int KCAL_SUM_FIELD_NUMBER = 1; + private double kcalSum_ = 0D; + + /** + * + * + *
+   * Sum of the total calories in kilocalories.
+   * 
+ * + * double kcal_sum = 1; + * + * @return The kcalSum. + */ + @java.lang.Override + public double getKcalSum() { + return kcalSum_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (java.lang.Double.doubleToRawLongBits(kcalSum_) != 0) { + output.writeDouble(1, kcalSum_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (java.lang.Double.doubleToRawLongBits(kcalSum_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(1, kcalSum_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.TotalCaloriesRollupValue)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.TotalCaloriesRollupValue other = + (com.google.devicesandservices.health.v4.TotalCaloriesRollupValue) obj; + + if (java.lang.Double.doubleToLongBits(getKcalSum()) + != java.lang.Double.doubleToLongBits(other.getKcalSum())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + KCAL_SUM_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getKcalSum())); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.TotalCaloriesRollupValue parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.TotalCaloriesRollupValue parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.TotalCaloriesRollupValue parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.TotalCaloriesRollupValue parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.TotalCaloriesRollupValue parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.TotalCaloriesRollupValue parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.TotalCaloriesRollupValue parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.TotalCaloriesRollupValue parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.TotalCaloriesRollupValue parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.TotalCaloriesRollupValue parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.TotalCaloriesRollupValue parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.TotalCaloriesRollupValue parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.TotalCaloriesRollupValue prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Represents the result of the rollup of the user's total calories.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.TotalCaloriesRollupValue} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.TotalCaloriesRollupValue) + com.google.devicesandservices.health.v4.TotalCaloriesRollupValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_TotalCaloriesRollupValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_TotalCaloriesRollupValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.TotalCaloriesRollupValue.class, + com.google.devicesandservices.health.v4.TotalCaloriesRollupValue.Builder.class); + } + + // Construct using com.google.devicesandservices.health.v4.TotalCaloriesRollupValue.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + kcalSum_ = 0D; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_TotalCaloriesRollupValue_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.TotalCaloriesRollupValue + getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.TotalCaloriesRollupValue.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.TotalCaloriesRollupValue build() { + com.google.devicesandservices.health.v4.TotalCaloriesRollupValue result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.TotalCaloriesRollupValue buildPartial() { + com.google.devicesandservices.health.v4.TotalCaloriesRollupValue result = + new com.google.devicesandservices.health.v4.TotalCaloriesRollupValue(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.devicesandservices.health.v4.TotalCaloriesRollupValue result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.kcalSum_ = kcalSum_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.TotalCaloriesRollupValue) { + return mergeFrom((com.google.devicesandservices.health.v4.TotalCaloriesRollupValue) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.devicesandservices.health.v4.TotalCaloriesRollupValue other) { + if (other + == com.google.devicesandservices.health.v4.TotalCaloriesRollupValue.getDefaultInstance()) + return this; + if (java.lang.Double.doubleToRawLongBits(other.getKcalSum()) != 0) { + setKcalSum(other.getKcalSum()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 9: + { + kcalSum_ = input.readDouble(); + bitField0_ |= 0x00000001; + break; + } // case 9 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private double kcalSum_; + + /** + * + * + *
+     * Sum of the total calories in kilocalories.
+     * 
+ * + * double kcal_sum = 1; + * + * @return The kcalSum. + */ + @java.lang.Override + public double getKcalSum() { + return kcalSum_; + } + + /** + * + * + *
+     * Sum of the total calories in kilocalories.
+     * 
+ * + * double kcal_sum = 1; + * + * @param value The kcalSum to set. + * @return This builder for chaining. + */ + public Builder setKcalSum(double value) { + + kcalSum_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Sum of the total calories in kilocalories.
+     * 
+ * + * double kcal_sum = 1; + * + * @return This builder for chaining. + */ + public Builder clearKcalSum() { + bitField0_ = (bitField0_ & ~0x00000001); + kcalSum_ = 0D; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.TotalCaloriesRollupValue) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.TotalCaloriesRollupValue) + private static final com.google.devicesandservices.health.v4.TotalCaloriesRollupValue + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.TotalCaloriesRollupValue(); + } + + public static com.google.devicesandservices.health.v4.TotalCaloriesRollupValue + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TotalCaloriesRollupValue parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.TotalCaloriesRollupValue + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/TotalCaloriesRollupValueOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/TotalCaloriesRollupValueOrBuilder.java new file mode 100644 index 000000000000..d177c3f31365 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/TotalCaloriesRollupValueOrBuilder.java @@ -0,0 +1,41 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface TotalCaloriesRollupValueOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.TotalCaloriesRollupValue) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Sum of the total calories in kilocalories.
+   * 
+ * + * double kcal_sum = 1; + * + * @return The kcalSum. + */ + double getKcalSum(); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/UpdateDataPointOperationMetadata.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/UpdateDataPointOperationMetadata.java new file mode 100644 index 000000000000..003e440c4d6b --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/UpdateDataPointOperationMetadata.java @@ -0,0 +1,413 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_points.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * Metadata for an update data point operation.
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.UpdateDataPointOperationMetadata} + */ +@com.google.protobuf.Generated +public final class UpdateDataPointOperationMetadata extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.UpdateDataPointOperationMetadata) + UpdateDataPointOperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "UpdateDataPointOperationMetadata"); + } + + // Use UpdateDataPointOperationMetadata.newBuilder() to construct. + private UpdateDataPointOperationMetadata( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private UpdateDataPointOperationMetadata() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_UpdateDataPointOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_UpdateDataPointOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.UpdateDataPointOperationMetadata.class, + com.google.devicesandservices.health.v4.UpdateDataPointOperationMetadata.Builder.class); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.devicesandservices.health.v4.UpdateDataPointOperationMetadata)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.UpdateDataPointOperationMetadata other = + (com.google.devicesandservices.health.v4.UpdateDataPointOperationMetadata) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.UpdateDataPointOperationMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.UpdateDataPointOperationMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.UpdateDataPointOperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.UpdateDataPointOperationMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.UpdateDataPointOperationMetadata parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.UpdateDataPointOperationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.UpdateDataPointOperationMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.UpdateDataPointOperationMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.UpdateDataPointOperationMetadata + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.UpdateDataPointOperationMetadata + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.UpdateDataPointOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.UpdateDataPointOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.UpdateDataPointOperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Metadata for an update data point operation.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.UpdateDataPointOperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.UpdateDataPointOperationMetadata) + com.google.devicesandservices.health.v4.UpdateDataPointOperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_UpdateDataPointOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_UpdateDataPointOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.UpdateDataPointOperationMetadata.class, + com.google.devicesandservices.health.v4.UpdateDataPointOperationMetadata.Builder + .class); + } + + // Construct using + // com.google.devicesandservices.health.v4.UpdateDataPointOperationMetadata.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_UpdateDataPointOperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.UpdateDataPointOperationMetadata + getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.UpdateDataPointOperationMetadata + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.UpdateDataPointOperationMetadata build() { + com.google.devicesandservices.health.v4.UpdateDataPointOperationMetadata result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.UpdateDataPointOperationMetadata buildPartial() { + com.google.devicesandservices.health.v4.UpdateDataPointOperationMetadata result = + new com.google.devicesandservices.health.v4.UpdateDataPointOperationMetadata(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.devicesandservices.health.v4.UpdateDataPointOperationMetadata) { + return mergeFrom( + (com.google.devicesandservices.health.v4.UpdateDataPointOperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.devicesandservices.health.v4.UpdateDataPointOperationMetadata other) { + if (other + == com.google.devicesandservices.health.v4.UpdateDataPointOperationMetadata + .getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.UpdateDataPointOperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.UpdateDataPointOperationMetadata) + private static final com.google.devicesandservices.health.v4.UpdateDataPointOperationMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.devicesandservices.health.v4.UpdateDataPointOperationMetadata(); + } + + public static com.google.devicesandservices.health.v4.UpdateDataPointOperationMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateDataPointOperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.UpdateDataPointOperationMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/UpdateDataPointOperationMetadataOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/UpdateDataPointOperationMetadataOrBuilder.java new file mode 100644 index 000000000000..9d63b6aabeee --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/UpdateDataPointOperationMetadataOrBuilder.java @@ -0,0 +1,27 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_points.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface UpdateDataPointOperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.UpdateDataPointOperationMetadata) + com.google.protobuf.MessageOrBuilder {} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/UpdateDataPointRequest.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/UpdateDataPointRequest.java new file mode 100644 index 000000000000..5ae0fca8b0f0 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/UpdateDataPointRequest.java @@ -0,0 +1,779 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_points.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * Request to update an identifiable data point.
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.UpdateDataPointRequest} + */ +@com.google.protobuf.Generated +public final class UpdateDataPointRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.UpdateDataPointRequest) + UpdateDataPointRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "UpdateDataPointRequest"); + } + + // Use UpdateDataPointRequest.newBuilder() to construct. + private UpdateDataPointRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private UpdateDataPointRequest() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_UpdateDataPointRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_UpdateDataPointRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.UpdateDataPointRequest.class, + com.google.devicesandservices.health.v4.UpdateDataPointRequest.Builder.class); + } + + private int bitField0_; + public static final int DATA_POINT_FIELD_NUMBER = 1; + private com.google.devicesandservices.health.v4.DataPoint dataPoint_; + + /** + * + * + *
+   * Required. The data point to update
+   *
+   * The data point's `name` field is used to identify the data point to update.
+   *
+   * Format: `users/{user}/dataTypes/{data_type}/dataPoints/{data_point}`
+   * 
+ * + * + * .google.devicesandservices.health.v4.DataPoint data_point = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the dataPoint field is set. + */ + @java.lang.Override + public boolean hasDataPoint() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The data point to update
+   *
+   * The data point's `name` field is used to identify the data point to update.
+   *
+   * Format: `users/{user}/dataTypes/{data_type}/dataPoints/{data_point}`
+   * 
+ * + * + * .google.devicesandservices.health.v4.DataPoint data_point = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The dataPoint. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DataPoint getDataPoint() { + return dataPoint_ == null + ? com.google.devicesandservices.health.v4.DataPoint.getDefaultInstance() + : dataPoint_; + } + + /** + * + * + *
+   * Required. The data point to update
+   *
+   * The data point's `name` field is used to identify the data point to update.
+   *
+   * Format: `users/{user}/dataTypes/{data_type}/dataPoints/{data_point}`
+   * 
+ * + * + * .google.devicesandservices.health.v4.DataPoint data_point = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.DataPointOrBuilder getDataPointOrBuilder() { + return dataPoint_ == null + ? com.google.devicesandservices.health.v4.DataPoint.getDefaultInstance() + : dataPoint_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getDataPoint()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getDataPoint()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.UpdateDataPointRequest)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.UpdateDataPointRequest other = + (com.google.devicesandservices.health.v4.UpdateDataPointRequest) obj; + + if (hasDataPoint() != other.hasDataPoint()) return false; + if (hasDataPoint()) { + if (!getDataPoint().equals(other.getDataPoint())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasDataPoint()) { + hash = (37 * hash) + DATA_POINT_FIELD_NUMBER; + hash = (53 * hash) + getDataPoint().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.UpdateDataPointRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.UpdateDataPointRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.UpdateDataPointRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.UpdateDataPointRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.UpdateDataPointRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.UpdateDataPointRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.UpdateDataPointRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.UpdateDataPointRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.UpdateDataPointRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.UpdateDataPointRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.UpdateDataPointRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.UpdateDataPointRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.UpdateDataPointRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request to update an identifiable data point.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.UpdateDataPointRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.UpdateDataPointRequest) + com.google.devicesandservices.health.v4.UpdateDataPointRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_UpdateDataPointRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_UpdateDataPointRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.UpdateDataPointRequest.class, + com.google.devicesandservices.health.v4.UpdateDataPointRequest.Builder.class); + } + + // Construct using com.google.devicesandservices.health.v4.UpdateDataPointRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetDataPointFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + dataPoint_ = null; + if (dataPointBuilder_ != null) { + dataPointBuilder_.dispose(); + dataPointBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataPointsProto + .internal_static_google_devicesandservices_health_v4_UpdateDataPointRequest_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.UpdateDataPointRequest + getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.UpdateDataPointRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.UpdateDataPointRequest build() { + com.google.devicesandservices.health.v4.UpdateDataPointRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.UpdateDataPointRequest buildPartial() { + com.google.devicesandservices.health.v4.UpdateDataPointRequest result = + new com.google.devicesandservices.health.v4.UpdateDataPointRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.devicesandservices.health.v4.UpdateDataPointRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.dataPoint_ = dataPointBuilder_ == null ? dataPoint_ : dataPointBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.UpdateDataPointRequest) { + return mergeFrom((com.google.devicesandservices.health.v4.UpdateDataPointRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.devicesandservices.health.v4.UpdateDataPointRequest other) { + if (other + == com.google.devicesandservices.health.v4.UpdateDataPointRequest.getDefaultInstance()) + return this; + if (other.hasDataPoint()) { + mergeDataPoint(other.getDataPoint()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetDataPointFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.devicesandservices.health.v4.DataPoint dataPoint_; + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.DataPoint, + com.google.devicesandservices.health.v4.DataPoint.Builder, + com.google.devicesandservices.health.v4.DataPointOrBuilder> + dataPointBuilder_; + + /** + * + * + *
+     * Required. The data point to update
+     *
+     * The data point's `name` field is used to identify the data point to update.
+     *
+     * Format: `users/{user}/dataTypes/{data_type}/dataPoints/{data_point}`
+     * 
+ * + * + * .google.devicesandservices.health.v4.DataPoint data_point = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the dataPoint field is set. + */ + public boolean hasDataPoint() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. The data point to update
+     *
+     * The data point's `name` field is used to identify the data point to update.
+     *
+     * Format: `users/{user}/dataTypes/{data_type}/dataPoints/{data_point}`
+     * 
+ * + * + * .google.devicesandservices.health.v4.DataPoint data_point = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The dataPoint. + */ + public com.google.devicesandservices.health.v4.DataPoint getDataPoint() { + if (dataPointBuilder_ == null) { + return dataPoint_ == null + ? com.google.devicesandservices.health.v4.DataPoint.getDefaultInstance() + : dataPoint_; + } else { + return dataPointBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The data point to update
+     *
+     * The data point's `name` field is used to identify the data point to update.
+     *
+     * Format: `users/{user}/dataTypes/{data_type}/dataPoints/{data_point}`
+     * 
+ * + * + * .google.devicesandservices.health.v4.DataPoint data_point = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDataPoint(com.google.devicesandservices.health.v4.DataPoint value) { + if (dataPointBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dataPoint_ = value; + } else { + dataPointBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The data point to update
+     *
+     * The data point's `name` field is used to identify the data point to update.
+     *
+     * Format: `users/{user}/dataTypes/{data_type}/dataPoints/{data_point}`
+     * 
+ * + * + * .google.devicesandservices.health.v4.DataPoint data_point = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDataPoint( + com.google.devicesandservices.health.v4.DataPoint.Builder builderForValue) { + if (dataPointBuilder_ == null) { + dataPoint_ = builderForValue.build(); + } else { + dataPointBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The data point to update
+     *
+     * The data point's `name` field is used to identify the data point to update.
+     *
+     * Format: `users/{user}/dataTypes/{data_type}/dataPoints/{data_point}`
+     * 
+ * + * + * .google.devicesandservices.health.v4.DataPoint data_point = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeDataPoint(com.google.devicesandservices.health.v4.DataPoint value) { + if (dataPointBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && dataPoint_ != null + && dataPoint_ + != com.google.devicesandservices.health.v4.DataPoint.getDefaultInstance()) { + getDataPointBuilder().mergeFrom(value); + } else { + dataPoint_ = value; + } + } else { + dataPointBuilder_.mergeFrom(value); + } + if (dataPoint_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The data point to update
+     *
+     * The data point's `name` field is used to identify the data point to update.
+     *
+     * Format: `users/{user}/dataTypes/{data_type}/dataPoints/{data_point}`
+     * 
+ * + * + * .google.devicesandservices.health.v4.DataPoint data_point = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearDataPoint() { + bitField0_ = (bitField0_ & ~0x00000001); + dataPoint_ = null; + if (dataPointBuilder_ != null) { + dataPointBuilder_.dispose(); + dataPointBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The data point to update
+     *
+     * The data point's `name` field is used to identify the data point to update.
+     *
+     * Format: `users/{user}/dataTypes/{data_type}/dataPoints/{data_point}`
+     * 
+ * + * + * .google.devicesandservices.health.v4.DataPoint data_point = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.devicesandservices.health.v4.DataPoint.Builder getDataPointBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetDataPointFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The data point to update
+     *
+     * The data point's `name` field is used to identify the data point to update.
+     *
+     * Format: `users/{user}/dataTypes/{data_type}/dataPoints/{data_point}`
+     * 
+ * + * + * .google.devicesandservices.health.v4.DataPoint data_point = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.devicesandservices.health.v4.DataPointOrBuilder getDataPointOrBuilder() { + if (dataPointBuilder_ != null) { + return dataPointBuilder_.getMessageOrBuilder(); + } else { + return dataPoint_ == null + ? com.google.devicesandservices.health.v4.DataPoint.getDefaultInstance() + : dataPoint_; + } + } + + /** + * + * + *
+     * Required. The data point to update
+     *
+     * The data point's `name` field is used to identify the data point to update.
+     *
+     * Format: `users/{user}/dataTypes/{data_type}/dataPoints/{data_point}`
+     * 
+ * + * + * .google.devicesandservices.health.v4.DataPoint data_point = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.DataPoint, + com.google.devicesandservices.health.v4.DataPoint.Builder, + com.google.devicesandservices.health.v4.DataPointOrBuilder> + internalGetDataPointFieldBuilder() { + if (dataPointBuilder_ == null) { + dataPointBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.DataPoint, + com.google.devicesandservices.health.v4.DataPoint.Builder, + com.google.devicesandservices.health.v4.DataPointOrBuilder>( + getDataPoint(), getParentForChildren(), isClean()); + dataPoint_ = null; + } + return dataPointBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.UpdateDataPointRequest) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.UpdateDataPointRequest) + private static final com.google.devicesandservices.health.v4.UpdateDataPointRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.UpdateDataPointRequest(); + } + + public static com.google.devicesandservices.health.v4.UpdateDataPointRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateDataPointRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.UpdateDataPointRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/UpdateDataPointRequestOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/UpdateDataPointRequestOrBuilder.java new file mode 100644 index 000000000000..8c5baaf0869a --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/UpdateDataPointRequestOrBuilder.java @@ -0,0 +1,83 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_points.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface UpdateDataPointRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.UpdateDataPointRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The data point to update
+   *
+   * The data point's `name` field is used to identify the data point to update.
+   *
+   * Format: `users/{user}/dataTypes/{data_type}/dataPoints/{data_point}`
+   * 
+ * + * + * .google.devicesandservices.health.v4.DataPoint data_point = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the dataPoint field is set. + */ + boolean hasDataPoint(); + + /** + * + * + *
+   * Required. The data point to update
+   *
+   * The data point's `name` field is used to identify the data point to update.
+   *
+   * Format: `users/{user}/dataTypes/{data_type}/dataPoints/{data_point}`
+   * 
+ * + * + * .google.devicesandservices.health.v4.DataPoint data_point = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The dataPoint. + */ + com.google.devicesandservices.health.v4.DataPoint getDataPoint(); + + /** + * + * + *
+   * Required. The data point to update
+   *
+   * The data point's `name` field is used to identify the data point to update.
+   *
+   * Format: `users/{user}/dataTypes/{data_type}/dataPoints/{data_point}`
+   * 
+ * + * + * .google.devicesandservices.health.v4.DataPoint data_point = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.devicesandservices.health.v4.DataPointOrBuilder getDataPointOrBuilder(); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/UpdateProfileRequest.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/UpdateProfileRequest.java new file mode 100644 index 000000000000..8c1fa6f376eb --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/UpdateProfileRequest.java @@ -0,0 +1,1016 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/health_profile.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * Request message for updating Profile details.
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.UpdateProfileRequest} + */ +@com.google.protobuf.Generated +public final class UpdateProfileRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.UpdateProfileRequest) + UpdateProfileRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "UpdateProfileRequest"); + } + + // Use UpdateProfileRequest.newBuilder() to construct. + private UpdateProfileRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private UpdateProfileRequest() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.HealthProfileProto + .internal_static_google_devicesandservices_health_v4_UpdateProfileRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.HealthProfileProto + .internal_static_google_devicesandservices_health_v4_UpdateProfileRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.UpdateProfileRequest.class, + com.google.devicesandservices.health.v4.UpdateProfileRequest.Builder.class); + } + + private int bitField0_; + public static final int PROFILE_FIELD_NUMBER = 1; + private com.google.devicesandservices.health.v4.Profile profile_; + + /** + * + * + *
+   * Required. Profile details.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Profile profile = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the profile field is set. + */ + @java.lang.Override + public boolean hasProfile() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. Profile details.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Profile profile = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The profile. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Profile getProfile() { + return profile_ == null + ? com.google.devicesandservices.health.v4.Profile.getDefaultInstance() + : profile_; + } + + /** + * + * + *
+   * Required. Profile details.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Profile profile = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ProfileOrBuilder getProfileOrBuilder() { + return profile_ == null + ? com.google.devicesandservices.health.v4.Profile.getDefaultInstance() + : profile_; + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + + /** + * + * + *
+   * Optional. The list of fields to be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Optional. The list of fields to be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + /** + * + * + *
+   * Optional. The list of fields to be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getProfile()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getUpdateMask()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getProfile()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.UpdateProfileRequest)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.UpdateProfileRequest other = + (com.google.devicesandservices.health.v4.UpdateProfileRequest) obj; + + if (hasProfile() != other.hasProfile()) return false; + if (hasProfile()) { + if (!getProfile().equals(other.getProfile())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasProfile()) { + hash = (37 * hash) + PROFILE_FIELD_NUMBER; + hash = (53 * hash) + getProfile().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.UpdateProfileRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.UpdateProfileRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.UpdateProfileRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.UpdateProfileRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.UpdateProfileRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.UpdateProfileRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.UpdateProfileRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.UpdateProfileRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.UpdateProfileRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.UpdateProfileRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.UpdateProfileRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.UpdateProfileRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.UpdateProfileRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for updating Profile details.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.UpdateProfileRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.UpdateProfileRequest) + com.google.devicesandservices.health.v4.UpdateProfileRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.HealthProfileProto + .internal_static_google_devicesandservices_health_v4_UpdateProfileRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.HealthProfileProto + .internal_static_google_devicesandservices_health_v4_UpdateProfileRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.UpdateProfileRequest.class, + com.google.devicesandservices.health.v4.UpdateProfileRequest.Builder.class); + } + + // Construct using com.google.devicesandservices.health.v4.UpdateProfileRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetProfileFieldBuilder(); + internalGetUpdateMaskFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + profile_ = null; + if (profileBuilder_ != null) { + profileBuilder_.dispose(); + profileBuilder_ = null; + } + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.HealthProfileProto + .internal_static_google_devicesandservices_health_v4_UpdateProfileRequest_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.UpdateProfileRequest + getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.UpdateProfileRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.UpdateProfileRequest build() { + com.google.devicesandservices.health.v4.UpdateProfileRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.UpdateProfileRequest buildPartial() { + com.google.devicesandservices.health.v4.UpdateProfileRequest result = + new com.google.devicesandservices.health.v4.UpdateProfileRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.devicesandservices.health.v4.UpdateProfileRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.profile_ = profileBuilder_ == null ? profile_ : profileBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.UpdateProfileRequest) { + return mergeFrom((com.google.devicesandservices.health.v4.UpdateProfileRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.devicesandservices.health.v4.UpdateProfileRequest other) { + if (other + == com.google.devicesandservices.health.v4.UpdateProfileRequest.getDefaultInstance()) + return this; + if (other.hasProfile()) { + mergeProfile(other.getProfile()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(internalGetProfileFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.devicesandservices.health.v4.Profile profile_; + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.Profile, + com.google.devicesandservices.health.v4.Profile.Builder, + com.google.devicesandservices.health.v4.ProfileOrBuilder> + profileBuilder_; + + /** + * + * + *
+     * Required. Profile details.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Profile profile = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the profile field is set. + */ + public boolean hasProfile() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. Profile details.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Profile profile = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The profile. + */ + public com.google.devicesandservices.health.v4.Profile getProfile() { + if (profileBuilder_ == null) { + return profile_ == null + ? com.google.devicesandservices.health.v4.Profile.getDefaultInstance() + : profile_; + } else { + return profileBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. Profile details.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Profile profile = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setProfile(com.google.devicesandservices.health.v4.Profile value) { + if (profileBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + profile_ = value; + } else { + profileBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Profile details.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Profile profile = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setProfile( + com.google.devicesandservices.health.v4.Profile.Builder builderForValue) { + if (profileBuilder_ == null) { + profile_ = builderForValue.build(); + } else { + profileBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Profile details.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Profile profile = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeProfile(com.google.devicesandservices.health.v4.Profile value) { + if (profileBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && profile_ != null + && profile_ != com.google.devicesandservices.health.v4.Profile.getDefaultInstance()) { + getProfileBuilder().mergeFrom(value); + } else { + profile_ = value; + } + } else { + profileBuilder_.mergeFrom(value); + } + if (profile_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. Profile details.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Profile profile = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearProfile() { + bitField0_ = (bitField0_ & ~0x00000001); + profile_ = null; + if (profileBuilder_ != null) { + profileBuilder_.dispose(); + profileBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Profile details.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Profile profile = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.devicesandservices.health.v4.Profile.Builder getProfileBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetProfileFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. Profile details.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Profile profile = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.devicesandservices.health.v4.ProfileOrBuilder getProfileOrBuilder() { + if (profileBuilder_ != null) { + return profileBuilder_.getMessageOrBuilder(); + } else { + return profile_ == null + ? com.google.devicesandservices.health.v4.Profile.getDefaultInstance() + : profile_; + } + } + + /** + * + * + *
+     * Required. Profile details.
+     * 
+ * + * + * .google.devicesandservices.health.v4.Profile profile = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.Profile, + com.google.devicesandservices.health.v4.Profile.Builder, + com.google.devicesandservices.health.v4.ProfileOrBuilder> + internalGetProfileFieldBuilder() { + if (profileBuilder_ == null) { + profileBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.Profile, + com.google.devicesandservices.health.v4.Profile.Builder, + com.google.devicesandservices.health.v4.ProfileOrBuilder>( + getProfile(), getParentForChildren(), isClean()); + profile_ = null; + } + return profileBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + + /** + * + * + *
+     * Optional. The list of fields to be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Optional. The list of fields to be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. The list of fields to be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The list of fields to be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The list of fields to be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + if (updateMask_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. The list of fields to be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000002); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The list of fields to be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetUpdateMaskFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. The list of fields to be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + + /** + * + * + *
+     * Optional. The list of fields to be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + internalGetUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.UpdateProfileRequest) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.UpdateProfileRequest) + private static final com.google.devicesandservices.health.v4.UpdateProfileRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.UpdateProfileRequest(); + } + + public static com.google.devicesandservices.health.v4.UpdateProfileRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateProfileRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.UpdateProfileRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/UpdateProfileRequestOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/UpdateProfileRequestOrBuilder.java new file mode 100644 index 000000000000..e3174e463a5b --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/UpdateProfileRequestOrBuilder.java @@ -0,0 +1,111 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/health_profile.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface UpdateProfileRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.UpdateProfileRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Profile details.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Profile profile = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the profile field is set. + */ + boolean hasProfile(); + + /** + * + * + *
+   * Required. Profile details.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Profile profile = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The profile. + */ + com.google.devicesandservices.health.v4.Profile getProfile(); + + /** + * + * + *
+   * Required. Profile details.
+   * 
+ * + * + * .google.devicesandservices.health.v4.Profile profile = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.devicesandservices.health.v4.ProfileOrBuilder getProfileOrBuilder(); + + /** + * + * + *
+   * Optional. The list of fields to be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + + /** + * + * + *
+   * Optional. The list of fields to be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + + /** + * + * + *
+   * Optional. The list of fields to be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/UpdateSettingsRequest.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/UpdateSettingsRequest.java new file mode 100644 index 000000000000..c9716bafd76f --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/UpdateSettingsRequest.java @@ -0,0 +1,1017 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/health_profile.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * Request message for updating Settings details.
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.UpdateSettingsRequest} + */ +@com.google.protobuf.Generated +public final class UpdateSettingsRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.UpdateSettingsRequest) + UpdateSettingsRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "UpdateSettingsRequest"); + } + + // Use UpdateSettingsRequest.newBuilder() to construct. + private UpdateSettingsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private UpdateSettingsRequest() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.HealthProfileProto + .internal_static_google_devicesandservices_health_v4_UpdateSettingsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.HealthProfileProto + .internal_static_google_devicesandservices_health_v4_UpdateSettingsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.UpdateSettingsRequest.class, + com.google.devicesandservices.health.v4.UpdateSettingsRequest.Builder.class); + } + + private int bitField0_; + public static final int SETTINGS_FIELD_NUMBER = 1; + private com.google.devicesandservices.health.v4.Settings settings_; + + /** + * + * + *
+   * Required. Settings details
+   * 
+ * + * + * .google.devicesandservices.health.v4.Settings settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the settings field is set. + */ + @java.lang.Override + public boolean hasSettings() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. Settings details
+   * 
+ * + * + * .google.devicesandservices.health.v4.Settings settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The settings. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.Settings getSettings() { + return settings_ == null + ? com.google.devicesandservices.health.v4.Settings.getDefaultInstance() + : settings_; + } + + /** + * + * + *
+   * Required. Settings details
+   * 
+ * + * + * .google.devicesandservices.health.v4.Settings settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.SettingsOrBuilder getSettingsOrBuilder() { + return settings_ == null + ? com.google.devicesandservices.health.v4.Settings.getDefaultInstance() + : settings_; + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + + /** + * + * + *
+   * Optional. The list of fields to be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Optional. The list of fields to be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + /** + * + * + *
+   * Optional. The list of fields to be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getSettings()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getUpdateMask()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getSettings()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.UpdateSettingsRequest)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.UpdateSettingsRequest other = + (com.google.devicesandservices.health.v4.UpdateSettingsRequest) obj; + + if (hasSettings() != other.hasSettings()) return false; + if (hasSettings()) { + if (!getSettings().equals(other.getSettings())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasSettings()) { + hash = (37 * hash) + SETTINGS_FIELD_NUMBER; + hash = (53 * hash) + getSettings().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.UpdateSettingsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.UpdateSettingsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.UpdateSettingsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.UpdateSettingsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.UpdateSettingsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.UpdateSettingsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.UpdateSettingsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.UpdateSettingsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.UpdateSettingsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.UpdateSettingsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.UpdateSettingsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.UpdateSettingsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.UpdateSettingsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for updating Settings details.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.UpdateSettingsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.UpdateSettingsRequest) + com.google.devicesandservices.health.v4.UpdateSettingsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.HealthProfileProto + .internal_static_google_devicesandservices_health_v4_UpdateSettingsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.HealthProfileProto + .internal_static_google_devicesandservices_health_v4_UpdateSettingsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.UpdateSettingsRequest.class, + com.google.devicesandservices.health.v4.UpdateSettingsRequest.Builder.class); + } + + // Construct using com.google.devicesandservices.health.v4.UpdateSettingsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetSettingsFieldBuilder(); + internalGetUpdateMaskFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + settings_ = null; + if (settingsBuilder_ != null) { + settingsBuilder_.dispose(); + settingsBuilder_ = null; + } + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.HealthProfileProto + .internal_static_google_devicesandservices_health_v4_UpdateSettingsRequest_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.UpdateSettingsRequest + getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.UpdateSettingsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.UpdateSettingsRequest build() { + com.google.devicesandservices.health.v4.UpdateSettingsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.UpdateSettingsRequest buildPartial() { + com.google.devicesandservices.health.v4.UpdateSettingsRequest result = + new com.google.devicesandservices.health.v4.UpdateSettingsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.devicesandservices.health.v4.UpdateSettingsRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.settings_ = settingsBuilder_ == null ? settings_ : settingsBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.UpdateSettingsRequest) { + return mergeFrom((com.google.devicesandservices.health.v4.UpdateSettingsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.devicesandservices.health.v4.UpdateSettingsRequest other) { + if (other + == com.google.devicesandservices.health.v4.UpdateSettingsRequest.getDefaultInstance()) + return this; + if (other.hasSettings()) { + mergeSettings(other.getSettings()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetSettingsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.devicesandservices.health.v4.Settings settings_; + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.Settings, + com.google.devicesandservices.health.v4.Settings.Builder, + com.google.devicesandservices.health.v4.SettingsOrBuilder> + settingsBuilder_; + + /** + * + * + *
+     * Required. Settings details
+     * 
+ * + * + * .google.devicesandservices.health.v4.Settings settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the settings field is set. + */ + public boolean hasSettings() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. Settings details
+     * 
+ * + * + * .google.devicesandservices.health.v4.Settings settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The settings. + */ + public com.google.devicesandservices.health.v4.Settings getSettings() { + if (settingsBuilder_ == null) { + return settings_ == null + ? com.google.devicesandservices.health.v4.Settings.getDefaultInstance() + : settings_; + } else { + return settingsBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. Settings details
+     * 
+ * + * + * .google.devicesandservices.health.v4.Settings settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSettings(com.google.devicesandservices.health.v4.Settings value) { + if (settingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + settings_ = value; + } else { + settingsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Settings details
+     * 
+ * + * + * .google.devicesandservices.health.v4.Settings settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSettings( + com.google.devicesandservices.health.v4.Settings.Builder builderForValue) { + if (settingsBuilder_ == null) { + settings_ = builderForValue.build(); + } else { + settingsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Settings details
+     * 
+ * + * + * .google.devicesandservices.health.v4.Settings settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeSettings(com.google.devicesandservices.health.v4.Settings value) { + if (settingsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && settings_ != null + && settings_ != com.google.devicesandservices.health.v4.Settings.getDefaultInstance()) { + getSettingsBuilder().mergeFrom(value); + } else { + settings_ = value; + } + } else { + settingsBuilder_.mergeFrom(value); + } + if (settings_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. Settings details
+     * 
+ * + * + * .google.devicesandservices.health.v4.Settings settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearSettings() { + bitField0_ = (bitField0_ & ~0x00000001); + settings_ = null; + if (settingsBuilder_ != null) { + settingsBuilder_.dispose(); + settingsBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Settings details
+     * 
+ * + * + * .google.devicesandservices.health.v4.Settings settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.devicesandservices.health.v4.Settings.Builder getSettingsBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetSettingsFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. Settings details
+     * 
+ * + * + * .google.devicesandservices.health.v4.Settings settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.devicesandservices.health.v4.SettingsOrBuilder getSettingsOrBuilder() { + if (settingsBuilder_ != null) { + return settingsBuilder_.getMessageOrBuilder(); + } else { + return settings_ == null + ? com.google.devicesandservices.health.v4.Settings.getDefaultInstance() + : settings_; + } + } + + /** + * + * + *
+     * Required. Settings details
+     * 
+ * + * + * .google.devicesandservices.health.v4.Settings settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.Settings, + com.google.devicesandservices.health.v4.Settings.Builder, + com.google.devicesandservices.health.v4.SettingsOrBuilder> + internalGetSettingsFieldBuilder() { + if (settingsBuilder_ == null) { + settingsBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.Settings, + com.google.devicesandservices.health.v4.Settings.Builder, + com.google.devicesandservices.health.v4.SettingsOrBuilder>( + getSettings(), getParentForChildren(), isClean()); + settings_ = null; + } + return settingsBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + + /** + * + * + *
+     * Optional. The list of fields to be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Optional. The list of fields to be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. The list of fields to be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The list of fields to be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The list of fields to be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + if (updateMask_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. The list of fields to be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000002); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The list of fields to be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetUpdateMaskFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. The list of fields to be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + + /** + * + * + *
+     * Optional. The list of fields to be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + internalGetUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.UpdateSettingsRequest) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.UpdateSettingsRequest) + private static final com.google.devicesandservices.health.v4.UpdateSettingsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.UpdateSettingsRequest(); + } + + public static com.google.devicesandservices.health.v4.UpdateSettingsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateSettingsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.UpdateSettingsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/UpdateSettingsRequestOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/UpdateSettingsRequestOrBuilder.java new file mode 100644 index 000000000000..0de4f07823d2 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/UpdateSettingsRequestOrBuilder.java @@ -0,0 +1,111 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/health_profile.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface UpdateSettingsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.UpdateSettingsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Settings details
+   * 
+ * + * + * .google.devicesandservices.health.v4.Settings settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the settings field is set. + */ + boolean hasSettings(); + + /** + * + * + *
+   * Required. Settings details
+   * 
+ * + * + * .google.devicesandservices.health.v4.Settings settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The settings. + */ + com.google.devicesandservices.health.v4.Settings getSettings(); + + /** + * + * + *
+   * Required. Settings details
+   * 
+ * + * + * .google.devicesandservices.health.v4.Settings settings = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.devicesandservices.health.v4.SettingsOrBuilder getSettingsOrBuilder(); + + /** + * + * + *
+   * Optional. The list of fields to be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + + /** + * + * + *
+   * Optional. The list of fields to be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + + /** + * + * + *
+   * Optional. The list of fields to be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/VO2Max.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/VO2Max.java new file mode 100644 index 000000000000..e8f8d3b1b772 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/VO2Max.java @@ -0,0 +1,1411 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * VO2 max measurement.
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.VO2Max} + */ +@com.google.protobuf.Generated +public final class VO2Max extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.VO2Max) + VO2MaxOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "VO2Max"); + } + + // Use VO2Max.newBuilder() to construct. + private VO2Max(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private VO2Max() { + measurementMethod_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_VO2Max_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_VO2Max_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.VO2Max.class, + com.google.devicesandservices.health.v4.VO2Max.Builder.class); + } + + /** + * + * + *
+   * Measurement method used to measure the VO2 max value.
+   * 
+ * + * Protobuf enum {@code google.devicesandservices.health.v4.VO2Max.MeasurementMethod} + */ + public enum MeasurementMethod implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified measurement method.
+     * 
+ * + * MEASUREMENT_METHOD_UNSPECIFIED = 0; + */ + MEASUREMENT_METHOD_UNSPECIFIED(0), + /** + * + * + *
+     * Fitbit specific, measures VO2 max rate during a run.
+     * 
+ * + * FITBIT_RUN = 1; + */ + FITBIT_RUN(1), + /** + * + * + *
+     * Google specific, measures VO2 max rate for a user based on their
+     * demographic data.
+     * 
+ * + * GOOGLE_DEMOGRAPHIC = 2; + */ + GOOGLE_DEMOGRAPHIC(2), + /** + * + * + *
+     * Run as far as possible for 12 minutes. Distance correlated with age and
+     * gender translates to a VO2 max value.
+     * 
+ * + * COOPER_TEST = 3; + */ + COOPER_TEST(3), + /** + * + * + *
+     * Maximum heart rate divided by the resting heart rate, with a multiplier
+     * applied. Does not require any exercise.
+     * 
+ * + * HEART_RATE_RATIO = 4; + */ + HEART_RATE_RATIO(4), + /** + * + * + *
+     * Measured by a medical device called metabolic cart.
+     * 
+ * + * METABOLIC_CART = 5; + */ + METABOLIC_CART(5), + /** + * + * + *
+     * Continuous 20m back-and-forth runs with increasing difficulty, until
+     * exhaustion.
+     * 
+ * + * MULTISTAGE_FITNESS_TEST = 6; + */ + MULTISTAGE_FITNESS_TEST(6), + /** + * + * + *
+     * Measured using walking exercise.
+     * 
+ * + * ROCKPORT_FITNESS_TEST = 7; + */ + ROCKPORT_FITNESS_TEST(7), + /** + * + * + *
+     * Healthkit specific, measures VO2 max rate by monitoring exercise to the
+     * user’s physical limit. Similar to COOPER_TEST or
+     * MULTISTAGE_FITNESS_TEST.
+     * 
+ * + * MAX_EXERCISE = 8; + */ + MAX_EXERCISE(8), + /** + * + * + *
+     * Healthkit specific, estimates VO2 max rate based on low-intensity
+     * exercise. Similar to ROCKPORT_FITNESS_TEST.
+     * 
+ * + * PREDICTION_SUB_MAX_EXERCISE = 9; + */ + PREDICTION_SUB_MAX_EXERCISE(9), + /** + * + * + *
+     * Healthkit specific, estimates VO2 max rate without any exercise.
+     * Similar to HEART_RATE_RATIO.
+     * 
+ * + * PREDICTION_NON_EXERCISE = 10; + */ + PREDICTION_NON_EXERCISE(10), + /** + * + * + *
+     * Use when the method is not covered in this enum.
+     * 
+ * + * OTHER = 11; + */ + OTHER(11), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "MeasurementMethod"); + } + + /** + * + * + *
+     * Unspecified measurement method.
+     * 
+ * + * MEASUREMENT_METHOD_UNSPECIFIED = 0; + */ + public static final int MEASUREMENT_METHOD_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Fitbit specific, measures VO2 max rate during a run.
+     * 
+ * + * FITBIT_RUN = 1; + */ + public static final int FITBIT_RUN_VALUE = 1; + + /** + * + * + *
+     * Google specific, measures VO2 max rate for a user based on their
+     * demographic data.
+     * 
+ * + * GOOGLE_DEMOGRAPHIC = 2; + */ + public static final int GOOGLE_DEMOGRAPHIC_VALUE = 2; + + /** + * + * + *
+     * Run as far as possible for 12 minutes. Distance correlated with age and
+     * gender translates to a VO2 max value.
+     * 
+ * + * COOPER_TEST = 3; + */ + public static final int COOPER_TEST_VALUE = 3; + + /** + * + * + *
+     * Maximum heart rate divided by the resting heart rate, with a multiplier
+     * applied. Does not require any exercise.
+     * 
+ * + * HEART_RATE_RATIO = 4; + */ + public static final int HEART_RATE_RATIO_VALUE = 4; + + /** + * + * + *
+     * Measured by a medical device called metabolic cart.
+     * 
+ * + * METABOLIC_CART = 5; + */ + public static final int METABOLIC_CART_VALUE = 5; + + /** + * + * + *
+     * Continuous 20m back-and-forth runs with increasing difficulty, until
+     * exhaustion.
+     * 
+ * + * MULTISTAGE_FITNESS_TEST = 6; + */ + public static final int MULTISTAGE_FITNESS_TEST_VALUE = 6; + + /** + * + * + *
+     * Measured using walking exercise.
+     * 
+ * + * ROCKPORT_FITNESS_TEST = 7; + */ + public static final int ROCKPORT_FITNESS_TEST_VALUE = 7; + + /** + * + * + *
+     * Healthkit specific, measures VO2 max rate by monitoring exercise to the
+     * user’s physical limit. Similar to COOPER_TEST or
+     * MULTISTAGE_FITNESS_TEST.
+     * 
+ * + * MAX_EXERCISE = 8; + */ + public static final int MAX_EXERCISE_VALUE = 8; + + /** + * + * + *
+     * Healthkit specific, estimates VO2 max rate based on low-intensity
+     * exercise. Similar to ROCKPORT_FITNESS_TEST.
+     * 
+ * + * PREDICTION_SUB_MAX_EXERCISE = 9; + */ + public static final int PREDICTION_SUB_MAX_EXERCISE_VALUE = 9; + + /** + * + * + *
+     * Healthkit specific, estimates VO2 max rate without any exercise.
+     * Similar to HEART_RATE_RATIO.
+     * 
+ * + * PREDICTION_NON_EXERCISE = 10; + */ + public static final int PREDICTION_NON_EXERCISE_VALUE = 10; + + /** + * + * + *
+     * Use when the method is not covered in this enum.
+     * 
+ * + * OTHER = 11; + */ + public static final int OTHER_VALUE = 11; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static MeasurementMethod valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static MeasurementMethod forNumber(int value) { + switch (value) { + case 0: + return MEASUREMENT_METHOD_UNSPECIFIED; + case 1: + return FITBIT_RUN; + case 2: + return GOOGLE_DEMOGRAPHIC; + case 3: + return COOPER_TEST; + case 4: + return HEART_RATE_RATIO; + case 5: + return METABOLIC_CART; + case 6: + return MULTISTAGE_FITNESS_TEST; + case 7: + return ROCKPORT_FITNESS_TEST; + case 8: + return MAX_EXERCISE; + case 9: + return PREDICTION_SUB_MAX_EXERCISE; + case 10: + return PREDICTION_NON_EXERCISE; + case 11: + return OTHER; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public MeasurementMethod findValueByNumber(int number) { + return MeasurementMethod.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.devicesandservices.health.v4.VO2Max.getDescriptor().getEnumTypes().get(0); + } + + private static final MeasurementMethod[] VALUES = values(); + + public static MeasurementMethod valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private MeasurementMethod(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.devicesandservices.health.v4.VO2Max.MeasurementMethod) + } + + private int bitField0_; + public static final int SAMPLE_TIME_FIELD_NUMBER = 1; + private com.google.devicesandservices.health.v4.ObservationSampleTime sampleTime_; + + /** + * + * + *
+   * Required. The time at which VO2 max was measured.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the sampleTime field is set. + */ + @java.lang.Override + public boolean hasSampleTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The time at which VO2 max was measured.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The sampleTime. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ObservationSampleTime getSampleTime() { + return sampleTime_ == null + ? com.google.devicesandservices.health.v4.ObservationSampleTime.getDefaultInstance() + : sampleTime_; + } + + /** + * + * + *
+   * Required. The time at which VO2 max was measured.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ObservationSampleTimeOrBuilder + getSampleTimeOrBuilder() { + return sampleTime_ == null + ? com.google.devicesandservices.health.v4.ObservationSampleTime.getDefaultInstance() + : sampleTime_; + } + + public static final int VO2_MAX_FIELD_NUMBER = 2; + private double vo2Max_ = 0D; + + /** + * + * + *
+   * Required. VO2 max value measured as in ml consumed oxygen / kg of body
+   * weight / min.
+   * 
+ * + * double vo2_max = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The vo2Max. + */ + @java.lang.Override + public double getVo2Max() { + return vo2Max_; + } + + public static final int MEASUREMENT_METHOD_FIELD_NUMBER = 4; + private int measurementMethod_ = 0; + + /** + * + * + *
+   * Optional. The method used to measure the VO2 max value.
+   * 
+ * + * + * .google.devicesandservices.health.v4.VO2Max.MeasurementMethod measurement_method = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for measurementMethod. + */ + @java.lang.Override + public int getMeasurementMethodValue() { + return measurementMethod_; + } + + /** + * + * + *
+   * Optional. The method used to measure the VO2 max value.
+   * 
+ * + * + * .google.devicesandservices.health.v4.VO2Max.MeasurementMethod measurement_method = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The measurementMethod. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.VO2Max.MeasurementMethod getMeasurementMethod() { + com.google.devicesandservices.health.v4.VO2Max.MeasurementMethod result = + com.google.devicesandservices.health.v4.VO2Max.MeasurementMethod.forNumber( + measurementMethod_); + return result == null + ? com.google.devicesandservices.health.v4.VO2Max.MeasurementMethod.UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getSampleTime()); + } + if (java.lang.Double.doubleToRawLongBits(vo2Max_) != 0) { + output.writeDouble(2, vo2Max_); + } + if (measurementMethod_ + != com.google.devicesandservices.health.v4.VO2Max.MeasurementMethod + .MEASUREMENT_METHOD_UNSPECIFIED + .getNumber()) { + output.writeEnum(4, measurementMethod_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getSampleTime()); + } + if (java.lang.Double.doubleToRawLongBits(vo2Max_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(2, vo2Max_); + } + if (measurementMethod_ + != com.google.devicesandservices.health.v4.VO2Max.MeasurementMethod + .MEASUREMENT_METHOD_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, measurementMethod_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.VO2Max)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.VO2Max other = + (com.google.devicesandservices.health.v4.VO2Max) obj; + + if (hasSampleTime() != other.hasSampleTime()) return false; + if (hasSampleTime()) { + if (!getSampleTime().equals(other.getSampleTime())) return false; + } + if (java.lang.Double.doubleToLongBits(getVo2Max()) + != java.lang.Double.doubleToLongBits(other.getVo2Max())) return false; + if (measurementMethod_ != other.measurementMethod_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasSampleTime()) { + hash = (37 * hash) + SAMPLE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getSampleTime().hashCode(); + } + hash = (37 * hash) + VO2_MAX_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong(java.lang.Double.doubleToLongBits(getVo2Max())); + hash = (37 * hash) + MEASUREMENT_METHOD_FIELD_NUMBER; + hash = (53 * hash) + measurementMethod_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.VO2Max parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.VO2Max parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.VO2Max parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.VO2Max parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.VO2Max parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.VO2Max parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.VO2Max parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.VO2Max parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.VO2Max parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.VO2Max parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.VO2Max parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.VO2Max parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.devicesandservices.health.v4.VO2Max prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * VO2 max measurement.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.VO2Max} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.VO2Max) + com.google.devicesandservices.health.v4.VO2MaxOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_VO2Max_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_VO2Max_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.VO2Max.class, + com.google.devicesandservices.health.v4.VO2Max.Builder.class); + } + + // Construct using com.google.devicesandservices.health.v4.VO2Max.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetSampleTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + sampleTime_ = null; + if (sampleTimeBuilder_ != null) { + sampleTimeBuilder_.dispose(); + sampleTimeBuilder_ = null; + } + vo2Max_ = 0D; + measurementMethod_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_VO2Max_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.VO2Max getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.VO2Max.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.VO2Max build() { + com.google.devicesandservices.health.v4.VO2Max result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.VO2Max buildPartial() { + com.google.devicesandservices.health.v4.VO2Max result = + new com.google.devicesandservices.health.v4.VO2Max(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.devicesandservices.health.v4.VO2Max result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.sampleTime_ = sampleTimeBuilder_ == null ? sampleTime_ : sampleTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.vo2Max_ = vo2Max_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.measurementMethod_ = measurementMethod_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.VO2Max) { + return mergeFrom((com.google.devicesandservices.health.v4.VO2Max) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.devicesandservices.health.v4.VO2Max other) { + if (other == com.google.devicesandservices.health.v4.VO2Max.getDefaultInstance()) return this; + if (other.hasSampleTime()) { + mergeSampleTime(other.getSampleTime()); + } + if (java.lang.Double.doubleToRawLongBits(other.getVo2Max()) != 0) { + setVo2Max(other.getVo2Max()); + } + if (other.measurementMethod_ != 0) { + setMeasurementMethodValue(other.getMeasurementMethodValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetSampleTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 17: + { + vo2Max_ = input.readDouble(); + bitField0_ |= 0x00000002; + break; + } // case 17 + case 32: + { + measurementMethod_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.devicesandservices.health.v4.ObservationSampleTime sampleTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ObservationSampleTime, + com.google.devicesandservices.health.v4.ObservationSampleTime.Builder, + com.google.devicesandservices.health.v4.ObservationSampleTimeOrBuilder> + sampleTimeBuilder_; + + /** + * + * + *
+     * Required. The time at which VO2 max was measured.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the sampleTime field is set. + */ + public boolean hasSampleTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. The time at which VO2 max was measured.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The sampleTime. + */ + public com.google.devicesandservices.health.v4.ObservationSampleTime getSampleTime() { + if (sampleTimeBuilder_ == null) { + return sampleTime_ == null + ? com.google.devicesandservices.health.v4.ObservationSampleTime.getDefaultInstance() + : sampleTime_; + } else { + return sampleTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The time at which VO2 max was measured.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSampleTime( + com.google.devicesandservices.health.v4.ObservationSampleTime value) { + if (sampleTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sampleTime_ = value; + } else { + sampleTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The time at which VO2 max was measured.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSampleTime( + com.google.devicesandservices.health.v4.ObservationSampleTime.Builder builderForValue) { + if (sampleTimeBuilder_ == null) { + sampleTime_ = builderForValue.build(); + } else { + sampleTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The time at which VO2 max was measured.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeSampleTime( + com.google.devicesandservices.health.v4.ObservationSampleTime value) { + if (sampleTimeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && sampleTime_ != null + && sampleTime_ + != com.google.devicesandservices.health.v4.ObservationSampleTime + .getDefaultInstance()) { + getSampleTimeBuilder().mergeFrom(value); + } else { + sampleTime_ = value; + } + } else { + sampleTimeBuilder_.mergeFrom(value); + } + if (sampleTime_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The time at which VO2 max was measured.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearSampleTime() { + bitField0_ = (bitField0_ & ~0x00000001); + sampleTime_ = null; + if (sampleTimeBuilder_ != null) { + sampleTimeBuilder_.dispose(); + sampleTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The time at which VO2 max was measured.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.devicesandservices.health.v4.ObservationSampleTime.Builder + getSampleTimeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetSampleTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The time at which VO2 max was measured.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.devicesandservices.health.v4.ObservationSampleTimeOrBuilder + getSampleTimeOrBuilder() { + if (sampleTimeBuilder_ != null) { + return sampleTimeBuilder_.getMessageOrBuilder(); + } else { + return sampleTime_ == null + ? com.google.devicesandservices.health.v4.ObservationSampleTime.getDefaultInstance() + : sampleTime_; + } + } + + /** + * + * + *
+     * Required. The time at which VO2 max was measured.
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ObservationSampleTime, + com.google.devicesandservices.health.v4.ObservationSampleTime.Builder, + com.google.devicesandservices.health.v4.ObservationSampleTimeOrBuilder> + internalGetSampleTimeFieldBuilder() { + if (sampleTimeBuilder_ == null) { + sampleTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ObservationSampleTime, + com.google.devicesandservices.health.v4.ObservationSampleTime.Builder, + com.google.devicesandservices.health.v4.ObservationSampleTimeOrBuilder>( + getSampleTime(), getParentForChildren(), isClean()); + sampleTime_ = null; + } + return sampleTimeBuilder_; + } + + private double vo2Max_; + + /** + * + * + *
+     * Required. VO2 max value measured as in ml consumed oxygen / kg of body
+     * weight / min.
+     * 
+ * + * double vo2_max = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The vo2Max. + */ + @java.lang.Override + public double getVo2Max() { + return vo2Max_; + } + + /** + * + * + *
+     * Required. VO2 max value measured as in ml consumed oxygen / kg of body
+     * weight / min.
+     * 
+ * + * double vo2_max = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The vo2Max to set. + * @return This builder for chaining. + */ + public Builder setVo2Max(double value) { + + vo2Max_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. VO2 max value measured as in ml consumed oxygen / kg of body
+     * weight / min.
+     * 
+ * + * double vo2_max = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearVo2Max() { + bitField0_ = (bitField0_ & ~0x00000002); + vo2Max_ = 0D; + onChanged(); + return this; + } + + private int measurementMethod_ = 0; + + /** + * + * + *
+     * Optional. The method used to measure the VO2 max value.
+     * 
+ * + * + * .google.devicesandservices.health.v4.VO2Max.MeasurementMethod measurement_method = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for measurementMethod. + */ + @java.lang.Override + public int getMeasurementMethodValue() { + return measurementMethod_; + } + + /** + * + * + *
+     * Optional. The method used to measure the VO2 max value.
+     * 
+ * + * + * .google.devicesandservices.health.v4.VO2Max.MeasurementMethod measurement_method = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for measurementMethod to set. + * @return This builder for chaining. + */ + public Builder setMeasurementMethodValue(int value) { + measurementMethod_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The method used to measure the VO2 max value.
+     * 
+ * + * + * .google.devicesandservices.health.v4.VO2Max.MeasurementMethod measurement_method = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The measurementMethod. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.VO2Max.MeasurementMethod getMeasurementMethod() { + com.google.devicesandservices.health.v4.VO2Max.MeasurementMethod result = + com.google.devicesandservices.health.v4.VO2Max.MeasurementMethod.forNumber( + measurementMethod_); + return result == null + ? com.google.devicesandservices.health.v4.VO2Max.MeasurementMethod.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Optional. The method used to measure the VO2 max value.
+     * 
+ * + * + * .google.devicesandservices.health.v4.VO2Max.MeasurementMethod measurement_method = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The measurementMethod to set. + * @return This builder for chaining. + */ + public Builder setMeasurementMethod( + com.google.devicesandservices.health.v4.VO2Max.MeasurementMethod value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + measurementMethod_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The method used to measure the VO2 max value.
+     * 
+ * + * + * .google.devicesandservices.health.v4.VO2Max.MeasurementMethod measurement_method = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearMeasurementMethod() { + bitField0_ = (bitField0_ & ~0x00000004); + measurementMethod_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.VO2Max) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.VO2Max) + private static final com.google.devicesandservices.health.v4.VO2Max DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.VO2Max(); + } + + public static com.google.devicesandservices.health.v4.VO2Max getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VO2Max parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.VO2Max getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/VO2MaxOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/VO2MaxOrBuilder.java new file mode 100644 index 000000000000..63bef52fa4fc --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/VO2MaxOrBuilder.java @@ -0,0 +1,115 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface VO2MaxOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.VO2Max) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The time at which VO2 max was measured.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the sampleTime field is set. + */ + boolean hasSampleTime(); + + /** + * + * + *
+   * Required. The time at which VO2 max was measured.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The sampleTime. + */ + com.google.devicesandservices.health.v4.ObservationSampleTime getSampleTime(); + + /** + * + * + *
+   * Required. The time at which VO2 max was measured.
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.devicesandservices.health.v4.ObservationSampleTimeOrBuilder getSampleTimeOrBuilder(); + + /** + * + * + *
+   * Required. VO2 max value measured as in ml consumed oxygen / kg of body
+   * weight / min.
+   * 
+ * + * double vo2_max = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The vo2Max. + */ + double getVo2Max(); + + /** + * + * + *
+   * Optional. The method used to measure the VO2 max value.
+   * 
+ * + * + * .google.devicesandservices.health.v4.VO2Max.MeasurementMethod measurement_method = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for measurementMethod. + */ + int getMeasurementMethodValue(); + + /** + * + * + *
+   * Optional. The method used to measure the VO2 max value.
+   * 
+ * + * + * .google.devicesandservices.health.v4.VO2Max.MeasurementMethod measurement_method = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The measurementMethod. + */ + com.google.devicesandservices.health.v4.VO2Max.MeasurementMethod getMeasurementMethod(); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/VolumeQuantity.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/VolumeQuantity.java new file mode 100644 index 000000000000..4aabcb3a8c43 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/VolumeQuantity.java @@ -0,0 +1,684 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * Represents the volume quantity.
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.VolumeQuantity} + */ +@com.google.protobuf.Generated +public final class VolumeQuantity extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.VolumeQuantity) + VolumeQuantityOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "VolumeQuantity"); + } + + // Use VolumeQuantity.newBuilder() to construct. + private VolumeQuantity(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private VolumeQuantity() { + userProvidedUnit_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_VolumeQuantity_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_VolumeQuantity_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.VolumeQuantity.class, + com.google.devicesandservices.health.v4.VolumeQuantity.Builder.class); + } + + public static final int MILLILITERS_FIELD_NUMBER = 1; + private double milliliters_ = 0D; + + /** + * + * + *
+   * Required. Value representing the volume in milliliters.
+   * 
+ * + * double milliliters = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The milliliters. + */ + @java.lang.Override + public double getMilliliters() { + return milliliters_; + } + + public static final int USER_PROVIDED_UNIT_FIELD_NUMBER = 2; + private int userProvidedUnit_ = 0; + + /** + * + * + *
+   * Optional. Value representing the user provided unit.
+   * 
+ * + * + * .google.devicesandservices.health.v4.VolumeUnit user_provided_unit = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for userProvidedUnit. + */ + @java.lang.Override + public int getUserProvidedUnitValue() { + return userProvidedUnit_; + } + + /** + * + * + *
+   * Optional. Value representing the user provided unit.
+   * 
+ * + * + * .google.devicesandservices.health.v4.VolumeUnit user_provided_unit = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The userProvidedUnit. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.VolumeUnit getUserProvidedUnit() { + com.google.devicesandservices.health.v4.VolumeUnit result = + com.google.devicesandservices.health.v4.VolumeUnit.forNumber(userProvidedUnit_); + return result == null + ? com.google.devicesandservices.health.v4.VolumeUnit.UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (java.lang.Double.doubleToRawLongBits(milliliters_) != 0) { + output.writeDouble(1, milliliters_); + } + if (userProvidedUnit_ + != com.google.devicesandservices.health.v4.VolumeUnit.VOLUME_UNIT_UNSPECIFIED.getNumber()) { + output.writeEnum(2, userProvidedUnit_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (java.lang.Double.doubleToRawLongBits(milliliters_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(1, milliliters_); + } + if (userProvidedUnit_ + != com.google.devicesandservices.health.v4.VolumeUnit.VOLUME_UNIT_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, userProvidedUnit_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.VolumeQuantity)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.VolumeQuantity other = + (com.google.devicesandservices.health.v4.VolumeQuantity) obj; + + if (java.lang.Double.doubleToLongBits(getMilliliters()) + != java.lang.Double.doubleToLongBits(other.getMilliliters())) return false; + if (userProvidedUnit_ != other.userProvidedUnit_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MILLILITERS_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getMilliliters())); + hash = (37 * hash) + USER_PROVIDED_UNIT_FIELD_NUMBER; + hash = (53 * hash) + userProvidedUnit_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.VolumeQuantity parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.VolumeQuantity parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.VolumeQuantity parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.VolumeQuantity parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.VolumeQuantity parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.VolumeQuantity parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.VolumeQuantity parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.VolumeQuantity parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.VolumeQuantity parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.VolumeQuantity parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.VolumeQuantity parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.VolumeQuantity parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.VolumeQuantity prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Represents the volume quantity.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.VolumeQuantity} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.VolumeQuantity) + com.google.devicesandservices.health.v4.VolumeQuantityOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_VolumeQuantity_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_VolumeQuantity_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.VolumeQuantity.class, + com.google.devicesandservices.health.v4.VolumeQuantity.Builder.class); + } + + // Construct using com.google.devicesandservices.health.v4.VolumeQuantity.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + milliliters_ = 0D; + userProvidedUnit_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_VolumeQuantity_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.VolumeQuantity getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.VolumeQuantity.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.VolumeQuantity build() { + com.google.devicesandservices.health.v4.VolumeQuantity result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.VolumeQuantity buildPartial() { + com.google.devicesandservices.health.v4.VolumeQuantity result = + new com.google.devicesandservices.health.v4.VolumeQuantity(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.devicesandservices.health.v4.VolumeQuantity result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.milliliters_ = milliliters_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.userProvidedUnit_ = userProvidedUnit_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.VolumeQuantity) { + return mergeFrom((com.google.devicesandservices.health.v4.VolumeQuantity) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.devicesandservices.health.v4.VolumeQuantity other) { + if (other == com.google.devicesandservices.health.v4.VolumeQuantity.getDefaultInstance()) + return this; + if (java.lang.Double.doubleToRawLongBits(other.getMilliliters()) != 0) { + setMilliliters(other.getMilliliters()); + } + if (other.userProvidedUnit_ != 0) { + setUserProvidedUnitValue(other.getUserProvidedUnitValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 9: + { + milliliters_ = input.readDouble(); + bitField0_ |= 0x00000001; + break; + } // case 9 + case 16: + { + userProvidedUnit_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private double milliliters_; + + /** + * + * + *
+     * Required. Value representing the volume in milliliters.
+     * 
+ * + * double milliliters = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The milliliters. + */ + @java.lang.Override + public double getMilliliters() { + return milliliters_; + } + + /** + * + * + *
+     * Required. Value representing the volume in milliliters.
+     * 
+ * + * double milliliters = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The milliliters to set. + * @return This builder for chaining. + */ + public Builder setMilliliters(double value) { + + milliliters_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Value representing the volume in milliliters.
+     * 
+ * + * double milliliters = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearMilliliters() { + bitField0_ = (bitField0_ & ~0x00000001); + milliliters_ = 0D; + onChanged(); + return this; + } + + private int userProvidedUnit_ = 0; + + /** + * + * + *
+     * Optional. Value representing the user provided unit.
+     * 
+ * + * + * .google.devicesandservices.health.v4.VolumeUnit user_provided_unit = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for userProvidedUnit. + */ + @java.lang.Override + public int getUserProvidedUnitValue() { + return userProvidedUnit_; + } + + /** + * + * + *
+     * Optional. Value representing the user provided unit.
+     * 
+ * + * + * .google.devicesandservices.health.v4.VolumeUnit user_provided_unit = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for userProvidedUnit to set. + * @return This builder for chaining. + */ + public Builder setUserProvidedUnitValue(int value) { + userProvidedUnit_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Value representing the user provided unit.
+     * 
+ * + * + * .google.devicesandservices.health.v4.VolumeUnit user_provided_unit = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The userProvidedUnit. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.VolumeUnit getUserProvidedUnit() { + com.google.devicesandservices.health.v4.VolumeUnit result = + com.google.devicesandservices.health.v4.VolumeUnit.forNumber(userProvidedUnit_); + return result == null + ? com.google.devicesandservices.health.v4.VolumeUnit.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Optional. Value representing the user provided unit.
+     * 
+ * + * + * .google.devicesandservices.health.v4.VolumeUnit user_provided_unit = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The userProvidedUnit to set. + * @return This builder for chaining. + */ + public Builder setUserProvidedUnit(com.google.devicesandservices.health.v4.VolumeUnit value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + userProvidedUnit_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Value representing the user provided unit.
+     * 
+ * + * + * .google.devicesandservices.health.v4.VolumeUnit user_provided_unit = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearUserProvidedUnit() { + bitField0_ = (bitField0_ & ~0x00000002); + userProvidedUnit_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.VolumeQuantity) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.VolumeQuantity) + private static final com.google.devicesandservices.health.v4.VolumeQuantity DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.VolumeQuantity(); + } + + public static com.google.devicesandservices.health.v4.VolumeQuantity getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VolumeQuantity parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.VolumeQuantity getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/VolumeQuantityOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/VolumeQuantityOrBuilder.java new file mode 100644 index 000000000000..86df7ad91415 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/VolumeQuantityOrBuilder.java @@ -0,0 +1,71 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface VolumeQuantityOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.VolumeQuantity) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Value representing the volume in milliliters.
+   * 
+ * + * double milliliters = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The milliliters. + */ + double getMilliliters(); + + /** + * + * + *
+   * Optional. Value representing the user provided unit.
+   * 
+ * + * + * .google.devicesandservices.health.v4.VolumeUnit user_provided_unit = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for userProvidedUnit. + */ + int getUserProvidedUnitValue(); + + /** + * + * + *
+   * Optional. Value representing the user provided unit.
+   * 
+ * + * + * .google.devicesandservices.health.v4.VolumeUnit user_provided_unit = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The userProvidedUnit. + */ + com.google.devicesandservices.health.v4.VolumeUnit getUserProvidedUnit(); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/VolumeUnit.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/VolumeUnit.java new file mode 100644 index 000000000000..ffc68f092c4d --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/VolumeUnit.java @@ -0,0 +1,331 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * Enum representing the unit of volume.
+ * 
+ * + * Protobuf enum {@code google.devicesandservices.health.v4.VolumeUnit} + */ +@com.google.protobuf.Generated +public enum VolumeUnit implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Unspecified volume unit.
+   * 
+ * + * VOLUME_UNIT_UNSPECIFIED = 0; + */ + VOLUME_UNIT_UNSPECIFIED(0), + /** + * + * + *
+   * Cup (imperial)
+   * 
+ * + * CUP_IMPERIAL = 1; + */ + CUP_IMPERIAL(1), + /** + * + * + *
+   * Cup (US)
+   * 
+ * + * CUP_US = 2; + */ + CUP_US(2), + /** + * + * + *
+   * Fluid ounce (imperial)
+   * 
+ * + * FLUID_OUNCE_IMPERIAL = 3; + */ + FLUID_OUNCE_IMPERIAL(3), + /** + * + * + *
+   * Fluid ounce (US)
+   * 
+ * + * FLUID_OUNCE_US = 4; + */ + FLUID_OUNCE_US(4), + /** + * + * + *
+   * Liter
+   * 
+ * + * LITER = 5; + */ + LITER(5), + /** + * + * + *
+   * Milliliter
+   * 
+ * + * MILLILITER = 6; + */ + MILLILITER(6), + /** + * + * + *
+   * Pint (imperial)
+   * 
+ * + * PINT_IMPERIAL = 7; + */ + PINT_IMPERIAL(7), + /** + * + * + *
+   * Pint (US)
+   * 
+ * + * PINT_US = 8; + */ + PINT_US(8), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "VolumeUnit"); + } + + /** + * + * + *
+   * Unspecified volume unit.
+   * 
+ * + * VOLUME_UNIT_UNSPECIFIED = 0; + */ + public static final int VOLUME_UNIT_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+   * Cup (imperial)
+   * 
+ * + * CUP_IMPERIAL = 1; + */ + public static final int CUP_IMPERIAL_VALUE = 1; + + /** + * + * + *
+   * Cup (US)
+   * 
+ * + * CUP_US = 2; + */ + public static final int CUP_US_VALUE = 2; + + /** + * + * + *
+   * Fluid ounce (imperial)
+   * 
+ * + * FLUID_OUNCE_IMPERIAL = 3; + */ + public static final int FLUID_OUNCE_IMPERIAL_VALUE = 3; + + /** + * + * + *
+   * Fluid ounce (US)
+   * 
+ * + * FLUID_OUNCE_US = 4; + */ + public static final int FLUID_OUNCE_US_VALUE = 4; + + /** + * + * + *
+   * Liter
+   * 
+ * + * LITER = 5; + */ + public static final int LITER_VALUE = 5; + + /** + * + * + *
+   * Milliliter
+   * 
+ * + * MILLILITER = 6; + */ + public static final int MILLILITER_VALUE = 6; + + /** + * + * + *
+   * Pint (imperial)
+   * 
+ * + * PINT_IMPERIAL = 7; + */ + public static final int PINT_IMPERIAL_VALUE = 7; + + /** + * + * + *
+   * Pint (US)
+   * 
+ * + * PINT_US = 8; + */ + public static final int PINT_US_VALUE = 8; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static VolumeUnit valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static VolumeUnit forNumber(int value) { + switch (value) { + case 0: + return VOLUME_UNIT_UNSPECIFIED; + case 1: + return CUP_IMPERIAL; + case 2: + return CUP_US; + case 3: + return FLUID_OUNCE_IMPERIAL; + case 4: + return FLUID_OUNCE_US; + case 5: + return LITER; + case 6: + return MILLILITER; + case 7: + return PINT_IMPERIAL; + case 8: + return PINT_US; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public VolumeUnit findValueByNumber(int number) { + return VolumeUnit.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto.getDescriptor() + .getEnumTypes() + .get(1); + } + + private static final VolumeUnit[] VALUES = values(); + + public static VolumeUnit valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private VolumeUnit(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.devicesandservices.health.v4.VolumeUnit) +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/WebhookNotificationCloudLog.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/WebhookNotificationCloudLog.java new file mode 100644 index 000000000000..077f0a70365b --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/WebhookNotificationCloudLog.java @@ -0,0 +1,733 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/webhook_notification_cloud_log.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * Log message for a webhook notification sent by the Google Health API to a
+ * subscriber's endpoint. Includes the HTTP response received from the endpoint.
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.WebhookNotificationCloudLog} + */ +@com.google.protobuf.Generated +public final class WebhookNotificationCloudLog extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.WebhookNotificationCloudLog) + WebhookNotificationCloudLogOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "WebhookNotificationCloudLog"); + } + + // Use WebhookNotificationCloudLog.newBuilder() to construct. + private WebhookNotificationCloudLog(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private WebhookNotificationCloudLog() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.WebhookNotificationCloudLogProto + .internal_static_google_devicesandservices_health_v4_WebhookNotificationCloudLog_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.WebhookNotificationCloudLogProto + .internal_static_google_devicesandservices_health_v4_WebhookNotificationCloudLog_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.WebhookNotificationCloudLog.class, + com.google.devicesandservices.health.v4.WebhookNotificationCloudLog.Builder.class); + } + + private int bitField0_; + public static final int HTTP_RESPONSE_FIELD_NUMBER = 1; + private com.google.rpc.HttpResponse httpResponse_; + + /** + * + * + *
+   * Required. Represents the HTTP response.
+   * This message includes the status code, reason phrase, headers, and body.
+   * 
+ * + * .google.rpc.HttpResponse http_response = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the httpResponse field is set. + */ + @java.lang.Override + public boolean hasHttpResponse() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. Represents the HTTP response.
+   * This message includes the status code, reason phrase, headers, and body.
+   * 
+ * + * .google.rpc.HttpResponse http_response = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The httpResponse. + */ + @java.lang.Override + public com.google.rpc.HttpResponse getHttpResponse() { + return httpResponse_ == null ? com.google.rpc.HttpResponse.getDefaultInstance() : httpResponse_; + } + + /** + * + * + *
+   * Required. Represents the HTTP response.
+   * This message includes the status code, reason phrase, headers, and body.
+   * 
+ * + * .google.rpc.HttpResponse http_response = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.rpc.HttpResponseOrBuilder getHttpResponseOrBuilder() { + return httpResponse_ == null ? com.google.rpc.HttpResponse.getDefaultInstance() : httpResponse_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getHttpResponse()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getHttpResponse()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.WebhookNotificationCloudLog)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.WebhookNotificationCloudLog other = + (com.google.devicesandservices.health.v4.WebhookNotificationCloudLog) obj; + + if (hasHttpResponse() != other.hasHttpResponse()) return false; + if (hasHttpResponse()) { + if (!getHttpResponse().equals(other.getHttpResponse())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasHttpResponse()) { + hash = (37 * hash) + HTTP_RESPONSE_FIELD_NUMBER; + hash = (53 * hash) + getHttpResponse().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.WebhookNotificationCloudLog parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.WebhookNotificationCloudLog parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.WebhookNotificationCloudLog parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.WebhookNotificationCloudLog parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.WebhookNotificationCloudLog parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.WebhookNotificationCloudLog parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.WebhookNotificationCloudLog parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.WebhookNotificationCloudLog parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.WebhookNotificationCloudLog + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.WebhookNotificationCloudLog + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.WebhookNotificationCloudLog parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.WebhookNotificationCloudLog parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.WebhookNotificationCloudLog prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Log message for a webhook notification sent by the Google Health API to a
+   * subscriber's endpoint. Includes the HTTP response received from the endpoint.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.WebhookNotificationCloudLog} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.WebhookNotificationCloudLog) + com.google.devicesandservices.health.v4.WebhookNotificationCloudLogOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.WebhookNotificationCloudLogProto + .internal_static_google_devicesandservices_health_v4_WebhookNotificationCloudLog_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.WebhookNotificationCloudLogProto + .internal_static_google_devicesandservices_health_v4_WebhookNotificationCloudLog_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.WebhookNotificationCloudLog.class, + com.google.devicesandservices.health.v4.WebhookNotificationCloudLog.Builder.class); + } + + // Construct using + // com.google.devicesandservices.health.v4.WebhookNotificationCloudLog.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetHttpResponseFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + httpResponse_ = null; + if (httpResponseBuilder_ != null) { + httpResponseBuilder_.dispose(); + httpResponseBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.WebhookNotificationCloudLogProto + .internal_static_google_devicesandservices_health_v4_WebhookNotificationCloudLog_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.WebhookNotificationCloudLog + getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.WebhookNotificationCloudLog + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.WebhookNotificationCloudLog build() { + com.google.devicesandservices.health.v4.WebhookNotificationCloudLog result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.WebhookNotificationCloudLog buildPartial() { + com.google.devicesandservices.health.v4.WebhookNotificationCloudLog result = + new com.google.devicesandservices.health.v4.WebhookNotificationCloudLog(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.devicesandservices.health.v4.WebhookNotificationCloudLog result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.httpResponse_ = + httpResponseBuilder_ == null ? httpResponse_ : httpResponseBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.WebhookNotificationCloudLog) { + return mergeFrom( + (com.google.devicesandservices.health.v4.WebhookNotificationCloudLog) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.devicesandservices.health.v4.WebhookNotificationCloudLog other) { + if (other + == com.google.devicesandservices.health.v4.WebhookNotificationCloudLog + .getDefaultInstance()) return this; + if (other.hasHttpResponse()) { + mergeHttpResponse(other.getHttpResponse()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetHttpResponseFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.rpc.HttpResponse httpResponse_; + private com.google.protobuf.SingleFieldBuilder< + com.google.rpc.HttpResponse, + com.google.rpc.HttpResponse.Builder, + com.google.rpc.HttpResponseOrBuilder> + httpResponseBuilder_; + + /** + * + * + *
+     * Required. Represents the HTTP response.
+     * This message includes the status code, reason phrase, headers, and body.
+     * 
+ * + * .google.rpc.HttpResponse http_response = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the httpResponse field is set. + */ + public boolean hasHttpResponse() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. Represents the HTTP response.
+     * This message includes the status code, reason phrase, headers, and body.
+     * 
+ * + * .google.rpc.HttpResponse http_response = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The httpResponse. + */ + public com.google.rpc.HttpResponse getHttpResponse() { + if (httpResponseBuilder_ == null) { + return httpResponse_ == null + ? com.google.rpc.HttpResponse.getDefaultInstance() + : httpResponse_; + } else { + return httpResponseBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. Represents the HTTP response.
+     * This message includes the status code, reason phrase, headers, and body.
+     * 
+ * + * .google.rpc.HttpResponse http_response = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setHttpResponse(com.google.rpc.HttpResponse value) { + if (httpResponseBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + httpResponse_ = value; + } else { + httpResponseBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Represents the HTTP response.
+     * This message includes the status code, reason phrase, headers, and body.
+     * 
+ * + * .google.rpc.HttpResponse http_response = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setHttpResponse(com.google.rpc.HttpResponse.Builder builderForValue) { + if (httpResponseBuilder_ == null) { + httpResponse_ = builderForValue.build(); + } else { + httpResponseBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Represents the HTTP response.
+     * This message includes the status code, reason phrase, headers, and body.
+     * 
+ * + * .google.rpc.HttpResponse http_response = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeHttpResponse(com.google.rpc.HttpResponse value) { + if (httpResponseBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && httpResponse_ != null + && httpResponse_ != com.google.rpc.HttpResponse.getDefaultInstance()) { + getHttpResponseBuilder().mergeFrom(value); + } else { + httpResponse_ = value; + } + } else { + httpResponseBuilder_.mergeFrom(value); + } + if (httpResponse_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. Represents the HTTP response.
+     * This message includes the status code, reason phrase, headers, and body.
+     * 
+ * + * .google.rpc.HttpResponse http_response = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearHttpResponse() { + bitField0_ = (bitField0_ & ~0x00000001); + httpResponse_ = null; + if (httpResponseBuilder_ != null) { + httpResponseBuilder_.dispose(); + httpResponseBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Represents the HTTP response.
+     * This message includes the status code, reason phrase, headers, and body.
+     * 
+ * + * .google.rpc.HttpResponse http_response = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.rpc.HttpResponse.Builder getHttpResponseBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetHttpResponseFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. Represents the HTTP response.
+     * This message includes the status code, reason phrase, headers, and body.
+     * 
+ * + * .google.rpc.HttpResponse http_response = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.rpc.HttpResponseOrBuilder getHttpResponseOrBuilder() { + if (httpResponseBuilder_ != null) { + return httpResponseBuilder_.getMessageOrBuilder(); + } else { + return httpResponse_ == null + ? com.google.rpc.HttpResponse.getDefaultInstance() + : httpResponse_; + } + } + + /** + * + * + *
+     * Required. Represents the HTTP response.
+     * This message includes the status code, reason phrase, headers, and body.
+     * 
+ * + * .google.rpc.HttpResponse http_response = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.rpc.HttpResponse, + com.google.rpc.HttpResponse.Builder, + com.google.rpc.HttpResponseOrBuilder> + internalGetHttpResponseFieldBuilder() { + if (httpResponseBuilder_ == null) { + httpResponseBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.rpc.HttpResponse, + com.google.rpc.HttpResponse.Builder, + com.google.rpc.HttpResponseOrBuilder>( + getHttpResponse(), getParentForChildren(), isClean()); + httpResponse_ = null; + } + return httpResponseBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.WebhookNotificationCloudLog) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.WebhookNotificationCloudLog) + private static final com.google.devicesandservices.health.v4.WebhookNotificationCloudLog + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.WebhookNotificationCloudLog(); + } + + public static com.google.devicesandservices.health.v4.WebhookNotificationCloudLog + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WebhookNotificationCloudLog parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.WebhookNotificationCloudLog + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/WebhookNotificationCloudLogOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/WebhookNotificationCloudLogOrBuilder.java new file mode 100644 index 000000000000..698d459a72e2 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/WebhookNotificationCloudLogOrBuilder.java @@ -0,0 +1,71 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/webhook_notification_cloud_log.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface WebhookNotificationCloudLogOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.WebhookNotificationCloudLog) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Represents the HTTP response.
+   * This message includes the status code, reason phrase, headers, and body.
+   * 
+ * + * .google.rpc.HttpResponse http_response = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the httpResponse field is set. + */ + boolean hasHttpResponse(); + + /** + * + * + *
+   * Required. Represents the HTTP response.
+   * This message includes the status code, reason phrase, headers, and body.
+   * 
+ * + * .google.rpc.HttpResponse http_response = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The httpResponse. + */ + com.google.rpc.HttpResponse getHttpResponse(); + + /** + * + * + *
+   * Required. Represents the HTTP response.
+   * This message includes the status code, reason phrase, headers, and body.
+   * 
+ * + * .google.rpc.HttpResponse http_response = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.rpc.HttpResponseOrBuilder getHttpResponseOrBuilder(); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/WebhookNotificationCloudLogProto.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/WebhookNotificationCloudLogProto.java new file mode 100644 index 000000000000..ae833ce2a538 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/WebhookNotificationCloudLogProto.java @@ -0,0 +1,97 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/webhook_notification_cloud_log.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public final class WebhookNotificationCloudLogProto extends com.google.protobuf.GeneratedFile { + private WebhookNotificationCloudLogProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "WebhookNotificationCloudLogProto"); + } + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_devicesandservices_health_v4_WebhookNotificationCloudLog_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_devicesandservices_health_v4_WebhookNotificationCloudLog_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\nHgoogle/devicesandservices/health/v4/we" + + "bhook_notification_cloud_log.proto\022#goog" + + "le.devicesandservices.health.v4\032\037google/" + + "api/field_behavior.proto\032\025google/rpc/htt" + + "p.proto\"S\n\033WebhookNotificationCloudLog\0224" + + "\n\rhttp_response\030\001 \001(\0132\030.google.rpc.HttpR" + + "esponseB\003\340A\002B\226\002\n\'com.google.devicesandse" + + "rvices.health.v4B WebhookNotificationClo" + + "udLogProtoP\001ZRgoogle.golang.org/genproto" + + "/googleapis/devicesandservices/health/ap" + + "iv4main;healthpb\252\002#Google.DevicesAndServ" + + "ices.Health.V4\312\002#Google\\DevicesAndServic" + + "es\\Health\\V4\352\002&Google::DevicesAndService" + + "s::Health::V4b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.rpc.HttpProto.getDescriptor(), + }); + internal_static_google_devicesandservices_health_v4_WebhookNotificationCloudLog_descriptor = + getDescriptor().getMessageType(0); + internal_static_google_devicesandservices_health_v4_WebhookNotificationCloudLog_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_devicesandservices_health_v4_WebhookNotificationCloudLog_descriptor, + new java.lang.String[] { + "HttpResponse", + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.rpc.HttpProto.getDescriptor(); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/Weight.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/Weight.java new file mode 100644 index 000000000000..3d35a8b460f2 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/Weight.java @@ -0,0 +1,1020 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * Body weight measurement.
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.Weight} + */ +@com.google.protobuf.Generated +public final class Weight extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.Weight) + WeightOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Weight"); + } + + // Use Weight.newBuilder() to construct. + private Weight(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Weight() { + notes_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_Weight_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_Weight_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.Weight.class, + com.google.devicesandservices.health.v4.Weight.Builder.class); + } + + private int bitField0_; + public static final int SAMPLE_TIME_FIELD_NUMBER = 2; + private com.google.devicesandservices.health.v4.ObservationSampleTime sampleTime_; + + /** + * + * + *
+   * Required. The time at which the weight was measured
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the sampleTime field is set. + */ + @java.lang.Override + public boolean hasSampleTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The time at which the weight was measured
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The sampleTime. + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ObservationSampleTime getSampleTime() { + return sampleTime_ == null + ? com.google.devicesandservices.health.v4.ObservationSampleTime.getDefaultInstance() + : sampleTime_; + } + + /** + * + * + *
+   * Required. The time at which the weight was measured
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.devicesandservices.health.v4.ObservationSampleTimeOrBuilder + getSampleTimeOrBuilder() { + return sampleTime_ == null + ? com.google.devicesandservices.health.v4.ObservationSampleTime.getDefaultInstance() + : sampleTime_; + } + + public static final int WEIGHT_GRAMS_FIELD_NUMBER = 3; + private double weightGrams_ = 0D; + + /** + * + * + *
+   * Required. Weight of a user in grams.
+   * 
+ * + * double weight_grams = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The weightGrams. + */ + @java.lang.Override + public double getWeightGrams() { + return weightGrams_; + } + + public static final int NOTES_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object notes_ = ""; + + /** + * + * + *
+   * Optional. Standard free-form notes captured at manual logging.
+   * 
+ * + * string notes = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The notes. + */ + @java.lang.Override + public java.lang.String getNotes() { + java.lang.Object ref = notes_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + notes_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Standard free-form notes captured at manual logging.
+   * 
+ * + * string notes = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for notes. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNotesBytes() { + java.lang.Object ref = notes_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + notes_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getSampleTime()); + } + if (java.lang.Double.doubleToRawLongBits(weightGrams_) != 0) { + output.writeDouble(3, weightGrams_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(notes_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, notes_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getSampleTime()); + } + if (java.lang.Double.doubleToRawLongBits(weightGrams_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(3, weightGrams_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(notes_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, notes_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.Weight)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.Weight other = + (com.google.devicesandservices.health.v4.Weight) obj; + + if (hasSampleTime() != other.hasSampleTime()) return false; + if (hasSampleTime()) { + if (!getSampleTime().equals(other.getSampleTime())) return false; + } + if (java.lang.Double.doubleToLongBits(getWeightGrams()) + != java.lang.Double.doubleToLongBits(other.getWeightGrams())) return false; + if (!getNotes().equals(other.getNotes())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasSampleTime()) { + hash = (37 * hash) + SAMPLE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getSampleTime().hashCode(); + } + hash = (37 * hash) + WEIGHT_GRAMS_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getWeightGrams())); + hash = (37 * hash) + NOTES_FIELD_NUMBER; + hash = (53 * hash) + getNotes().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.Weight parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.Weight parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Weight parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.Weight parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Weight parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.Weight parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Weight parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.Weight parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Weight parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.Weight parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.Weight parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.Weight parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.devicesandservices.health.v4.Weight prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Body weight measurement.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.Weight} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.Weight) + com.google.devicesandservices.health.v4.WeightOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_Weight_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_Weight_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.Weight.class, + com.google.devicesandservices.health.v4.Weight.Builder.class); + } + + // Construct using com.google.devicesandservices.health.v4.Weight.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetSampleTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + sampleTime_ = null; + if (sampleTimeBuilder_ != null) { + sampleTimeBuilder_.dispose(); + sampleTimeBuilder_ = null; + } + weightGrams_ = 0D; + notes_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_Weight_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.Weight getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.Weight.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.Weight build() { + com.google.devicesandservices.health.v4.Weight result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.Weight buildPartial() { + com.google.devicesandservices.health.v4.Weight result = + new com.google.devicesandservices.health.v4.Weight(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.devicesandservices.health.v4.Weight result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.sampleTime_ = sampleTimeBuilder_ == null ? sampleTime_ : sampleTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.weightGrams_ = weightGrams_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.notes_ = notes_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.Weight) { + return mergeFrom((com.google.devicesandservices.health.v4.Weight) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.devicesandservices.health.v4.Weight other) { + if (other == com.google.devicesandservices.health.v4.Weight.getDefaultInstance()) return this; + if (other.hasSampleTime()) { + mergeSampleTime(other.getSampleTime()); + } + if (java.lang.Double.doubleToRawLongBits(other.getWeightGrams()) != 0) { + setWeightGrams(other.getWeightGrams()); + } + if (!other.getNotes().isEmpty()) { + notes_ = other.notes_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + input.readMessage( + internalGetSampleTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 18 + case 25: + { + weightGrams_ = input.readDouble(); + bitField0_ |= 0x00000002; + break; + } // case 25 + case 34: + { + notes_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.devicesandservices.health.v4.ObservationSampleTime sampleTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ObservationSampleTime, + com.google.devicesandservices.health.v4.ObservationSampleTime.Builder, + com.google.devicesandservices.health.v4.ObservationSampleTimeOrBuilder> + sampleTimeBuilder_; + + /** + * + * + *
+     * Required. The time at which the weight was measured
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the sampleTime field is set. + */ + public boolean hasSampleTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. The time at which the weight was measured
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The sampleTime. + */ + public com.google.devicesandservices.health.v4.ObservationSampleTime getSampleTime() { + if (sampleTimeBuilder_ == null) { + return sampleTime_ == null + ? com.google.devicesandservices.health.v4.ObservationSampleTime.getDefaultInstance() + : sampleTime_; + } else { + return sampleTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The time at which the weight was measured
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSampleTime( + com.google.devicesandservices.health.v4.ObservationSampleTime value) { + if (sampleTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sampleTime_ = value; + } else { + sampleTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The time at which the weight was measured
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSampleTime( + com.google.devicesandservices.health.v4.ObservationSampleTime.Builder builderForValue) { + if (sampleTimeBuilder_ == null) { + sampleTime_ = builderForValue.build(); + } else { + sampleTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The time at which the weight was measured
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeSampleTime( + com.google.devicesandservices.health.v4.ObservationSampleTime value) { + if (sampleTimeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && sampleTime_ != null + && sampleTime_ + != com.google.devicesandservices.health.v4.ObservationSampleTime + .getDefaultInstance()) { + getSampleTimeBuilder().mergeFrom(value); + } else { + sampleTime_ = value; + } + } else { + sampleTimeBuilder_.mergeFrom(value); + } + if (sampleTime_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The time at which the weight was measured
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearSampleTime() { + bitField0_ = (bitField0_ & ~0x00000001); + sampleTime_ = null; + if (sampleTimeBuilder_ != null) { + sampleTimeBuilder_.dispose(); + sampleTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The time at which the weight was measured
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.devicesandservices.health.v4.ObservationSampleTime.Builder + getSampleTimeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetSampleTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The time at which the weight was measured
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.devicesandservices.health.v4.ObservationSampleTimeOrBuilder + getSampleTimeOrBuilder() { + if (sampleTimeBuilder_ != null) { + return sampleTimeBuilder_.getMessageOrBuilder(); + } else { + return sampleTime_ == null + ? com.google.devicesandservices.health.v4.ObservationSampleTime.getDefaultInstance() + : sampleTime_; + } + } + + /** + * + * + *
+     * Required. The time at which the weight was measured
+     * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ObservationSampleTime, + com.google.devicesandservices.health.v4.ObservationSampleTime.Builder, + com.google.devicesandservices.health.v4.ObservationSampleTimeOrBuilder> + internalGetSampleTimeFieldBuilder() { + if (sampleTimeBuilder_ == null) { + sampleTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.devicesandservices.health.v4.ObservationSampleTime, + com.google.devicesandservices.health.v4.ObservationSampleTime.Builder, + com.google.devicesandservices.health.v4.ObservationSampleTimeOrBuilder>( + getSampleTime(), getParentForChildren(), isClean()); + sampleTime_ = null; + } + return sampleTimeBuilder_; + } + + private double weightGrams_; + + /** + * + * + *
+     * Required. Weight of a user in grams.
+     * 
+ * + * double weight_grams = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The weightGrams. + */ + @java.lang.Override + public double getWeightGrams() { + return weightGrams_; + } + + /** + * + * + *
+     * Required. Weight of a user in grams.
+     * 
+ * + * double weight_grams = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The weightGrams to set. + * @return This builder for chaining. + */ + public Builder setWeightGrams(double value) { + + weightGrams_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Weight of a user in grams.
+     * 
+ * + * double weight_grams = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearWeightGrams() { + bitField0_ = (bitField0_ & ~0x00000002); + weightGrams_ = 0D; + onChanged(); + return this; + } + + private java.lang.Object notes_ = ""; + + /** + * + * + *
+     * Optional. Standard free-form notes captured at manual logging.
+     * 
+ * + * string notes = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The notes. + */ + public java.lang.String getNotes() { + java.lang.Object ref = notes_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + notes_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Standard free-form notes captured at manual logging.
+     * 
+ * + * string notes = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for notes. + */ + public com.google.protobuf.ByteString getNotesBytes() { + java.lang.Object ref = notes_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + notes_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Standard free-form notes captured at manual logging.
+     * 
+ * + * string notes = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The notes to set. + * @return This builder for chaining. + */ + public Builder setNotes(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + notes_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Standard free-form notes captured at manual logging.
+     * 
+ * + * string notes = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearNotes() { + notes_ = getDefaultInstance().getNotes(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Standard free-form notes captured at manual logging.
+     * 
+ * + * string notes = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for notes to set. + * @return This builder for chaining. + */ + public Builder setNotesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + notes_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.Weight) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.Weight) + private static final com.google.devicesandservices.health.v4.Weight DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.Weight(); + } + + public static com.google.devicesandservices.health.v4.Weight getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Weight parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.Weight getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/WeightOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/WeightOrBuilder.java new file mode 100644 index 000000000000..76a89ad48a16 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/WeightOrBuilder.java @@ -0,0 +1,110 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface WeightOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.Weight) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The time at which the weight was measured
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the sampleTime field is set. + */ + boolean hasSampleTime(); + + /** + * + * + *
+   * Required. The time at which the weight was measured
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The sampleTime. + */ + com.google.devicesandservices.health.v4.ObservationSampleTime getSampleTime(); + + /** + * + * + *
+   * Required. The time at which the weight was measured
+   * 
+ * + * + * .google.devicesandservices.health.v4.ObservationSampleTime sample_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.devicesandservices.health.v4.ObservationSampleTimeOrBuilder getSampleTimeOrBuilder(); + + /** + * + * + *
+   * Required. Weight of a user in grams.
+   * 
+ * + * double weight_grams = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The weightGrams. + */ + double getWeightGrams(); + + /** + * + * + *
+   * Optional. Standard free-form notes captured at manual logging.
+   * 
+ * + * string notes = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The notes. + */ + java.lang.String getNotes(); + + /** + * + * + *
+   * Optional. Standard free-form notes captured at manual logging.
+   * 
+ * + * string notes = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for notes. + */ + com.google.protobuf.ByteString getNotesBytes(); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/WeightRollupValue.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/WeightRollupValue.java new file mode 100644 index 000000000000..b47baf82553b --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/WeightRollupValue.java @@ -0,0 +1,508 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +/** + * + * + *
+ * Represents the result of the rollup of the weight data type.
+ * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.WeightRollupValue} + */ +@com.google.protobuf.Generated +public final class WeightRollupValue extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.devicesandservices.health.v4.WeightRollupValue) + WeightRollupValueOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "WeightRollupValue"); + } + + // Use WeightRollupValue.newBuilder() to construct. + private WeightRollupValue(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private WeightRollupValue() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_WeightRollupValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_WeightRollupValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.WeightRollupValue.class, + com.google.devicesandservices.health.v4.WeightRollupValue.Builder.class); + } + + public static final int WEIGHT_GRAMS_AVG_FIELD_NUMBER = 1; + private double weightGramsAvg_ = 0D; + + /** + * + * + *
+   * Average weight in grams.
+   * 
+ * + * double weight_grams_avg = 1; + * + * @return The weightGramsAvg. + */ + @java.lang.Override + public double getWeightGramsAvg() { + return weightGramsAvg_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (java.lang.Double.doubleToRawLongBits(weightGramsAvg_) != 0) { + output.writeDouble(1, weightGramsAvg_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (java.lang.Double.doubleToRawLongBits(weightGramsAvg_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(1, weightGramsAvg_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.devicesandservices.health.v4.WeightRollupValue)) { + return super.equals(obj); + } + com.google.devicesandservices.health.v4.WeightRollupValue other = + (com.google.devicesandservices.health.v4.WeightRollupValue) obj; + + if (java.lang.Double.doubleToLongBits(getWeightGramsAvg()) + != java.lang.Double.doubleToLongBits(other.getWeightGramsAvg())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + WEIGHT_GRAMS_AVG_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getWeightGramsAvg())); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.devicesandservices.health.v4.WeightRollupValue parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.WeightRollupValue parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.WeightRollupValue parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.WeightRollupValue parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.WeightRollupValue parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.devicesandservices.health.v4.WeightRollupValue parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.WeightRollupValue parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.WeightRollupValue parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.WeightRollupValue parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.WeightRollupValue parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.devicesandservices.health.v4.WeightRollupValue parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.devicesandservices.health.v4.WeightRollupValue parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.devicesandservices.health.v4.WeightRollupValue prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Represents the result of the rollup of the weight data type.
+   * 
+ * + * Protobuf type {@code google.devicesandservices.health.v4.WeightRollupValue} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.devicesandservices.health.v4.WeightRollupValue) + com.google.devicesandservices.health.v4.WeightRollupValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_WeightRollupValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_WeightRollupValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devicesandservices.health.v4.WeightRollupValue.class, + com.google.devicesandservices.health.v4.WeightRollupValue.Builder.class); + } + + // Construct using com.google.devicesandservices.health.v4.WeightRollupValue.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + weightGramsAvg_ = 0D; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.devicesandservices.health.v4.DataModelProto + .internal_static_google_devicesandservices_health_v4_WeightRollupValue_descriptor; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.WeightRollupValue getDefaultInstanceForType() { + return com.google.devicesandservices.health.v4.WeightRollupValue.getDefaultInstance(); + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.WeightRollupValue build() { + com.google.devicesandservices.health.v4.WeightRollupValue result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.WeightRollupValue buildPartial() { + com.google.devicesandservices.health.v4.WeightRollupValue result = + new com.google.devicesandservices.health.v4.WeightRollupValue(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.devicesandservices.health.v4.WeightRollupValue result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.weightGramsAvg_ = weightGramsAvg_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.devicesandservices.health.v4.WeightRollupValue) { + return mergeFrom((com.google.devicesandservices.health.v4.WeightRollupValue) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.devicesandservices.health.v4.WeightRollupValue other) { + if (other == com.google.devicesandservices.health.v4.WeightRollupValue.getDefaultInstance()) + return this; + if (java.lang.Double.doubleToRawLongBits(other.getWeightGramsAvg()) != 0) { + setWeightGramsAvg(other.getWeightGramsAvg()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 9: + { + weightGramsAvg_ = input.readDouble(); + bitField0_ |= 0x00000001; + break; + } // case 9 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private double weightGramsAvg_; + + /** + * + * + *
+     * Average weight in grams.
+     * 
+ * + * double weight_grams_avg = 1; + * + * @return The weightGramsAvg. + */ + @java.lang.Override + public double getWeightGramsAvg() { + return weightGramsAvg_; + } + + /** + * + * + *
+     * Average weight in grams.
+     * 
+ * + * double weight_grams_avg = 1; + * + * @param value The weightGramsAvg to set. + * @return This builder for chaining. + */ + public Builder setWeightGramsAvg(double value) { + + weightGramsAvg_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Average weight in grams.
+     * 
+ * + * double weight_grams_avg = 1; + * + * @return This builder for chaining. + */ + public Builder clearWeightGramsAvg() { + bitField0_ = (bitField0_ & ~0x00000001); + weightGramsAvg_ = 0D; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.devicesandservices.health.v4.WeightRollupValue) + } + + // @@protoc_insertion_point(class_scope:google.devicesandservices.health.v4.WeightRollupValue) + private static final com.google.devicesandservices.health.v4.WeightRollupValue DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.devicesandservices.health.v4.WeightRollupValue(); + } + + public static com.google.devicesandservices.health.v4.WeightRollupValue getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WeightRollupValue parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.devicesandservices.health.v4.WeightRollupValue getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/WeightRollupValueOrBuilder.java b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/WeightRollupValueOrBuilder.java new file mode 100644 index 000000000000..3cd27ebac344 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/java/com/google/devicesandservices/health/v4/WeightRollupValueOrBuilder.java @@ -0,0 +1,41 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/devicesandservices/health/v4/data_model.proto +// Protobuf Java Version: 4.33.2 + +package com.google.devicesandservices.health.v4; + +@com.google.protobuf.Generated +public interface WeightRollupValueOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.devicesandservices.health.v4.WeightRollupValue) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Average weight in grams.
+   * 
+ * + * double weight_grams_avg = 1; + * + * @return The weightGramsAvg. + */ + double getWeightGramsAvg(); +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/proto/google/devicesandservices/health/v4/data_coordinates.proto b/java-health/proto-google-cloud-health-v4/src/main/proto/google/devicesandservices/health/v4/data_coordinates.proto new file mode 100644 index 000000000000..24c646b40119 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/proto/google/devicesandservices/health/v4/data_coordinates.proto @@ -0,0 +1,131 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.devicesandservices.health.v4; + +import "google/api/field_behavior.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; +import "google/type/date.proto"; +import "google/type/timeofday.proto"; + +option csharp_namespace = "Google.DevicesAndServices.Health.V4"; +option go_package = "google.golang.org/genproto/googleapis/devicesandservices/health/apiv4main;healthpb"; +option java_multiple_files = true; +option java_outer_classname = "DataCoordinatesProto"; +option java_package = "com.google.devicesandservices.health.v4"; +option php_namespace = "Google\\DevicesAndServices\\Health\\V4"; +option ruby_package = "Google::DevicesAndServices::Health::V4"; + +// Civil time representation similar to +// [google.type.DateTime][google.type.DateTime], but ensures that neither the +// timezone nor the UTC offset can be set to avoid confusion between civil and +// physical time queries. +message CivilDateTime { + // Required. Calendar date. + google.type.Date date = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Time of day. Defaults to the start of the day, at midnight if + // omitted. + google.type.TimeOfDay time = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Counterpart of [google.type.Interval][google.type.Interval], but using +// [CivilDateTime][google.devicesandservices.health.v4.CivilDateTime]. +message CivilTimeInterval { + // Required. The inclusive start of the range. + CivilDateTime start = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The exclusive end of the range. + CivilDateTime end = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Represents a time interval of an observed data point. +message ObservationTimeInterval { + // Required. Observed interval start time. + google.protobuf.Timestamp start_time = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The offset of the user's local time at the start of the + // observation relative to the Coordinated Universal Time (UTC). + google.protobuf.Duration start_utc_offset = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Required. Observed interval end time. + google.protobuf.Timestamp end_time = 3 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The offset of the user's local time at the end of the observation + // relative to the Coordinated Universal Time (UTC). + google.protobuf.Duration end_utc_offset = 4 + [(google.api.field_behavior) = REQUIRED]; + + // Output only. Observed interval start time in civil time in the timezone the + // subject is in at the start of the observed interval + CivilDateTime civil_start_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Observed interval end time in civil time in the timezone the + // subject is in at the end of the observed interval + CivilDateTime civil_end_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Represents a time interval of session data point, which bundles multiple +// observed metrics together. +message SessionTimeInterval { + // Required. The start time of the observed session. + google.protobuf.Timestamp start_time = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The offset of the user's local time at the start of the session + // relative to the Coordinated Universal Time (UTC). + google.protobuf.Duration start_utc_offset = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The end time of the observed session. + google.protobuf.Timestamp end_time = 3 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The offset of the user's local time at the end of the session + // relative to the Coordinated Universal Time (UTC). + google.protobuf.Duration end_utc_offset = 4 + [(google.api.field_behavior) = REQUIRED]; + + // Output only. Session start time in civil time in the timezone the subject + // is in at the start of the session. + CivilDateTime civil_start_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Session end time in civil time in the timezone the subject is + // in at the end of the session. + CivilDateTime civil_end_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Represents a sample time of an observed data point. +message ObservationSampleTime { + // Required. The time of the observation. + google.protobuf.Timestamp physical_time = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The offset of the user's local time during the observation + // relative to the Coordinated Universal Time (UTC). + google.protobuf.Duration utc_offset = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Output only. The civil time in the timezone the subject is in + // at the time of the observation. + CivilDateTime civil_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/proto/google/devicesandservices/health/v4/data_model.proto b/java-health/proto-google-cloud-health-v4/src/main/proto/google/devicesandservices/health/v4/data_model.proto new file mode 100644 index 000000000000..2bb2a9d69068 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/proto/google/devicesandservices/health/v4/data_model.proto @@ -0,0 +1,1432 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.devicesandservices.health.v4; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/devicesandservices/health/v4/data_coordinates.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; +import "google/type/date.proto"; + +option csharp_namespace = "Google.DevicesAndServices.Health.V4"; +option go_package = "google.golang.org/genproto/googleapis/devicesandservices/health/apiv4main;healthpb"; +option java_multiple_files = true; +option java_outer_classname = "DataModelProto"; +option java_package = "com.google.devicesandservices.health.v4"; +option php_namespace = "Google\\DevicesAndServices\\Health\\V4"; +option ruby_package = "Google::DevicesAndServices::Health::V4"; + +// The heart rate zone type. +enum HeartRateZoneType { + // Unspecified heart rate zone. + HEART_RATE_ZONE_TYPE_UNSPECIFIED = 0; + + // The light heart rate zone. + LIGHT = 1; + + // The moderate heart rate zone. + MODERATE = 2; + + // The vigorous heart rate zone. + VIGOROUS = 3; + + // The peak heart rate zone. + PEAK = 4; +} + +// Enum representing the unit of volume. +enum VolumeUnit { + // Unspecified volume unit. + VOLUME_UNIT_UNSPECIFIED = 0; + + // Cup (imperial) + CUP_IMPERIAL = 1; + + // Cup (US) + CUP_US = 2; + + // Fluid ounce (imperial) + FLUID_OUNCE_IMPERIAL = 3; + + // Fluid ounce (US) + FLUID_OUNCE_US = 4; + + // Liter + LITER = 5; + + // Milliliter + MILLILITER = 6; + + // Pint (imperial) + PINT_IMPERIAL = 7; + + // Pint (US) + PINT_US = 8; +} + +// Record of active zone minutes in a given time interval. +message ActiveZoneMinutes { + // Represents different heart rate zones. + enum HeartRateZone { + // Unspecified heart rate zone. + HEART_RATE_ZONE_UNSPECIFIED = 0; + + // The fat burn heart rate zone. + FAT_BURN = 1; + + // The cardio heart rate zone. + CARDIO = 2; + + // The peak heart rate zone. + PEAK = 3; + } + + // Required. Observed interval. + ObservationTimeInterval interval = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Heart rate zone in which the active zone minutes have been + // earned, in the given time interval. + HeartRateZone heart_rate_zone = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Number of Active Zone Minutes earned in the given time interval. + // Note: active_zone_minutes equals to 1 for low intensity (fat burn) zones or + // 2 for high intensity zones (cardio, peak). + int64 active_zone_minutes = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Represents the result of the rollup of the active zone minutes data type. +message ActiveZoneMinutesRollupValue { + // Active zone minutes in `HeartRateZone.CARDIO`. + int64 sum_in_cardio_heart_zone = 1; + + // Active zone minutes in `HeartRateZone.PEAK`. + int64 sum_in_peak_heart_zone = 2; + + // Active zone minutes in `HeartRateZone.FAT_BURN`. + int64 sum_in_fat_burn_heart_zone = 3; +} + +// Record of active minutes in a given time interval. +message ActiveMinutes { + // Active minutes at a given activity level. + message ActiveMinutesByActivityLevel { + // Required. The level of activity. + ActivityLevel activity_level = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Number of whole minutes spent in activity. + int64 active_minutes = 2 [(google.api.field_behavior) = REQUIRED]; + } + + // Activity level. + enum ActivityLevel { + // Activity level is unspecified. + ACTIVITY_LEVEL_UNSPECIFIED = 0; + + // Light activity level. + LIGHT = 1; + + // Moderate activity level. + MODERATE = 2; + + // Vigorous activity level. + VIGOROUS = 3; + } + + // Required. Observed interval. + ObservationTimeInterval interval = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Active minutes by activity level. At most one record per activity + // level is allowed. + repeated ActiveMinutesByActivityLevel active_minutes_by_activity_level = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Represents the result of the rollup of the active minutes data type. +message ActiveMinutesRollupValue { + // Active minutes by activity level. + message ActiveMinutesRollupByActivityLevel { + // The level of activity. + ActiveMinutes.ActivityLevel activity_level = 1; + + // Number of whole minutes spent in activity. + int64 active_minutes_sum = 2; + } + + // Active minutes by activity level. At most one record per activity level + // is allowed. + repeated ActiveMinutesRollupByActivityLevel + active_minutes_rollup_by_activity_level = 1; +} + +// Internal type to capture activity level during a certain time interval. +message ActivityLevel { + // Represents different activity level types. + enum ActivityLevelType { + // Unspecified activity level type. + ACTIVITY_LEVEL_TYPE_UNSPECIFIED = 0; + + // Sedentary activity level. + SEDENTARY = 1; + + // Lightly active activity level. + LIGHTLY_ACTIVE = 2; + + // Moderately active activity level. + MODERATELY_ACTIVE = 3; + + // Very active activity level. + VERY_ACTIVE = 4; + } + + // Required. Observed interval. + ObservationTimeInterval interval = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Activity level type in the given time interval. + ActivityLevelType activity_level_type = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Represents the result of the rollup of the activity level data type. +message ActivityLevelRollupValue { + // Represents the total duration in a specific activity level type. + message ActivityLevelRollupByActivityLevelType { + // Activity level type. + ActivityLevel.ActivityLevelType activity_level_type = 1; + + // Total duration in the activity level type. + google.protobuf.Duration total_duration = 2; + } + + // List of total durations in each activity level type. + repeated ActivityLevelRollupByActivityLevelType + activity_level_rollups_by_activity_level_type = 1; +} + +// Captures the altitude gain (i.e. deltas), and not level above sea, for a user +// in millimeters. +message Altitude { + // Required. Observed interval. + ObservationTimeInterval interval = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Altitude gain in millimeters over the observed interval. + int64 gain_millimeters = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Number of calories burned due to basal metabolic rate (BMR) over a period of +// time. +message BasalEnergyBurned { + // Required. Observed interval. + ObservationTimeInterval interval = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Number of calories burned due to basal metabolic rate in + // kilocalories over the observed interval. + double kcal = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Body fat measurement. +message BodyFat { + // Required. The time at which body fat was measured. + ObservationSampleTime sample_time = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Required. Body fat percentage, in range [0, 100]. + double percentage = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Represents the result of the rollup of the body fat data type. +message BodyFatRollupValue { + // Average body fat percentage. + double body_fat_percentage_avg = 1; +} + +// Represents the result of the rollup of the calories in heart rate zone data +// type. +message CaloriesInHeartRateZoneRollupValue { + // Represents the amount of kilocalories burned in a specific heart rate zone. + message CaloriesInHeartRateZoneValue { + // The heart rate zone. + HeartRateZoneType heart_rate_zone = 1; + + // The amount of kilocalories burned in the specified heart rate zone. + double kcal = 2; + } + + // List of calories burned in each heart rate zone. + repeated CaloriesInHeartRateZoneValue calories_in_heart_rate_zones = 1; +} + +// User's heart rate zone thresholds based on the Karvonen algorithm for a +// specific day. +message DailyHeartRateZones { + // The heart rate zone. + message HeartRateZone { + // Required. The heart rate zone type. + HeartRateZoneType heart_rate_zone_type = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. Minimum heart rate for this zone in beats per minute. + int64 min_beats_per_minute = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Maximum heart rate for this zone in beats per minute. + int64 max_beats_per_minute = 3 [(google.api.field_behavior) = REQUIRED]; + } + + // Required. Date (in user's timezone) of the heart rate zones record. + google.type.Date date = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The heart rate zones. + repeated HeartRateZone heart_rate_zones = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Represents the daily heart rate variability data type. +// +// At least one of the following fields must be set: +// +// - `average_heart_rate_variability_milliseconds` +// - `non_rem_heart_rate_beats_per_minute` +// - `entropy` +// - `deep_sleep_root_mean_square_of_successive_differences_milliseconds` +message DailyHeartRateVariability { + // Required. Date (in the user's timezone) of heart rate variability + // measurement. + google.type.Date date = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A user's average heart rate variability calculated using the root + // mean square of successive differences (RMSSD) in times between heartbeats. + optional double average_heart_rate_variability_milliseconds = 4 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Non-REM heart rate + optional int64 non_rem_heart_rate_beats_per_minute = 5 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The Shanon entropy of heartbeat intervals. + // Entropy quantifies randomness or disorder in a system. High entropy + // indicates high HRV. Entropy is measured from the histogram of time interval + // between successive heart beats values measured during sleep. + optional double entropy = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The root mean square of successive differences (RMSSD) value + // during deep sleep. + optional double + deep_sleep_root_mean_square_of_successive_differences_milliseconds = 7 + [(google.api.field_behavior) = OPTIONAL]; +} + +// A daily average respiratory rate (breaths per minute) for a day of the year. +// One data point per day calculated for the main sleep. +message DailyRespiratoryRate { + // Required. The date on which the respiratory rate was measured. + google.type.Date date = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The average number of breaths taken per minute. + double breaths_per_minute = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// A daily oxygen saturation (SpO2) record. +// Represents the user's daily oxygen saturation summary, typically calculated +// during sleep. +message DailyOxygenSaturation { + // Required. Date (in user's timezone) of the daily oxygen saturation record. + google.type.Date date = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The average value of the oxygen saturation samples during the + // sleep. + double average_percentage = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The lower bound of the confidence interval of oxygen saturation + // samples during sleep. + double lower_bound_percentage = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. The upper bound of the confidence interval of oxygen saturation + // samples during sleep. + double upper_bound_percentage = 4 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Standard deviation of the daily oxygen saturation averages from + // the past 7-30 days. + double standard_deviation_percentage = 5 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Measures the daily resting heart rate for a user, calculated using the all +// day heart rate measurements. +message DailyRestingHeartRate { + // Metadata for the daily resting heart rate. + message DailyRestingHeartRateMetadata { + // The method used to calculate the resting heart rate. + enum CalculationMethod { + // The calculation method is unspecified. + CALCULATION_METHOD_UNSPECIFIED = 0; + + // The resting heart rate is calculated using the sleep data. + WITH_SLEEP = 1; + + // The resting heart rate is calculated using only awake data. + ONLY_WITH_AWAKE_DATA = 2; + } + + // Required. The method used to calculate the resting heart rate. + CalculationMethod calculation_method = 1 + [(google.api.field_behavior) = REQUIRED]; + } + + // Required. Date (in the user's timezone) of the resting heart rate + // measurement. + google.type.Date date = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The resting heart rate value in beats per minute. + int64 beats_per_minute = 4 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Metadata for the daily resting heart rate. + DailyRestingHeartRateMetadata daily_resting_heart_rate_metadata = 5 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Provides derived sleep temperature values, calculated from skin or internal +// device temperature readings during sleep. +message DailySleepTemperatureDerivations { + // Required. Date for which the sleep temperature derivations are calculated. + google.type.Date date = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The user's nightly skin temperature. It is the mean of skin + // temperature samples taken from the user’s sleep. + double nightly_temperature_celsius = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. The user's baseline skin temperature. It is the median of the + // user's nightly skin temperature over the past 30 days. + double baseline_temperature_celsius = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The standard deviation of the user’s relative nightly skin + // temperature (temperature - baseline) over the past 30 days. + double relative_nightly_stddev_30d_celsius = 4 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Contains a daily summary of the user's VO2 max (cardio fitness score), +// which is the maximum rate of oxygen the body can use during exercise. +message DailyVO2Max { + // The cardio fitness level categories. + enum CardioFitnessLevel { + // Unspecified cardio fitness level. + CARDIO_FITNESS_LEVEL_UNSPECIFIED = 0; + + // Poor cardio fitness level. + POOR = 1; + + // Fair cardio fitness level. + FAIR = 2; + + // Average cardio fitness level. + AVERAGE = 3; + + // Good cardio fitness level. + GOOD = 4; + + // Very good cardio fitness level. + VERY_GOOD = 5; + + // Excellent cardio fitness level. + EXCELLENT = 6; + } + + // Required. The date for which the Daily VO2 max was measured. + google.type.Date date = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Daily VO2 max value measured as in ml consumed oxygen / kg of + // body weight / min. + double vo2_max = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An estimated field is added to indicate when the confidence has + // decreased sufficiently to consider the value an estimation. + bool estimated = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Represents the user's cardio fitness level based on their VO2 + // max. + CardioFitnessLevel cardio_fitness_level = 4 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The covariance of the VO2 max value. + double vo2_max_covariance = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Distance traveled over an interval of time. +message Distance { + // Required. Observed interval. + ObservationTimeInterval interval = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Distance in millimeters over the observed interval. + int64 millimeters = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Result of the rollup of the user's distance. +message DistanceRollupValue { + // Sum of the distance in millimeters. + int64 millimeters_sum = 1; +} + +// An exercise that stores information about a physical activity. +message Exercise { + // Represents splits or laps recorded within an exercise. Lap events + // partition a workout into segments based on criteria like distance, time, or + // calories. + message SplitSummary { + // The type of the split, such as manual, duration, distance, calories. + enum SplitType { + // Split type is unspecified. + SPLIT_TYPE_UNSPECIFIED = 0; + + // Manual split. + MANUAL = 1; + + // Split by duration. + DURATION = 2; + + // Split by distance. + DISTANCE = 3; + + // Split by calories. + CALORIES = 4; + } + + // Required. Lap start time + google.protobuf.Timestamp start_time = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. Lap start time offset from UTC + google.protobuf.Duration start_utc_offset = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Required. Lap end time + google.protobuf.Timestamp end_time = 3 + [(google.api.field_behavior) = REQUIRED]; + + // Required. Lap end time offset from UTC + google.protobuf.Duration end_utc_offset = 4 + [(google.api.field_behavior) = REQUIRED]; + + // Output only. Lap time excluding the pauses. + google.protobuf.Duration active_duration = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Summary metrics for this split. + MetricsSummary metrics_summary = 6 [(google.api.field_behavior) = REQUIRED]; + + // Required. Method used to split the exercise laps. + // Users may manually mark the lap as complete even if the tracking + // is automatic. + SplitType split_type = 7 [(google.api.field_behavior) = REQUIRED]; + } + + // Represents instantaneous events that happen during an exercise, + // such as start, stop, pause, split. + message ExerciseEvent { + // The type of the event, such as start, stop, pause, resume. + enum ExerciseEventType { + // Exercise event type is unspecified. + EXERCISE_EVENT_TYPE_UNSPECIFIED = 0; + + // Exercise start event. + START = 1; + + // Exercise stop event. + STOP = 2; + + // Exercise pause event. + PAUSE = 3; + + // Exercise resume event. + RESUME = 4; + + // Exercise auto-pause event. + AUTO_PAUSE = 5; + + // Exercise auto-resume event. + AUTO_RESUME = 6; + } + + // Required. Exercise event time + google.protobuf.Timestamp event_time = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. Exercise event time offset from UTC + google.protobuf.Duration event_utc_offset = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The type of the event, such as start, stop, pause, resume. + ExerciseEventType exercise_event_type = 3 + [(google.api.field_behavior) = REQUIRED]; + } + + // Additional exercise metadata. + message ExerciseMetadata { + // Optional. Pool length in millimeters. Only present in the swimming + // exercises. + int64 pool_length_millimeters = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Whether the exercise had GPS tracking. + bool has_gps = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // The type of activity performed during an exercise. + enum ExerciseType { + // Exercise type is unspecified. + EXERCISE_TYPE_UNSPECIFIED = 0; + + // Running type. + RUNNING = 1; + + // Walking type. + WALKING = 2; + + // Biking type. + BIKING = 3; + + // Swimming type. + SWIMMING = 4; + + // Hiking type. + HIKING = 5; + + // Yoga type. + YOGA = 6; + + // Pilates type. + PILATES = 7; + + // Workout type. + WORKOUT = 8; + + // HIIT type. + HIIT = 9; + + // Weightlifting type. + WEIGHTLIFTING = 10; + + // Strength training type. + STRENGTH_TRAINING = 11; + + // Other type. + OTHER = 12; + } + + // Required. Observed exercise interval + SessionTimeInterval interval = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The type of activity performed during an exercise. + ExerciseType exercise_type = 6 [(google.api.field_behavior) = REQUIRED]; + + // 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 SplitSummary splits = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Exercise events that happen during an exercise, such as pause & + // restarts. + repeated ExerciseEvent exercise_events = 15 + [(google.api.field_behavior) = OPTIONAL]; + + // 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 SplitSummary split_summaries = 9 + [(google.api.field_behavior) = OPTIONAL]; + + // Required. Summary metrics for this exercise + // ( ) + MetricsSummary metrics_summary = 10 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Additional exercise metadata. + ExerciseMetadata exercise_metadata = 11 + [(google.api.field_behavior) = OPTIONAL]; + + // Required. Exercise display name. + string display_name = 12 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Duration excluding pauses. + google.protobuf.Duration active_duration = 13 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Standard free-form notes captured at manual logging. + string notes = 14 [(google.api.field_behavior) = OPTIONAL]; + + // 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]; + + // Output only. Represents the timestamp of the creation of the exercise. + google.protobuf.Timestamp create_time = 17 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Gained elevation measured in floors over the time interval +message Floors { + // Required. Observed interval + ObservationTimeInterval interval = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Number of floors in the recorded interval + int64 count = 4 [(google.api.field_behavior) = REQUIRED]; +} + +// Represents the result of the rollup of the user's floors. +message FloorsRollupValue { + // Sum of the floors count. + int64 count_sum = 1; +} + +// Represents the result of the rollup of the user's altitude. +message AltitudeRollupValue { + // Sum of the altitude gain in millimeters. + int64 gain_millimeters_sum = 1; +} + +// A heart rate measurement. +message HeartRate { + // Heart rate metadata. + message HeartRateMetadata { + // The user’s level of activity when the heart rate sample was measured. + enum MotionContext { + // The default value when no data is available. + MOTION_CONTEXT_UNSPECIFIED = 0; + + // The user is active. + ACTIVE = 1; + + // The user is inactive. + SEDENTARY = 2; + } + + // The location of the sensor that measured the heart rate. + enum SensorLocation { + // The default value when no data is available. + SENSOR_LOCATION_UNSPECIFIED = 0; + + // Chest sensor. + CHEST = 1; + + // Wrist sensor. + WRIST = 2; + + // Finger sensor. + FINGER = 3; + + // Hand sensor. + HAND = 4; + + // Ear lobe sensor. + EAR_LOBE = 5; + + // Foot sensor. + FOOT = 6; + } + + // Optional. Indicates the user’s level of activity when the heart rate + // sample was measured + MotionContext motion_context = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Indicates the location of the sensor that measured the heart + // rate. + SensorLocation sensor_location = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // Required. Observation time + ObservationSampleTime sample_time = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The heart rate value in beats per minute. + int64 beats_per_minute = 4 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Metadata about the heart rate sample. + HeartRateMetadata metadata = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Represents the result of the rollup of the heart rate data type. +message HeartRateRollupValue { + // The average heart rate value in the interval. + optional double beats_per_minute_avg = 1; + + // The maximum heart rate value in the interval. + optional double beats_per_minute_max = 2; + + // The minimum heart rate value in the interval. + optional double beats_per_minute_min = 3; +} + +// Represents the result of the rollup of the user's daily heart rate +// variability personal range. +message RunVO2MaxRollupValue { + // Minimum value of run VO2 max in the interval.. + double rate_min = 1; + + // Maximum value of run VO2 max in the interval. + double rate_max = 2; + + // Average value of run VO2 max in the interval. + double rate_avg = 3; +} + +// VO2 max value calculated based on the user's running activity. +// Value stored in ml/kg/min. +message RunVO2Max { + // Required. The time at which the metric was measured. + ObservationSampleTime sample_time = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. Run VO2 max value in ml/kg/min. + double run_vo2_max = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Represents the result of the rollup of the user's daily heart rate +// variability personal range. +message HeartRateVariabilityPersonalRangeRollupValue { + // The lower bound of the user's average heart rate variability personal + // range. + optional double average_heart_rate_variability_milliseconds_min = 1; + + // The upper bound of the user's average heart rate variability personal + // range. + optional double average_heart_rate_variability_milliseconds_max = 2; +} + +// Body height measurement. +message Height { + // Required. The time at which the height was recorded. + ObservationSampleTime sample_time = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. Height of the user in millimeters. + int64 height_millimeters = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Captures user's heart rate variability (HRV) as measured by the root mean +// square of successive differences (RMSSD) between normal heartbeats or by +// standard deviation of the inter-beat intervals (SDNN). +message HeartRateVariability { + // Required. The time of the heart rate variability measurement. + ObservationSampleTime sample_time = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. The root mean square of successive differences between normal + // heartbeats. This is a measure of heart rate variability used by Fitbit. + double root_mean_square_of_successive_differences_milliseconds = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The standard deviation of the heart rate variability measurement. + double standard_deviation_milliseconds = 3 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Represents the volume quantity. +message VolumeQuantity { + // Required. Value representing the volume in milliliters. + double milliliters = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Value representing the user provided unit. + VolumeUnit user_provided_unit = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Holds information about a user logged hydration. +message HydrationLog { + // Required. Observed interval. + SessionTimeInterval interval = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Amount of liquid (ex. water) consumed. + VolumeQuantity amount_consumed = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Represents the result of the rollup of the hydration log data type. +message HydrationLogRollupValue { + // Rollup for volume quantity. + message VolumeQuantityRollup { + // Required. The sum of volume in milliliters. + double milliliters_sum = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The user provided unit on the last element. + VolumeUnit user_provided_unit_last = 2 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Rollup for amount consumed. + VolumeQuantityRollup amount_consumed = 1; +} + +// Summary metrics for an exercise. +message MetricsSummary { + // Time spent in each heart rate zone. + message TimeInHeartRateZones { + // Optional. Time spent in light heart rate zone. + google.protobuf.Duration light_time = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Time spent in moderate heart rate zone. + google.protobuf.Duration moderate_time = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Time spent in vigorous heart rate zone. + google.protobuf.Duration vigorous_time = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Time spent in peak heart rate zone. + google.protobuf.Duration peak_time = 4 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Mobility workouts specific metrics + message MobilityMetrics { + // Optional. Cadence is a measure of the frequency of your foot strikes. + // Steps / min in real time during workout. + optional double avg_cadence_steps_per_minute = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Stride length is a measure of the distance covered by a single + // stride + optional int64 avg_stride_length_millimeters = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Distance off the ground your center of mass moves with each + // stride while running + optional int64 avg_vertical_oscillation_millimeters = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Vertical oscillation/stride length between [5.0, 11.0]. + optional double avg_vertical_ratio = 4 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The ground contact time for a particular stride is the amount + // of time for which the foot was in contact with the ground on that stride + google.protobuf.Duration avg_ground_contact_time_duration = 5 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional. Total calories burned by the user during the exercise. + optional double calories_kcal = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Total distance covered by the user during the exercise. + optional double distance_millimeters = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Total steps taken during the exercise. + optional int64 steps = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Average speed in millimeters per second. + optional double average_speed_millimeters_per_second = 4 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Average pace in seconds per meter. + optional double average_pace_seconds_per_meter = 5 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Average heart rate during the exercise. + optional int64 average_heart_rate_beats_per_minute = 6 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Total elevation gain during the exercise. + optional double elevation_gain_millimeters = 7 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Total active zone minutes for the exercise. + optional int64 active_zone_minutes = 9 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Run VO2 max value for the exercise. Only present in the running + // exercises at the top level as in the summary of the whole exercise. + optional double run_vo2_max = 10 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Number of full pool lengths completed during the exercise. Only + // present in the swimming exercises at the top level as in the summary of the + // whole exercise. + optional double total_swim_lengths = 11 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Time spent in each heart rate zone. + TimeInHeartRateZones heart_rate_zone_durations = 12 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Mobility workouts specific metrics. Only present in the advanced + // running exercises. + MobilityMetrics mobility_metrics = 13 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Captures the user's instantaneous oxygen saturation percentage (SpO2). +message OxygenSaturation { + // Required. The time at which oxygen saturation was measured. + ObservationSampleTime sample_time = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The oxygen saturation percentage. Valid values are from 0 to 100. + double percentage = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Represents the rollup value for the daily resting heart rate data type. +message RestingHeartRatePersonalRangeRollupValue { + // The lower bound of the user's daily resting heart rate personal range. + optional double beats_per_minute_min = 1; + + // The upper bound of the user's daily resting heart rate personal range. + optional double beats_per_minute_max = 2; +} + +// Records respiratory rate details during sleep. +// Can have multiple per day if the user sleeps multiple times. +message RespiratoryRateSleepSummary { + // Respiratory rate statistics for a given sleep stage. + message RespiratoryRateSleepSummaryStatistics { + // Required. Average breaths per minute. + double breaths_per_minute = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Standard deviation of the respiratory rate during sleep. + double standard_deviation = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. How trustworthy the data is for the computation. + double signal_to_noise = 3 [(google.api.field_behavior) = OPTIONAL]; + } + + // Required. The time at which respiratory rate was measured. + ObservationSampleTime sample_time = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. Respiratory rate statistics for deep sleep. + RespiratoryRateSleepSummaryStatistics deep_sleep_stats = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Respiratory rate statistics for light sleep. + RespiratoryRateSleepSummaryStatistics light_sleep_stats = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Respiratory rate statistics for REM sleep. + RespiratoryRateSleepSummaryStatistics rem_sleep_stats = 4 + [(google.api.field_behavior) = OPTIONAL]; + + // Required. Full respiratory rate statistics. + RespiratoryRateSleepSummaryStatistics full_sleep_stats = 5 + [(google.api.field_behavior) = REQUIRED]; +} + +// A sleep session possibly including stages. +message Sleep { + // Sleep stage segment. + message SleepStage { + // Required. Sleep stage start time. + google.protobuf.Timestamp start_time = 3 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The offset of the user's local time at the start of the sleep + // stage relative to the Coordinated Universal Time (UTC). + google.protobuf.Duration start_utc_offset = 4 + [(google.api.field_behavior) = REQUIRED]; + + // Required. Sleep stage end time. + google.protobuf.Timestamp end_time = 5 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The offset of the user's local time at the end of the sleep + // stage relative to the Coordinated Universal Time (UTC). + google.protobuf.Duration end_utc_offset = 6 + [(google.api.field_behavior) = REQUIRED]; + + // Required. Sleep stage type: AWAKE, DEEP, REM, LIGHT etc. + SleepStageType type = 7 [(google.api.field_behavior) = REQUIRED]; + + // Output only. Creation time of this sleep stages segment. + google.protobuf.Timestamp create_time = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Last update time of this sleep stages segment. + google.protobuf.Timestamp update_time = 9 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // A time interval to represent an out-of-bed segment. + message OutOfBedSegment { + // Required. Segment tart time. + google.protobuf.Timestamp start_time = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The offset of the user's local time at the start of the segment + // relative to the Coordinated Universal Time (UTC). + google.protobuf.Duration start_utc_offset = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Required. Segment end time. + google.protobuf.Timestamp end_time = 3 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The offset of the user's local time at the end of the segment + // relative to the Coordinated Universal Time (UTC). + google.protobuf.Duration end_utc_offset = 4 + [(google.api.field_behavior) = REQUIRED]; + } + + // Additional information about how the sleep was processed. + message SleepMetadata { + // Sleep stages algorithm processing status. + enum StagesState { + // Output only. Sleep stages status is unspecified. + STAGES_STATE_UNSPECIFIED = 0; + + // Output only. Sleep stages cannot be computed due to low RR coverage. + REJECTED_COVERAGE = 1; + + // Output only. Sleep stages cannot be computed due to the large middle + // gap (2h). + REJECTED_MAX_GAP = 2; + + // Output only. Sleep stages cannot be computed due to the large start + // gap (1h). + REJECTED_START_GAP = 3; + + // Output only. Sleep stages cannot be computed due to the large end gap + // (1h). + REJECTED_END_GAP = 4; + + // Output only. Sleep stages cannot be computed because the sleep log is a + // nap (has < 3h duration). + REJECTED_NAP = 5; + + // Output only. Sleep stages cannot be computed because input data is not + // available (PPGV2, wake magnitude, etc). + REJECTED_SERVER = 6; + + // Output only. Sleep stages cannot be computed due to server timeout. + TIMEOUT = 7; + + // Output only. Sleep stages successfully computed. + SUCCEEDED = 8; + + // Output only. Sleep stages cannot be computed due to server internal + // error. + PROCESSING_INTERNAL_ERROR = 9; + } + + // Output only. Sleep stages algorithm processing status. + StagesState stages_status = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Sleep and sleep stages algorithms finished processing. + bool processed = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Naps are sleeps without stages and relatively short + // durations. + bool nap = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Some sleeps autodetected by algorithms can be manually + // edited by users. + bool manually_edited = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Sleep identifier relevant in the context of the data source. + string external_id = 7 [(google.api.field_behavior) = OPTIONAL]; + } + + // + // Sleep summary: metrics and stages summary. + message SleepSummary { + // Total duration and segment count for a stage. + message StageSummary { + // Output only. Sleep stage type: AWAKE, DEEP, REM, LIGHT etc. + SleepStageType type = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Total duration in minutes of a sleep stage. + int64 minutes = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Number of sleep stages segments. + int64 count = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Output only. Delta between wake time and bedtime. It is the sum of all + // stages. + optional int64 minutes_in_sleep_period = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Minutes after wake up calculated by restlessness algorithm. + optional int64 minutes_after_wake_up = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Minutes to fall asleep calculated by restlessness algorithm. + optional int64 minutes_to_fall_asleep = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Total number of minutes asleep. + // For classic sleep it is the sum of ASLEEP stages (excluding AWAKE and + // RESTLESS). For "stages" sleep it is the sum of LIGHT, REM and DEEP stages + // (excluding AWAKE). + optional int64 minutes_asleep = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Total number of minutes awake. It is a sum of all AWAKE + // stages. + optional int64 minutes_awake = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. List of summaries (total duration and segment count) per + // each sleep stage type. + repeated StageSummary stages_summary = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Sleep type: classic or stages. + enum SleepType { + // Sleep type is unspecified. + SLEEP_TYPE_UNSPECIFIED = 0; + + // Classic sleep is a sleep with 3 stages types: AWAKE, RESTLESS and ASLEEP. + CLASSIC = 1; + + // On top of "classic" sleep stages an additional processing pass can + // calculate stages more precisely, overwriting the prior stages with AWAKE, + // LIGHT, REM and DEEP. + STAGES = 2; + } + + // Sleep stage type: AWAKE, DEEP, REM, LIGHT etc. + enum SleepStageType { + // The default unset value. + SLEEP_STAGE_TYPE_UNSPECIFIED = 0; + + // Sleep stage AWAKE. + AWAKE = 1; + + // Sleep stage LIGHT. + LIGHT = 2; + + // Sleep stage DEEP. + DEEP = 3; + + // Sleep stage REM. + REM = 4; + + // Sleep stage ASLEEP. + ASLEEP = 5; + + // Sleep stage RESTLESS. + RESTLESS = 6; + } + + // Required. Observed sleep interval. + SessionTimeInterval interval = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. SleepType: classic or stages. + SleepType type = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. List of non-overlapping contiguous sleep stage segments that + // cover the sleep period. + repeated SleepStage stages = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. + // “Out of bed” segments that can overlap with sleep stages. + repeated OutOfBedSegment out_of_bed_segments = 6 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Sleep metadata: processing, main, manually edited, stages status. + SleepMetadata metadata = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Sleep summary: metrics and stages summary. + SleepSummary summary = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Creation time of this sleep observation. + google.protobuf.Timestamp create_time = 10 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Last update time of this sleep observation. + google.protobuf.Timestamp update_time = 11 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Step count over the time interval. +message Steps { + // Required. Observed interval. + ObservationTimeInterval interval = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Number of steps in the recorded interval. + int64 count = 4 [(google.api.field_behavior) = REQUIRED]; +} + +// Represents the result of the rollup of the steps data type. +message StepsRollupValue { + // Total number of steps in the interval. + int64 count_sum = 1; +} + +// Swim lengths data over the time interval. +message SwimLengthsData { + // Swim stroke type. + enum SwimStrokeType { + // Swim stroke type is unspecified. + SWIM_STROKE_TYPE_UNSPECIFIED = 0; + + // Freestyle swim stroke type. + FREESTYLE = 1; + + // Backstroke swim stroke type. + BACKSTROKE = 2; + + // Breaststroke swim stroke type. + BREASTSTROKE = 3; + + // Butterfly swim stroke type. + BUTTERFLY = 4; + } + + // Required. Observed interval. + ObservationTimeInterval interval = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Swim stroke type. + SwimStrokeType swim_stroke_type = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Number of strokes in the lap. + int64 stroke_count = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Represents the result of the rollup of the swim lengths data type. +message SwimLengthsDataRollupValue { + // Total number of swim strokes in the interval. + int64 stroke_count_sum = 1; +} + +// Time in heart rate zone record. It's an interval spent in specific heart +// rate zone. +message TimeInHeartRateZone { + // Required. Observed interval. + ObservationTimeInterval interval = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Heart rate zone type. + HeartRateZoneType heart_rate_zone_type = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Represents the result of the rollup of the time in heart rate zone data +// type. +message TimeInHeartRateZoneRollupValue { + // Represents the total time spent in a specific heart rate zone. + message TimeInHeartRateZoneValue { + // The heart rate zone. + HeartRateZoneType heart_rate_zone = 1; + + // The total time spent in the specified heart rate zone. + google.protobuf.Duration duration = 2; + } + + // List of time spent in each heart rate zone. + repeated TimeInHeartRateZoneValue time_in_heart_rate_zones = 1; +} + +// Represents the result of the rollup of the user's total calories. +message TotalCaloriesRollupValue { + // Sum of the total calories in kilocalories. + double kcal_sum = 1; +} + +// VO2 max measurement. +message VO2Max { + // Measurement method used to measure the VO2 max value. + enum MeasurementMethod { + // Unspecified measurement method. + MEASUREMENT_METHOD_UNSPECIFIED = 0; + + // Fitbit specific, measures VO2 max rate during a run. + FITBIT_RUN = 1; + + // Google specific, measures VO2 max rate for a user based on their + // demographic data. + GOOGLE_DEMOGRAPHIC = 2; + + // Run as far as possible for 12 minutes. Distance correlated with age and + // gender translates to a VO2 max value. + COOPER_TEST = 3; + + // Maximum heart rate divided by the resting heart rate, with a multiplier + // applied. Does not require any exercise. + HEART_RATE_RATIO = 4; + + // Measured by a medical device called metabolic cart. + METABOLIC_CART = 5; + + // Continuous 20m back-and-forth runs with increasing difficulty, until + // exhaustion. + MULTISTAGE_FITNESS_TEST = 6; + + // Measured using walking exercise. + ROCKPORT_FITNESS_TEST = 7; + + // Healthkit specific, measures VO2 max rate by monitoring exercise to the + // user’s physical limit. Similar to COOPER_TEST or + // MULTISTAGE_FITNESS_TEST. + MAX_EXERCISE = 8; + + // Healthkit specific, estimates VO2 max rate based on low-intensity + // exercise. Similar to ROCKPORT_FITNESS_TEST. + PREDICTION_SUB_MAX_EXERCISE = 9; + + // Healthkit specific, estimates VO2 max rate without any exercise. + // Similar to HEART_RATE_RATIO. + PREDICTION_NON_EXERCISE = 10; + + // Use when the method is not covered in this enum. + OTHER = 11; + } + + // Required. The time at which VO2 max was measured. + ObservationSampleTime sample_time = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. VO2 max value measured as in ml consumed oxygen / kg of body + // weight / min. + double vo2_max = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The method used to measure the VO2 max value. + MeasurementMethod measurement_method = 4 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Body weight measurement. +message Weight { + // Required. The time at which the weight was measured + ObservationSampleTime sample_time = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Required. Weight of a user in grams. + double weight_grams = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Standard free-form notes captured at manual logging. + string notes = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Represents the result of the rollup of the weight data type. +message WeightRollupValue { + // Average weight in grams. + double weight_grams_avg = 1; +} + +// SedentaryPeriod +// +// SedentaryPeriod data represents the periods of time that the user was +// sedentary (i.e. not moving while wearing the device). +message SedentaryPeriod { + // Required. Observed interval. + ObservationTimeInterval interval = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Represents the result of the rollup of the user's sedentary periods. +message SedentaryPeriodRollupValue { + // The total time user spent sedentary during the interval. + google.protobuf.Duration duration_sum = 1; +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/proto/google/devicesandservices/health/v4/data_points.proto b/java-health/proto-google-cloud-health-v4/src/main/proto/google/devicesandservices/health/v4/data_points.proto new file mode 100644 index 000000000000..b6f1e69cdb2c --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/proto/google/devicesandservices/health/v4/data_points.proto @@ -0,0 +1,1143 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.devicesandservices.health.v4; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/devicesandservices/health/v4/data_coordinates.proto"; +import "google/devicesandservices/health/v4/data_model.proto"; +import "google/devicesandservices/health/v4/data_source.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; +import "google/type/interval.proto"; + +option csharp_namespace = "Google.DevicesAndServices.Health.V4"; +option go_package = "google.golang.org/genproto/googleapis/devicesandservices/health/apiv4main;healthpb"; +option java_multiple_files = true; +option java_outer_classname = "DataPointsProto"; +option java_package = "com.google.devicesandservices.health.v4"; +option php_namespace = "Google\\DevicesAndServices\\Health\\V4"; +option ruby_package = "Google::DevicesAndServices::Health::V4"; + +// Data Points Service exposing the user's health and fitness measured and +// derived data. +service DataPointsService { + option (google.api.default_host) = "health.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly," + "https://www.googleapis.com/auth/googlehealth.health_metrics_and_measurements.readonly," + "https://www.googleapis.com/auth/googlehealth.location.readonly," + "https://www.googleapis.com/auth/googlehealth.sleep.readonly"; + + // Get a single identifyable data point. + rpc GetDataPoint(GetDataPointRequest) returns (DataPoint) { + option (google.api.http) = { + get: "/v4/{name=users/*/dataTypes/*/dataPoints/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Query user health and fitness data points. + rpc ListDataPoints(ListDataPointsRequest) returns (ListDataPointsResponse) { + option (google.api.http) = { + get: "/v4/{parent=users/*/dataTypes/*}/dataPoints" + }; + option (google.api.method_signature) = "parent"; + } + + // Creates a single identifiable data point. + rpc CreateDataPoint(CreateDataPointRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v4/{parent=users/*/dataTypes/*}/dataPoints" + body: "data_point" + }; + option (google.api.method_signature) = "parent,data_point"; + option (google.longrunning.operation_info) = { + response_type: "DataPoint" + metadata_type: "CreateDataPointOperationMetadata" + }; + } + + // Updates a single identifiable data point. If a data point with the + // specified `name` is not found, the request will fail. + rpc UpdateDataPoint(UpdateDataPointRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v4/{data_point.name=users/*/dataTypes/*/dataPoints/*}" + body: "data_point" + }; + option (google.api.method_signature) = "data_point"; + option (google.longrunning.operation_info) = { + response_type: "DataPoint" + metadata_type: "UpdateDataPointOperationMetadata" + }; + } + + // Delete a batch of identifyable data points. + rpc BatchDeleteDataPoints(BatchDeleteDataPointsRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v4/{parent=users/*/dataTypes/*}/dataPoints:batchDelete" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "BatchDeleteDataPointsResponse" + metadata_type: "BatchDeleteDataPointsOperationMetadata" + }; + } + + // Reconcile data points from multiple data sources into a single data stream. + rpc ReconcileDataPoints(ReconcileDataPointsRequest) + returns (ReconcileDataPointsResponse) { + option (google.api.http) = { + get: "/v4/{parent=users/*/dataTypes/*}/dataPoints:reconcile" + }; + } + + // Roll up data points over physical time intervals for supported data types. + rpc RollUpDataPoints(RollUpDataPointsRequest) + returns (RollUpDataPointsResponse) { + option (google.api.http) = { + post: "/v4/{parent=users/*/dataTypes/*}/dataPoints:rollUp" + body: "*" + }; + } + + // Roll up data points over civil time intervals for supported data types. + rpc DailyRollUpDataPoints(DailyRollUpDataPointsRequest) + returns (DailyRollUpDataPointsResponse) { + option (google.api.http) = { + post: "/v4/{parent=users/*/dataTypes/*}/dataPoints:dailyRollUp" + body: "*" + }; + } + + // Exports exercise data in TCX format. + // + // + // Note: While the Authorization section below states that any one of the + // listed scopes is accepted, this specific method requires the user to + // provide both one of the `activity_and_fitness` scopes (`normal` or + // `readonly`) AND one of the `location` scopes (`normal` or `readonly`) in + // their access token to succeed. + rpc ExportExerciseTcx(ExportExerciseTcxRequest) + returns (ExportExerciseTcxResponse) { + option (google.api.http) = { + get: "/v4/{name=users/*/dataTypes/*/dataPoints/*}:exportExerciseTcx" + }; + option (google.api.method_signature) = "name"; + } +} + +// A computed or recorded metric. +message DataPoint { + option (google.api.resource) = { + type: "health.googleapis.com/DataPoint" + pattern: "users/{user}/dataTypes/{data_type}/dataPoints/{data_point}" + plural: "dataPoints" + singular: "dataPoint" + }; + + // Data type component in the name field will always correspond to the data + // field set. + // These messages represent the data payload for each data type and are + // embedded within the `DataPoint` resource. They are not standalone resources + // themselves. + oneof data { + // Optional. Data for points in the `steps` interval data type collection. + Steps steps = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Data for points in the `floors` interval data type collection. + Floors floors = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Data for points in the `heart-rate` sample data type + // collection. + HeartRate heart_rate = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Data for points in the `sleep` session data type collection. + Sleep sleep = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Data for points in the `daily-resting-heart-rate` daily data + // type collection. + DailyRestingHeartRate daily_resting_heart_rate = 9 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Data for points in the `daily-heart-rate-variability` daily + // data type collection. + DailyHeartRateVariability daily_heart_rate_variability = 10 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Data for points in the `exercise` session data type collection. + Exercise exercise = 11 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Data for points in the `weight` sample data type collection. + Weight weight = 12 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Data for points in the `altitude` interval data type + // collection. + Altitude altitude = 13 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Data for points in the `distance` interval data type + // collection. + Distance distance = 14 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Data for points in the `body-fat` sample data type collection. + BodyFat body_fat = 15 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Data for points in the `active-zone-minutes` interval data type + // collection, measured in minutes. + ActiveZoneMinutes active_zone_minutes = 17 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Data for points in the `heart-rate-variability` sample data + // type collection. + HeartRateVariability heart_rate_variability = 19 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Data for points in the `daily-sleep-temperature-derivations` + // daily data type collection. + DailySleepTemperatureDerivations daily_sleep_temperature_derivations = 20 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Data for points in the `sedentary-period` interval data type + // collection. + SedentaryPeriod sedentary_period = 21 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Data for points in the `run-vo2-max` sample data type + // collection. + RunVO2Max run_vo2_max = 22 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Data for points in the `oxygen-saturation` sample data type + // collection. + OxygenSaturation oxygen_saturation = 24 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Data for points in the `daily-oxygen-saturation` daily data + // type collection. + DailyOxygenSaturation daily_oxygen_saturation = 25 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Data for points in the `activity-level` daily data type + // collection. + ActivityLevel activity_level = 26 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Data for points in the `vo2-max` sample data type collection. + VO2Max vo2_max = 27 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Data for points in the `daily-vo2-max` daily data type + // collection. + DailyVO2Max daily_vo2_max = 28 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Data for points in the `daily-heart-rate-zones` daily data type + // collection. + DailyHeartRateZones daily_heart_rate_zones = 32 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Data for points in the `hydration-log` session data type + // collection. + HydrationLog hydration_log = 33 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Data for points in the `time-in-heart-rate-zone` interval data + // type collection. + TimeInHeartRateZone time_in_heart_rate_zone = 35 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Data for points in the `active-minutes` interval data type + // collection. + ActiveMinutes active_minutes = 36 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Data for points in the `respiratory-rate-sleep-summary` sample + // data type collection. + RespiratoryRateSleepSummary respiratory_rate_sleep_summary = 37 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Data for points in the `daily-respiratory-rate` daily data type + // collection. + DailyRespiratoryRate daily_respiratory_rate = 38 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Data for points in the `swim-lengths-data` interval data type + // collection. + SwimLengthsData swim_lengths_data = 39 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Data for points in the `height` sample data type collection. + Height height = 40 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Data for points in the `basal-energy-burned` interval data type + // collection. + BasalEnergyBurned basal_energy_burned = 41 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Identifier. Data point name, only supported for the subset of identifiable + // data types. For the majority of the data types, individual data points do + // not need to be identified and this field would be empty. + // + // Format: `users/{user}/dataTypes/{data_type}/dataPoints/{data_point}` + // + // Example: + // `users/abcd1234/dataTypes/sleep/dataPoints/a1b2c3d4-e5f6-7890-1234-567890abcdef` + // + // The `{user}` ID is a system-generated identifier, as described in + // [Identity.health_user_id][google.devicesandservices.health.v4.Identity.health_user_id]. + // + // The `{data_type}` ID corresponds to the kebab-case version of the field + // names in the [DataPoint + // data][google.devicesandservices.health.v4.DataPoint] union + // field, e.g. `total-calories` for the `total_calories` field. + // + // The `{data_point}` ID can be client-provided or system-generated. + // If client-provided, it must be a string of 4-63 characters, + // containing only lowercase letters, numbers, and hyphens. + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Optional. Data source information for the metric + DataSource data_source = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// A reconciled computed or recorded metric. +message ReconciledDataPoint { + // Data type component in the name field will always correspond to the data + // field set. + // These messages represent the data payload for each data type and are + // embedded within the `DataPoint` resource. They are not standalone resources + // themselves. + oneof data { + // Data for points in the `steps` interval data type collection. + Steps steps = 4; + + // Data for points in the `floors` interval data type collection. + Floors floors = 5; + + // Data for points in the `heart-rate` sample data type collection. + HeartRate heart_rate = 6; + + // Data for points in the `sleep` session data type collection. + Sleep sleep = 8; + + // Data for points in the `daily-resting-heart-rate` daily data type + // collection. + DailyRestingHeartRate daily_resting_heart_rate = 9; + + // Data for points in the `daily-heart-rate-variability` daily data type + // collection. + DailyHeartRateVariability daily_heart_rate_variability = 10; + + // Data for points in the `exercise` session data type collection. + Exercise exercise = 11; + + // Data for points in the `weight` sample data type collection. + Weight weight = 12; + + // Data for points in the `altitude` interval data type collection. + Altitude altitude = 13; + + // Data for points in the `distance` interval data type collection. + Distance distance = 14; + + // Data for points in the `body-fat` sample data type collection. + BodyFat body_fat = 15; + + // Data for points in the `active-zone-minutes` interval data type + // collection, measured in minutes. + ActiveZoneMinutes active_zone_minutes = 17; + + // Data for points in the `heart-rate-variability` sample data type + // collection. + HeartRateVariability heart_rate_variability = 19; + + // Data for points in the `daily-sleep-temperature-derivations` daily data + // type collection. + DailySleepTemperatureDerivations daily_sleep_temperature_derivations = 20; + + // Data for points in the `sedentary-period` interval data type collection. + SedentaryPeriod sedentary_period = 21; + + // Data for points in the `run-vo2-max` sample data type collection. + RunVO2Max run_vo2_max = 22; + + // Data for points in the `oxygen-saturation` sample data type collection. + OxygenSaturation oxygen_saturation = 24; + + // Data for points in the `daily-oxygen-saturation` daily data type + // collection. + DailyOxygenSaturation daily_oxygen_saturation = 25; + + // Data for points in the `activity-level` daily data type collection. + ActivityLevel activity_level = 26; + + // Data for points in the `vo2-max` sample data type collection. + VO2Max vo2_max = 27; + + // Data for points in the `daily-vo2-max` daily data type collection. + DailyVO2Max daily_vo2_max = 28; + + // Data for points in the `daily-heart-rate-zones` daily data type + // collection. + DailyHeartRateZones daily_heart_rate_zones = 32; + + // Data for points in the `hydration-log` session data type collection. + HydrationLog hydration_log = 33; + + // Data for points in the `time-in-heart-rate-zone` interval data type + // collection. + TimeInHeartRateZone time_in_heart_rate_zone = 35; + + // Data for points in the `active-minutes` interval data type collection. + ActiveMinutes active_minutes = 36; + + // Data for points in the `respiratory-rate-sleep-summary` sample data type + // collection. + RespiratoryRateSleepSummary respiratory_rate_sleep_summary = 37; + + // Data for points in the `daily-respiratory-rate` daily data type + // collection. + DailyRespiratoryRate daily_respiratory_rate = 38; + + // Data for points in the `swim-lengths-data` interval data type collection. + SwimLengthsData swim_lengths_data = 39; + + // Data for points in the `height` sample data type collection. + Height height = 40; + + // Data for points in the `basal-energy-burned` interval data type + // collection. + BasalEnergyBurned basal_energy_burned = 41; + } + + // Identifier. Data point name, only supported for the subset of identifiable + // data types. For the majority of the data types, individual data points do + // not need to be identified and this field would be empty. + // + // Format: `users/{user}/dataTypes/{data_type}/dataPoints/{data_point}` + // + // Example: + // `users/abcd1234/dataTypes/sleep/dataPoints/a1b2c3d4-e5f6-7890-1234-567890abcdef` + // + // The `{user}` ID is a system-generated identifier, as described in + // [Identity.health_user_id][google.devicesandservices.health.v4.Identity.health_user_id]. + // + // The `{data_type}` ID corresponds to the kebab-case version of the field + // names in the [DataPoint + // data][google.devicesandservices.health.v4.DataPoint] union + // field, e.g. `total-calories` for the `total_calories` field. + // + // The `{data_point}` ID can be client-provided or system-generated. + // If client-provided, it must be a string of 4-63 characters, + // containing only lowercase letters, numbers, and hyphens. + string data_point_name = 1 [(google.api.field_behavior) = IDENTIFIER]; +} + +// Value of a rollup for a single physical time interval (aggregation window) +message RollupDataPoint { + // Outcome of a rollup of the requested data type. + // + // `{DataType}RollupValue` messages for each data type contain aggregated + // values for all supported fields. + // + // The field names usually follow the format + // `{original_field_name}_{aggregation_function}`. For example: + // `confidence_min`, `confidence_sum`. + // + // If there were no data points in this interval, the value will not be set. + // These messages represent the aggregated data payload for each data type + // and are embedded within the `RollupDataPoint`. They are not standalone + // resources themselves. + oneof value { + // Returned by default when rolling up data points from the `steps` data + // type, or when requested explicitly using the `steps` rollup type + // identifier. + StepsRollupValue steps = 5; + + // Returned by default when rolling up data points from the `floors` data + // type, or when requested explicitly using the `floors` rollup type + // identifier. + FloorsRollupValue floors = 6; + + // Returned by default when rolling up data points from the `heart-rate` + // data type, or when requested explicitly using the `heart-rate` rollup + // type identifier. + HeartRateRollupValue heart_rate = 7; + + // Returned by default when rolling up data points from the `weight` data + // type, or when requested explicitly using the `weight` rollup type + // identifier. + WeightRollupValue weight = 8; + + // Returned by default when rolling up data points from the `altitude` data + // type, or when requested explicitly using the `altitude` rollup type + // identifier. + AltitudeRollupValue altitude = 9; + + // Returned by default when rolling up data points from the `distance` data + // type, or when requested explicitly using the `distance` rollup type + // identifier. + DistanceRollupValue distance = 10; + + // Returned by default when rolling up data points from the `body-fat` data + // type, or when requested explicitly using the `body-fat` rollup type + // identifier. + BodyFatRollupValue body_fat = 11; + + // Returned by default when rolling up data points from the `total-calories` + // data type, or when requested explicitly using the `total-calories` + // rollup type identifier. + TotalCaloriesRollupValue total_calories = 12; + + // Returned by default when rolling up data points from the + // `active-zone-minutes` data type, or when requested explicitly using the + // `active-zone-minutes` rollup type identifier. + ActiveZoneMinutesRollupValue active_zone_minutes = 13; + + // Returned by default when rolling up data points from the + // `sedentary-period` data type, or when requested explicitly using the + // `sedentary-period` rollup type identifier. + SedentaryPeriodRollupValue sedentary_period = 15; + + // Returned by default when rolling up data points from the + // `run-vo2-max` data type, or when requested explicitly using the + // `run-vo2-max` rollup type identifier. + RunVO2MaxRollupValue run_vo2_max = 16; + + // Returned by default when rolling up data points from the + // `calories-in-heart-rate-zone` data type, or when requested explicitly + // using the `calories-in-heart-rate-zone` rollup type identifier. + CaloriesInHeartRateZoneRollupValue calories_in_heart_rate_zone = 17; + + // Returned by default when rolling up data points from the + // `activity-level` data type, or when requested explicitly using the + // `activity-level` rollup type identifier. + ActivityLevelRollupValue activity_level = 18; + + // Returned by default when rolling up data points from the + // `hydration-log` data type, or when requested explicitly using the + // `hydration-log` rollup type identifier. + HydrationLogRollupValue hydration_log = 20; + + // Returned by default when rolling up data points from the + // `time-in-heart-rate-zone` data type, or when requested explicitly using + // the `time-in-heart-rate-zone` rollup type identifier. + TimeInHeartRateZoneRollupValue time_in_heart_rate_zone = 21; + + // Returned by default when rolling up data points from the + // `active-minutes` data type, or when requested explicitly using the + // `active-minutes` rollup type identifier. + ActiveMinutesRollupValue active_minutes = 22; + + // Returned by default when rolling up data points from the + // `swim-lengths-data` data type, or when requested explicitly using the + // `swim-lengths-data` rollup type identifier. + SwimLengthsDataRollupValue swim_lengths_data = 23; + } + + // Start time of the window this value aggregates over + google.protobuf.Timestamp start_time = 1; + + // End time of the window this value aggregates over + google.protobuf.Timestamp end_time = 2; +} + +// Value of a daily rollup for a single civil time interval (aggregation window) +message DailyRollupDataPoint { + // Outcome of a rollup of the requested roll-up type. + // + // `{RollUpType}RollupValue` messages for each data type contain aggregated + // values for all supported fields. + // + // The field names usually follow the format + // `{original_field_name}_{aggregation_function}`. For example: + // `confidence_min`, `confidence_sum`. + // + // If there were no data points in this interval, the value will not be set. + // These messages represent the aggregated data payload for each data type + // and are embedded within the `DailyRollupDataPoint`. They are not standalone + // resources themselves. + oneof value { + // Returned by default when rolling up data points from the `steps` data + // type, or when requested explicitly using the `steps` rollup type + // identifier. + StepsRollupValue steps = 5; + + // Returned by default when rolling up data points from the `floors` data + // type, or when requested explicitly using the `floors` rollup type + // identifier. + FloorsRollupValue floors = 6; + + // Returned by default when rolling up data points from the `heart-rate` + // data type, or when requested explicitly using the `heart-rate` rollup + // type identifier. + HeartRateRollupValue heart_rate = 7; + + // Returned by default when rolling up data points from the + // `daily-resting-heart-rate` data type, or when requested + // explicitly using the `resting-heart-rate-personal-range` rollup type + // identifier. + RestingHeartRatePersonalRangeRollupValue resting_heart_rate_personal_range = + 8; + + // Returned by default when rolling up data points from the + // `daily-heart-rate-variability` data type, or when requested explicitly + // using the `heart-rate-variability-personal-range` rollup type + // identifier. + HeartRateVariabilityPersonalRangeRollupValue + heart_rate_variability_personal_range = 9; + + // Returned by default when rolling up data points from the `weight` data + // type, or when requested explicitly using the `weight` rollup type + // identifier. + WeightRollupValue weight = 10; + + // Returned by default when rolling up data points from the `altitude` data + // type, or when requested explicitly using the `altitude` rollup type + // identifier. + AltitudeRollupValue altitude = 11; + + // Returned by default when rolling up data points from the `distance` data + // type, or when requested explicitly using the `distance` rollup type + // identifier. + DistanceRollupValue distance = 12; + + // Returned by default when rolling up data points from the `body-fat` data + // type, or when requested explicitly using the `body-fat` rollup type + // identifier. + BodyFatRollupValue body_fat = 13; + + // Returned by default when rolling up data points from the `total-calories` + // data type, or when requested explicitly using the `total-calories` + // rollup type identifier. + TotalCaloriesRollupValue total_calories = 14; + + // Returned by default when rolling up data points from the + // `active-zone-minutes` data type, or when requested explicitly using the + // `active-zone-minutes` rollup type identifier. + ActiveZoneMinutesRollupValue active_zone_minutes = 15; + + // Returned by default when rolling up data points from the + // `sedentary-period` data type, or when requested explicitly using the + // `sedentary-period` rollup type identifier. + SedentaryPeriodRollupValue sedentary_period = 17; + + // Returned by default when rolling up data points from the + // `run-vo2-max` data type, or when requested explicitly using the + // `run-vo2-max` rollup type identifier. + RunVO2MaxRollupValue run_vo2_max = 18; + + // Returned by default when rolling up data points from the + // `calories-in-heart-rate-zone` data type, or when requested explicitly + // using the `calories-in-heart-rate-zone` rollup type identifier. + CaloriesInHeartRateZoneRollupValue calories_in_heart_rate_zone = 19; + + // Returned by default when rolling up data points from the + // `activity-level` data type, or when requested explicitly using the + // `activity-level` rollup type identifier. + ActivityLevelRollupValue activity_level = 20; + + // Returned by default when rolling up data points from the + // `hydration-log` data type, or when requested explicitly using the + // `hydration-log` rollup type identifier. + HydrationLogRollupValue hydration_log = 22; + + // Returned by default when rolling up data points from the + // `time-in-heart-rate-zone` data type, or when requested explicitly using + // the `time-in-heart-rate-zone` rollup type identifier. + TimeInHeartRateZoneRollupValue time_in_heart_rate_zone = 23; + + // Returned by default when rolling up data points from the + // `active-minutes` data type, or when requested explicitly using the + // `active-minutes` rollup type identifier. + ActiveMinutesRollupValue active_minutes = 24; + + // Returned by default when rolling up data points from the + // `swim-lengths-data` data type, or when requested explicitly using the + // `swim-lengths-data` rollup type identifier. + SwimLengthsDataRollupValue swim_lengths_data = 25; + } + + // Start time of the window this value aggregates over + CivilDateTime civil_start_time = 1; + + // End time of the window this value aggregates over + CivilDateTime civil_end_time = 2; +} + +// Request for getting a single data point +message GetDataPointRequest { + // Required. The name of the data point to retrieve. + // + // Format: `users/{user}/dataTypes/{data_type}/dataPoints/{data_point}` + // + // See + // [DataPoint.name][google.devicesandservices.health.v4.DataPoint.name] + // for examples and possible values. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "health.googleapis.com/DataPoint" + } + ]; +} + +// Request for listing raw data points +message ListDataPointsRequest { + // Required. Parent data type of the Data Point collection. + // + // Format: `users/me/dataTypes/{data_type}`, e.g.: + // + // - `users/me/dataTypes/steps` + // - `users/me/dataTypes/weight` + // + // For a list of the supported data types see the [DataPoint + // data][google.devicesandservices.health.v4.DataPoint] union + // field. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "health.googleapis.com/DataType" } + ]; + + // Optional. The maximum number of data points to return. + // If unspecified, at most 1440 data points will be returned. + // The maximum page size is 10000; values above that will be truncated + // accordingly. + // For `exercise` and `sleep` the default page size is 25. + // The maximum page size for `exercise` and `sleep` is 25. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The `next_page_token` from a previous request, if any. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filter expression following https://google.aip.dev/160. + // + // A time range (either physical or civil) can be specified. + // + // The supported filter fields are: + // + // + // - Interval start time: + // - Pattern: `{interval_data_type}.interval.start_time` + // - Supported comparison operators: `>=`, `<` + // - Timestamp literal expected in RFC-3339 format + // - Supported logical operators: `AND` + // - Example: + // - `steps.interval.start_time >= "2023-11-24T00:00:00Z" AND + // steps.interval.start_time < "2023-11-25T00:00:00Z"` + // - `distance.interval.start_time >= "2024-08-14T12:34:56Z"` + // + // - Interval civil start time: + // - Pattern: `{interval_data_type}.interval.civil_start_time` + // - Supported comparison operators: `>=`, `<` + // - Date with optional time literal expected in ISO 8601 + // `YYYY-MM-DD[THH:mm:ss]` format + // - Supported logical operators: `AND` + // - Example: + // - `steps.interval.civil_start_time >= "2023-11-24" AND + // steps.interval.civil_start_time < "2023-11-25"` + // - `distance.interval.civil_start_time >= "2024-08-14T12:34:56"` + // + // - Sample observation physical time: + // - Pattern: `{sample_data_type}.sample_time.physical_time` + // - Supported comparison operators: `>=`, `<` + // - Timestamp literal expected in RFC-3339 format + // - Supported logical operators: `AND` + // - Example: + // - `weight.sample_time.physical_time >= "2023-11-24T00:00:00Z" + // AND weight.sample_time.physical_time < "2023-11-25T00:00:00Z"` + // - `weight.sample_time.physical_time >= + // "2024-08-14T12:34:56Z"` + // + // - Sample observation civil time: + // - Pattern: `{sample_data_type}.sample_time.civil_time` + // - Supported comparison operators: `>=`, `<` + // - Date with optional time literal expected in ISO 8601 + // `YYYY-MM-DD[THH:mm:ss]` format + // - Supported logical operators: `AND` + // - Example: + // - `weight.sample_time.civil_time >= "2023-11-24" AND + // weight.sample_time.civil_time < "2023-11-25"` + // - `weight.sample_time.civil_time >= "2024-08-14T12:34:56"` + // + // - Daily summary date: + // - Pattern: `{daily_summary_data_type}.date` + // - Supported comparison operators: `>=`, `<` + // - Date literal expected in ISO 8601 `YYYY-MM-DD` format + // - Supported logical operators: `AND` + // - Example: + // - `daily_resting_heart_rate.date >= "2024-08-14"` + // - `daily_heart_rate_variability.date < "2024-08-15"` + // + // + // - Session civil start time (**Excluding Sleep**): + // - Pattern: `{session_data_type}.interval.civil_start_time` + // - Supported comparison operators: `>=`, `<` + // - Date with optional time literal expected in ISO 8601 + // `YYYY-MM-DD[THH:mm:ss]` format + // - Supported logical operators: `AND` + // - Example: + // - `exercise.interval.civil_start_time >= "2023-11-24" AND + // exercise.interval.civil_start_time < "2023-11-25"` + // - `exercise.interval.civil_start_time >= "2024-08-14T12:34:56"` + // + // - Session end time (**Sleep specific**): + // - Pattern: `sleep.interval.end_time` + // - Supported comparison operators: `>=`, `<` + // - Timestamp literal expected in RFC-3339 format + // - Supported logical operators: `AND`, `OR` + // - Example: + // - `sleep.interval.end_time >= "2023-11-24T00:00:00Z" AND + // sleep.interval.end_time < "2023-11-25T00:00:00Z"` + // + // - Session civil end time (**Sleep specific**): + // - Pattern: `sleep.interval.civil_end_time` + // - Supported comparison operators: `>=`, `<` + // - Date with optional time literal expected in ISO 8601 + // `YYYY-MM-DD[THH:mm:ss]` format + // - Supported logical operators: `AND`, `OR` + // - Example: + // - `sleep.interval.civil_end_time >= "2023-11-24" AND + // sleep.interval.civil_end_time < "2023-11-25"` + // + // + // Data points in the response will be ordered by the interval start time in + // descending order. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response containing raw data points matching the query +message ListDataPointsResponse { + // Data points matching the query + repeated DataPoint data_points = 1; + + // Next page token, empty if the response is complete + string next_page_token = 2; +} + +// Request to create an identifiable data point. +message CreateDataPointRequest { + // Required. The parent resource name where the data point will be created. + // Format: `users/{user}/dataTypes/{data_type}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "health.googleapis.com/DataPoint" + } + ]; + + // Required. The data point to create. + DataPoint data_point = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Metadata for a create data point operation. +message CreateDataPointOperationMetadata {} + +// Request to update an identifiable data point. +message UpdateDataPointRequest { + // Required. The data point to update + // + // The data point's `name` field is used to identify the data point to update. + // + // Format: `users/{user}/dataTypes/{data_type}/dataPoints/{data_point}` + DataPoint data_point = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Metadata for an update data point operation. +message UpdateDataPointOperationMetadata {} + +// Request to delete a batch of identifiable data points. +message BatchDeleteDataPointsRequest { + // Optional. Parent (data type) for the Data Point collection + // Format: `users/me/dataTypes/{data_type}`, e.g.: + // + // - `users/me/dataTypes/steps` + // - `users/me/dataTypes/-` + // + // For a list of the supported data types see the + // [DataPoint + // data][google.devicesandservices.health.v4.DataPoint] union + // field. + // + // Deleting data points across multiple data type collections is supported + // following https://aip.dev/159. + // + // If this is set, the parent of all of the data points specified in `names` + // must match this field. + string parent = 1 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { type: "health.googleapis.com/DataType" } + ]; + + // Required. The names of the DataPoints to delete. + // A maximum of 10000 data points can be deleted in a single request. + repeated string names = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "health.googleapis.com/DataPoint" + } + ]; +} + +// Response containing the list of possibly soft-deleted DataPoints. +message BatchDeleteDataPointsResponse { + // The list of soft-deleted DataPoints, if the data type supports only soft + // deletion. + repeated DataPoint data_points = 1; +} + +// Metadata for a batch delete data points operation. +message BatchDeleteDataPointsOperationMetadata { + // The key in this map is the index of the request in the `requests` field in + // the batch request. + map failed_requests = 1; +} + +// Request to reconcile data points from multiple data sources. +message ReconcileDataPointsRequest { + // Required. Parent data type of the Data Point collection. + // + // Format: `users/me/dataTypes/{data_type}`, e.g.: + // + // - `users/me/dataTypes/steps` + // - `users/me/dataTypes/heart-rate` + // + // For a list of the supported data types see the + // [DataPoint + // data][google.devicesandservices.health.v4.DataPoint] union + // field. + string parent = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The maximum number of data points to return. + // If unspecified, at most 1440 data points will be returned. + // The maximum page size is 10000; values above that will be truncated + // accordingly. + // For `exercise` and `sleep` the default page size is 25. + // The maximum page size for `exercise` and `sleep` is 25. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The `next_page_token` from a previous request, if any. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filter expression based on https://aip.dev/160. + // + // A time range, either physical or civil, can be specified. + // See the + // [ListDataPointsRequest.filter][google.devicesandservices.health.v4.ListDataPointsRequest.filter] + // for the supported fields and syntax. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The data source family name to reconcile. + // + // If empty, data points from all data sources will be reconciled. + // + // Format: `users/me/dataSourceFamilies/{data_source_family}` + // + // The supported values are: + // + // - `users/me/dataSourceFamilies/all-sources` - default value + // - `users/me/dataSourceFamilies/google-wearables` - tracker devices + // - `users/me/dataSourceFamilies/google-sources` - Google first party + // sources + string data_source_family = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response containing the list of reconciled DataPoints. +message ReconcileDataPointsResponse { + // Data points matching the query + repeated ReconciledDataPoint data_points = 1; + + // Next page token, empty if the response is complete + string next_page_token = 2; +} + +// Request to roll up data points by physical time intervals. +message RollUpDataPointsRequest { + // Required. Parent data type of the Data Point collection. + // + // Format: `users/{user}/dataTypes/{data_type}`, e.g.: + // + // - `users/me/dataTypes/steps` + // - `users/me/dataTypes/distance` + // + // For a list of the supported data types see the [RollupDataPoint + // value][google.devicesandservices.health.v4.RollupDataPoint] + // union field. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "health.googleapis.com/DataType" } + ]; + + // Required. Closed-open range of data points that will be rolled up. + // The maximum range for `calories-in-heart-rate-zone`, `heart-rate`, + // `active-minutes` and `total-calories` is 14 days. + // The maximum range for all other data types is 90 days. + google.type.Interval range = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The size of the time window to group data points into before + // applying the aggregation functions. + google.protobuf.Duration window_size = 3 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. The maximum number of data points to return. + // If unspecified, at most 1440 data points will be returned. + // The maximum page size is 10000; values above that will be truncated + // accordingly. + int32 page_size = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The next_page_token from a previous request, if any. + // All other request fields need to be the same as in the initial request + // when the page token is specified. + string page_token = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The data source family name to roll up. + // + // If empty, data points from all available data sources will be rolled up. + // + // Format: `users/me/dataSourceFamilies/{data_source_family}` + // + // The supported values are: + // + // - `users/me/dataSourceFamilies/all-sources` - default value + // - `users/me/dataSourceFamilies/google-wearables` - tracker devices + // - `users/me/dataSourceFamilies/google-sources` - Google first party + // sources + string data_source_family = 7 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response containing the list of rolled up data points. +message RollUpDataPointsResponse { + // Values for each aggregation time window. + repeated RollupDataPoint rollup_data_points = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// Request to roll up data points by civil time intervals. +message DailyRollUpDataPointsRequest { + // Required. Parent data type of the Data Point collection. + // + // Format: `users/{user}/dataTypes/{data_type}`, e.g.: + // + // - `users/me/dataTypes/steps` + // - `users/me/dataTypes/distance` + // + // For a list of the supported data types see the [DailyRollupDataPoint + // value][google.devicesandservices.health.v4.DailyRollupDataPoint] + // union field. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "health.googleapis.com/DataType" } + ]; + + // Required. Closed-open range of data points that will be rolled up. + // The start time must be aligned with the aggregation window. + // The maximum range for `calories-in-heart-rate-zone`, `heart-rate`, + // `active-minutes` and `total-calories` is 14 days. + // The maximum range for all other data types is 90 days. + CivilTimeInterval range = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Aggregation window size, in number of days. Defaults to 1 if not + // specified. + int32 window_size_days = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The maximum number of data points to return. + // If unspecified, at most 1440 data points will be returned. + // The maximum page size is 10000; values above that will be truncated + // accordingly. + int32 page_size = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The `next_page_token` from a previous request, if any. + // All other request fields need to be the same as in the initial request + // when the page token is specified. + string page_token = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The data source family name to roll up. + // If empty, data points from all available data sources will be rolled up. + // + // Format: `users/me/dataSourceFamilies/{data_source_family}` + // + // The supported values are: + // + // - `users/me/dataSourceFamilies/all-sources` - default value + // - `users/me/dataSourceFamilies/google-wearables` - tracker devices + // - `users/me/dataSourceFamilies/google-sources` - Google first party + // sources + string data_source_family = 7 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response containing the list of rolled up data points. +message DailyRollUpDataPointsResponse { + // Values for each aggregation time window. + repeated DailyRollupDataPoint rollup_data_points = 1; +} + +// Represents a type of health data a user can have data points recorded for. +// It matches the parent resource of collection containing data points of the +// given type. +// +// Clients currently do not need to interact with this resource directly. +message DataType { + option (google.api.resource) = { + type: "health.googleapis.com/DataType" + pattern: "users/{user}/dataTypes/{data_type}" + plural: "dataTypes" + singular: "dataType" + }; + + // Identifier. The resource name of the data type. + // + // Format: `users/{user}/dataTypes/{data_type}` + // + // See + // [DataPoint.name][google.devicesandservices.health.v4.DataPoint.name] + // for examples and possible values. + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; +} + +// Represents a request to export exercise data in TCX format. +message ExportExerciseTcxRequest { + // Required. The resource name of the exercise data point to export. + // + // Format: `users/{user}/dataTypes/exercise/dataPoints/{data_point}` + // Example: `users/me/dataTypes/exercise/dataPoints/2026443605080188808` + // + // The `{user}` is the alias `"me"` currently. Future versions may support + // user IDs. + // The `{data_point}` ID maps to the exercise ID, which is a long integer. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "health.googleapis.com/DataPoint" + } + ]; + + // Optional. Indicates whether to include the TCX data points when the GPS + // data is not available. If not specified, defaults to `false` and partial + // data will not be included. + bool partial_data = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Represents a Response for exporting exercise data in TCX format. +message ExportExerciseTcxResponse { + // Contains the exported TCX data. + string tcx_data = 2; +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/proto/google/devicesandservices/health/v4/data_source.proto b/java-health/proto-google-cloud-health-v4/src/main/proto/google/devicesandservices/health/v4/data_source.proto new file mode 100644 index 000000000000..64438beb6399 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/proto/google/devicesandservices/health/v4/data_source.proto @@ -0,0 +1,178 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.devicesandservices.health.v4; + +import "google/api/field_behavior.proto"; + +option csharp_namespace = "Google.DevicesAndServices.Health.V4"; +option go_package = "google.golang.org/genproto/googleapis/devicesandservices/health/apiv4main;healthpb"; +option java_multiple_files = true; +option java_outer_classname = "DataSourceProto"; +option java_package = "com.google.devicesandservices.health.v4"; +option php_namespace = "Google\\DevicesAndServices\\Health\\V4"; +option ruby_package = "Google::DevicesAndServices::Health::V4"; + +// 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). +message DataSource { + // Captures metadata about the device that recorded the measurement. + message Device { + // Form factor of the device, e.g. phone, watch, band, etc. + enum FormFactor { + // The form factor is unspecified. + FORM_FACTOR_UNSPECIFIED = 0; + + // The device is a fitness band. + FITNESS_BAND = 1; + + // The device is a watch. + WATCH = 2; + + // The device is a phone. + PHONE = 3; + + // The device is a ring. + RING = 4; + + // The device is a chest strap. + CHEST_STRAP = 5; + + // The device is a scale. + SCALE = 6; + + // The device is a tablet. + TABLET = 7; + + // The device is a head mounted device. + HEAD_MOUNTED = 8; + + // The device is a smart display. + SMART_DISPLAY = 9; + } + + // Optional. Captures the form factor of the device. + FormFactor form_factor = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. An optional manufacturer of the device. + string manufacturer = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. An optional name for the device. + string display_name = 3 [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional metadata for the application that provided this data. + message Application { + // Output only. A unique identifier for the mobile application + // that was the source of the data. + // + // This is typically the application's package name on Android (e.g., + // `com.google.fitbit`) or the bundle ID on iOS. This field is informational + // and helps trace data origin. This field is system-populated when the data + // is uploaded from the Fitbit mobile application, Health Connect or Health + // Kit. + string package_name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The client ID of the application that recorded the data. + // + // This ID is a legacy Fitbit API client ID, which is different from a + // Google OAuth client ID. Example format: `ABC123`. + // This field is system-populated and used for tracing data from + // legacy Fitbit API integrations. This field is system-populated when + // the data is uploaded from a legacy Fitbit API integration. + string web_client_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The Google OAuth 2.0 client ID of the web application or + // service that recorded the data. + // + // This is the client ID used during the Google OAuth + // flow to obtain user credentials. This field is system-populated when + // the data is uploaded from Google Web API. + string google_web_client_id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // The method by which the data was recorded. + enum RecordingMethod { + // The recording method is unspecified. + RECORDING_METHOD_UNSPECIFIED = 0; + + // The data was manually entered by the user. + MANUAL = 1; + + // The data was passively measured by a device. + PASSIVELY_MEASURED = 2; + + // The data was derived from other data, e.g., by an algorithm in the + // backend. + DERIVED = 3; + + // The data was actively measured by a device. + ACTIVELY_MEASURED = 4; + + // The recording method is unknown. This is set when the data is uploaded + // from a third party app that does not provide this information. + UNKNOWN = 5; + } + + // The platform that uploaded the data. + // Additional values may be added in the future. Clients should be prepared to + // handle unknown values gracefully. + enum Platform { + // The platform is unspecified. + PLATFORM_UNSPECIFIED = 0; + + // The data was uploaded from Fitbit. + FITBIT = 1; + + // The data was uploaded from Health Connect. + HEALTH_CONNECT = 2; + + // The data was uploaded from Health Kit. + HEALTH_KIT = 3; + + // The data was uploaded from Google Fit. + FIT = 4; + + // The data was uploaded from Fitbit legacy Web API. + FITBIT_WEB_API = 5; + + // The data was uploaded from Nest devices. + NEST = 6; + + // The data was uploaded from Google Health API. + GOOGLE_WEB_API = 7; + + // The data was uploaded from Google Partner Integrations. + GOOGLE_PARTNER_INTEGRATION = 8; + } + + // Optional. Captures how the data was recorded. + RecordingMethod recording_method = 1 [(google.api.field_behavior) = OPTIONAL]; + + // 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. + Device device = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Captures metadata for the application that provided this data. + Application application = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Captures the platform that uploaded the data. + Platform platform = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/proto/google/devicesandservices/health/v4/health_profile.proto b/java-health/proto-google-cloud-health-v4/src/main/proto/google/devicesandservices/health/v4/health_profile.proto new file mode 100644 index 000000000000..88233db84441 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/proto/google/devicesandservices/health/v4/health_profile.proto @@ -0,0 +1,438 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.devicesandservices.health.v4; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/field_mask.proto"; +import "google/type/date.proto"; + +option csharp_namespace = "Google.DevicesAndServices.Health.V4"; +option go_package = "google.golang.org/genproto/googleapis/devicesandservices/health/apiv4main;healthpb"; +option java_multiple_files = true; +option java_outer_classname = "HealthProfileProto"; +option java_package = "com.google.devicesandservices.health.v4"; +option php_namespace = "Google\\DevicesAndServices\\Health\\V4"; +option ruby_package = "Google::DevicesAndServices::Health::V4"; + +// Health Profile Service +service HealthProfileService { + option (google.api.default_host) = "health.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly," + "https://www.googleapis.com/auth/googlehealth.health_metrics_and_measurements.readonly," + "https://www.googleapis.com/auth/googlehealth.profile.readonly," + "https://www.googleapis.com/auth/googlehealth.settings.readonly," + "https://www.googleapis.com/auth/googlehealth.sleep.readonly"; + + // Returns user Profile details. + rpc GetProfile(GetProfileRequest) returns (Profile) { + option (google.api.http) = { + get: "/v4/{name=users/*/profile}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates the user's profile details. + rpc UpdateProfile(UpdateProfileRequest) returns (Profile) { + option (google.api.http) = { + patch: "/v4/{profile.name=users/*/profile}" + body: "profile" + }; + option (google.api.method_signature) = "profile,update_mask"; + } + + // Returns user settings details. + rpc GetSettings(GetSettingsRequest) returns (Settings) { + option (google.api.http) = { + get: "/v4/{name=users/*/settings}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates the user's settings details. + rpc UpdateSettings(UpdateSettingsRequest) returns (Settings) { + option (google.api.http) = { + patch: "/v4/{settings.name=users/*/settings}" + body: "settings" + }; + option (google.api.method_signature) = "settings,update_mask"; + } + + // Gets the user's identity. + // + // It includes the legacy Fitbit user ID and the Google user ID and it can be + // used by migrating clients to map identifiers between the two systems. + rpc GetIdentity(GetIdentityRequest) returns (Identity) { + option (google.api.http) = { + get: "/v4/{name=users/*/identity}" + }; + option (google.api.method_signature) = "name"; + } +} + +// Profile details. +message Profile { + option (google.api.resource) = { + type: "health.googleapis.com/Profile" + pattern: "users/{user}/profile" + plural: "profiles" + singular: "profile" + }; + + // Identifier. The resource name of this Profile resource. + // + // Format: `users/{user}/profile` + // Example: `users/1234567890/profile` or `users/me/profile` + // The {user} ID is a system-generated Google Health API user ID, a string of + // 1-63 characters consisting of lowercase and uppercase letters, numbers, and + // hyphens. The literal `me` can also be used to refer to the authenticated + // user. + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Optional. The age in years based on the user's birth date. + // + // Updates to this field are currently not supported. + int32 age = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The date the user created their account. + // + // Updates to this field are currently not supported. + google.type.Date membership_start_date = 9 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The user's user configured walking stride length, in millimeters. + // + // The user must consent to + // one of the following access scopes to access this field: + // + // - + // `https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly` + // - `https://www.googleapis.com/auth/googlehealth.activity_and_fitness` + optional int32 user_configured_walking_stride_length_mm = 13 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The user's user configured running stride length, in millimeters. + // + // The user must consent to + // one of the following access scopes to access this field: + // + // - + // `https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly` + // - `https://www.googleapis.com/auth/googlehealth.activity_and_fitness` + optional int32 user_configured_running_stride_length_mm = 14 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The automatically calculated walking stride length, in + // millimeters. + // + // The user must consent to + // one of the following access scopes to access this field: + // + // - + // `https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly` + // - `https://www.googleapis.com/auth/googlehealth.activity_and_fitness` + optional int32 auto_walking_stride_length_mm = 15 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The automatically calculated running stride length, in + // millimeters. + // + // The user must consent to + // one of the following access scopes to access this field: + // + // - + // `https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly` + // - `https://www.googleapis.com/auth/googlehealth.activity_and_fitness` + optional int32 auto_running_stride_length_mm = 16 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Settings details. +message Settings { + option (google.api.resource) = { + type: "health.googleapis.com/Settings" + pattern: "users/{user}/settings" + plural: "settings" + singular: "settings" + }; + + // The measurement unit defined in the user's account settings. + enum DistanceUnit { + // Distance unit is not specified. + DISTANCE_UNIT_UNSPECIFIED = 0; + + // Distance unit is miles. + DISTANCE_UNIT_MILES = 1; + + // Distance unit is kilometers. + DISTANCE_UNIT_KILOMETERS = 2; + } + + // The measurement unit defined in the user's account settings. + enum GlucoseUnit { + // Glucose unit is not specified. + GLUCOSE_UNIT_UNSPECIFIED = 0; + + // Glucose unit is mg/dL. + GLUCOSE_UNIT_MG_DL = 1; + + // Glucose unit is mmol/l. + GLUCOSE_UNIT_MMOL_L = 2; + } + + // The measurement unit defined in the user's account settings. + enum HeightUnit { + // Height unit is not specified. + HEIGHT_UNIT_UNSPECIFIED = 0; + + // Height unit is inches. + HEIGHT_UNIT_INCHES = 1; + + // Height unit is cm. + HEIGHT_UNIT_CENTIMETERS = 2; + } + + // The stride length type defined in the user's account settings. Specifies if + // the user's stride length is determined automatically (default) or manually + // as defined in the user's account settings. + enum StrideLengthType { + // Stride length type is not specified. + STRIDE_LENGTH_TYPE_UNSPECIFIED = 0; + + // Stride length type is computed based on the user's gender and height. + STRIDE_LENGTH_TYPE_DEFAULT = 1; + + // Stride length type is manually set by the user. + STRIDE_LENGTH_TYPE_MANUAL = 2; + + // Stride length type is determined automatically. + STRIDE_LENGTH_TYPE_AUTO = 3; + } + + // The swim unit defined in the user's account settings. + enum SwimUnit { + // Swim unit is not specified. + SWIM_UNIT_UNSPECIFIED = 0; + + // Swim unit is meters. + SWIM_UNIT_METERS = 1; + + // Swim unit is yards. + SWIM_UNIT_YARDS = 2; + } + + // The measurement unit defined in the user's account settings. + enum TemperatureUnit { + // Temperature unit is not specified. + TEMPERATURE_UNIT_UNSPECIFIED = 0; + + // Temperature unit is Celsius. + TEMPERATURE_UNIT_CELSIUS = 1; + + // Temperature unit is Fahrenheit. + TEMPERATURE_UNIT_FAHRENHEIT = 2; + } + + // The measurement unit defined in the user's account settings. + enum WeightUnit { + // Weight unit is not specified. + WEIGHT_UNIT_UNSPECIFIED = 0; + + // Weight unit is pounds. + WEIGHT_UNIT_POUNDS = 1; + + // Weight unit is stones. + WEIGHT_UNIT_STONE = 2; + + // Weight unit is kilograms. + WEIGHT_UNIT_KILOGRAMS = 3; + } + + // The water measurement unit defined in the user's account settings. + enum WaterUnit { + // Water unit is not specified. + WATER_UNIT_UNSPECIFIED = 0; + + // Water unit is milliliters. + WATER_UNIT_ML = 1; + + // Water unit is fluid ounces. + WATER_UNIT_FL_OZ = 2; + + // Water unit is cups. + WATER_UNIT_CUP = 3; + } + + // Identifier. The resource name of this Settings resource. + // + // Format: `users/{user}/settings` + // Example: `users/1234567890/settings` or `users/me/settings` + // The {user} ID is a system-generated Google Health API user ID, a string of + // 1-63 characters consisting of lowercase and uppercase letters, numbers, and + // hyphens. The literal `me` can also be used to refer to the authenticated + // user. + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Optional. True if the user's stride length is determined automatically. + // + // Updates to this field are currently not supported. + bool auto_stride_enabled = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The measurement unit defined in the user's account settings. + // + // Updates to this field are currently not supported. + DistanceUnit distance_unit = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The measurement unit defined in the user's account settings. + GlucoseUnit glucose_unit = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The measurement unit defined in the user's account settings. + HeightUnit height_unit = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The locale defined in the user's account settings. + // + // Updates to this field are currently not supported. + string language_locale = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The user's timezone offset relative to UTC. + // + // Updates to this field are currently not supported. + google.protobuf.Duration utc_offset = 10 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The stride length type defined in the user's account settings for + // walking. + // + // Updates to this field are currently not supported. + StrideLengthType stride_length_walking_type = 13 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The stride length type defined in the user's account settings for + // running. + // + // Updates to this field are currently not supported. + StrideLengthType stride_length_running_type = 14 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The measurement unit defined in the user's account settings. + SwimUnit swim_unit = 15 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The measurement unit defined in the user's account settings. + TemperatureUnit temperature_unit = 16 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The timezone defined in the user's account settings. This follows + // the IANA [Time Zone Database](https://www.iana.org/time-zones). + // + // Updates to this field are currently not supported. + string time_zone = 17 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The measurement unit defined in the user's account settings. + WeightUnit weight_unit = 18 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The measurement unit defined in the user's account settings. + WaterUnit water_unit = 19 [(google.api.field_behavior) = OPTIONAL]; +} + +// Represents details about the Google user's identity. +message Identity { + option (google.api.resource) = { + type: "health.googleapis.com/Identity" + pattern: "users/{user}/identity" + plural: "identities" + singular: "identity" + }; + + // Identifier. The resource name of this Identity resource. + // Format: `users/me/identity` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. The legacy Fitbit User identifier. This is the Fitbit ID used + // in the legacy Fitbit APIs (v1-v3). It can be referenced by clients + // migrating from the legacy Fitbit APIs to map their existing identifiers to + // the new Google user ID. + // + // It **must not** be used for any other purpose. It is not of any use for new + // clients using only the Google Health APIs. + // + // Valid values are strings of 1-63 characters, and valid characters are + // lowercase and uppercase letters, numbers, and hyphens. + string legacy_user_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The Google User Identifier in the Google Health APIs. It + // matches the + // `{user}` resource ID segment in the resource name paths, e.g. + // `users/{user}/dataTypes/steps`. + // + // Valid values are strings of 1-63 characters, and valid characters are + // lowercase and uppercase letters, numbers, and hyphens. + string health_user_id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Request message for getting Profile details. +message GetProfileRequest { + // Required. The name of the Profile. + // Format: `users/me/profile`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "health.googleapis.com/Profile" } + ]; +} + +// Request message for updating Profile details. +message UpdateProfileRequest { + // Required. Profile details. + Profile profile = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The list of fields to be updated. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for getting Settings details. +message GetSettingsRequest { + // Required. The name of the Settings. + // Format: `users/me/settings`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "health.googleapis.com/Settings" } + ]; +} + +// Request message for updating Settings details. +message UpdateSettingsRequest { + // Required. Settings details + Settings settings = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The list of fields to be updated. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for getting Identity details. +message GetIdentityRequest { + // Required. The resource name of the Identity. + // Format: `users/me/identity` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "health.googleapis.com/Identity" } + ]; +} diff --git a/java-health/proto-google-cloud-health-v4/src/main/proto/google/devicesandservices/health/v4/webhook_notification_cloud_log.proto b/java-health/proto-google-cloud-health-v4/src/main/proto/google/devicesandservices/health/v4/webhook_notification_cloud_log.proto new file mode 100644 index 000000000000..dcb2f44ff5c0 --- /dev/null +++ b/java-health/proto-google-cloud-health-v4/src/main/proto/google/devicesandservices/health/v4/webhook_notification_cloud_log.proto @@ -0,0 +1,37 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.devicesandservices.health.v4; + +import "google/api/field_behavior.proto"; +import "google/rpc/http.proto"; + +option csharp_namespace = "Google.DevicesAndServices.Health.V4"; +option go_package = "google.golang.org/genproto/googleapis/devicesandservices/health/apiv4main;healthpb"; +option java_multiple_files = true; +option java_outer_classname = "WebhookNotificationCloudLogProto"; +option java_package = "com.google.devicesandservices.health.v4"; +option php_namespace = "Google\\DevicesAndServices\\Health\\V4"; +option ruby_package = "Google::DevicesAndServices::Health::V4"; + +// Log message for a webhook notification sent by the Google Health API to a +// subscriber's endpoint. Includes the HTTP response received from the endpoint. +message WebhookNotificationCloudLog { + // Required. Represents the HTTP response. + // This message includes the status code, reason phrase, headers, and body. + google.rpc.HttpResponse http_response = 1 + [(google.api.field_behavior) = REQUIRED]; +} diff --git a/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/batchdeletedatapoints/AsyncBatchDeleteDataPoints.java b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/batchdeletedatapoints/AsyncBatchDeleteDataPoints.java new file mode 100644 index 000000000000..663dea91d803 --- /dev/null +++ b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/batchdeletedatapoints/AsyncBatchDeleteDataPoints.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4.samples; + +// [START health_v4_generated_DataPointsService_BatchDeleteDataPoints_async] +import com.google.api.core.ApiFuture; +import com.google.devicesandservices.health.v4.BatchDeleteDataPointsRequest; +import com.google.devicesandservices.health.v4.DataPointsServiceClient; +import com.google.devicesandservices.health.v4.DataTypeName; +import com.google.longrunning.Operation; +import java.util.ArrayList; + +public class AsyncBatchDeleteDataPoints { + + public static void main(String[] args) throws Exception { + asyncBatchDeleteDataPoints(); + } + + public static void asyncBatchDeleteDataPoints() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.create()) { + BatchDeleteDataPointsRequest request = + BatchDeleteDataPointsRequest.newBuilder() + .setParent(DataTypeName.of("[USER]", "[DATA_TYPE]").toString()) + .addAllNames(new ArrayList()) + .build(); + ApiFuture future = + dataPointsServiceClient.batchDeleteDataPointsCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END health_v4_generated_DataPointsService_BatchDeleteDataPoints_async] diff --git a/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/batchdeletedatapoints/AsyncBatchDeleteDataPointsLRO.java b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/batchdeletedatapoints/AsyncBatchDeleteDataPointsLRO.java new file mode 100644 index 000000000000..cb97cc4f3ad4 --- /dev/null +++ b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/batchdeletedatapoints/AsyncBatchDeleteDataPointsLRO.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4.samples; + +// [START health_v4_generated_DataPointsService_BatchDeleteDataPoints_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.devicesandservices.health.v4.BatchDeleteDataPointsOperationMetadata; +import com.google.devicesandservices.health.v4.BatchDeleteDataPointsRequest; +import com.google.devicesandservices.health.v4.BatchDeleteDataPointsResponse; +import com.google.devicesandservices.health.v4.DataPointsServiceClient; +import com.google.devicesandservices.health.v4.DataTypeName; +import java.util.ArrayList; + +public class AsyncBatchDeleteDataPointsLRO { + + public static void main(String[] args) throws Exception { + asyncBatchDeleteDataPointsLRO(); + } + + public static void asyncBatchDeleteDataPointsLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.create()) { + BatchDeleteDataPointsRequest request = + BatchDeleteDataPointsRequest.newBuilder() + .setParent(DataTypeName.of("[USER]", "[DATA_TYPE]").toString()) + .addAllNames(new ArrayList()) + .build(); + OperationFuture + future = + dataPointsServiceClient.batchDeleteDataPointsOperationCallable().futureCall(request); + // Do something. + BatchDeleteDataPointsResponse response = future.get(); + } + } +} +// [END health_v4_generated_DataPointsService_BatchDeleteDataPoints_LRO_async] diff --git a/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/batchdeletedatapoints/SyncBatchDeleteDataPoints.java b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/batchdeletedatapoints/SyncBatchDeleteDataPoints.java new file mode 100644 index 000000000000..ab2f5178cc3a --- /dev/null +++ b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/batchdeletedatapoints/SyncBatchDeleteDataPoints.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4.samples; + +// [START health_v4_generated_DataPointsService_BatchDeleteDataPoints_sync] +import com.google.devicesandservices.health.v4.BatchDeleteDataPointsRequest; +import com.google.devicesandservices.health.v4.BatchDeleteDataPointsResponse; +import com.google.devicesandservices.health.v4.DataPointsServiceClient; +import com.google.devicesandservices.health.v4.DataTypeName; +import java.util.ArrayList; + +public class SyncBatchDeleteDataPoints { + + public static void main(String[] args) throws Exception { + syncBatchDeleteDataPoints(); + } + + public static void syncBatchDeleteDataPoints() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.create()) { + BatchDeleteDataPointsRequest request = + BatchDeleteDataPointsRequest.newBuilder() + .setParent(DataTypeName.of("[USER]", "[DATA_TYPE]").toString()) + .addAllNames(new ArrayList()) + .build(); + BatchDeleteDataPointsResponse response = + dataPointsServiceClient.batchDeleteDataPointsAsync(request).get(); + } + } +} +// [END health_v4_generated_DataPointsService_BatchDeleteDataPoints_sync] diff --git a/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/create/SyncCreateSetCredentialsProvider.java b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..35f3f2c520b8 --- /dev/null +++ b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4.samples; + +// [START health_v4_generated_DataPointsService_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.devicesandservices.health.v4.DataPointsServiceClient; +import com.google.devicesandservices.health.v4.DataPointsServiceSettings; +import com.google.devicesandservices.health.v4.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + DataPointsServiceSettings dataPointsServiceSettings = + DataPointsServiceSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + DataPointsServiceClient dataPointsServiceClient = + DataPointsServiceClient.create(dataPointsServiceSettings); + } +} +// [END health_v4_generated_DataPointsService_Create_SetCredentialsProvider_sync] diff --git a/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/create/SyncCreateSetEndpoint.java b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..cc37f9fdec16 --- /dev/null +++ b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4.samples; + +// [START health_v4_generated_DataPointsService_Create_SetEndpoint_sync] +import com.google.devicesandservices.health.v4.DataPointsServiceClient; +import com.google.devicesandservices.health.v4.DataPointsServiceSettings; +import com.google.devicesandservices.health.v4.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + DataPointsServiceSettings dataPointsServiceSettings = + DataPointsServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); + DataPointsServiceClient dataPointsServiceClient = + DataPointsServiceClient.create(dataPointsServiceSettings); + } +} +// [END health_v4_generated_DataPointsService_Create_SetEndpoint_sync] diff --git a/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/create/SyncCreateUseHttpJsonTransport.java b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/create/SyncCreateUseHttpJsonTransport.java new file mode 100644 index 000000000000..3cccf38c9ab7 --- /dev/null +++ b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/create/SyncCreateUseHttpJsonTransport.java @@ -0,0 +1,41 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4.samples; + +// [START health_v4_generated_DataPointsService_Create_UseHttpJsonTransport_sync] +import com.google.devicesandservices.health.v4.DataPointsServiceClient; +import com.google.devicesandservices.health.v4.DataPointsServiceSettings; + +public class SyncCreateUseHttpJsonTransport { + + public static void main(String[] args) throws Exception { + syncCreateUseHttpJsonTransport(); + } + + public static void syncCreateUseHttpJsonTransport() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + DataPointsServiceSettings dataPointsServiceSettings = + DataPointsServiceSettings.newHttpJsonBuilder().build(); + DataPointsServiceClient dataPointsServiceClient = + DataPointsServiceClient.create(dataPointsServiceSettings); + } +} +// [END health_v4_generated_DataPointsService_Create_UseHttpJsonTransport_sync] diff --git a/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/createdatapoint/AsyncCreateDataPoint.java b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/createdatapoint/AsyncCreateDataPoint.java new file mode 100644 index 000000000000..5b81e286fdb0 --- /dev/null +++ b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/createdatapoint/AsyncCreateDataPoint.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4.samples; + +// [START health_v4_generated_DataPointsService_CreateDataPoint_async] +import com.google.api.core.ApiFuture; +import com.google.devicesandservices.health.v4.CreateDataPointRequest; +import com.google.devicesandservices.health.v4.DataPoint; +import com.google.devicesandservices.health.v4.DataPointsServiceClient; +import com.google.devicesandservices.health.v4.DataTypeName; +import com.google.longrunning.Operation; + +public class AsyncCreateDataPoint { + + public static void main(String[] args) throws Exception { + asyncCreateDataPoint(); + } + + public static void asyncCreateDataPoint() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.create()) { + CreateDataPointRequest request = + CreateDataPointRequest.newBuilder() + .setParent(DataTypeName.of("[USER]", "[DATA_TYPE]").toString()) + .setDataPoint(DataPoint.newBuilder().build()) + .build(); + ApiFuture future = + dataPointsServiceClient.createDataPointCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END health_v4_generated_DataPointsService_CreateDataPoint_async] diff --git a/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/createdatapoint/AsyncCreateDataPointLRO.java b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/createdatapoint/AsyncCreateDataPointLRO.java new file mode 100644 index 000000000000..00f984b101dc --- /dev/null +++ b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/createdatapoint/AsyncCreateDataPointLRO.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4.samples; + +// [START health_v4_generated_DataPointsService_CreateDataPoint_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.devicesandservices.health.v4.CreateDataPointOperationMetadata; +import com.google.devicesandservices.health.v4.CreateDataPointRequest; +import com.google.devicesandservices.health.v4.DataPoint; +import com.google.devicesandservices.health.v4.DataPointsServiceClient; +import com.google.devicesandservices.health.v4.DataTypeName; + +public class AsyncCreateDataPointLRO { + + public static void main(String[] args) throws Exception { + asyncCreateDataPointLRO(); + } + + public static void asyncCreateDataPointLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.create()) { + CreateDataPointRequest request = + CreateDataPointRequest.newBuilder() + .setParent(DataTypeName.of("[USER]", "[DATA_TYPE]").toString()) + .setDataPoint(DataPoint.newBuilder().build()) + .build(); + OperationFuture future = + dataPointsServiceClient.createDataPointOperationCallable().futureCall(request); + // Do something. + DataPoint response = future.get(); + } + } +} +// [END health_v4_generated_DataPointsService_CreateDataPoint_LRO_async] diff --git a/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/createdatapoint/SyncCreateDataPoint.java b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/createdatapoint/SyncCreateDataPoint.java new file mode 100644 index 000000000000..e96a099f9497 --- /dev/null +++ b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/createdatapoint/SyncCreateDataPoint.java @@ -0,0 +1,47 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4.samples; + +// [START health_v4_generated_DataPointsService_CreateDataPoint_sync] +import com.google.devicesandservices.health.v4.CreateDataPointRequest; +import com.google.devicesandservices.health.v4.DataPoint; +import com.google.devicesandservices.health.v4.DataPointsServiceClient; +import com.google.devicesandservices.health.v4.DataTypeName; + +public class SyncCreateDataPoint { + + public static void main(String[] args) throws Exception { + syncCreateDataPoint(); + } + + public static void syncCreateDataPoint() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.create()) { + CreateDataPointRequest request = + CreateDataPointRequest.newBuilder() + .setParent(DataTypeName.of("[USER]", "[DATA_TYPE]").toString()) + .setDataPoint(DataPoint.newBuilder().build()) + .build(); + DataPoint response = dataPointsServiceClient.createDataPointAsync(request).get(); + } + } +} +// [END health_v4_generated_DataPointsService_CreateDataPoint_sync] diff --git a/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/createdatapoint/SyncCreateDataPointDatatypenameDatapoint.java b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/createdatapoint/SyncCreateDataPointDatatypenameDatapoint.java new file mode 100644 index 000000000000..ca57a4b69ee1 --- /dev/null +++ b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/createdatapoint/SyncCreateDataPointDatatypenameDatapoint.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4.samples; + +// [START health_v4_generated_DataPointsService_CreateDataPoint_DatatypenameDatapoint_sync] +import com.google.devicesandservices.health.v4.DataPoint; +import com.google.devicesandservices.health.v4.DataPointsServiceClient; +import com.google.devicesandservices.health.v4.DataTypeName; + +public class SyncCreateDataPointDatatypenameDatapoint { + + public static void main(String[] args) throws Exception { + syncCreateDataPointDatatypenameDatapoint(); + } + + public static void syncCreateDataPointDatatypenameDatapoint() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.create()) { + DataTypeName parent = DataTypeName.of("[USER]", "[DATA_TYPE]"); + DataPoint dataPoint = DataPoint.newBuilder().build(); + DataPoint response = dataPointsServiceClient.createDataPointAsync(parent, dataPoint).get(); + } + } +} +// [END health_v4_generated_DataPointsService_CreateDataPoint_DatatypenameDatapoint_sync] diff --git a/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/createdatapoint/SyncCreateDataPointStringDatapoint.java b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/createdatapoint/SyncCreateDataPointStringDatapoint.java new file mode 100644 index 000000000000..e4a98a8e43c2 --- /dev/null +++ b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/createdatapoint/SyncCreateDataPointStringDatapoint.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4.samples; + +// [START health_v4_generated_DataPointsService_CreateDataPoint_StringDatapoint_sync] +import com.google.devicesandservices.health.v4.DataPoint; +import com.google.devicesandservices.health.v4.DataPointsServiceClient; +import com.google.devicesandservices.health.v4.DataTypeName; + +public class SyncCreateDataPointStringDatapoint { + + public static void main(String[] args) throws Exception { + syncCreateDataPointStringDatapoint(); + } + + public static void syncCreateDataPointStringDatapoint() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.create()) { + String parent = DataTypeName.of("[USER]", "[DATA_TYPE]").toString(); + DataPoint dataPoint = DataPoint.newBuilder().build(); + DataPoint response = dataPointsServiceClient.createDataPointAsync(parent, dataPoint).get(); + } + } +} +// [END health_v4_generated_DataPointsService_CreateDataPoint_StringDatapoint_sync] diff --git a/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/dailyrollupdatapoints/AsyncDailyRollUpDataPoints.java b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/dailyrollupdatapoints/AsyncDailyRollUpDataPoints.java new file mode 100644 index 000000000000..e4bafb45d532 --- /dev/null +++ b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/dailyrollupdatapoints/AsyncDailyRollUpDataPoints.java @@ -0,0 +1,56 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4.samples; + +// [START health_v4_generated_DataPointsService_DailyRollUpDataPoints_async] +import com.google.api.core.ApiFuture; +import com.google.devicesandservices.health.v4.CivilTimeInterval; +import com.google.devicesandservices.health.v4.DailyRollUpDataPointsRequest; +import com.google.devicesandservices.health.v4.DailyRollUpDataPointsResponse; +import com.google.devicesandservices.health.v4.DataPointsServiceClient; +import com.google.devicesandservices.health.v4.DataTypeName; + +public class AsyncDailyRollUpDataPoints { + + public static void main(String[] args) throws Exception { + asyncDailyRollUpDataPoints(); + } + + public static void asyncDailyRollUpDataPoints() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.create()) { + DailyRollUpDataPointsRequest request = + DailyRollUpDataPointsRequest.newBuilder() + .setParent(DataTypeName.of("[USER]", "[DATA_TYPE]").toString()) + .setRange(CivilTimeInterval.newBuilder().build()) + .setWindowSizeDays(1064520774) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setDataSourceFamily("dataSourceFamily586548265") + .build(); + ApiFuture future = + dataPointsServiceClient.dailyRollUpDataPointsCallable().futureCall(request); + // Do something. + DailyRollUpDataPointsResponse response = future.get(); + } + } +} +// [END health_v4_generated_DataPointsService_DailyRollUpDataPoints_async] diff --git a/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/dailyrollupdatapoints/SyncDailyRollUpDataPoints.java b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/dailyrollupdatapoints/SyncDailyRollUpDataPoints.java new file mode 100644 index 000000000000..25b46281eb7a --- /dev/null +++ b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/dailyrollupdatapoints/SyncDailyRollUpDataPoints.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4.samples; + +// [START health_v4_generated_DataPointsService_DailyRollUpDataPoints_sync] +import com.google.devicesandservices.health.v4.CivilTimeInterval; +import com.google.devicesandservices.health.v4.DailyRollUpDataPointsRequest; +import com.google.devicesandservices.health.v4.DailyRollUpDataPointsResponse; +import com.google.devicesandservices.health.v4.DataPointsServiceClient; +import com.google.devicesandservices.health.v4.DataTypeName; + +public class SyncDailyRollUpDataPoints { + + public static void main(String[] args) throws Exception { + syncDailyRollUpDataPoints(); + } + + public static void syncDailyRollUpDataPoints() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.create()) { + DailyRollUpDataPointsRequest request = + DailyRollUpDataPointsRequest.newBuilder() + .setParent(DataTypeName.of("[USER]", "[DATA_TYPE]").toString()) + .setRange(CivilTimeInterval.newBuilder().build()) + .setWindowSizeDays(1064520774) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setDataSourceFamily("dataSourceFamily586548265") + .build(); + DailyRollUpDataPointsResponse response = + dataPointsServiceClient.dailyRollUpDataPoints(request); + } + } +} +// [END health_v4_generated_DataPointsService_DailyRollUpDataPoints_sync] diff --git a/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/exportexercisetcx/AsyncExportExerciseTcx.java b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/exportexercisetcx/AsyncExportExerciseTcx.java new file mode 100644 index 000000000000..5e9d7f0c3db4 --- /dev/null +++ b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/exportexercisetcx/AsyncExportExerciseTcx.java @@ -0,0 +1,51 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4.samples; + +// [START health_v4_generated_DataPointsService_ExportExerciseTcx_async] +import com.google.api.core.ApiFuture; +import com.google.devicesandservices.health.v4.DataPointName; +import com.google.devicesandservices.health.v4.DataPointsServiceClient; +import com.google.devicesandservices.health.v4.ExportExerciseTcxRequest; +import com.google.devicesandservices.health.v4.ExportExerciseTcxResponse; + +public class AsyncExportExerciseTcx { + + public static void main(String[] args) throws Exception { + asyncExportExerciseTcx(); + } + + public static void asyncExportExerciseTcx() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.create()) { + ExportExerciseTcxRequest request = + ExportExerciseTcxRequest.newBuilder() + .setName(DataPointName.of("[USER]", "[DATA_TYPE]", "[DATA_POINT]").toString()) + .setPartialData(true) + .build(); + ApiFuture future = + dataPointsServiceClient.exportExerciseTcxCallable().futureCall(request); + // Do something. + ExportExerciseTcxResponse response = future.get(); + } + } +} +// [END health_v4_generated_DataPointsService_ExportExerciseTcx_async] diff --git a/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/exportexercisetcx/SyncExportExerciseTcx.java b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/exportexercisetcx/SyncExportExerciseTcx.java new file mode 100644 index 000000000000..8affbce8f339 --- /dev/null +++ b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/exportexercisetcx/SyncExportExerciseTcx.java @@ -0,0 +1,47 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4.samples; + +// [START health_v4_generated_DataPointsService_ExportExerciseTcx_sync] +import com.google.devicesandservices.health.v4.DataPointName; +import com.google.devicesandservices.health.v4.DataPointsServiceClient; +import com.google.devicesandservices.health.v4.ExportExerciseTcxRequest; +import com.google.devicesandservices.health.v4.ExportExerciseTcxResponse; + +public class SyncExportExerciseTcx { + + public static void main(String[] args) throws Exception { + syncExportExerciseTcx(); + } + + public static void syncExportExerciseTcx() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.create()) { + ExportExerciseTcxRequest request = + ExportExerciseTcxRequest.newBuilder() + .setName(DataPointName.of("[USER]", "[DATA_TYPE]", "[DATA_POINT]").toString()) + .setPartialData(true) + .build(); + ExportExerciseTcxResponse response = dataPointsServiceClient.exportExerciseTcx(request); + } + } +} +// [END health_v4_generated_DataPointsService_ExportExerciseTcx_sync] diff --git a/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/exportexercisetcx/SyncExportExerciseTcxDatapointname.java b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/exportexercisetcx/SyncExportExerciseTcxDatapointname.java new file mode 100644 index 000000000000..5de73e57a89c --- /dev/null +++ b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/exportexercisetcx/SyncExportExerciseTcxDatapointname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4.samples; + +// [START health_v4_generated_DataPointsService_ExportExerciseTcx_Datapointname_sync] +import com.google.devicesandservices.health.v4.DataPointName; +import com.google.devicesandservices.health.v4.DataPointsServiceClient; +import com.google.devicesandservices.health.v4.ExportExerciseTcxResponse; + +public class SyncExportExerciseTcxDatapointname { + + public static void main(String[] args) throws Exception { + syncExportExerciseTcxDatapointname(); + } + + public static void syncExportExerciseTcxDatapointname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.create()) { + DataPointName name = DataPointName.of("[USER]", "[DATA_TYPE]", "[DATA_POINT]"); + ExportExerciseTcxResponse response = dataPointsServiceClient.exportExerciseTcx(name); + } + } +} +// [END health_v4_generated_DataPointsService_ExportExerciseTcx_Datapointname_sync] diff --git a/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/exportexercisetcx/SyncExportExerciseTcxString.java b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/exportexercisetcx/SyncExportExerciseTcxString.java new file mode 100644 index 000000000000..e61190c3fb78 --- /dev/null +++ b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/exportexercisetcx/SyncExportExerciseTcxString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4.samples; + +// [START health_v4_generated_DataPointsService_ExportExerciseTcx_String_sync] +import com.google.devicesandservices.health.v4.DataPointName; +import com.google.devicesandservices.health.v4.DataPointsServiceClient; +import com.google.devicesandservices.health.v4.ExportExerciseTcxResponse; + +public class SyncExportExerciseTcxString { + + public static void main(String[] args) throws Exception { + syncExportExerciseTcxString(); + } + + public static void syncExportExerciseTcxString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.create()) { + String name = DataPointName.of("[USER]", "[DATA_TYPE]", "[DATA_POINT]").toString(); + ExportExerciseTcxResponse response = dataPointsServiceClient.exportExerciseTcx(name); + } + } +} +// [END health_v4_generated_DataPointsService_ExportExerciseTcx_String_sync] diff --git a/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/getdatapoint/AsyncGetDataPoint.java b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/getdatapoint/AsyncGetDataPoint.java new file mode 100644 index 000000000000..76e362ebc911 --- /dev/null +++ b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/getdatapoint/AsyncGetDataPoint.java @@ -0,0 +1,50 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4.samples; + +// [START health_v4_generated_DataPointsService_GetDataPoint_async] +import com.google.api.core.ApiFuture; +import com.google.devicesandservices.health.v4.DataPoint; +import com.google.devicesandservices.health.v4.DataPointName; +import com.google.devicesandservices.health.v4.DataPointsServiceClient; +import com.google.devicesandservices.health.v4.GetDataPointRequest; + +public class AsyncGetDataPoint { + + public static void main(String[] args) throws Exception { + asyncGetDataPoint(); + } + + public static void asyncGetDataPoint() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.create()) { + GetDataPointRequest request = + GetDataPointRequest.newBuilder() + .setName(DataPointName.of("[USER]", "[DATA_TYPE]", "[DATA_POINT]").toString()) + .build(); + ApiFuture future = + dataPointsServiceClient.getDataPointCallable().futureCall(request); + // Do something. + DataPoint response = future.get(); + } + } +} +// [END health_v4_generated_DataPointsService_GetDataPoint_async] diff --git a/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/getdatapoint/SyncGetDataPoint.java b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/getdatapoint/SyncGetDataPoint.java new file mode 100644 index 000000000000..8486a25e4cd4 --- /dev/null +++ b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/getdatapoint/SyncGetDataPoint.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4.samples; + +// [START health_v4_generated_DataPointsService_GetDataPoint_sync] +import com.google.devicesandservices.health.v4.DataPoint; +import com.google.devicesandservices.health.v4.DataPointName; +import com.google.devicesandservices.health.v4.DataPointsServiceClient; +import com.google.devicesandservices.health.v4.GetDataPointRequest; + +public class SyncGetDataPoint { + + public static void main(String[] args) throws Exception { + syncGetDataPoint(); + } + + public static void syncGetDataPoint() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.create()) { + GetDataPointRequest request = + GetDataPointRequest.newBuilder() + .setName(DataPointName.of("[USER]", "[DATA_TYPE]", "[DATA_POINT]").toString()) + .build(); + DataPoint response = dataPointsServiceClient.getDataPoint(request); + } + } +} +// [END health_v4_generated_DataPointsService_GetDataPoint_sync] diff --git a/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/getdatapoint/SyncGetDataPointDatapointname.java b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/getdatapoint/SyncGetDataPointDatapointname.java new file mode 100644 index 000000000000..431bec11cad6 --- /dev/null +++ b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/getdatapoint/SyncGetDataPointDatapointname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4.samples; + +// [START health_v4_generated_DataPointsService_GetDataPoint_Datapointname_sync] +import com.google.devicesandservices.health.v4.DataPoint; +import com.google.devicesandservices.health.v4.DataPointName; +import com.google.devicesandservices.health.v4.DataPointsServiceClient; + +public class SyncGetDataPointDatapointname { + + public static void main(String[] args) throws Exception { + syncGetDataPointDatapointname(); + } + + public static void syncGetDataPointDatapointname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.create()) { + DataPointName name = DataPointName.of("[USER]", "[DATA_TYPE]", "[DATA_POINT]"); + DataPoint response = dataPointsServiceClient.getDataPoint(name); + } + } +} +// [END health_v4_generated_DataPointsService_GetDataPoint_Datapointname_sync] diff --git a/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/getdatapoint/SyncGetDataPointString.java b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/getdatapoint/SyncGetDataPointString.java new file mode 100644 index 000000000000..1677c916241a --- /dev/null +++ b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/getdatapoint/SyncGetDataPointString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4.samples; + +// [START health_v4_generated_DataPointsService_GetDataPoint_String_sync] +import com.google.devicesandservices.health.v4.DataPoint; +import com.google.devicesandservices.health.v4.DataPointName; +import com.google.devicesandservices.health.v4.DataPointsServiceClient; + +public class SyncGetDataPointString { + + public static void main(String[] args) throws Exception { + syncGetDataPointString(); + } + + public static void syncGetDataPointString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.create()) { + String name = DataPointName.of("[USER]", "[DATA_TYPE]", "[DATA_POINT]").toString(); + DataPoint response = dataPointsServiceClient.getDataPoint(name); + } + } +} +// [END health_v4_generated_DataPointsService_GetDataPoint_String_sync] diff --git a/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/listdatapoints/AsyncListDataPoints.java b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/listdatapoints/AsyncListDataPoints.java new file mode 100644 index 000000000000..7d580daacc08 --- /dev/null +++ b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/listdatapoints/AsyncListDataPoints.java @@ -0,0 +1,55 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4.samples; + +// [START health_v4_generated_DataPointsService_ListDataPoints_async] +import com.google.api.core.ApiFuture; +import com.google.devicesandservices.health.v4.DataPoint; +import com.google.devicesandservices.health.v4.DataPointsServiceClient; +import com.google.devicesandservices.health.v4.DataTypeName; +import com.google.devicesandservices.health.v4.ListDataPointsRequest; + +public class AsyncListDataPoints { + + public static void main(String[] args) throws Exception { + asyncListDataPoints(); + } + + public static void asyncListDataPoints() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.create()) { + ListDataPointsRequest request = + ListDataPointsRequest.newBuilder() + .setParent(DataTypeName.of("[USER]", "[DATA_TYPE]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .build(); + ApiFuture future = + dataPointsServiceClient.listDataPointsPagedCallable().futureCall(request); + // Do something. + for (DataPoint element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END health_v4_generated_DataPointsService_ListDataPoints_async] diff --git a/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/listdatapoints/AsyncListDataPointsPaged.java b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/listdatapoints/AsyncListDataPointsPaged.java new file mode 100644 index 000000000000..72199d038d7d --- /dev/null +++ b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/listdatapoints/AsyncListDataPointsPaged.java @@ -0,0 +1,63 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4.samples; + +// [START health_v4_generated_DataPointsService_ListDataPoints_Paged_async] +import com.google.common.base.Strings; +import com.google.devicesandservices.health.v4.DataPoint; +import com.google.devicesandservices.health.v4.DataPointsServiceClient; +import com.google.devicesandservices.health.v4.DataTypeName; +import com.google.devicesandservices.health.v4.ListDataPointsRequest; +import com.google.devicesandservices.health.v4.ListDataPointsResponse; + +public class AsyncListDataPointsPaged { + + public static void main(String[] args) throws Exception { + asyncListDataPointsPaged(); + } + + public static void asyncListDataPointsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.create()) { + ListDataPointsRequest request = + ListDataPointsRequest.newBuilder() + .setParent(DataTypeName.of("[USER]", "[DATA_TYPE]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .build(); + while (true) { + ListDataPointsResponse response = + dataPointsServiceClient.listDataPointsCallable().call(request); + for (DataPoint element : response.getDataPointsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END health_v4_generated_DataPointsService_ListDataPoints_Paged_async] diff --git a/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/listdatapoints/SyncListDataPoints.java b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/listdatapoints/SyncListDataPoints.java new file mode 100644 index 000000000000..51ceed6f2cc4 --- /dev/null +++ b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/listdatapoints/SyncListDataPoints.java @@ -0,0 +1,51 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4.samples; + +// [START health_v4_generated_DataPointsService_ListDataPoints_sync] +import com.google.devicesandservices.health.v4.DataPoint; +import com.google.devicesandservices.health.v4.DataPointsServiceClient; +import com.google.devicesandservices.health.v4.DataTypeName; +import com.google.devicesandservices.health.v4.ListDataPointsRequest; + +public class SyncListDataPoints { + + public static void main(String[] args) throws Exception { + syncListDataPoints(); + } + + public static void syncListDataPoints() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.create()) { + ListDataPointsRequest request = + ListDataPointsRequest.newBuilder() + .setParent(DataTypeName.of("[USER]", "[DATA_TYPE]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .build(); + for (DataPoint element : dataPointsServiceClient.listDataPoints(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END health_v4_generated_DataPointsService_ListDataPoints_sync] diff --git a/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/listdatapoints/SyncListDataPointsDatatypename.java b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/listdatapoints/SyncListDataPointsDatatypename.java new file mode 100644 index 000000000000..1c45f166b05e --- /dev/null +++ b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/listdatapoints/SyncListDataPointsDatatypename.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4.samples; + +// [START health_v4_generated_DataPointsService_ListDataPoints_Datatypename_sync] +import com.google.devicesandservices.health.v4.DataPoint; +import com.google.devicesandservices.health.v4.DataPointsServiceClient; +import com.google.devicesandservices.health.v4.DataTypeName; + +public class SyncListDataPointsDatatypename { + + public static void main(String[] args) throws Exception { + syncListDataPointsDatatypename(); + } + + public static void syncListDataPointsDatatypename() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.create()) { + DataTypeName parent = DataTypeName.of("[USER]", "[DATA_TYPE]"); + for (DataPoint element : dataPointsServiceClient.listDataPoints(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END health_v4_generated_DataPointsService_ListDataPoints_Datatypename_sync] diff --git a/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/listdatapoints/SyncListDataPointsString.java b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/listdatapoints/SyncListDataPointsString.java new file mode 100644 index 000000000000..bfcc09191eb5 --- /dev/null +++ b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/listdatapoints/SyncListDataPointsString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4.samples; + +// [START health_v4_generated_DataPointsService_ListDataPoints_String_sync] +import com.google.devicesandservices.health.v4.DataPoint; +import com.google.devicesandservices.health.v4.DataPointsServiceClient; +import com.google.devicesandservices.health.v4.DataTypeName; + +public class SyncListDataPointsString { + + public static void main(String[] args) throws Exception { + syncListDataPointsString(); + } + + public static void syncListDataPointsString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.create()) { + String parent = DataTypeName.of("[USER]", "[DATA_TYPE]").toString(); + for (DataPoint element : dataPointsServiceClient.listDataPoints(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END health_v4_generated_DataPointsService_ListDataPoints_String_sync] diff --git a/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/reconciledatapoints/AsyncReconcileDataPoints.java b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/reconciledatapoints/AsyncReconcileDataPoints.java new file mode 100644 index 000000000000..3a0d6891e44f --- /dev/null +++ b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/reconciledatapoints/AsyncReconcileDataPoints.java @@ -0,0 +1,55 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4.samples; + +// [START health_v4_generated_DataPointsService_ReconcileDataPoints_async] +import com.google.api.core.ApiFuture; +import com.google.devicesandservices.health.v4.DataPointsServiceClient; +import com.google.devicesandservices.health.v4.ReconcileDataPointsRequest; +import com.google.devicesandservices.health.v4.ReconciledDataPoint; + +public class AsyncReconcileDataPoints { + + public static void main(String[] args) throws Exception { + asyncReconcileDataPoints(); + } + + public static void asyncReconcileDataPoints() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.create()) { + ReconcileDataPointsRequest request = + ReconcileDataPointsRequest.newBuilder() + .setParent("parent-995424086") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setDataSourceFamily("dataSourceFamily586548265") + .build(); + ApiFuture future = + dataPointsServiceClient.reconcileDataPointsPagedCallable().futureCall(request); + // Do something. + for (ReconciledDataPoint element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END health_v4_generated_DataPointsService_ReconcileDataPoints_async] diff --git a/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/reconciledatapoints/AsyncReconcileDataPointsPaged.java b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/reconciledatapoints/AsyncReconcileDataPointsPaged.java new file mode 100644 index 000000000000..c678c439229e --- /dev/null +++ b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/reconciledatapoints/AsyncReconcileDataPointsPaged.java @@ -0,0 +1,63 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4.samples; + +// [START health_v4_generated_DataPointsService_ReconcileDataPoints_Paged_async] +import com.google.common.base.Strings; +import com.google.devicesandservices.health.v4.DataPointsServiceClient; +import com.google.devicesandservices.health.v4.ReconcileDataPointsRequest; +import com.google.devicesandservices.health.v4.ReconcileDataPointsResponse; +import com.google.devicesandservices.health.v4.ReconciledDataPoint; + +public class AsyncReconcileDataPointsPaged { + + public static void main(String[] args) throws Exception { + asyncReconcileDataPointsPaged(); + } + + public static void asyncReconcileDataPointsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.create()) { + ReconcileDataPointsRequest request = + ReconcileDataPointsRequest.newBuilder() + .setParent("parent-995424086") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setDataSourceFamily("dataSourceFamily586548265") + .build(); + while (true) { + ReconcileDataPointsResponse response = + dataPointsServiceClient.reconcileDataPointsCallable().call(request); + for (ReconciledDataPoint element : response.getDataPointsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END health_v4_generated_DataPointsService_ReconcileDataPoints_Paged_async] diff --git a/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/reconciledatapoints/SyncReconcileDataPoints.java b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/reconciledatapoints/SyncReconcileDataPoints.java new file mode 100644 index 000000000000..d6204cee518b --- /dev/null +++ b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/reconciledatapoints/SyncReconcileDataPoints.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4.samples; + +// [START health_v4_generated_DataPointsService_ReconcileDataPoints_sync] +import com.google.devicesandservices.health.v4.DataPointsServiceClient; +import com.google.devicesandservices.health.v4.ReconcileDataPointsRequest; +import com.google.devicesandservices.health.v4.ReconciledDataPoint; + +public class SyncReconcileDataPoints { + + public static void main(String[] args) throws Exception { + syncReconcileDataPoints(); + } + + public static void syncReconcileDataPoints() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.create()) { + ReconcileDataPointsRequest request = + ReconcileDataPointsRequest.newBuilder() + .setParent("parent-995424086") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setDataSourceFamily("dataSourceFamily586548265") + .build(); + for (ReconciledDataPoint element : + dataPointsServiceClient.reconcileDataPoints(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END health_v4_generated_DataPointsService_ReconcileDataPoints_sync] diff --git a/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/rollupdatapoints/AsyncRollUpDataPoints.java b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/rollupdatapoints/AsyncRollUpDataPoints.java new file mode 100644 index 000000000000..67fe0a02a1ca --- /dev/null +++ b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/rollupdatapoints/AsyncRollUpDataPoints.java @@ -0,0 +1,59 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4.samples; + +// [START health_v4_generated_DataPointsService_RollUpDataPoints_async] +import com.google.api.core.ApiFuture; +import com.google.devicesandservices.health.v4.DataPointsServiceClient; +import com.google.devicesandservices.health.v4.DataTypeName; +import com.google.devicesandservices.health.v4.RollUpDataPointsRequest; +import com.google.devicesandservices.health.v4.RollupDataPoint; +import com.google.protobuf.Duration; +import com.google.type.Interval; + +public class AsyncRollUpDataPoints { + + public static void main(String[] args) throws Exception { + asyncRollUpDataPoints(); + } + + public static void asyncRollUpDataPoints() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.create()) { + RollUpDataPointsRequest request = + RollUpDataPointsRequest.newBuilder() + .setParent(DataTypeName.of("[USER]", "[DATA_TYPE]").toString()) + .setRange(Interval.newBuilder().build()) + .setWindowSize(Duration.newBuilder().build()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setDataSourceFamily("dataSourceFamily586548265") + .build(); + ApiFuture future = + dataPointsServiceClient.rollUpDataPointsPagedCallable().futureCall(request); + // Do something. + for (RollupDataPoint element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END health_v4_generated_DataPointsService_RollUpDataPoints_async] diff --git a/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/rollupdatapoints/AsyncRollUpDataPointsPaged.java b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/rollupdatapoints/AsyncRollUpDataPointsPaged.java new file mode 100644 index 000000000000..86ae8ddcaff0 --- /dev/null +++ b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/rollupdatapoints/AsyncRollUpDataPointsPaged.java @@ -0,0 +1,67 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4.samples; + +// [START health_v4_generated_DataPointsService_RollUpDataPoints_Paged_async] +import com.google.common.base.Strings; +import com.google.devicesandservices.health.v4.DataPointsServiceClient; +import com.google.devicesandservices.health.v4.DataTypeName; +import com.google.devicesandservices.health.v4.RollUpDataPointsRequest; +import com.google.devicesandservices.health.v4.RollUpDataPointsResponse; +import com.google.devicesandservices.health.v4.RollupDataPoint; +import com.google.protobuf.Duration; +import com.google.type.Interval; + +public class AsyncRollUpDataPointsPaged { + + public static void main(String[] args) throws Exception { + asyncRollUpDataPointsPaged(); + } + + public static void asyncRollUpDataPointsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.create()) { + RollUpDataPointsRequest request = + RollUpDataPointsRequest.newBuilder() + .setParent(DataTypeName.of("[USER]", "[DATA_TYPE]").toString()) + .setRange(Interval.newBuilder().build()) + .setWindowSize(Duration.newBuilder().build()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setDataSourceFamily("dataSourceFamily586548265") + .build(); + while (true) { + RollUpDataPointsResponse response = + dataPointsServiceClient.rollUpDataPointsCallable().call(request); + for (RollupDataPoint element : response.getRollupDataPointsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END health_v4_generated_DataPointsService_RollUpDataPoints_Paged_async] diff --git a/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/rollupdatapoints/SyncRollUpDataPoints.java b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/rollupdatapoints/SyncRollUpDataPoints.java new file mode 100644 index 000000000000..e39aa0995d3d --- /dev/null +++ b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/rollupdatapoints/SyncRollUpDataPoints.java @@ -0,0 +1,56 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4.samples; + +// [START health_v4_generated_DataPointsService_RollUpDataPoints_sync] +import com.google.devicesandservices.health.v4.DataPointsServiceClient; +import com.google.devicesandservices.health.v4.DataTypeName; +import com.google.devicesandservices.health.v4.RollUpDataPointsRequest; +import com.google.devicesandservices.health.v4.RollupDataPoint; +import com.google.protobuf.Duration; +import com.google.type.Interval; + +public class SyncRollUpDataPoints { + + public static void main(String[] args) throws Exception { + syncRollUpDataPoints(); + } + + public static void syncRollUpDataPoints() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.create()) { + RollUpDataPointsRequest request = + RollUpDataPointsRequest.newBuilder() + .setParent(DataTypeName.of("[USER]", "[DATA_TYPE]").toString()) + .setRange(Interval.newBuilder().build()) + .setWindowSize(Duration.newBuilder().build()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setDataSourceFamily("dataSourceFamily586548265") + .build(); + for (RollupDataPoint element : + dataPointsServiceClient.rollUpDataPoints(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END health_v4_generated_DataPointsService_RollUpDataPoints_sync] diff --git a/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/updatedatapoint/AsyncUpdateDataPoint.java b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/updatedatapoint/AsyncUpdateDataPoint.java new file mode 100644 index 000000000000..826c85728f5a --- /dev/null +++ b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/updatedatapoint/AsyncUpdateDataPoint.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4.samples; + +// [START health_v4_generated_DataPointsService_UpdateDataPoint_async] +import com.google.api.core.ApiFuture; +import com.google.devicesandservices.health.v4.DataPoint; +import com.google.devicesandservices.health.v4.DataPointsServiceClient; +import com.google.devicesandservices.health.v4.UpdateDataPointRequest; +import com.google.longrunning.Operation; + +public class AsyncUpdateDataPoint { + + public static void main(String[] args) throws Exception { + asyncUpdateDataPoint(); + } + + public static void asyncUpdateDataPoint() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.create()) { + UpdateDataPointRequest request = + UpdateDataPointRequest.newBuilder().setDataPoint(DataPoint.newBuilder().build()).build(); + ApiFuture future = + dataPointsServiceClient.updateDataPointCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END health_v4_generated_DataPointsService_UpdateDataPoint_async] diff --git a/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/updatedatapoint/AsyncUpdateDataPointLRO.java b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/updatedatapoint/AsyncUpdateDataPointLRO.java new file mode 100644 index 000000000000..7f042cf39012 --- /dev/null +++ b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/updatedatapoint/AsyncUpdateDataPointLRO.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4.samples; + +// [START health_v4_generated_DataPointsService_UpdateDataPoint_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.devicesandservices.health.v4.DataPoint; +import com.google.devicesandservices.health.v4.DataPointsServiceClient; +import com.google.devicesandservices.health.v4.UpdateDataPointOperationMetadata; +import com.google.devicesandservices.health.v4.UpdateDataPointRequest; + +public class AsyncUpdateDataPointLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateDataPointLRO(); + } + + public static void asyncUpdateDataPointLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.create()) { + UpdateDataPointRequest request = + UpdateDataPointRequest.newBuilder().setDataPoint(DataPoint.newBuilder().build()).build(); + OperationFuture future = + dataPointsServiceClient.updateDataPointOperationCallable().futureCall(request); + // Do something. + DataPoint response = future.get(); + } + } +} +// [END health_v4_generated_DataPointsService_UpdateDataPoint_LRO_async] diff --git a/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/updatedatapoint/SyncUpdateDataPoint.java b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/updatedatapoint/SyncUpdateDataPoint.java new file mode 100644 index 000000000000..785fe1d5e452 --- /dev/null +++ b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/updatedatapoint/SyncUpdateDataPoint.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4.samples; + +// [START health_v4_generated_DataPointsService_UpdateDataPoint_sync] +import com.google.devicesandservices.health.v4.DataPoint; +import com.google.devicesandservices.health.v4.DataPointsServiceClient; +import com.google.devicesandservices.health.v4.UpdateDataPointRequest; + +public class SyncUpdateDataPoint { + + public static void main(String[] args) throws Exception { + syncUpdateDataPoint(); + } + + public static void syncUpdateDataPoint() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.create()) { + UpdateDataPointRequest request = + UpdateDataPointRequest.newBuilder().setDataPoint(DataPoint.newBuilder().build()).build(); + DataPoint response = dataPointsServiceClient.updateDataPointAsync(request).get(); + } + } +} +// [END health_v4_generated_DataPointsService_UpdateDataPoint_sync] diff --git a/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/updatedatapoint/SyncUpdateDataPointDatapoint.java b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/updatedatapoint/SyncUpdateDataPointDatapoint.java new file mode 100644 index 000000000000..8c5d866148ec --- /dev/null +++ b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservice/updatedatapoint/SyncUpdateDataPointDatapoint.java @@ -0,0 +1,41 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4.samples; + +// [START health_v4_generated_DataPointsService_UpdateDataPoint_Datapoint_sync] +import com.google.devicesandservices.health.v4.DataPoint; +import com.google.devicesandservices.health.v4.DataPointsServiceClient; + +public class SyncUpdateDataPointDatapoint { + + public static void main(String[] args) throws Exception { + syncUpdateDataPointDatapoint(); + } + + public static void syncUpdateDataPointDatapoint() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataPointsServiceClient dataPointsServiceClient = DataPointsServiceClient.create()) { + DataPoint dataPoint = DataPoint.newBuilder().build(); + DataPoint response = dataPointsServiceClient.updateDataPointAsync(dataPoint).get(); + } + } +} +// [END health_v4_generated_DataPointsService_UpdateDataPoint_Datapoint_sync] diff --git a/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservicesettings/createdatapoint/SyncCreateDataPoint.java b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservicesettings/createdatapoint/SyncCreateDataPoint.java new file mode 100644 index 000000000000..8b28dfc5d1e6 --- /dev/null +++ b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservicesettings/createdatapoint/SyncCreateDataPoint.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4.samples; + +// [START health_v4_generated_DataPointsServiceSettings_CreateDataPoint_sync] +import com.google.api.gax.longrunning.OperationalTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.retrying.TimedRetryAlgorithm; +import com.google.devicesandservices.health.v4.DataPointsServiceSettings; +import java.time.Duration; + +public class SyncCreateDataPoint { + + public static void main(String[] args) throws Exception { + syncCreateDataPoint(); + } + + public static void syncCreateDataPoint() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + DataPointsServiceSettings.Builder dataPointsServiceSettingsBuilder = + DataPointsServiceSettings.newBuilder(); + TimedRetryAlgorithm timedRetryAlgorithm = + OperationalTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(500)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(5000)) + .setTotalTimeoutDuration(Duration.ofHours(24)) + .build()); + dataPointsServiceSettingsBuilder + .createClusterOperationSettings() + .setPollingAlgorithm(timedRetryAlgorithm) + .build(); + } +} +// [END health_v4_generated_DataPointsServiceSettings_CreateDataPoint_sync] diff --git a/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservicesettings/getdatapoint/SyncGetDataPoint.java b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservicesettings/getdatapoint/SyncGetDataPoint.java new file mode 100644 index 000000000000..6f8c52de3546 --- /dev/null +++ b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/datapointsservicesettings/getdatapoint/SyncGetDataPoint.java @@ -0,0 +1,56 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4.samples; + +// [START health_v4_generated_DataPointsServiceSettings_GetDataPoint_sync] +import com.google.devicesandservices.health.v4.DataPointsServiceSettings; +import java.time.Duration; + +public class SyncGetDataPoint { + + public static void main(String[] args) throws Exception { + syncGetDataPoint(); + } + + public static void syncGetDataPoint() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + DataPointsServiceSettings.Builder dataPointsServiceSettingsBuilder = + DataPointsServiceSettings.newBuilder(); + dataPointsServiceSettingsBuilder + .getDataPointSettings() + .setRetrySettings( + dataPointsServiceSettingsBuilder + .getDataPointSettings() + .getRetrySettings() + .toBuilder() + .setInitialRetryDelayDuration(Duration.ofSeconds(1)) + .setInitialRpcTimeoutDuration(Duration.ofSeconds(5)) + .setMaxAttempts(5) + .setMaxRetryDelayDuration(Duration.ofSeconds(30)) + .setMaxRpcTimeoutDuration(Duration.ofSeconds(60)) + .setRetryDelayMultiplier(1.3) + .setRpcTimeoutMultiplier(1.5) + .setTotalTimeoutDuration(Duration.ofSeconds(300)) + .build()); + DataPointsServiceSettings dataPointsServiceSettings = dataPointsServiceSettingsBuilder.build(); + } +} +// [END health_v4_generated_DataPointsServiceSettings_GetDataPoint_sync] diff --git a/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/healthprofileservice/create/SyncCreateSetCredentialsProvider.java b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/healthprofileservice/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..d7d8ef5880cf --- /dev/null +++ b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/healthprofileservice/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4.samples; + +// [START health_v4_generated_HealthProfileService_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.devicesandservices.health.v4.HealthProfileServiceClient; +import com.google.devicesandservices.health.v4.HealthProfileServiceSettings; +import com.google.devicesandservices.health.v4.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + HealthProfileServiceSettings healthProfileServiceSettings = + HealthProfileServiceSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + HealthProfileServiceClient healthProfileServiceClient = + HealthProfileServiceClient.create(healthProfileServiceSettings); + } +} +// [END health_v4_generated_HealthProfileService_Create_SetCredentialsProvider_sync] diff --git a/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/healthprofileservice/create/SyncCreateSetEndpoint.java b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/healthprofileservice/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..a0861e6bbc5d --- /dev/null +++ b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/healthprofileservice/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4.samples; + +// [START health_v4_generated_HealthProfileService_Create_SetEndpoint_sync] +import com.google.devicesandservices.health.v4.HealthProfileServiceClient; +import com.google.devicesandservices.health.v4.HealthProfileServiceSettings; +import com.google.devicesandservices.health.v4.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + HealthProfileServiceSettings healthProfileServiceSettings = + HealthProfileServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); + HealthProfileServiceClient healthProfileServiceClient = + HealthProfileServiceClient.create(healthProfileServiceSettings); + } +} +// [END health_v4_generated_HealthProfileService_Create_SetEndpoint_sync] diff --git a/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/healthprofileservice/create/SyncCreateUseHttpJsonTransport.java b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/healthprofileservice/create/SyncCreateUseHttpJsonTransport.java new file mode 100644 index 000000000000..c3f63fc671d6 --- /dev/null +++ b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/healthprofileservice/create/SyncCreateUseHttpJsonTransport.java @@ -0,0 +1,41 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4.samples; + +// [START health_v4_generated_HealthProfileService_Create_UseHttpJsonTransport_sync] +import com.google.devicesandservices.health.v4.HealthProfileServiceClient; +import com.google.devicesandservices.health.v4.HealthProfileServiceSettings; + +public class SyncCreateUseHttpJsonTransport { + + public static void main(String[] args) throws Exception { + syncCreateUseHttpJsonTransport(); + } + + public static void syncCreateUseHttpJsonTransport() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + HealthProfileServiceSettings healthProfileServiceSettings = + HealthProfileServiceSettings.newHttpJsonBuilder().build(); + HealthProfileServiceClient healthProfileServiceClient = + HealthProfileServiceClient.create(healthProfileServiceSettings); + } +} +// [END health_v4_generated_HealthProfileService_Create_UseHttpJsonTransport_sync] diff --git a/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/healthprofileservice/getidentity/AsyncGetIdentity.java b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/healthprofileservice/getidentity/AsyncGetIdentity.java new file mode 100644 index 000000000000..c0fc489d3729 --- /dev/null +++ b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/healthprofileservice/getidentity/AsyncGetIdentity.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4.samples; + +// [START health_v4_generated_HealthProfileService_GetIdentity_async] +import com.google.api.core.ApiFuture; +import com.google.devicesandservices.health.v4.GetIdentityRequest; +import com.google.devicesandservices.health.v4.HealthProfileServiceClient; +import com.google.devicesandservices.health.v4.Identity; +import com.google.devicesandservices.health.v4.IdentityName; + +public class AsyncGetIdentity { + + public static void main(String[] args) throws Exception { + asyncGetIdentity(); + } + + public static void asyncGetIdentity() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HealthProfileServiceClient healthProfileServiceClient = + HealthProfileServiceClient.create()) { + GetIdentityRequest request = + GetIdentityRequest.newBuilder().setName(IdentityName.of("[USER]").toString()).build(); + ApiFuture future = + healthProfileServiceClient.getIdentityCallable().futureCall(request); + // Do something. + Identity response = future.get(); + } + } +} +// [END health_v4_generated_HealthProfileService_GetIdentity_async] diff --git a/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/healthprofileservice/getidentity/SyncGetIdentity.java b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/healthprofileservice/getidentity/SyncGetIdentity.java new file mode 100644 index 000000000000..a2625ca4180e --- /dev/null +++ b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/healthprofileservice/getidentity/SyncGetIdentity.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4.samples; + +// [START health_v4_generated_HealthProfileService_GetIdentity_sync] +import com.google.devicesandservices.health.v4.GetIdentityRequest; +import com.google.devicesandservices.health.v4.HealthProfileServiceClient; +import com.google.devicesandservices.health.v4.Identity; +import com.google.devicesandservices.health.v4.IdentityName; + +public class SyncGetIdentity { + + public static void main(String[] args) throws Exception { + syncGetIdentity(); + } + + public static void syncGetIdentity() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HealthProfileServiceClient healthProfileServiceClient = + HealthProfileServiceClient.create()) { + GetIdentityRequest request = + GetIdentityRequest.newBuilder().setName(IdentityName.of("[USER]").toString()).build(); + Identity response = healthProfileServiceClient.getIdentity(request); + } + } +} +// [END health_v4_generated_HealthProfileService_GetIdentity_sync] diff --git a/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/healthprofileservice/getidentity/SyncGetIdentityIdentityname.java b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/healthprofileservice/getidentity/SyncGetIdentityIdentityname.java new file mode 100644 index 000000000000..a9c65aae4ae1 --- /dev/null +++ b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/healthprofileservice/getidentity/SyncGetIdentityIdentityname.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4.samples; + +// [START health_v4_generated_HealthProfileService_GetIdentity_Identityname_sync] +import com.google.devicesandservices.health.v4.HealthProfileServiceClient; +import com.google.devicesandservices.health.v4.Identity; +import com.google.devicesandservices.health.v4.IdentityName; + +public class SyncGetIdentityIdentityname { + + public static void main(String[] args) throws Exception { + syncGetIdentityIdentityname(); + } + + public static void syncGetIdentityIdentityname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HealthProfileServiceClient healthProfileServiceClient = + HealthProfileServiceClient.create()) { + IdentityName name = IdentityName.of("[USER]"); + Identity response = healthProfileServiceClient.getIdentity(name); + } + } +} +// [END health_v4_generated_HealthProfileService_GetIdentity_Identityname_sync] diff --git a/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/healthprofileservice/getidentity/SyncGetIdentityString.java b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/healthprofileservice/getidentity/SyncGetIdentityString.java new file mode 100644 index 000000000000..5f379a362eba --- /dev/null +++ b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/healthprofileservice/getidentity/SyncGetIdentityString.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4.samples; + +// [START health_v4_generated_HealthProfileService_GetIdentity_String_sync] +import com.google.devicesandservices.health.v4.HealthProfileServiceClient; +import com.google.devicesandservices.health.v4.Identity; +import com.google.devicesandservices.health.v4.IdentityName; + +public class SyncGetIdentityString { + + public static void main(String[] args) throws Exception { + syncGetIdentityString(); + } + + public static void syncGetIdentityString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HealthProfileServiceClient healthProfileServiceClient = + HealthProfileServiceClient.create()) { + String name = IdentityName.of("[USER]").toString(); + Identity response = healthProfileServiceClient.getIdentity(name); + } + } +} +// [END health_v4_generated_HealthProfileService_GetIdentity_String_sync] diff --git a/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/healthprofileservice/getprofile/AsyncGetProfile.java b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/healthprofileservice/getprofile/AsyncGetProfile.java new file mode 100644 index 000000000000..b0da7071f970 --- /dev/null +++ b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/healthprofileservice/getprofile/AsyncGetProfile.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4.samples; + +// [START health_v4_generated_HealthProfileService_GetProfile_async] +import com.google.api.core.ApiFuture; +import com.google.devicesandservices.health.v4.GetProfileRequest; +import com.google.devicesandservices.health.v4.HealthProfileServiceClient; +import com.google.devicesandservices.health.v4.Profile; +import com.google.devicesandservices.health.v4.ProfileName; + +public class AsyncGetProfile { + + public static void main(String[] args) throws Exception { + asyncGetProfile(); + } + + public static void asyncGetProfile() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HealthProfileServiceClient healthProfileServiceClient = + HealthProfileServiceClient.create()) { + GetProfileRequest request = + GetProfileRequest.newBuilder().setName(ProfileName.of("[USER]").toString()).build(); + ApiFuture future = + healthProfileServiceClient.getProfileCallable().futureCall(request); + // Do something. + Profile response = future.get(); + } + } +} +// [END health_v4_generated_HealthProfileService_GetProfile_async] diff --git a/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/healthprofileservice/getprofile/SyncGetProfile.java b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/healthprofileservice/getprofile/SyncGetProfile.java new file mode 100644 index 000000000000..8ca88afb0d4f --- /dev/null +++ b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/healthprofileservice/getprofile/SyncGetProfile.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4.samples; + +// [START health_v4_generated_HealthProfileService_GetProfile_sync] +import com.google.devicesandservices.health.v4.GetProfileRequest; +import com.google.devicesandservices.health.v4.HealthProfileServiceClient; +import com.google.devicesandservices.health.v4.Profile; +import com.google.devicesandservices.health.v4.ProfileName; + +public class SyncGetProfile { + + public static void main(String[] args) throws Exception { + syncGetProfile(); + } + + public static void syncGetProfile() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HealthProfileServiceClient healthProfileServiceClient = + HealthProfileServiceClient.create()) { + GetProfileRequest request = + GetProfileRequest.newBuilder().setName(ProfileName.of("[USER]").toString()).build(); + Profile response = healthProfileServiceClient.getProfile(request); + } + } +} +// [END health_v4_generated_HealthProfileService_GetProfile_sync] diff --git a/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/healthprofileservice/getprofile/SyncGetProfileProfilename.java b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/healthprofileservice/getprofile/SyncGetProfileProfilename.java new file mode 100644 index 000000000000..1f8085b57089 --- /dev/null +++ b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/healthprofileservice/getprofile/SyncGetProfileProfilename.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4.samples; + +// [START health_v4_generated_HealthProfileService_GetProfile_Profilename_sync] +import com.google.devicesandservices.health.v4.HealthProfileServiceClient; +import com.google.devicesandservices.health.v4.Profile; +import com.google.devicesandservices.health.v4.ProfileName; + +public class SyncGetProfileProfilename { + + public static void main(String[] args) throws Exception { + syncGetProfileProfilename(); + } + + public static void syncGetProfileProfilename() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HealthProfileServiceClient healthProfileServiceClient = + HealthProfileServiceClient.create()) { + ProfileName name = ProfileName.of("[USER]"); + Profile response = healthProfileServiceClient.getProfile(name); + } + } +} +// [END health_v4_generated_HealthProfileService_GetProfile_Profilename_sync] diff --git a/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/healthprofileservice/getprofile/SyncGetProfileString.java b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/healthprofileservice/getprofile/SyncGetProfileString.java new file mode 100644 index 000000000000..cbeefd49ce87 --- /dev/null +++ b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/healthprofileservice/getprofile/SyncGetProfileString.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4.samples; + +// [START health_v4_generated_HealthProfileService_GetProfile_String_sync] +import com.google.devicesandservices.health.v4.HealthProfileServiceClient; +import com.google.devicesandservices.health.v4.Profile; +import com.google.devicesandservices.health.v4.ProfileName; + +public class SyncGetProfileString { + + public static void main(String[] args) throws Exception { + syncGetProfileString(); + } + + public static void syncGetProfileString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HealthProfileServiceClient healthProfileServiceClient = + HealthProfileServiceClient.create()) { + String name = ProfileName.of("[USER]").toString(); + Profile response = healthProfileServiceClient.getProfile(name); + } + } +} +// [END health_v4_generated_HealthProfileService_GetProfile_String_sync] diff --git a/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/healthprofileservice/getsettings/AsyncGetSettings.java b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/healthprofileservice/getsettings/AsyncGetSettings.java new file mode 100644 index 000000000000..2b560caec2b3 --- /dev/null +++ b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/healthprofileservice/getsettings/AsyncGetSettings.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4.samples; + +// [START health_v4_generated_HealthProfileService_GetSettings_async] +import com.google.api.core.ApiFuture; +import com.google.devicesandservices.health.v4.GetSettingsRequest; +import com.google.devicesandservices.health.v4.HealthProfileServiceClient; +import com.google.devicesandservices.health.v4.Settings; +import com.google.devicesandservices.health.v4.SettingsName; + +public class AsyncGetSettings { + + public static void main(String[] args) throws Exception { + asyncGetSettings(); + } + + public static void asyncGetSettings() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HealthProfileServiceClient healthProfileServiceClient = + HealthProfileServiceClient.create()) { + GetSettingsRequest request = + GetSettingsRequest.newBuilder().setName(SettingsName.of("[USER]").toString()).build(); + ApiFuture future = + healthProfileServiceClient.getSettingsCallable().futureCall(request); + // Do something. + Settings response = future.get(); + } + } +} +// [END health_v4_generated_HealthProfileService_GetSettings_async] diff --git a/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/healthprofileservice/getsettings/SyncGetSettings.java b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/healthprofileservice/getsettings/SyncGetSettings.java new file mode 100644 index 000000000000..95a52c609f7a --- /dev/null +++ b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/healthprofileservice/getsettings/SyncGetSettings.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4.samples; + +// [START health_v4_generated_HealthProfileService_GetSettings_sync] +import com.google.devicesandservices.health.v4.GetSettingsRequest; +import com.google.devicesandservices.health.v4.HealthProfileServiceClient; +import com.google.devicesandservices.health.v4.Settings; +import com.google.devicesandservices.health.v4.SettingsName; + +public class SyncGetSettings { + + public static void main(String[] args) throws Exception { + syncGetSettings(); + } + + public static void syncGetSettings() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HealthProfileServiceClient healthProfileServiceClient = + HealthProfileServiceClient.create()) { + GetSettingsRequest request = + GetSettingsRequest.newBuilder().setName(SettingsName.of("[USER]").toString()).build(); + Settings response = healthProfileServiceClient.getSettings(request); + } + } +} +// [END health_v4_generated_HealthProfileService_GetSettings_sync] diff --git a/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/healthprofileservice/getsettings/SyncGetSettingsSettingsname.java b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/healthprofileservice/getsettings/SyncGetSettingsSettingsname.java new file mode 100644 index 000000000000..c01daa5cc1e4 --- /dev/null +++ b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/healthprofileservice/getsettings/SyncGetSettingsSettingsname.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4.samples; + +// [START health_v4_generated_HealthProfileService_GetSettings_Settingsname_sync] +import com.google.devicesandservices.health.v4.HealthProfileServiceClient; +import com.google.devicesandservices.health.v4.Settings; +import com.google.devicesandservices.health.v4.SettingsName; + +public class SyncGetSettingsSettingsname { + + public static void main(String[] args) throws Exception { + syncGetSettingsSettingsname(); + } + + public static void syncGetSettingsSettingsname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HealthProfileServiceClient healthProfileServiceClient = + HealthProfileServiceClient.create()) { + SettingsName name = SettingsName.of("[USER]"); + Settings response = healthProfileServiceClient.getSettings(name); + } + } +} +// [END health_v4_generated_HealthProfileService_GetSettings_Settingsname_sync] diff --git a/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/healthprofileservice/getsettings/SyncGetSettingsString.java b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/healthprofileservice/getsettings/SyncGetSettingsString.java new file mode 100644 index 000000000000..5e84da525244 --- /dev/null +++ b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/healthprofileservice/getsettings/SyncGetSettingsString.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4.samples; + +// [START health_v4_generated_HealthProfileService_GetSettings_String_sync] +import com.google.devicesandservices.health.v4.HealthProfileServiceClient; +import com.google.devicesandservices.health.v4.Settings; +import com.google.devicesandservices.health.v4.SettingsName; + +public class SyncGetSettingsString { + + public static void main(String[] args) throws Exception { + syncGetSettingsString(); + } + + public static void syncGetSettingsString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HealthProfileServiceClient healthProfileServiceClient = + HealthProfileServiceClient.create()) { + String name = SettingsName.of("[USER]").toString(); + Settings response = healthProfileServiceClient.getSettings(name); + } + } +} +// [END health_v4_generated_HealthProfileService_GetSettings_String_sync] diff --git a/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/healthprofileservice/updateprofile/AsyncUpdateProfile.java b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/healthprofileservice/updateprofile/AsyncUpdateProfile.java new file mode 100644 index 000000000000..dc25db7bcc3a --- /dev/null +++ b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/healthprofileservice/updateprofile/AsyncUpdateProfile.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4.samples; + +// [START health_v4_generated_HealthProfileService_UpdateProfile_async] +import com.google.api.core.ApiFuture; +import com.google.devicesandservices.health.v4.HealthProfileServiceClient; +import com.google.devicesandservices.health.v4.Profile; +import com.google.devicesandservices.health.v4.UpdateProfileRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateProfile { + + public static void main(String[] args) throws Exception { + asyncUpdateProfile(); + } + + public static void asyncUpdateProfile() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HealthProfileServiceClient healthProfileServiceClient = + HealthProfileServiceClient.create()) { + UpdateProfileRequest request = + UpdateProfileRequest.newBuilder() + .setProfile(Profile.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = + healthProfileServiceClient.updateProfileCallable().futureCall(request); + // Do something. + Profile response = future.get(); + } + } +} +// [END health_v4_generated_HealthProfileService_UpdateProfile_async] diff --git a/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/healthprofileservice/updateprofile/SyncUpdateProfile.java b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/healthprofileservice/updateprofile/SyncUpdateProfile.java new file mode 100644 index 000000000000..f324854847bb --- /dev/null +++ b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/healthprofileservice/updateprofile/SyncUpdateProfile.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4.samples; + +// [START health_v4_generated_HealthProfileService_UpdateProfile_sync] +import com.google.devicesandservices.health.v4.HealthProfileServiceClient; +import com.google.devicesandservices.health.v4.Profile; +import com.google.devicesandservices.health.v4.UpdateProfileRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateProfile { + + public static void main(String[] args) throws Exception { + syncUpdateProfile(); + } + + public static void syncUpdateProfile() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HealthProfileServiceClient healthProfileServiceClient = + HealthProfileServiceClient.create()) { + UpdateProfileRequest request = + UpdateProfileRequest.newBuilder() + .setProfile(Profile.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + Profile response = healthProfileServiceClient.updateProfile(request); + } + } +} +// [END health_v4_generated_HealthProfileService_UpdateProfile_sync] diff --git a/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/healthprofileservice/updateprofile/SyncUpdateProfileProfileFieldmask.java b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/healthprofileservice/updateprofile/SyncUpdateProfileProfileFieldmask.java new file mode 100644 index 000000000000..666db00cfad2 --- /dev/null +++ b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/healthprofileservice/updateprofile/SyncUpdateProfileProfileFieldmask.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4.samples; + +// [START health_v4_generated_HealthProfileService_UpdateProfile_ProfileFieldmask_sync] +import com.google.devicesandservices.health.v4.HealthProfileServiceClient; +import com.google.devicesandservices.health.v4.Profile; +import com.google.protobuf.FieldMask; + +public class SyncUpdateProfileProfileFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateProfileProfileFieldmask(); + } + + public static void syncUpdateProfileProfileFieldmask() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HealthProfileServiceClient healthProfileServiceClient = + HealthProfileServiceClient.create()) { + Profile profile = Profile.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + Profile response = healthProfileServiceClient.updateProfile(profile, updateMask); + } + } +} +// [END health_v4_generated_HealthProfileService_UpdateProfile_ProfileFieldmask_sync] diff --git a/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/healthprofileservice/updatesettings/AsyncUpdateSettings.java b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/healthprofileservice/updatesettings/AsyncUpdateSettings.java new file mode 100644 index 000000000000..e29f22bcfad5 --- /dev/null +++ b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/healthprofileservice/updatesettings/AsyncUpdateSettings.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4.samples; + +// [START health_v4_generated_HealthProfileService_UpdateSettings_async] +import com.google.api.core.ApiFuture; +import com.google.devicesandservices.health.v4.HealthProfileServiceClient; +import com.google.devicesandservices.health.v4.Settings; +import com.google.devicesandservices.health.v4.UpdateSettingsRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateSettings { + + public static void main(String[] args) throws Exception { + asyncUpdateSettings(); + } + + public static void asyncUpdateSettings() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HealthProfileServiceClient healthProfileServiceClient = + HealthProfileServiceClient.create()) { + UpdateSettingsRequest request = + UpdateSettingsRequest.newBuilder() + .setSettings(Settings.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = + healthProfileServiceClient.updateSettingsCallable().futureCall(request); + // Do something. + Settings response = future.get(); + } + } +} +// [END health_v4_generated_HealthProfileService_UpdateSettings_async] diff --git a/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/healthprofileservice/updatesettings/SyncUpdateSettings.java b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/healthprofileservice/updatesettings/SyncUpdateSettings.java new file mode 100644 index 000000000000..bf8725a11b16 --- /dev/null +++ b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/healthprofileservice/updatesettings/SyncUpdateSettings.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4.samples; + +// [START health_v4_generated_HealthProfileService_UpdateSettings_sync] +import com.google.devicesandservices.health.v4.HealthProfileServiceClient; +import com.google.devicesandservices.health.v4.Settings; +import com.google.devicesandservices.health.v4.UpdateSettingsRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateSettings { + + public static void main(String[] args) throws Exception { + syncUpdateSettings(); + } + + public static void syncUpdateSettings() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HealthProfileServiceClient healthProfileServiceClient = + HealthProfileServiceClient.create()) { + UpdateSettingsRequest request = + UpdateSettingsRequest.newBuilder() + .setSettings(Settings.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + Settings response = healthProfileServiceClient.updateSettings(request); + } + } +} +// [END health_v4_generated_HealthProfileService_UpdateSettings_sync] diff --git a/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/healthprofileservice/updatesettings/SyncUpdateSettingsSettingsFieldmask.java b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/healthprofileservice/updatesettings/SyncUpdateSettingsSettingsFieldmask.java new file mode 100644 index 000000000000..bb8d242a4ff3 --- /dev/null +++ b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/healthprofileservice/updatesettings/SyncUpdateSettingsSettingsFieldmask.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4.samples; + +// [START health_v4_generated_HealthProfileService_UpdateSettings_SettingsFieldmask_sync] +import com.google.devicesandservices.health.v4.HealthProfileServiceClient; +import com.google.devicesandservices.health.v4.Settings; +import com.google.protobuf.FieldMask; + +public class SyncUpdateSettingsSettingsFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateSettingsSettingsFieldmask(); + } + + public static void syncUpdateSettingsSettingsFieldmask() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HealthProfileServiceClient healthProfileServiceClient = + HealthProfileServiceClient.create()) { + Settings settings = Settings.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + Settings response = healthProfileServiceClient.updateSettings(settings, updateMask); + } + } +} +// [END health_v4_generated_HealthProfileService_UpdateSettings_SettingsFieldmask_sync] diff --git a/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/healthprofileservicesettings/getprofile/SyncGetProfile.java b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/healthprofileservicesettings/getprofile/SyncGetProfile.java new file mode 100644 index 000000000000..e0cbda35bd21 --- /dev/null +++ b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/healthprofileservicesettings/getprofile/SyncGetProfile.java @@ -0,0 +1,57 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4.samples; + +// [START health_v4_generated_HealthProfileServiceSettings_GetProfile_sync] +import com.google.devicesandservices.health.v4.HealthProfileServiceSettings; +import java.time.Duration; + +public class SyncGetProfile { + + public static void main(String[] args) throws Exception { + syncGetProfile(); + } + + public static void syncGetProfile() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + HealthProfileServiceSettings.Builder healthProfileServiceSettingsBuilder = + HealthProfileServiceSettings.newBuilder(); + healthProfileServiceSettingsBuilder + .getProfileSettings() + .setRetrySettings( + healthProfileServiceSettingsBuilder + .getProfileSettings() + .getRetrySettings() + .toBuilder() + .setInitialRetryDelayDuration(Duration.ofSeconds(1)) + .setInitialRpcTimeoutDuration(Duration.ofSeconds(5)) + .setMaxAttempts(5) + .setMaxRetryDelayDuration(Duration.ofSeconds(30)) + .setMaxRpcTimeoutDuration(Duration.ofSeconds(60)) + .setRetryDelayMultiplier(1.3) + .setRpcTimeoutMultiplier(1.5) + .setTotalTimeoutDuration(Duration.ofSeconds(300)) + .build()); + HealthProfileServiceSettings healthProfileServiceSettings = + healthProfileServiceSettingsBuilder.build(); + } +} +// [END health_v4_generated_HealthProfileServiceSettings_GetProfile_sync] diff --git a/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/stub/datapointsservicestubsettings/createdatapoint/SyncCreateDataPoint.java b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/stub/datapointsservicestubsettings/createdatapoint/SyncCreateDataPoint.java new file mode 100644 index 000000000000..f334e879b986 --- /dev/null +++ b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/stub/datapointsservicestubsettings/createdatapoint/SyncCreateDataPoint.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4.stub.samples; + +// [START health_v4_generated_DataPointsServiceStubSettings_CreateDataPoint_sync] +import com.google.api.gax.longrunning.OperationalTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.retrying.TimedRetryAlgorithm; +import com.google.devicesandservices.health.v4.stub.DataPointsServiceStubSettings; +import java.time.Duration; + +public class SyncCreateDataPoint { + + public static void main(String[] args) throws Exception { + syncCreateDataPoint(); + } + + public static void syncCreateDataPoint() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + DataPointsServiceStubSettings.Builder dataPointsServiceSettingsBuilder = + DataPointsServiceStubSettings.newBuilder(); + TimedRetryAlgorithm timedRetryAlgorithm = + OperationalTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(500)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(5000)) + .setTotalTimeoutDuration(Duration.ofHours(24)) + .build()); + dataPointsServiceSettingsBuilder + .createClusterOperationSettings() + .setPollingAlgorithm(timedRetryAlgorithm) + .build(); + } +} +// [END health_v4_generated_DataPointsServiceStubSettings_CreateDataPoint_sync] diff --git a/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/stub/datapointsservicestubsettings/getdatapoint/SyncGetDataPoint.java b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/stub/datapointsservicestubsettings/getdatapoint/SyncGetDataPoint.java new file mode 100644 index 000000000000..7ea381bdb825 --- /dev/null +++ b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/stub/datapointsservicestubsettings/getdatapoint/SyncGetDataPoint.java @@ -0,0 +1,57 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4.stub.samples; + +// [START health_v4_generated_DataPointsServiceStubSettings_GetDataPoint_sync] +import com.google.devicesandservices.health.v4.stub.DataPointsServiceStubSettings; +import java.time.Duration; + +public class SyncGetDataPoint { + + public static void main(String[] args) throws Exception { + syncGetDataPoint(); + } + + public static void syncGetDataPoint() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + DataPointsServiceStubSettings.Builder dataPointsServiceSettingsBuilder = + DataPointsServiceStubSettings.newBuilder(); + dataPointsServiceSettingsBuilder + .getDataPointSettings() + .setRetrySettings( + dataPointsServiceSettingsBuilder + .getDataPointSettings() + .getRetrySettings() + .toBuilder() + .setInitialRetryDelayDuration(Duration.ofSeconds(1)) + .setInitialRpcTimeoutDuration(Duration.ofSeconds(5)) + .setMaxAttempts(5) + .setMaxRetryDelayDuration(Duration.ofSeconds(30)) + .setMaxRpcTimeoutDuration(Duration.ofSeconds(60)) + .setRetryDelayMultiplier(1.3) + .setRpcTimeoutMultiplier(1.5) + .setTotalTimeoutDuration(Duration.ofSeconds(300)) + .build()); + DataPointsServiceStubSettings dataPointsServiceSettings = + dataPointsServiceSettingsBuilder.build(); + } +} +// [END health_v4_generated_DataPointsServiceStubSettings_GetDataPoint_sync] diff --git a/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/stub/healthprofileservicestubsettings/getprofile/SyncGetProfile.java b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/stub/healthprofileservicestubsettings/getprofile/SyncGetProfile.java new file mode 100644 index 000000000000..a62f98e7a836 --- /dev/null +++ b/java-health/samples/snippets/generated/com/google/devicesandservices/health/v4/stub/healthprofileservicestubsettings/getprofile/SyncGetProfile.java @@ -0,0 +1,57 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.devicesandservices.health.v4.stub.samples; + +// [START health_v4_generated_HealthProfileServiceStubSettings_GetProfile_sync] +import com.google.devicesandservices.health.v4.stub.HealthProfileServiceStubSettings; +import java.time.Duration; + +public class SyncGetProfile { + + public static void main(String[] args) throws Exception { + syncGetProfile(); + } + + public static void syncGetProfile() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + HealthProfileServiceStubSettings.Builder healthProfileServiceSettingsBuilder = + HealthProfileServiceStubSettings.newBuilder(); + healthProfileServiceSettingsBuilder + .getProfileSettings() + .setRetrySettings( + healthProfileServiceSettingsBuilder + .getProfileSettings() + .getRetrySettings() + .toBuilder() + .setInitialRetryDelayDuration(Duration.ofSeconds(1)) + .setInitialRpcTimeoutDuration(Duration.ofSeconds(5)) + .setMaxAttempts(5) + .setMaxRetryDelayDuration(Duration.ofSeconds(30)) + .setMaxRpcTimeoutDuration(Duration.ofSeconds(60)) + .setRetryDelayMultiplier(1.3) + .setRpcTimeoutMultiplier(1.5) + .setTotalTimeoutDuration(Duration.ofSeconds(300)) + .build()); + HealthProfileServiceStubSettings healthProfileServiceSettings = + healthProfileServiceSettingsBuilder.build(); + } +} +// [END health_v4_generated_HealthProfileServiceStubSettings_GetProfile_sync] diff --git a/pom.xml b/pom.xml index 7b3e1670a34b..00c347aafec9 100644 --- a/pom.xml +++ b/pom.xml @@ -124,6 +124,7 @@ java-gkerecommender java-grafeas java-gsuite-addons + java-health java-hypercomputecluster java-iam java-iam-admin diff --git a/versions.txt b/versions.txt index ddc6f3f5cd04..7cb0161af182 100644 --- a/versions.txt +++ b/versions.txt @@ -1026,6 +1026,9 @@ google-cloud-nio:0.131.0:0.132.0-SNAPSHOT google-cloud-appoptimize:0.1.0:0.2.0-SNAPSHOT proto-google-cloud-appoptimize-v1beta:0.1.0:0.2.0-SNAPSHOT grpc-google-cloud-appoptimize-v1beta:0.1.0:0.2.0-SNAPSHOT +google-cloud-health:0.0.0:0.0.1-SNAPSHOT +proto-google-cloud-health-v4:0.0.0:0.0.1-SNAPSHOT +grpc-google-cloud-health-v4:0.0.0:0.0.1-SNAPSHOT google-maps-mapmanagement:0.0.0:0.0.1-SNAPSHOT proto-google-maps-mapmanagement-v2beta:0.0.0:0.0.1-SNAPSHOT grpc-google-maps-mapmanagement-v2beta:0.0.0:0.0.1-SNAPSHOT