From 171648a5140b5a45df9ea6101f7a474fa1a1362a Mon Sep 17 00:00:00 2001 From: Garrett Jones Date: Thu, 18 Feb 2016 13:10:12 -0800 Subject: [PATCH 1/5] Removing GAX from gcloud-java --- gcloud-java-gax/README.md | 53 - .../java/com/google/api/AnnotationsProto.java | 222 - .../src/main/java/com/google/api/Context.java | 779 --- .../java/com/google/api/ContextOrBuilder.java | 53 - .../java/com/google/api/ContextProto.java | 64 - .../main/java/com/google/api/ContextRule.java | 922 ---- .../com/google/api/ContextRuleOrBuilder.java | 99 - .../main/java/com/google/api/CustomError.java | 1016 ---- .../com/google/api/CustomErrorOrBuilder.java | 93 - .../java/com/google/api/CustomErrorRule.java | 627 --- .../google/api/CustomErrorRuleOrBuilder.java | 48 - .../com/google/api/CustomHttpPattern.java | 627 --- .../api/CustomHttpPatternOrBuilder.java | 45 - .../java/com/google/api/Documentation.java | 1816 ------- .../google/api/DocumentationOrBuilder.java | 173 - .../com/google/api/DocumentationProto.java | 79 - .../com/google/api/DocumentationRule.java | 662 --- .../api/DocumentationRuleOrBuilder.java | 55 - .../java/com/google/api/ErrorFormatProto.java | 65 - .../src/main/java/com/google/api/Http.java | 759 --- .../java/com/google/api/HttpOrBuilder.java | 53 - .../main/java/com/google/api/HttpProto.java | 106 - .../main/java/com/google/api/HttpRule.java | 3069 ----------- .../com/google/api/HttpRuleOrBuilder.java | 276 - .../java/com/google/api/MediaDownload.java | 399 -- .../google/api/MediaDownloadOrBuilder.java | 18 - .../main/java/com/google/api/MediaUpload.java | 399 -- .../com/google/api/MediaUploadOrBuilder.java | 18 - .../src/main/java/com/google/api/Page.java | 1176 ----- .../java/com/google/api/PageOrBuilder.java | 120 - .../src/main/java/com/google/api/Service.java | 4591 ----------------- .../java/com/google/api/ServiceOrBuilder.java | 530 -- .../java/com/google/api/ServiceProto.java | 95 - .../main/java/com/google/api/Visibility.java | 1370 ----- .../com/google/api/VisibilityOrBuilder.java | 148 - .../java/com/google/api/VisibilityProto.java | 70 - .../java/com/google/api/VisibilityRule.java | 998 ---- .../google/api/VisibilityRuleOrBuilder.java | 110 - .../longrunning/CancelOperationRequest.java | 476 -- .../CancelOperationRequestOrBuilder.java | 27 - .../longrunning/DeleteOperationRequest.java | 476 -- .../DeleteOperationRequestOrBuilder.java | 27 - .../longrunning/GetOperationRequest.java | 476 -- .../GetOperationRequestOrBuilder.java | 27 - .../longrunning/ListOperationsRequest.java | 848 --- .../ListOperationsRequestOrBuilder.java | 72 - .../longrunning/ListOperationsResponse.java | 909 ---- .../ListOperationsResponseOrBuilder.java | 71 - .../com/google/longrunning/Operation.java | 1383 ----- .../longrunning/OperationOrBuilder.java | 123 - .../google/longrunning/OperationsGrpc.java | 306 -- .../google/longrunning/OperationsProto.java | 146 - .../main/java/com/google/rpc/BadRequest.java | 1437 ------ .../com/google/rpc/BadRequestOrBuilder.java | 53 - .../src/main/java/com/google/rpc/Code.java | 543 -- .../main/java/com/google/rpc/CodeProto.java | 46 - .../main/java/com/google/rpc/DebugInfo.java | 697 --- .../com/google/rpc/DebugInfoOrBuilder.java | 62 - .../com/google/rpc/ErrorDetailsProto.java | 167 - .../src/main/java/com/google/rpc/Help.java | 1423 ----- .../java/com/google/rpc/HelpOrBuilder.java | 53 - .../java/com/google/rpc/QuotaFailure.java | 1498 ------ .../com/google/rpc/QuotaFailureOrBuilder.java | 53 - .../main/java/com/google/rpc/RequestInfo.java | 643 --- .../com/google/rpc/RequestInfoOrBuilder.java | 49 - .../java/com/google/rpc/ResourceInfo.java | 985 ---- .../com/google/rpc/ResourceInfoOrBuilder.java | 97 - .../main/java/com/google/rpc/RetryInfo.java | 565 -- .../com/google/rpc/RetryInfoOrBuilder.java | 34 - .../src/main/java/com/google/rpc/Status.java | 1092 ---- .../java/com/google/rpc/StatusOrBuilder.java | 89 - .../main/java/com/google/rpc/StatusProto.java | 54 - .../src/main/java/com/google/type/Color.java | 1047 ---- .../java/com/google/type/ColorOrBuilder.java | 85 - .../main/java/com/google/type/ColorProto.java | 55 - .../src/main/java/com/google/type/Date.java | 593 --- .../java/com/google/type/DateOrBuilder.java | 38 - .../main/java/com/google/type/DateProto.java | 51 - .../main/java/com/google/type/DayOfWeek.java | 220 - .../java/com/google/type/DayOfWeekProto.java | 42 - .../src/main/java/com/google/type/LatLng.java | 513 -- .../java/com/google/type/LatLngOrBuilder.java | 27 - .../java/com/google/type/LatLngProto.java | 51 - .../src/main/java/com/google/type/Money.java | 640 --- .../java/com/google/type/MoneyOrBuilder.java | 51 - .../main/java/com/google/type/MoneyProto.java | 51 - .../main/java/com/google/type/TimeOfDay.java | 659 --- .../com/google/type/TimeOfDayOrBuilder.java | 47 - .../java/com/google/type/TimeOfDayProto.java | 52 - gcloud-java-gax/pom.xml | 101 - .../java/io/gapi/gax/grpc/ApiCallable.java | 391 -- .../io/gapi/gax/grpc/CallableDescriptor.java | 76 - .../io/gapi/gax/grpc/CompoundClientCall.java | 78 - .../io/gapi/gax/grpc/FollowedByCallable.java | 146 - .../java/io/gapi/gax/grpc/PageDescriptor.java | 62 - .../gapi/gax/grpc/PageStreamingCallable.java | 185 - .../io/gapi/gax/grpc/RetryingCallable.java | 197 - .../io/gapi/gax/grpc/ServiceApiSettings.java | 125 - .../gapi/gax/grpc/TransformingCallable.java | 171 - .../java/io/gapi/gax/internal/ApiUtils.java | 127 - .../io/gapi/gax/protobuf/PathTemplate.java | 881 ---- .../io/gapi/gax/protobuf/ResourceName.java | 275 - .../gax/protobuf/ValidationException.java | 63 - .../io/gapi/gax/grpc/ApiCallableTest.java | 250 - .../gapi/gax/protobuf/PathTemplateTest.java | 168 - .../gapi/gax/protobuf/ResourceNameTest.java | 25 - 106 files changed, 44353 deletions(-) delete mode 100644 gcloud-java-gax/README.md delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/api/AnnotationsProto.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/api/Context.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/api/ContextOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/api/ContextProto.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/api/ContextRule.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/api/ContextRuleOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/api/CustomError.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/api/CustomErrorOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/api/CustomErrorRule.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/api/CustomErrorRuleOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/api/CustomHttpPattern.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/api/CustomHttpPatternOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/api/Documentation.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/api/DocumentationOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/api/DocumentationProto.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/api/DocumentationRule.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/api/DocumentationRuleOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/api/ErrorFormatProto.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/api/Http.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/api/HttpOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/api/HttpProto.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/api/HttpRule.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/api/HttpRuleOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/api/MediaDownload.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/api/MediaDownloadOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/api/MediaUpload.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/api/MediaUploadOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/api/Page.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/api/PageOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/api/Service.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/api/ServiceOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/api/ServiceProto.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/api/Visibility.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/api/VisibilityOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/api/VisibilityProto.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/api/VisibilityRule.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/api/VisibilityRuleOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/longrunning/CancelOperationRequest.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/longrunning/CancelOperationRequestOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/longrunning/DeleteOperationRequest.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/longrunning/DeleteOperationRequestOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/longrunning/GetOperationRequest.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/longrunning/GetOperationRequestOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/longrunning/ListOperationsRequest.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/longrunning/ListOperationsRequestOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/longrunning/ListOperationsResponse.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/longrunning/ListOperationsResponseOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/longrunning/Operation.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/longrunning/OperationOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/longrunning/OperationsGrpc.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/longrunning/OperationsProto.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/rpc/BadRequest.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/rpc/BadRequestOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/rpc/Code.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/rpc/CodeProto.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/rpc/DebugInfo.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/rpc/DebugInfoOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/rpc/ErrorDetailsProto.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/rpc/Help.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/rpc/HelpOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/rpc/QuotaFailure.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/rpc/QuotaFailureOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/rpc/RequestInfo.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/rpc/RequestInfoOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/rpc/ResourceInfo.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/rpc/ResourceInfoOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/rpc/RetryInfo.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/rpc/RetryInfoOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/rpc/Status.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/rpc/StatusOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/rpc/StatusProto.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/type/Color.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/type/ColorOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/type/ColorProto.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/type/Date.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/type/DateOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/type/DateProto.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/type/DayOfWeek.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/type/DayOfWeekProto.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/type/LatLng.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/type/LatLngOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/type/LatLngProto.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/type/Money.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/type/MoneyOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/type/MoneyProto.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/type/TimeOfDay.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/type/TimeOfDayOrBuilder.java delete mode 100644 gcloud-java-gax/generated/src/main/java/com/google/type/TimeOfDayProto.java delete mode 100644 gcloud-java-gax/pom.xml delete mode 100644 gcloud-java-gax/src/main/java/io/gapi/gax/grpc/ApiCallable.java delete mode 100644 gcloud-java-gax/src/main/java/io/gapi/gax/grpc/CallableDescriptor.java delete mode 100644 gcloud-java-gax/src/main/java/io/gapi/gax/grpc/CompoundClientCall.java delete mode 100644 gcloud-java-gax/src/main/java/io/gapi/gax/grpc/FollowedByCallable.java delete mode 100644 gcloud-java-gax/src/main/java/io/gapi/gax/grpc/PageDescriptor.java delete mode 100644 gcloud-java-gax/src/main/java/io/gapi/gax/grpc/PageStreamingCallable.java delete mode 100644 gcloud-java-gax/src/main/java/io/gapi/gax/grpc/RetryingCallable.java delete mode 100644 gcloud-java-gax/src/main/java/io/gapi/gax/grpc/ServiceApiSettings.java delete mode 100644 gcloud-java-gax/src/main/java/io/gapi/gax/grpc/TransformingCallable.java delete mode 100644 gcloud-java-gax/src/main/java/io/gapi/gax/internal/ApiUtils.java delete mode 100644 gcloud-java-gax/src/main/java/io/gapi/gax/protobuf/PathTemplate.java delete mode 100644 gcloud-java-gax/src/main/java/io/gapi/gax/protobuf/ResourceName.java delete mode 100644 gcloud-java-gax/src/main/java/io/gapi/gax/protobuf/ValidationException.java delete mode 100644 gcloud-java-gax/src/test/java/io/gapi/gax/grpc/ApiCallableTest.java delete mode 100644 gcloud-java-gax/src/test/java/io/gapi/gax/protobuf/PathTemplateTest.java delete mode 100644 gcloud-java-gax/src/test/java/io/gapi/gax/protobuf/ResourceNameTest.java diff --git a/gcloud-java-gax/README.md b/gcloud-java-gax/README.md deleted file mode 100644 index d3dfbdde1ca8..000000000000 --- a/gcloud-java-gax/README.md +++ /dev/null @@ -1,53 +0,0 @@ -Google Cloud Java Client -- GAX -========================================= - -This module provides common functionality required by service-specific modules of this library. - -[![Build Status](https://travis-ci.org/GoogleCloudPlatform/gcloud-java.svg?branch=master)](https://travis-ci.org/GoogleCloudPlatform/gcloud-java) -[![Coverage Status](https://coveralls.io/repos/GoogleCloudPlatform/gcloud-java/badge.svg?branch=master)](https://coveralls.io/r/GoogleCloudPlatform/gcloud-java?branch=master) -[![Maven](https://img.shields.io/maven-central/v/com.google.gcloud/gcloud-java-gax.svg)](https://img.shields.io/maven-central/v/com.google.gcloud/gcloud-java-gax.svg) - -- [Homepage] (https://googlecloudplatform.github.io/gcloud-java/) -- [API Documentation] (http://googlecloudplatform.github.io/gcloud-java/apidocs/index.html?com/google/gcloud/package-summary.html) - -Quickstart ----------- -Add this to your pom.xml file -```xml - - com.google.gcloud - gcloud-java-gax - 0.0.10 - -``` - -Java Versions -------------- - -Java 7 or above is required for using this client. - -Contributing ------------- - -Contributions to this library are always welcome and highly encouraged. - -See [CONTRIBUTING] for more information on how to get started. - -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. - -License -------- - -Apache 2.0 - See [LICENSE] for more information. - - -[CONTRIBUTING]:https://github.com/GoogleCloudPlatform/gcloud-java/blob/master/CONTRIBUTING.md -[LICENSE]: https://github.com/GoogleCloudPlatform/gcloud-java/blob/master/LICENSE -[cloud-platform]: https://cloud.google.com/ diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/AnnotationsProto.java b/gcloud-java-gax/generated/src/main/java/com/google/api/AnnotationsProto.java deleted file mode 100644 index 0281d9ddd73b..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/AnnotationsProto.java +++ /dev/null @@ -1,222 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/api/annotations.proto - -package com.google.api; - -public final class AnnotationsProto { - private AnnotationsProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registry.add(com.google.api.AnnotationsProto.fileVisibility); - registry.add(com.google.api.AnnotationsProto.apiVisibility); - registry.add(com.google.api.AnnotationsProto.methodVisibility); - registry.add(com.google.api.AnnotationsProto.http); - registry.add(com.google.api.AnnotationsProto.messageVisibility); - registry.add(com.google.api.AnnotationsProto.customError); - registry.add(com.google.api.AnnotationsProto.fieldVisibility); - registry.add(com.google.api.AnnotationsProto.enumVisibility); - registry.add(com.google.api.AnnotationsProto.valueVisibility); - } - public static final int FILE_VISIBILITY_FIELD_NUMBER = 72295727; - /** - * extend .google.protobuf.FileOptions { ... } - * - *
-   * See `VisibilityRule`.
-   * 
- */ - public static final - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.google.protobuf.DescriptorProtos.FileOptions, - com.google.api.VisibilityRule> fileVisibility = com.google.protobuf.GeneratedMessage - .newFileScopedGeneratedExtension( - com.google.api.VisibilityRule.class, - com.google.api.VisibilityRule.getDefaultInstance()); - public static final int API_VISIBILITY_FIELD_NUMBER = 72295727; - /** - * extend .google.protobuf.ServiceOptions { ... } - * - *
-   * See `VisibilityRule`.
-   * 
- */ - public static final - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.google.protobuf.DescriptorProtos.ServiceOptions, - com.google.api.VisibilityRule> apiVisibility = com.google.protobuf.GeneratedMessage - .newFileScopedGeneratedExtension( - com.google.api.VisibilityRule.class, - com.google.api.VisibilityRule.getDefaultInstance()); - public static final int METHOD_VISIBILITY_FIELD_NUMBER = 72295727; - /** - * extend .google.protobuf.MethodOptions { ... } - * - *
-   * See `VisibilityRule`.
-   * 
- */ - public static final - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.google.protobuf.DescriptorProtos.MethodOptions, - com.google.api.VisibilityRule> methodVisibility = com.google.protobuf.GeneratedMessage - .newFileScopedGeneratedExtension( - com.google.api.VisibilityRule.class, - com.google.api.VisibilityRule.getDefaultInstance()); - public static final int HTTP_FIELD_NUMBER = 72295728; - /** - * extend .google.protobuf.MethodOptions { ... } - * - *
-   * See `HttpRule`.
-   * 
- */ - public static final - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.google.protobuf.DescriptorProtos.MethodOptions, - com.google.api.HttpRule> http = com.google.protobuf.GeneratedMessage - .newFileScopedGeneratedExtension( - com.google.api.HttpRule.class, - com.google.api.HttpRule.getDefaultInstance()); - public static final int MESSAGE_VISIBILITY_FIELD_NUMBER = 72295727; - /** - * extend .google.protobuf.MessageOptions { ... } - * - *
-   * See `VisibilityRule`.
-   * 
- */ - public static final - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.google.protobuf.DescriptorProtos.MessageOptions, - com.google.api.VisibilityRule> messageVisibility = com.google.protobuf.GeneratedMessage - .newFileScopedGeneratedExtension( - com.google.api.VisibilityRule.class, - com.google.api.VisibilityRule.getDefaultInstance()); - public static final int CUSTOM_ERROR_FIELD_NUMBER = 79365461; - /** - * extend .google.protobuf.MessageOptions { ... } - * - *
-   * See `CustomErrorRule`.
-   * 
- */ - public static final - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.google.protobuf.DescriptorProtos.MessageOptions, - com.google.api.CustomErrorRule> customError = com.google.protobuf.GeneratedMessage - .newFileScopedGeneratedExtension( - com.google.api.CustomErrorRule.class, - com.google.api.CustomErrorRule.getDefaultInstance()); - public static final int FIELD_VISIBILITY_FIELD_NUMBER = 72295727; - /** - * extend .google.protobuf.FieldOptions { ... } - * - *
-   * See `VisibilityRule`.
-   * 
- */ - public static final - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.google.protobuf.DescriptorProtos.FieldOptions, - com.google.api.VisibilityRule> fieldVisibility = com.google.protobuf.GeneratedMessage - .newFileScopedGeneratedExtension( - com.google.api.VisibilityRule.class, - com.google.api.VisibilityRule.getDefaultInstance()); - public static final int ENUM_VISIBILITY_FIELD_NUMBER = 72295727; - /** - * extend .google.protobuf.EnumOptions { ... } - * - *
-   * See `VisibilityRule`.
-   * 
- */ - public static final - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.google.protobuf.DescriptorProtos.EnumOptions, - com.google.api.VisibilityRule> enumVisibility = com.google.protobuf.GeneratedMessage - .newFileScopedGeneratedExtension( - com.google.api.VisibilityRule.class, - com.google.api.VisibilityRule.getDefaultInstance()); - public static final int VALUE_VISIBILITY_FIELD_NUMBER = 72295727; - /** - * extend .google.protobuf.EnumValueOptions { ... } - * - *
-   * See `VisibilityRule`.
-   * 
- */ - public static final - com.google.protobuf.GeneratedMessage.GeneratedExtension< - com.google.protobuf.DescriptorProtos.EnumValueOptions, - com.google.api.VisibilityRule> valueVisibility = com.google.protobuf.GeneratedMessage - .newFileScopedGeneratedExtension( - com.google.api.VisibilityRule.class, - com.google.api.VisibilityRule.getDefaultInstance()); - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n\034google/api/annotations.proto\022\ngoogle.a" + - "pi\032 google/protobuf/descriptor.proto\032\026go" + - "ogle/api/error.proto\032\025google/api/http.pr" + - "oto\032\033google/api/visibility.proto:T\n\017file" + - "_visibility\022\034.google.protobuf.FileOption" + - "s\030\257\312\274\" \001(\0132\032.google.api.VisibilityRule:V" + - "\n\016api_visibility\022\037.google.protobuf.Servi" + - "ceOptions\030\257\312\274\" \001(\0132\032.google.api.Visibili" + - "tyRule:X\n\021method_visibility\022\036.google.pro" + - "tobuf.MethodOptions\030\257\312\274\" \001(\0132\032.google.ap", - "i.VisibilityRule:E\n\004http\022\036.google.protob" + - "uf.MethodOptions\030\260\312\274\" \001(\0132\024.google.api.H" + - "ttpRule:Z\n\022message_visibility\022\037.google.p" + - "rotobuf.MessageOptions\030\257\312\274\" \001(\0132\032.google" + - ".api.VisibilityRule:U\n\014custom_error\022\037.go" + - "ogle.protobuf.MessageOptions\030\325\212\354% \001(\0132\033." + - "google.api.CustomErrorRule:V\n\020field_visi" + - "bility\022\035.google.protobuf.FieldOptions\030\257\312" + - "\274\" \001(\0132\032.google.api.VisibilityRule:T\n\017en" + - "um_visibility\022\034.google.protobuf.EnumOpti", - "ons\030\257\312\274\" \001(\0132\032.google.api.VisibilityRule" + - ":Z\n\020value_visibility\022!.google.protobuf.E" + - "numValueOptions\030\257\312\274\" \001(\0132\032.google.api.Vi" + - "sibilityRuleB$\n\016com.google.apiB\020Annotati" + - "onsProtoP\001b\006proto3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.protobuf.DescriptorProtos.getDescriptor(), - com.google.api.ErrorFormatProto.getDescriptor(), - com.google.api.HttpProto.getDescriptor(), - com.google.api.VisibilityProto.getDescriptor(), - }, assigner); - fileVisibility.internalInit(descriptor.getExtensions().get(0)); - apiVisibility.internalInit(descriptor.getExtensions().get(1)); - methodVisibility.internalInit(descriptor.getExtensions().get(2)); - http.internalInit(descriptor.getExtensions().get(3)); - messageVisibility.internalInit(descriptor.getExtensions().get(4)); - customError.internalInit(descriptor.getExtensions().get(5)); - fieldVisibility.internalInit(descriptor.getExtensions().get(6)); - enumVisibility.internalInit(descriptor.getExtensions().get(7)); - valueVisibility.internalInit(descriptor.getExtensions().get(8)); - com.google.protobuf.DescriptorProtos.getDescriptor(); - com.google.api.ErrorFormatProto.getDescriptor(); - com.google.api.HttpProto.getDescriptor(); - com.google.api.VisibilityProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/Context.java b/gcloud-java-gax/generated/src/main/java/com/google/api/Context.java deleted file mode 100644 index 1385a7b9ea50..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/Context.java +++ /dev/null @@ -1,779 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/api/context.proto - -package com.google.api; - -/** - * Protobuf type {@code google.api.Context} - * - *
- * `Context` defines which contexts an API requests.
- * Example:
- *     context:
- *       rules:
- *       - selector: "*"
- *         requested:
- *         - google.rpc.context.ProjectContext
- *         - google.rpc.context.OriginContext
- * The above specifies that all methods in the API request
- * `google.rpc.context.ProjectContext` and
- * `google.rpc.context.OriginContext`.
- * Available context types are defined in package
- * `google.rpc.context`.
- * 
- */ -public final class Context extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.api.Context) - ContextOrBuilder { - // Use Context.newBuilder() to construct. - private Context(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Context() { - rules_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private Context( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - int mutable_bitField0_ = 0; - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!input.skipField(tag)) { - done = true; - } - break; - } - case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - rules_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - rules_.add(input.readMessage(com.google.api.ContextRule.parser(), extensionRegistry)); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - rules_ = java.util.Collections.unmodifiableList(rules_); - } - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.api.ContextProto.internal_static_google_api_Context_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.api.ContextProto.internal_static_google_api_Context_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.api.Context.class, com.google.api.Context.Builder.class); - } - - public static final int RULES_FIELD_NUMBER = 1; - private java.util.List rules_; - /** - * repeated .google.api.ContextRule rules = 1; - * - *
-   * List of rules for context, applicable to methods.
-   * 
- */ - public java.util.List getRulesList() { - return rules_; - } - /** - * repeated .google.api.ContextRule rules = 1; - * - *
-   * List of rules for context, applicable to methods.
-   * 
- */ - public java.util.List - getRulesOrBuilderList() { - return rules_; - } - /** - * repeated .google.api.ContextRule rules = 1; - * - *
-   * List of rules for context, applicable to methods.
-   * 
- */ - public int getRulesCount() { - return rules_.size(); - } - /** - * repeated .google.api.ContextRule rules = 1; - * - *
-   * List of rules for context, applicable to methods.
-   * 
- */ - public com.google.api.ContextRule getRules(int index) { - return rules_.get(index); - } - /** - * repeated .google.api.ContextRule rules = 1; - * - *
-   * List of rules for context, applicable to methods.
-   * 
- */ - public com.google.api.ContextRuleOrBuilder getRulesOrBuilder( - int index) { - return rules_.get(index); - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < rules_.size(); i++) { - output.writeMessage(1, rules_.get(i)); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < rules_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, rules_.get(i)); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static com.google.api.Context parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.api.Context 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.api.Context parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.api.Context parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.api.Context parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.api.Context parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.api.Context parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.api.Context parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.api.Context parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.api.Context parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.api.Context prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - 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; - } - /** - * Protobuf type {@code google.api.Context} - * - *
-   * `Context` defines which contexts an API requests.
-   * Example:
-   *     context:
-   *       rules:
-   *       - selector: "*"
-   *         requested:
-   *         - google.rpc.context.ProjectContext
-   *         - google.rpc.context.OriginContext
-   * The above specifies that all methods in the API request
-   * `google.rpc.context.ProjectContext` and
-   * `google.rpc.context.OriginContext`.
-   * Available context types are defined in package
-   * `google.rpc.context`.
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.api.Context) - com.google.api.ContextOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.api.ContextProto.internal_static_google_api_Context_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.api.ContextProto.internal_static_google_api_Context_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.api.Context.class, com.google.api.Context.Builder.class); - } - - // Construct using com.google.api.Context.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getRulesFieldBuilder(); - } - } - public Builder clear() { - super.clear(); - if (rulesBuilder_ == null) { - rules_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - rulesBuilder_.clear(); - } - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.api.ContextProto.internal_static_google_api_Context_descriptor; - } - - public com.google.api.Context getDefaultInstanceForType() { - return com.google.api.Context.getDefaultInstance(); - } - - public com.google.api.Context build() { - com.google.api.Context result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.api.Context buildPartial() { - com.google.api.Context result = new com.google.api.Context(this); - int from_bitField0_ = bitField0_; - if (rulesBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - rules_ = java.util.Collections.unmodifiableList(rules_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.rules_ = rules_; - } else { - result.rules_ = rulesBuilder_.build(); - } - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.api.Context) { - return mergeFrom((com.google.api.Context)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.api.Context other) { - if (other == com.google.api.Context.getDefaultInstance()) return this; - if (rulesBuilder_ == null) { - if (!other.rules_.isEmpty()) { - if (rules_.isEmpty()) { - rules_ = other.rules_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureRulesIsMutable(); - rules_.addAll(other.rules_); - } - onChanged(); - } - } else { - if (!other.rules_.isEmpty()) { - if (rulesBuilder_.isEmpty()) { - rulesBuilder_.dispose(); - rulesBuilder_ = null; - rules_ = other.rules_; - bitField0_ = (bitField0_ & ~0x00000001); - rulesBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getRulesFieldBuilder() : null; - } else { - rulesBuilder_.addAllMessages(other.rules_); - } - } - } - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.api.Context parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.api.Context) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List rules_ = - java.util.Collections.emptyList(); - private void ensureRulesIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { - rules_ = new java.util.ArrayList(rules_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.api.ContextRule, com.google.api.ContextRule.Builder, com.google.api.ContextRuleOrBuilder> rulesBuilder_; - - /** - * repeated .google.api.ContextRule rules = 1; - * - *
-     * List of rules for context, applicable to methods.
-     * 
- */ - public java.util.List getRulesList() { - if (rulesBuilder_ == null) { - return java.util.Collections.unmodifiableList(rules_); - } else { - return rulesBuilder_.getMessageList(); - } - } - /** - * repeated .google.api.ContextRule rules = 1; - * - *
-     * List of rules for context, applicable to methods.
-     * 
- */ - public int getRulesCount() { - if (rulesBuilder_ == null) { - return rules_.size(); - } else { - return rulesBuilder_.getCount(); - } - } - /** - * repeated .google.api.ContextRule rules = 1; - * - *
-     * List of rules for context, applicable to methods.
-     * 
- */ - public com.google.api.ContextRule getRules(int index) { - if (rulesBuilder_ == null) { - return rules_.get(index); - } else { - return rulesBuilder_.getMessage(index); - } - } - /** - * repeated .google.api.ContextRule rules = 1; - * - *
-     * List of rules for context, applicable to methods.
-     * 
- */ - public Builder setRules( - int index, com.google.api.ContextRule value) { - if (rulesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRulesIsMutable(); - rules_.set(index, value); - onChanged(); - } else { - rulesBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .google.api.ContextRule rules = 1; - * - *
-     * List of rules for context, applicable to methods.
-     * 
- */ - public Builder setRules( - int index, com.google.api.ContextRule.Builder builderForValue) { - if (rulesBuilder_ == null) { - ensureRulesIsMutable(); - rules_.set(index, builderForValue.build()); - onChanged(); - } else { - rulesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.api.ContextRule rules = 1; - * - *
-     * List of rules for context, applicable to methods.
-     * 
- */ - public Builder addRules(com.google.api.ContextRule value) { - if (rulesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRulesIsMutable(); - rules_.add(value); - onChanged(); - } else { - rulesBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .google.api.ContextRule rules = 1; - * - *
-     * List of rules for context, applicable to methods.
-     * 
- */ - public Builder addRules( - int index, com.google.api.ContextRule value) { - if (rulesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRulesIsMutable(); - rules_.add(index, value); - onChanged(); - } else { - rulesBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .google.api.ContextRule rules = 1; - * - *
-     * List of rules for context, applicable to methods.
-     * 
- */ - public Builder addRules( - com.google.api.ContextRule.Builder builderForValue) { - if (rulesBuilder_ == null) { - ensureRulesIsMutable(); - rules_.add(builderForValue.build()); - onChanged(); - } else { - rulesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .google.api.ContextRule rules = 1; - * - *
-     * List of rules for context, applicable to methods.
-     * 
- */ - public Builder addRules( - int index, com.google.api.ContextRule.Builder builderForValue) { - if (rulesBuilder_ == null) { - ensureRulesIsMutable(); - rules_.add(index, builderForValue.build()); - onChanged(); - } else { - rulesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.api.ContextRule rules = 1; - * - *
-     * List of rules for context, applicable to methods.
-     * 
- */ - public Builder addAllRules( - java.lang.Iterable values) { - if (rulesBuilder_ == null) { - ensureRulesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, rules_); - onChanged(); - } else { - rulesBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .google.api.ContextRule rules = 1; - * - *
-     * List of rules for context, applicable to methods.
-     * 
- */ - public Builder clearRules() { - if (rulesBuilder_ == null) { - rules_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - rulesBuilder_.clear(); - } - return this; - } - /** - * repeated .google.api.ContextRule rules = 1; - * - *
-     * List of rules for context, applicable to methods.
-     * 
- */ - public Builder removeRules(int index) { - if (rulesBuilder_ == null) { - ensureRulesIsMutable(); - rules_.remove(index); - onChanged(); - } else { - rulesBuilder_.remove(index); - } - return this; - } - /** - * repeated .google.api.ContextRule rules = 1; - * - *
-     * List of rules for context, applicable to methods.
-     * 
- */ - public com.google.api.ContextRule.Builder getRulesBuilder( - int index) { - return getRulesFieldBuilder().getBuilder(index); - } - /** - * repeated .google.api.ContextRule rules = 1; - * - *
-     * List of rules for context, applicable to methods.
-     * 
- */ - public com.google.api.ContextRuleOrBuilder getRulesOrBuilder( - int index) { - if (rulesBuilder_ == null) { - return rules_.get(index); } else { - return rulesBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .google.api.ContextRule rules = 1; - * - *
-     * List of rules for context, applicable to methods.
-     * 
- */ - public java.util.List - getRulesOrBuilderList() { - if (rulesBuilder_ != null) { - return rulesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(rules_); - } - } - /** - * repeated .google.api.ContextRule rules = 1; - * - *
-     * List of rules for context, applicable to methods.
-     * 
- */ - public com.google.api.ContextRule.Builder addRulesBuilder() { - return getRulesFieldBuilder().addBuilder( - com.google.api.ContextRule.getDefaultInstance()); - } - /** - * repeated .google.api.ContextRule rules = 1; - * - *
-     * List of rules for context, applicable to methods.
-     * 
- */ - public com.google.api.ContextRule.Builder addRulesBuilder( - int index) { - return getRulesFieldBuilder().addBuilder( - index, com.google.api.ContextRule.getDefaultInstance()); - } - /** - * repeated .google.api.ContextRule rules = 1; - * - *
-     * List of rules for context, applicable to methods.
-     * 
- */ - public java.util.List - getRulesBuilderList() { - return getRulesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - com.google.api.ContextRule, com.google.api.ContextRule.Builder, com.google.api.ContextRuleOrBuilder> - getRulesFieldBuilder() { - if (rulesBuilder_ == null) { - rulesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - com.google.api.ContextRule, com.google.api.ContextRule.Builder, com.google.api.ContextRuleOrBuilder>( - rules_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); - rules_ = null; - } - return rulesBuilder_; - } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - - // @@protoc_insertion_point(builder_scope:google.api.Context) - } - - // @@protoc_insertion_point(class_scope:google.api.Context) - private static final com.google.api.Context DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.api.Context(); - } - - public static com.google.api.Context getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public Context parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new Context(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public com.google.api.Context getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/ContextOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/api/ContextOrBuilder.java deleted file mode 100644 index 97be9b0b3dd9..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/ContextOrBuilder.java +++ /dev/null @@ -1,53 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/api/context.proto - -package com.google.api; - -public interface ContextOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.api.Context) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated .google.api.ContextRule rules = 1; - * - *
-   * List of rules for context, applicable to methods.
-   * 
- */ - java.util.List - getRulesList(); - /** - * repeated .google.api.ContextRule rules = 1; - * - *
-   * List of rules for context, applicable to methods.
-   * 
- */ - com.google.api.ContextRule getRules(int index); - /** - * repeated .google.api.ContextRule rules = 1; - * - *
-   * List of rules for context, applicable to methods.
-   * 
- */ - int getRulesCount(); - /** - * repeated .google.api.ContextRule rules = 1; - * - *
-   * List of rules for context, applicable to methods.
-   * 
- */ - java.util.List - getRulesOrBuilderList(); - /** - * repeated .google.api.ContextRule rules = 1; - * - *
-   * List of rules for context, applicable to methods.
-   * 
- */ - com.google.api.ContextRuleOrBuilder getRulesOrBuilder( - int index); -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/ContextProto.java b/gcloud-java-gax/generated/src/main/java/com/google/api/ContextProto.java deleted file mode 100644 index 755c670fa8af..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/ContextProto.java +++ /dev/null @@ -1,64 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/api/context.proto - -package com.google.api; - -public final class ContextProto { - private ContextProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - } - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_api_Context_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_api_Context_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_api_ContextRule_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_api_ContextRule_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\030google/api/context.proto\022\ngoogle.api\"1" + - "\n\007Context\022&\n\005rules\030\001 \003(\0132\027.google.api.Co" + - "ntextRule\"D\n\013ContextRule\022\020\n\010selector\030\001 \001" + - "(\t\022\021\n\trequested\030\002 \003(\t\022\020\n\010provided\030\003 \003(\tB" + - " \n\016com.google.apiB\014ContextProtoP\001b\006proto" + - "3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }, assigner); - internal_static_google_api_Context_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_api_Context_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_api_Context_descriptor, - new java.lang.String[] { "Rules", }); - internal_static_google_api_ContextRule_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_api_ContextRule_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_api_ContextRule_descriptor, - new java.lang.String[] { "Selector", "Requested", "Provided", }); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/ContextRule.java b/gcloud-java-gax/generated/src/main/java/com/google/api/ContextRule.java deleted file mode 100644 index 9857e3bfdd24..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/ContextRule.java +++ /dev/null @@ -1,922 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/api/context.proto - -package com.google.api; - -/** - * Protobuf type {@code google.api.ContextRule} - * - *
- * A context rule provides information about the context for an individual API
- * element.
- * 
- */ -public final class ContextRule extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.api.ContextRule) - ContextRuleOrBuilder { - // Use ContextRule.newBuilder() to construct. - private ContextRule(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private ContextRule() { - selector_ = ""; - requested_ = com.google.protobuf.LazyStringArrayList.EMPTY; - provided_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private ContextRule( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - int mutable_bitField0_ = 0; - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!input.skipField(tag)) { - done = true; - } - break; - } - case 10: { - String s = input.readStringRequireUtf8(); - - selector_ = s; - break; - } - case 18: { - String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - requested_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - requested_.add(s); - break; - } - case 26: { - String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { - provided_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000004; - } - provided_.add(s); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - requested_ = requested_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { - provided_ = provided_.getUnmodifiableView(); - } - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.api.ContextProto.internal_static_google_api_ContextRule_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.api.ContextProto.internal_static_google_api_ContextRule_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.api.ContextRule.class, com.google.api.ContextRule.Builder.class); - } - - private int bitField0_; - public static final int SELECTOR_FIELD_NUMBER = 1; - private volatile java.lang.Object selector_; - /** - * optional string selector = 1; - * - *
-   * Selects the methods to which this rule applies.
-   * Refer to [selector][DocumentationRule.selector] for syntax details.
-   * 
- */ - public java.lang.String getSelector() { - java.lang.Object ref = selector_; - 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(); - selector_ = s; - return s; - } - } - /** - * optional string selector = 1; - * - *
-   * Selects the methods to which this rule applies.
-   * Refer to [selector][DocumentationRule.selector] for syntax details.
-   * 
- */ - public com.google.protobuf.ByteString - getSelectorBytes() { - java.lang.Object ref = selector_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - selector_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int REQUESTED_FIELD_NUMBER = 2; - private com.google.protobuf.LazyStringList requested_; - /** - * repeated string requested = 2; - * - *
-   * A list of full type names of requested contexts.
-   * 
- */ - public com.google.protobuf.ProtocolStringList - getRequestedList() { - return requested_; - } - /** - * repeated string requested = 2; - * - *
-   * A list of full type names of requested contexts.
-   * 
- */ - public int getRequestedCount() { - return requested_.size(); - } - /** - * repeated string requested = 2; - * - *
-   * A list of full type names of requested contexts.
-   * 
- */ - public java.lang.String getRequested(int index) { - return requested_.get(index); - } - /** - * repeated string requested = 2; - * - *
-   * A list of full type names of requested contexts.
-   * 
- */ - public com.google.protobuf.ByteString - getRequestedBytes(int index) { - return requested_.getByteString(index); - } - - public static final int PROVIDED_FIELD_NUMBER = 3; - private com.google.protobuf.LazyStringList provided_; - /** - * repeated string provided = 3; - * - *
-   * A list of full type names of provided contexts.
-   * 
- */ - public com.google.protobuf.ProtocolStringList - getProvidedList() { - return provided_; - } - /** - * repeated string provided = 3; - * - *
-   * A list of full type names of provided contexts.
-   * 
- */ - public int getProvidedCount() { - return provided_.size(); - } - /** - * repeated string provided = 3; - * - *
-   * A list of full type names of provided contexts.
-   * 
- */ - public java.lang.String getProvided(int index) { - return provided_.get(index); - } - /** - * repeated string provided = 3; - * - *
-   * A list of full type names of provided contexts.
-   * 
- */ - public com.google.protobuf.ByteString - getProvidedBytes(int index) { - return provided_.getByteString(index); - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!getSelectorBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, selector_); - } - for (int i = 0; i < requested_.size(); i++) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, requested_.getRaw(i)); - } - for (int i = 0; i < provided_.size(); i++) { - com.google.protobuf.GeneratedMessage.writeString(output, 3, provided_.getRaw(i)); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getSelectorBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, selector_); - } - { - int dataSize = 0; - for (int i = 0; i < requested_.size(); i++) { - dataSize += computeStringSizeNoTag(requested_.getRaw(i)); - } - size += dataSize; - size += 1 * getRequestedList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < provided_.size(); i++) { - dataSize += computeStringSizeNoTag(provided_.getRaw(i)); - } - size += dataSize; - size += 1 * getProvidedList().size(); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static com.google.api.ContextRule parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.api.ContextRule 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.api.ContextRule parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.api.ContextRule parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.api.ContextRule parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.api.ContextRule parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.api.ContextRule parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.api.ContextRule parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.api.ContextRule parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.api.ContextRule parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.api.ContextRule prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - 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; - } - /** - * Protobuf type {@code google.api.ContextRule} - * - *
-   * A context rule provides information about the context for an individual API
-   * element.
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.api.ContextRule) - com.google.api.ContextRuleOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.api.ContextProto.internal_static_google_api_ContextRule_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.api.ContextProto.internal_static_google_api_ContextRule_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.api.ContextRule.class, com.google.api.ContextRule.Builder.class); - } - - // Construct using com.google.api.ContextRule.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - selector_ = ""; - - requested_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - provided_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.api.ContextProto.internal_static_google_api_ContextRule_descriptor; - } - - public com.google.api.ContextRule getDefaultInstanceForType() { - return com.google.api.ContextRule.getDefaultInstance(); - } - - public com.google.api.ContextRule build() { - com.google.api.ContextRule result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.api.ContextRule buildPartial() { - com.google.api.ContextRule result = new com.google.api.ContextRule(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - result.selector_ = selector_; - if (((bitField0_ & 0x00000002) == 0x00000002)) { - requested_ = requested_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.requested_ = requested_; - if (((bitField0_ & 0x00000004) == 0x00000004)) { - provided_ = provided_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.provided_ = provided_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.api.ContextRule) { - return mergeFrom((com.google.api.ContextRule)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.api.ContextRule other) { - if (other == com.google.api.ContextRule.getDefaultInstance()) return this; - if (!other.getSelector().isEmpty()) { - selector_ = other.selector_; - onChanged(); - } - if (!other.requested_.isEmpty()) { - if (requested_.isEmpty()) { - requested_ = other.requested_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureRequestedIsMutable(); - requested_.addAll(other.requested_); - } - onChanged(); - } - if (!other.provided_.isEmpty()) { - if (provided_.isEmpty()) { - provided_ = other.provided_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureProvidedIsMutable(); - provided_.addAll(other.provided_); - } - onChanged(); - } - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.api.ContextRule parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.api.ContextRule) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object selector_ = ""; - /** - * optional string selector = 1; - * - *
-     * Selects the methods to which this rule applies.
-     * Refer to [selector][DocumentationRule.selector] for syntax details.
-     * 
- */ - public java.lang.String getSelector() { - java.lang.Object ref = selector_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - selector_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string selector = 1; - * - *
-     * Selects the methods to which this rule applies.
-     * Refer to [selector][DocumentationRule.selector] for syntax details.
-     * 
- */ - public com.google.protobuf.ByteString - getSelectorBytes() { - java.lang.Object ref = selector_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - selector_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string selector = 1; - * - *
-     * Selects the methods to which this rule applies.
-     * Refer to [selector][DocumentationRule.selector] for syntax details.
-     * 
- */ - public Builder setSelector( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - selector_ = value; - onChanged(); - return this; - } - /** - * optional string selector = 1; - * - *
-     * Selects the methods to which this rule applies.
-     * Refer to [selector][DocumentationRule.selector] for syntax details.
-     * 
- */ - public Builder clearSelector() { - - selector_ = getDefaultInstance().getSelector(); - onChanged(); - return this; - } - /** - * optional string selector = 1; - * - *
-     * Selects the methods to which this rule applies.
-     * Refer to [selector][DocumentationRule.selector] for syntax details.
-     * 
- */ - public Builder setSelectorBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - selector_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList requested_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureRequestedIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { - requested_ = new com.google.protobuf.LazyStringArrayList(requested_); - bitField0_ |= 0x00000002; - } - } - /** - * repeated string requested = 2; - * - *
-     * A list of full type names of requested contexts.
-     * 
- */ - public com.google.protobuf.ProtocolStringList - getRequestedList() { - return requested_.getUnmodifiableView(); - } - /** - * repeated string requested = 2; - * - *
-     * A list of full type names of requested contexts.
-     * 
- */ - public int getRequestedCount() { - return requested_.size(); - } - /** - * repeated string requested = 2; - * - *
-     * A list of full type names of requested contexts.
-     * 
- */ - public java.lang.String getRequested(int index) { - return requested_.get(index); - } - /** - * repeated string requested = 2; - * - *
-     * A list of full type names of requested contexts.
-     * 
- */ - public com.google.protobuf.ByteString - getRequestedBytes(int index) { - return requested_.getByteString(index); - } - /** - * repeated string requested = 2; - * - *
-     * A list of full type names of requested contexts.
-     * 
- */ - public Builder setRequested( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureRequestedIsMutable(); - requested_.set(index, value); - onChanged(); - return this; - } - /** - * repeated string requested = 2; - * - *
-     * A list of full type names of requested contexts.
-     * 
- */ - public Builder addRequested( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureRequestedIsMutable(); - requested_.add(value); - onChanged(); - return this; - } - /** - * repeated string requested = 2; - * - *
-     * A list of full type names of requested contexts.
-     * 
- */ - public Builder addAllRequested( - java.lang.Iterable values) { - ensureRequestedIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, requested_); - onChanged(); - return this; - } - /** - * repeated string requested = 2; - * - *
-     * A list of full type names of requested contexts.
-     * 
- */ - public Builder clearRequested() { - requested_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * repeated string requested = 2; - * - *
-     * A list of full type names of requested contexts.
-     * 
- */ - public Builder addRequestedBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureRequestedIsMutable(); - requested_.add(value); - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList provided_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureProvidedIsMutable() { - if (!((bitField0_ & 0x00000004) == 0x00000004)) { - provided_ = new com.google.protobuf.LazyStringArrayList(provided_); - bitField0_ |= 0x00000004; - } - } - /** - * repeated string provided = 3; - * - *
-     * A list of full type names of provided contexts.
-     * 
- */ - public com.google.protobuf.ProtocolStringList - getProvidedList() { - return provided_.getUnmodifiableView(); - } - /** - * repeated string provided = 3; - * - *
-     * A list of full type names of provided contexts.
-     * 
- */ - public int getProvidedCount() { - return provided_.size(); - } - /** - * repeated string provided = 3; - * - *
-     * A list of full type names of provided contexts.
-     * 
- */ - public java.lang.String getProvided(int index) { - return provided_.get(index); - } - /** - * repeated string provided = 3; - * - *
-     * A list of full type names of provided contexts.
-     * 
- */ - public com.google.protobuf.ByteString - getProvidedBytes(int index) { - return provided_.getByteString(index); - } - /** - * repeated string provided = 3; - * - *
-     * A list of full type names of provided contexts.
-     * 
- */ - public Builder setProvided( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureProvidedIsMutable(); - provided_.set(index, value); - onChanged(); - return this; - } - /** - * repeated string provided = 3; - * - *
-     * A list of full type names of provided contexts.
-     * 
- */ - public Builder addProvided( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureProvidedIsMutable(); - provided_.add(value); - onChanged(); - return this; - } - /** - * repeated string provided = 3; - * - *
-     * A list of full type names of provided contexts.
-     * 
- */ - public Builder addAllProvided( - java.lang.Iterable values) { - ensureProvidedIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, provided_); - onChanged(); - return this; - } - /** - * repeated string provided = 3; - * - *
-     * A list of full type names of provided contexts.
-     * 
- */ - public Builder clearProvided() { - provided_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * repeated string provided = 3; - * - *
-     * A list of full type names of provided contexts.
-     * 
- */ - public Builder addProvidedBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureProvidedIsMutable(); - provided_.add(value); - onChanged(); - return this; - } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - - // @@protoc_insertion_point(builder_scope:google.api.ContextRule) - } - - // @@protoc_insertion_point(class_scope:google.api.ContextRule) - private static final com.google.api.ContextRule DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.api.ContextRule(); - } - - public static com.google.api.ContextRule getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public ContextRule parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new ContextRule(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public com.google.api.ContextRule getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/ContextRuleOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/api/ContextRuleOrBuilder.java deleted file mode 100644 index 3174e0295a35..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/ContextRuleOrBuilder.java +++ /dev/null @@ -1,99 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/api/context.proto - -package com.google.api; - -public interface ContextRuleOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.api.ContextRule) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string selector = 1; - * - *
-   * Selects the methods to which this rule applies.
-   * Refer to [selector][DocumentationRule.selector] for syntax details.
-   * 
- */ - java.lang.String getSelector(); - /** - * optional string selector = 1; - * - *
-   * Selects the methods to which this rule applies.
-   * Refer to [selector][DocumentationRule.selector] for syntax details.
-   * 
- */ - com.google.protobuf.ByteString - getSelectorBytes(); - - /** - * repeated string requested = 2; - * - *
-   * A list of full type names of requested contexts.
-   * 
- */ - com.google.protobuf.ProtocolStringList - getRequestedList(); - /** - * repeated string requested = 2; - * - *
-   * A list of full type names of requested contexts.
-   * 
- */ - int getRequestedCount(); - /** - * repeated string requested = 2; - * - *
-   * A list of full type names of requested contexts.
-   * 
- */ - java.lang.String getRequested(int index); - /** - * repeated string requested = 2; - * - *
-   * A list of full type names of requested contexts.
-   * 
- */ - com.google.protobuf.ByteString - getRequestedBytes(int index); - - /** - * repeated string provided = 3; - * - *
-   * A list of full type names of provided contexts.
-   * 
- */ - com.google.protobuf.ProtocolStringList - getProvidedList(); - /** - * repeated string provided = 3; - * - *
-   * A list of full type names of provided contexts.
-   * 
- */ - int getProvidedCount(); - /** - * repeated string provided = 3; - * - *
-   * A list of full type names of provided contexts.
-   * 
- */ - java.lang.String getProvided(int index); - /** - * repeated string provided = 3; - * - *
-   * A list of full type names of provided contexts.
-   * 
- */ - com.google.protobuf.ByteString - getProvidedBytes(int index); -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/CustomError.java b/gcloud-java-gax/generated/src/main/java/com/google/api/CustomError.java deleted file mode 100644 index 9b9b004161b3..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/CustomError.java +++ /dev/null @@ -1,1016 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/api/error.proto - -package com.google.api; - -/** - * Protobuf type {@code google.api.CustomError} - * - *
- * Customize service error responses.  For example, list any service
- * specific protobuf types that can appear in error detail lists of
- * error responses.
- * Example:
- *     custom_error:
- *       types:
- *       - google.foo.v1.CustomError
- *       - google.foo.v1.AnotherError
- * (-- For internal Google service producers, instead of listing such
- * custom error detail types in the YAML configuration file; Stubby
- * annotation can be used.  Please, see //google/api/annotations.proto
- * for more details. --)
- * 
- */ -public final class CustomError extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.api.CustomError) - CustomErrorOrBuilder { - // Use CustomError.newBuilder() to construct. - private CustomError(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private CustomError() { - rules_ = java.util.Collections.emptyList(); - types_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private CustomError( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - int mutable_bitField0_ = 0; - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!input.skipField(tag)) { - done = true; - } - break; - } - case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - rules_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - rules_.add(input.readMessage(com.google.api.CustomErrorRule.parser(), extensionRegistry)); - break; - } - case 18: { - String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - types_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - types_.add(s); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - rules_ = java.util.Collections.unmodifiableList(rules_); - } - if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - types_ = types_.getUnmodifiableView(); - } - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.api.ErrorFormatProto.internal_static_google_api_CustomError_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.api.ErrorFormatProto.internal_static_google_api_CustomError_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.api.CustomError.class, com.google.api.CustomError.Builder.class); - } - - public static final int RULES_FIELD_NUMBER = 1; - private java.util.List rules_; - /** - * repeated .google.api.CustomErrorRule rules = 1; - * - *
-   * The list of custom error rules to select to which messages this should
-   * apply.
-   * 
- */ - public java.util.List getRulesList() { - return rules_; - } - /** - * repeated .google.api.CustomErrorRule rules = 1; - * - *
-   * The list of custom error rules to select to which messages this should
-   * apply.
-   * 
- */ - public java.util.List - getRulesOrBuilderList() { - return rules_; - } - /** - * repeated .google.api.CustomErrorRule rules = 1; - * - *
-   * The list of custom error rules to select to which messages this should
-   * apply.
-   * 
- */ - public int getRulesCount() { - return rules_.size(); - } - /** - * repeated .google.api.CustomErrorRule rules = 1; - * - *
-   * The list of custom error rules to select to which messages this should
-   * apply.
-   * 
- */ - public com.google.api.CustomErrorRule getRules(int index) { - return rules_.get(index); - } - /** - * repeated .google.api.CustomErrorRule rules = 1; - * - *
-   * The list of custom error rules to select to which messages this should
-   * apply.
-   * 
- */ - public com.google.api.CustomErrorRuleOrBuilder getRulesOrBuilder( - int index) { - return rules_.get(index); - } - - public static final int TYPES_FIELD_NUMBER = 2; - private com.google.protobuf.LazyStringList types_; - /** - * repeated string types = 2; - * - *
-   * The list of custom error detail types, e.g. 'google.foo.v1.CustomError'.
-   * 
- */ - public com.google.protobuf.ProtocolStringList - getTypesList() { - return types_; - } - /** - * repeated string types = 2; - * - *
-   * The list of custom error detail types, e.g. 'google.foo.v1.CustomError'.
-   * 
- */ - public int getTypesCount() { - return types_.size(); - } - /** - * repeated string types = 2; - * - *
-   * The list of custom error detail types, e.g. 'google.foo.v1.CustomError'.
-   * 
- */ - public java.lang.String getTypes(int index) { - return types_.get(index); - } - /** - * repeated string types = 2; - * - *
-   * The list of custom error detail types, e.g. 'google.foo.v1.CustomError'.
-   * 
- */ - public com.google.protobuf.ByteString - getTypesBytes(int index) { - return types_.getByteString(index); - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < rules_.size(); i++) { - output.writeMessage(1, rules_.get(i)); - } - for (int i = 0; i < types_.size(); i++) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, types_.getRaw(i)); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < rules_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, rules_.get(i)); - } - { - int dataSize = 0; - for (int i = 0; i < types_.size(); i++) { - dataSize += computeStringSizeNoTag(types_.getRaw(i)); - } - size += dataSize; - size += 1 * getTypesList().size(); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static com.google.api.CustomError parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.api.CustomError 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.api.CustomError parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.api.CustomError parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.api.CustomError parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.api.CustomError parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.api.CustomError parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.api.CustomError parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.api.CustomError parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.api.CustomError parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.api.CustomError prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - 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; - } - /** - * Protobuf type {@code google.api.CustomError} - * - *
-   * Customize service error responses.  For example, list any service
-   * specific protobuf types that can appear in error detail lists of
-   * error responses.
-   * Example:
-   *     custom_error:
-   *       types:
-   *       - google.foo.v1.CustomError
-   *       - google.foo.v1.AnotherError
-   * (-- For internal Google service producers, instead of listing such
-   * custom error detail types in the YAML configuration file; Stubby
-   * annotation can be used.  Please, see //google/api/annotations.proto
-   * for more details. --)
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.api.CustomError) - com.google.api.CustomErrorOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.api.ErrorFormatProto.internal_static_google_api_CustomError_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.api.ErrorFormatProto.internal_static_google_api_CustomError_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.api.CustomError.class, com.google.api.CustomError.Builder.class); - } - - // Construct using com.google.api.CustomError.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getRulesFieldBuilder(); - } - } - public Builder clear() { - super.clear(); - if (rulesBuilder_ == null) { - rules_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - rulesBuilder_.clear(); - } - types_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.api.ErrorFormatProto.internal_static_google_api_CustomError_descriptor; - } - - public com.google.api.CustomError getDefaultInstanceForType() { - return com.google.api.CustomError.getDefaultInstance(); - } - - public com.google.api.CustomError build() { - com.google.api.CustomError result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.api.CustomError buildPartial() { - com.google.api.CustomError result = new com.google.api.CustomError(this); - int from_bitField0_ = bitField0_; - if (rulesBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - rules_ = java.util.Collections.unmodifiableList(rules_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.rules_ = rules_; - } else { - result.rules_ = rulesBuilder_.build(); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - types_ = types_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.types_ = types_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.api.CustomError) { - return mergeFrom((com.google.api.CustomError)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.api.CustomError other) { - if (other == com.google.api.CustomError.getDefaultInstance()) return this; - if (rulesBuilder_ == null) { - if (!other.rules_.isEmpty()) { - if (rules_.isEmpty()) { - rules_ = other.rules_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureRulesIsMutable(); - rules_.addAll(other.rules_); - } - onChanged(); - } - } else { - if (!other.rules_.isEmpty()) { - if (rulesBuilder_.isEmpty()) { - rulesBuilder_.dispose(); - rulesBuilder_ = null; - rules_ = other.rules_; - bitField0_ = (bitField0_ & ~0x00000001); - rulesBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getRulesFieldBuilder() : null; - } else { - rulesBuilder_.addAllMessages(other.rules_); - } - } - } - if (!other.types_.isEmpty()) { - if (types_.isEmpty()) { - types_ = other.types_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureTypesIsMutable(); - types_.addAll(other.types_); - } - onChanged(); - } - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.api.CustomError parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.api.CustomError) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List rules_ = - java.util.Collections.emptyList(); - private void ensureRulesIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { - rules_ = new java.util.ArrayList(rules_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.api.CustomErrorRule, com.google.api.CustomErrorRule.Builder, com.google.api.CustomErrorRuleOrBuilder> rulesBuilder_; - - /** - * repeated .google.api.CustomErrorRule rules = 1; - * - *
-     * The list of custom error rules to select to which messages this should
-     * apply.
-     * 
- */ - public java.util.List getRulesList() { - if (rulesBuilder_ == null) { - return java.util.Collections.unmodifiableList(rules_); - } else { - return rulesBuilder_.getMessageList(); - } - } - /** - * repeated .google.api.CustomErrorRule rules = 1; - * - *
-     * The list of custom error rules to select to which messages this should
-     * apply.
-     * 
- */ - public int getRulesCount() { - if (rulesBuilder_ == null) { - return rules_.size(); - } else { - return rulesBuilder_.getCount(); - } - } - /** - * repeated .google.api.CustomErrorRule rules = 1; - * - *
-     * The list of custom error rules to select to which messages this should
-     * apply.
-     * 
- */ - public com.google.api.CustomErrorRule getRules(int index) { - if (rulesBuilder_ == null) { - return rules_.get(index); - } else { - return rulesBuilder_.getMessage(index); - } - } - /** - * repeated .google.api.CustomErrorRule rules = 1; - * - *
-     * The list of custom error rules to select to which messages this should
-     * apply.
-     * 
- */ - public Builder setRules( - int index, com.google.api.CustomErrorRule value) { - if (rulesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRulesIsMutable(); - rules_.set(index, value); - onChanged(); - } else { - rulesBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .google.api.CustomErrorRule rules = 1; - * - *
-     * The list of custom error rules to select to which messages this should
-     * apply.
-     * 
- */ - public Builder setRules( - int index, com.google.api.CustomErrorRule.Builder builderForValue) { - if (rulesBuilder_ == null) { - ensureRulesIsMutable(); - rules_.set(index, builderForValue.build()); - onChanged(); - } else { - rulesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.api.CustomErrorRule rules = 1; - * - *
-     * The list of custom error rules to select to which messages this should
-     * apply.
-     * 
- */ - public Builder addRules(com.google.api.CustomErrorRule value) { - if (rulesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRulesIsMutable(); - rules_.add(value); - onChanged(); - } else { - rulesBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .google.api.CustomErrorRule rules = 1; - * - *
-     * The list of custom error rules to select to which messages this should
-     * apply.
-     * 
- */ - public Builder addRules( - int index, com.google.api.CustomErrorRule value) { - if (rulesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRulesIsMutable(); - rules_.add(index, value); - onChanged(); - } else { - rulesBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .google.api.CustomErrorRule rules = 1; - * - *
-     * The list of custom error rules to select to which messages this should
-     * apply.
-     * 
- */ - public Builder addRules( - com.google.api.CustomErrorRule.Builder builderForValue) { - if (rulesBuilder_ == null) { - ensureRulesIsMutable(); - rules_.add(builderForValue.build()); - onChanged(); - } else { - rulesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .google.api.CustomErrorRule rules = 1; - * - *
-     * The list of custom error rules to select to which messages this should
-     * apply.
-     * 
- */ - public Builder addRules( - int index, com.google.api.CustomErrorRule.Builder builderForValue) { - if (rulesBuilder_ == null) { - ensureRulesIsMutable(); - rules_.add(index, builderForValue.build()); - onChanged(); - } else { - rulesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.api.CustomErrorRule rules = 1; - * - *
-     * The list of custom error rules to select to which messages this should
-     * apply.
-     * 
- */ - public Builder addAllRules( - java.lang.Iterable values) { - if (rulesBuilder_ == null) { - ensureRulesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, rules_); - onChanged(); - } else { - rulesBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .google.api.CustomErrorRule rules = 1; - * - *
-     * The list of custom error rules to select to which messages this should
-     * apply.
-     * 
- */ - public Builder clearRules() { - if (rulesBuilder_ == null) { - rules_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - rulesBuilder_.clear(); - } - return this; - } - /** - * repeated .google.api.CustomErrorRule rules = 1; - * - *
-     * The list of custom error rules to select to which messages this should
-     * apply.
-     * 
- */ - public Builder removeRules(int index) { - if (rulesBuilder_ == null) { - ensureRulesIsMutable(); - rules_.remove(index); - onChanged(); - } else { - rulesBuilder_.remove(index); - } - return this; - } - /** - * repeated .google.api.CustomErrorRule rules = 1; - * - *
-     * The list of custom error rules to select to which messages this should
-     * apply.
-     * 
- */ - public com.google.api.CustomErrorRule.Builder getRulesBuilder( - int index) { - return getRulesFieldBuilder().getBuilder(index); - } - /** - * repeated .google.api.CustomErrorRule rules = 1; - * - *
-     * The list of custom error rules to select to which messages this should
-     * apply.
-     * 
- */ - public com.google.api.CustomErrorRuleOrBuilder getRulesOrBuilder( - int index) { - if (rulesBuilder_ == null) { - return rules_.get(index); } else { - return rulesBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .google.api.CustomErrorRule rules = 1; - * - *
-     * The list of custom error rules to select to which messages this should
-     * apply.
-     * 
- */ - public java.util.List - getRulesOrBuilderList() { - if (rulesBuilder_ != null) { - return rulesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(rules_); - } - } - /** - * repeated .google.api.CustomErrorRule rules = 1; - * - *
-     * The list of custom error rules to select to which messages this should
-     * apply.
-     * 
- */ - public com.google.api.CustomErrorRule.Builder addRulesBuilder() { - return getRulesFieldBuilder().addBuilder( - com.google.api.CustomErrorRule.getDefaultInstance()); - } - /** - * repeated .google.api.CustomErrorRule rules = 1; - * - *
-     * The list of custom error rules to select to which messages this should
-     * apply.
-     * 
- */ - public com.google.api.CustomErrorRule.Builder addRulesBuilder( - int index) { - return getRulesFieldBuilder().addBuilder( - index, com.google.api.CustomErrorRule.getDefaultInstance()); - } - /** - * repeated .google.api.CustomErrorRule rules = 1; - * - *
-     * The list of custom error rules to select to which messages this should
-     * apply.
-     * 
- */ - public java.util.List - getRulesBuilderList() { - return getRulesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - com.google.api.CustomErrorRule, com.google.api.CustomErrorRule.Builder, com.google.api.CustomErrorRuleOrBuilder> - getRulesFieldBuilder() { - if (rulesBuilder_ == null) { - rulesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - com.google.api.CustomErrorRule, com.google.api.CustomErrorRule.Builder, com.google.api.CustomErrorRuleOrBuilder>( - rules_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); - rules_ = null; - } - return rulesBuilder_; - } - - private com.google.protobuf.LazyStringList types_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureTypesIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { - types_ = new com.google.protobuf.LazyStringArrayList(types_); - bitField0_ |= 0x00000002; - } - } - /** - * repeated string types = 2; - * - *
-     * The list of custom error detail types, e.g. 'google.foo.v1.CustomError'.
-     * 
- */ - public com.google.protobuf.ProtocolStringList - getTypesList() { - return types_.getUnmodifiableView(); - } - /** - * repeated string types = 2; - * - *
-     * The list of custom error detail types, e.g. 'google.foo.v1.CustomError'.
-     * 
- */ - public int getTypesCount() { - return types_.size(); - } - /** - * repeated string types = 2; - * - *
-     * The list of custom error detail types, e.g. 'google.foo.v1.CustomError'.
-     * 
- */ - public java.lang.String getTypes(int index) { - return types_.get(index); - } - /** - * repeated string types = 2; - * - *
-     * The list of custom error detail types, e.g. 'google.foo.v1.CustomError'.
-     * 
- */ - public com.google.protobuf.ByteString - getTypesBytes(int index) { - return types_.getByteString(index); - } - /** - * repeated string types = 2; - * - *
-     * The list of custom error detail types, e.g. 'google.foo.v1.CustomError'.
-     * 
- */ - public Builder setTypes( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureTypesIsMutable(); - types_.set(index, value); - onChanged(); - return this; - } - /** - * repeated string types = 2; - * - *
-     * The list of custom error detail types, e.g. 'google.foo.v1.CustomError'.
-     * 
- */ - public Builder addTypes( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureTypesIsMutable(); - types_.add(value); - onChanged(); - return this; - } - /** - * repeated string types = 2; - * - *
-     * The list of custom error detail types, e.g. 'google.foo.v1.CustomError'.
-     * 
- */ - public Builder addAllTypes( - java.lang.Iterable values) { - ensureTypesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, types_); - onChanged(); - return this; - } - /** - * repeated string types = 2; - * - *
-     * The list of custom error detail types, e.g. 'google.foo.v1.CustomError'.
-     * 
- */ - public Builder clearTypes() { - types_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * repeated string types = 2; - * - *
-     * The list of custom error detail types, e.g. 'google.foo.v1.CustomError'.
-     * 
- */ - public Builder addTypesBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureTypesIsMutable(); - types_.add(value); - onChanged(); - return this; - } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - - // @@protoc_insertion_point(builder_scope:google.api.CustomError) - } - - // @@protoc_insertion_point(class_scope:google.api.CustomError) - private static final com.google.api.CustomError DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.api.CustomError(); - } - - public static com.google.api.CustomError getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public CustomError parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new CustomError(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public com.google.api.CustomError getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/CustomErrorOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/api/CustomErrorOrBuilder.java deleted file mode 100644 index 9e7fc1d0b94d..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/CustomErrorOrBuilder.java +++ /dev/null @@ -1,93 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/api/error.proto - -package com.google.api; - -public interface CustomErrorOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.api.CustomError) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated .google.api.CustomErrorRule rules = 1; - * - *
-   * The list of custom error rules to select to which messages this should
-   * apply.
-   * 
- */ - java.util.List - getRulesList(); - /** - * repeated .google.api.CustomErrorRule rules = 1; - * - *
-   * The list of custom error rules to select to which messages this should
-   * apply.
-   * 
- */ - com.google.api.CustomErrorRule getRules(int index); - /** - * repeated .google.api.CustomErrorRule rules = 1; - * - *
-   * The list of custom error rules to select to which messages this should
-   * apply.
-   * 
- */ - int getRulesCount(); - /** - * repeated .google.api.CustomErrorRule rules = 1; - * - *
-   * The list of custom error rules to select to which messages this should
-   * apply.
-   * 
- */ - java.util.List - getRulesOrBuilderList(); - /** - * repeated .google.api.CustomErrorRule rules = 1; - * - *
-   * The list of custom error rules to select to which messages this should
-   * apply.
-   * 
- */ - com.google.api.CustomErrorRuleOrBuilder getRulesOrBuilder( - int index); - - /** - * repeated string types = 2; - * - *
-   * The list of custom error detail types, e.g. 'google.foo.v1.CustomError'.
-   * 
- */ - com.google.protobuf.ProtocolStringList - getTypesList(); - /** - * repeated string types = 2; - * - *
-   * The list of custom error detail types, e.g. 'google.foo.v1.CustomError'.
-   * 
- */ - int getTypesCount(); - /** - * repeated string types = 2; - * - *
-   * The list of custom error detail types, e.g. 'google.foo.v1.CustomError'.
-   * 
- */ - java.lang.String getTypes(int index); - /** - * repeated string types = 2; - * - *
-   * The list of custom error detail types, e.g. 'google.foo.v1.CustomError'.
-   * 
- */ - com.google.protobuf.ByteString - getTypesBytes(int index); -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/CustomErrorRule.java b/gcloud-java-gax/generated/src/main/java/com/google/api/CustomErrorRule.java deleted file mode 100644 index 6f1333cb2e13..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/CustomErrorRule.java +++ /dev/null @@ -1,627 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/api/error.proto - -package com.google.api; - -/** - * Protobuf type {@code google.api.CustomErrorRule} - * - *
- * A custom error rule.
- * 
- */ -public final class CustomErrorRule extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.api.CustomErrorRule) - CustomErrorRuleOrBuilder { - // Use CustomErrorRule.newBuilder() to construct. - private CustomErrorRule(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private CustomErrorRule() { - selector_ = ""; - stubbyBridge_ = 0; - isErrorType_ = false; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private CustomErrorRule( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - int mutable_bitField0_ = 0; - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!input.skipField(tag)) { - done = true; - } - break; - } - case 10: { - String s = input.readStringRequireUtf8(); - - selector_ = s; - break; - } - case 16: { - - stubbyBridge_ = input.readInt32(); - break; - } - case 24: { - - isErrorType_ = input.readBool(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.api.ErrorFormatProto.internal_static_google_api_CustomErrorRule_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.api.ErrorFormatProto.internal_static_google_api_CustomErrorRule_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.api.CustomErrorRule.class, com.google.api.CustomErrorRule.Builder.class); - } - - public static final int SELECTOR_FIELD_NUMBER = 1; - private volatile java.lang.Object selector_; - /** - * optional string selector = 1; - * - *
-   * Selects messages to which this rule applies.
-   * Refer to [selector][DocumentationRule.selector] for syntax details.
-   * 
- */ - public java.lang.String getSelector() { - java.lang.Object ref = selector_; - 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(); - selector_ = s; - return s; - } - } - /** - * optional string selector = 1; - * - *
-   * Selects messages to which this rule applies.
-   * Refer to [selector][DocumentationRule.selector] for syntax details.
-   * 
- */ - public com.google.protobuf.ByteString - getSelectorBytes() { - java.lang.Object ref = selector_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - selector_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int STUBBY_BRIDGE_FIELD_NUMBER = 2; - private int stubbyBridge_; - /** - * optional int32 stubby_bridge = 2 [deprecated = true]; - * - *
-   * (--The Stubby bridge of the message.--)
-   * 
- */ - @java.lang.Deprecated public int getStubbyBridge() { - return stubbyBridge_; - } - - public static final int IS_ERROR_TYPE_FIELD_NUMBER = 3; - private boolean isErrorType_; - /** - * optional bool is_error_type = 3; - * - *
-   * Mark this message as possible payload in error response.  Otherwise,
-   * objects of this type will be filtered when they appear in error payload.
-   * 
- */ - public boolean getIsErrorType() { - return isErrorType_; - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!getSelectorBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, selector_); - } - if (stubbyBridge_ != 0) { - output.writeInt32(2, stubbyBridge_); - } - if (isErrorType_ != false) { - output.writeBool(3, isErrorType_); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getSelectorBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, selector_); - } - if (stubbyBridge_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, stubbyBridge_); - } - if (isErrorType_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(3, isErrorType_); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static com.google.api.CustomErrorRule parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.api.CustomErrorRule 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.api.CustomErrorRule parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.api.CustomErrorRule parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.api.CustomErrorRule parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.api.CustomErrorRule parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.api.CustomErrorRule parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.api.CustomErrorRule parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.api.CustomErrorRule parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.api.CustomErrorRule parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.api.CustomErrorRule prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - 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; - } - /** - * Protobuf type {@code google.api.CustomErrorRule} - * - *
-   * A custom error rule.
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.api.CustomErrorRule) - com.google.api.CustomErrorRuleOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.api.ErrorFormatProto.internal_static_google_api_CustomErrorRule_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.api.ErrorFormatProto.internal_static_google_api_CustomErrorRule_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.api.CustomErrorRule.class, com.google.api.CustomErrorRule.Builder.class); - } - - // Construct using com.google.api.CustomErrorRule.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - selector_ = ""; - - stubbyBridge_ = 0; - - isErrorType_ = false; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.api.ErrorFormatProto.internal_static_google_api_CustomErrorRule_descriptor; - } - - public com.google.api.CustomErrorRule getDefaultInstanceForType() { - return com.google.api.CustomErrorRule.getDefaultInstance(); - } - - public com.google.api.CustomErrorRule build() { - com.google.api.CustomErrorRule result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.api.CustomErrorRule buildPartial() { - com.google.api.CustomErrorRule result = new com.google.api.CustomErrorRule(this); - result.selector_ = selector_; - result.stubbyBridge_ = stubbyBridge_; - result.isErrorType_ = isErrorType_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.api.CustomErrorRule) { - return mergeFrom((com.google.api.CustomErrorRule)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.api.CustomErrorRule other) { - if (other == com.google.api.CustomErrorRule.getDefaultInstance()) return this; - if (!other.getSelector().isEmpty()) { - selector_ = other.selector_; - onChanged(); - } - if (other.getStubbyBridge() != 0) { - setStubbyBridge(other.getStubbyBridge()); - } - if (other.getIsErrorType() != false) { - setIsErrorType(other.getIsErrorType()); - } - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.api.CustomErrorRule parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.api.CustomErrorRule) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object selector_ = ""; - /** - * optional string selector = 1; - * - *
-     * Selects messages to which this rule applies.
-     * Refer to [selector][DocumentationRule.selector] for syntax details.
-     * 
- */ - public java.lang.String getSelector() { - java.lang.Object ref = selector_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - selector_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string selector = 1; - * - *
-     * Selects messages to which this rule applies.
-     * Refer to [selector][DocumentationRule.selector] for syntax details.
-     * 
- */ - public com.google.protobuf.ByteString - getSelectorBytes() { - java.lang.Object ref = selector_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - selector_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string selector = 1; - * - *
-     * Selects messages to which this rule applies.
-     * Refer to [selector][DocumentationRule.selector] for syntax details.
-     * 
- */ - public Builder setSelector( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - selector_ = value; - onChanged(); - return this; - } - /** - * optional string selector = 1; - * - *
-     * Selects messages to which this rule applies.
-     * Refer to [selector][DocumentationRule.selector] for syntax details.
-     * 
- */ - public Builder clearSelector() { - - selector_ = getDefaultInstance().getSelector(); - onChanged(); - return this; - } - /** - * optional string selector = 1; - * - *
-     * Selects messages to which this rule applies.
-     * Refer to [selector][DocumentationRule.selector] for syntax details.
-     * 
- */ - public Builder setSelectorBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - selector_ = value; - onChanged(); - return this; - } - - private int stubbyBridge_ ; - /** - * optional int32 stubby_bridge = 2 [deprecated = true]; - * - *
-     * (--The Stubby bridge of the message.--)
-     * 
- */ - @java.lang.Deprecated public int getStubbyBridge() { - return stubbyBridge_; - } - /** - * optional int32 stubby_bridge = 2 [deprecated = true]; - * - *
-     * (--The Stubby bridge of the message.--)
-     * 
- */ - @java.lang.Deprecated public Builder setStubbyBridge(int value) { - - stubbyBridge_ = value; - onChanged(); - return this; - } - /** - * optional int32 stubby_bridge = 2 [deprecated = true]; - * - *
-     * (--The Stubby bridge of the message.--)
-     * 
- */ - @java.lang.Deprecated public Builder clearStubbyBridge() { - - stubbyBridge_ = 0; - onChanged(); - return this; - } - - private boolean isErrorType_ ; - /** - * optional bool is_error_type = 3; - * - *
-     * Mark this message as possible payload in error response.  Otherwise,
-     * objects of this type will be filtered when they appear in error payload.
-     * 
- */ - public boolean getIsErrorType() { - return isErrorType_; - } - /** - * optional bool is_error_type = 3; - * - *
-     * Mark this message as possible payload in error response.  Otherwise,
-     * objects of this type will be filtered when they appear in error payload.
-     * 
- */ - public Builder setIsErrorType(boolean value) { - - isErrorType_ = value; - onChanged(); - return this; - } - /** - * optional bool is_error_type = 3; - * - *
-     * Mark this message as possible payload in error response.  Otherwise,
-     * objects of this type will be filtered when they appear in error payload.
-     * 
- */ - public Builder clearIsErrorType() { - - isErrorType_ = false; - onChanged(); - return this; - } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - - // @@protoc_insertion_point(builder_scope:google.api.CustomErrorRule) - } - - // @@protoc_insertion_point(class_scope:google.api.CustomErrorRule) - private static final com.google.api.CustomErrorRule DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.api.CustomErrorRule(); - } - - public static com.google.api.CustomErrorRule getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public CustomErrorRule parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new CustomErrorRule(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public com.google.api.CustomErrorRule getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/CustomErrorRuleOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/api/CustomErrorRuleOrBuilder.java deleted file mode 100644 index a4746577b373..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/CustomErrorRuleOrBuilder.java +++ /dev/null @@ -1,48 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/api/error.proto - -package com.google.api; - -public interface CustomErrorRuleOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.api.CustomErrorRule) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string selector = 1; - * - *
-   * Selects messages to which this rule applies.
-   * Refer to [selector][DocumentationRule.selector] for syntax details.
-   * 
- */ - java.lang.String getSelector(); - /** - * optional string selector = 1; - * - *
-   * Selects messages to which this rule applies.
-   * Refer to [selector][DocumentationRule.selector] for syntax details.
-   * 
- */ - com.google.protobuf.ByteString - getSelectorBytes(); - - /** - * optional int32 stubby_bridge = 2 [deprecated = true]; - * - *
-   * (--The Stubby bridge of the message.--)
-   * 
- */ - @java.lang.Deprecated int getStubbyBridge(); - - /** - * optional bool is_error_type = 3; - * - *
-   * Mark this message as possible payload in error response.  Otherwise,
-   * objects of this type will be filtered when they appear in error payload.
-   * 
- */ - boolean getIsErrorType(); -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/CustomHttpPattern.java b/gcloud-java-gax/generated/src/main/java/com/google/api/CustomHttpPattern.java deleted file mode 100644 index e3a51cd280c7..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/CustomHttpPattern.java +++ /dev/null @@ -1,627 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/api/http.proto - -package com.google.api; - -/** - * Protobuf type {@code google.api.CustomHttpPattern} - * - *
- * A custom pattern is used for defining custom HTTP verb.
- * 
- */ -public final class CustomHttpPattern extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.api.CustomHttpPattern) - CustomHttpPatternOrBuilder { - // Use CustomHttpPattern.newBuilder() to construct. - private CustomHttpPattern(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private CustomHttpPattern() { - kind_ = ""; - path_ = ""; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private CustomHttpPattern( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - int mutable_bitField0_ = 0; - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!input.skipField(tag)) { - done = true; - } - break; - } - case 10: { - String s = input.readStringRequireUtf8(); - - kind_ = s; - break; - } - case 18: { - String s = input.readStringRequireUtf8(); - - path_ = s; - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.api.HttpProto.internal_static_google_api_CustomHttpPattern_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.api.HttpProto.internal_static_google_api_CustomHttpPattern_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.api.CustomHttpPattern.class, com.google.api.CustomHttpPattern.Builder.class); - } - - public static final int KIND_FIELD_NUMBER = 1; - private volatile java.lang.Object kind_; - /** - * optional string kind = 1; - * - *
-   * The name of this custom HTTP verb.
-   * 
- */ - public java.lang.String getKind() { - java.lang.Object ref = kind_; - 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(); - kind_ = s; - return s; - } - } - /** - * optional string kind = 1; - * - *
-   * The name of this custom HTTP verb.
-   * 
- */ - public com.google.protobuf.ByteString - getKindBytes() { - java.lang.Object ref = kind_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - kind_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PATH_FIELD_NUMBER = 2; - private volatile java.lang.Object path_; - /** - * optional string path = 2; - * - *
-   * The path matched by this custom verb.
-   * 
- */ - public java.lang.String getPath() { - java.lang.Object ref = path_; - 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(); - path_ = s; - return s; - } - } - /** - * optional string path = 2; - * - *
-   * The path matched by this custom verb.
-   * 
- */ - public com.google.protobuf.ByteString - getPathBytes() { - java.lang.Object ref = path_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - path_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!getKindBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, kind_); - } - if (!getPathBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, path_); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getKindBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, kind_); - } - if (!getPathBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, path_); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static com.google.api.CustomHttpPattern parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.api.CustomHttpPattern 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.api.CustomHttpPattern parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.api.CustomHttpPattern parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.api.CustomHttpPattern parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.api.CustomHttpPattern parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.api.CustomHttpPattern parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.api.CustomHttpPattern parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.api.CustomHttpPattern parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.api.CustomHttpPattern parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.api.CustomHttpPattern prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - 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; - } - /** - * Protobuf type {@code google.api.CustomHttpPattern} - * - *
-   * A custom pattern is used for defining custom HTTP verb.
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.api.CustomHttpPattern) - com.google.api.CustomHttpPatternOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.api.HttpProto.internal_static_google_api_CustomHttpPattern_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.api.HttpProto.internal_static_google_api_CustomHttpPattern_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.api.CustomHttpPattern.class, com.google.api.CustomHttpPattern.Builder.class); - } - - // Construct using com.google.api.CustomHttpPattern.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - kind_ = ""; - - path_ = ""; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.api.HttpProto.internal_static_google_api_CustomHttpPattern_descriptor; - } - - public com.google.api.CustomHttpPattern getDefaultInstanceForType() { - return com.google.api.CustomHttpPattern.getDefaultInstance(); - } - - public com.google.api.CustomHttpPattern build() { - com.google.api.CustomHttpPattern result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.api.CustomHttpPattern buildPartial() { - com.google.api.CustomHttpPattern result = new com.google.api.CustomHttpPattern(this); - result.kind_ = kind_; - result.path_ = path_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.api.CustomHttpPattern) { - return mergeFrom((com.google.api.CustomHttpPattern)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.api.CustomHttpPattern other) { - if (other == com.google.api.CustomHttpPattern.getDefaultInstance()) return this; - if (!other.getKind().isEmpty()) { - kind_ = other.kind_; - onChanged(); - } - if (!other.getPath().isEmpty()) { - path_ = other.path_; - onChanged(); - } - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.api.CustomHttpPattern parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.api.CustomHttpPattern) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object kind_ = ""; - /** - * optional string kind = 1; - * - *
-     * The name of this custom HTTP verb.
-     * 
- */ - public java.lang.String getKind() { - java.lang.Object ref = kind_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - kind_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string kind = 1; - * - *
-     * The name of this custom HTTP verb.
-     * 
- */ - public com.google.protobuf.ByteString - getKindBytes() { - java.lang.Object ref = kind_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - kind_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string kind = 1; - * - *
-     * The name of this custom HTTP verb.
-     * 
- */ - public Builder setKind( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - kind_ = value; - onChanged(); - return this; - } - /** - * optional string kind = 1; - * - *
-     * The name of this custom HTTP verb.
-     * 
- */ - public Builder clearKind() { - - kind_ = getDefaultInstance().getKind(); - onChanged(); - return this; - } - /** - * optional string kind = 1; - * - *
-     * The name of this custom HTTP verb.
-     * 
- */ - public Builder setKindBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - kind_ = value; - onChanged(); - return this; - } - - private java.lang.Object path_ = ""; - /** - * optional string path = 2; - * - *
-     * The path matched by this custom verb.
-     * 
- */ - public java.lang.String getPath() { - java.lang.Object ref = path_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - path_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string path = 2; - * - *
-     * The path matched by this custom verb.
-     * 
- */ - public com.google.protobuf.ByteString - getPathBytes() { - java.lang.Object ref = path_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - path_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string path = 2; - * - *
-     * The path matched by this custom verb.
-     * 
- */ - public Builder setPath( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - path_ = value; - onChanged(); - return this; - } - /** - * optional string path = 2; - * - *
-     * The path matched by this custom verb.
-     * 
- */ - public Builder clearPath() { - - path_ = getDefaultInstance().getPath(); - onChanged(); - return this; - } - /** - * optional string path = 2; - * - *
-     * The path matched by this custom verb.
-     * 
- */ - public Builder setPathBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - path_ = value; - onChanged(); - return this; - } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - - // @@protoc_insertion_point(builder_scope:google.api.CustomHttpPattern) - } - - // @@protoc_insertion_point(class_scope:google.api.CustomHttpPattern) - private static final com.google.api.CustomHttpPattern DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.api.CustomHttpPattern(); - } - - public static com.google.api.CustomHttpPattern getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public CustomHttpPattern parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new CustomHttpPattern(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public com.google.api.CustomHttpPattern getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/CustomHttpPatternOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/api/CustomHttpPatternOrBuilder.java deleted file mode 100644 index e45514be7749..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/CustomHttpPatternOrBuilder.java +++ /dev/null @@ -1,45 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/api/http.proto - -package com.google.api; - -public interface CustomHttpPatternOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.api.CustomHttpPattern) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string kind = 1; - * - *
-   * The name of this custom HTTP verb.
-   * 
- */ - java.lang.String getKind(); - /** - * optional string kind = 1; - * - *
-   * The name of this custom HTTP verb.
-   * 
- */ - com.google.protobuf.ByteString - getKindBytes(); - - /** - * optional string path = 2; - * - *
-   * The path matched by this custom verb.
-   * 
- */ - java.lang.String getPath(); - /** - * optional string path = 2; - * - *
-   * The path matched by this custom verb.
-   * 
- */ - com.google.protobuf.ByteString - getPathBytes(); -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/Documentation.java b/gcloud-java-gax/generated/src/main/java/com/google/api/Documentation.java deleted file mode 100644 index 544435e99564..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/Documentation.java +++ /dev/null @@ -1,1816 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/api/documentation.proto - -package com.google.api; - -/** - * Protobuf type {@code google.api.Documentation} - * - *
- * `Documentation` provides the information for describing a service.
- * Example:
- *     documentation:
- *       summary: >
- *         The Google Calendar API gives access
- *         to most calendar features.
- *       pages:
- *       - name: Overview
- *         content: (== include google/foo/overview.md ==)
- *       - name: Tutorial
- *         content: (== include google/foo/tutorial.md ==)
- *         subpages;
- *         - name: Java
- *           content: (== include google/foo/tutorial_java.md ==)
- *       rules:
- *       - selector: google.calendar.Calendar.Get
- *         description: >
- *           ...
- *       - selector: google.calendar.Calendar.Put
- *         description: >
- *           ...
- * Documentation is provided in markdown syntax. In addition to
- * standard markdown features, definition lists, tables and fenced
- * code blocks are supported. Section headers can be provided and are
- * interpreted relative to the section nesting of the context where
- * a documentation fragment is embedded.
- * Documentation from the IDL is merged with documentation defined
- * via the config at normalization time, where documentation provided
- * by config rules overrides IDL provided.
- * A number of constructs specific to the API platform are supported
- * in documentation text.
- * In order to reference a proto element, the following
- * notation can be used:
- * <pre><code>&#91;display text]&#91;fully.qualified.proto.name]
- * &#91;fully.qualified.proto.name]&#91;]</code></pre>
- * Text can be excluded from doc using the following notation:
- * <pre><code>&#40;-- internal comment --&#41;</code></pre>
- * Comments can be made conditional using a visibility label. The below
- * text will be only rendered if the `BETA` label is available:
- * <pre><code>&#40;--BETA: comment for BETA users --&#41;</code></pre>
- * A few directives are available in documentation. Note that
- * directives must appear on a single line to be properly
- * identified. The `include` directive includes a markdown file from
- * an external source:
- *     (== include path/to/file> ==)
- * The `resource_for` directive marks a message to be the resource of
- * a collection in REST view. If it is not specified, tools attempt
- * to infer the resource from the operations in a collection:
- *     (== resource_for v1.shelves.books ==)
- * The directive `suppress_warning` is not directly effecting documentation
- * and is documented together with service config validation.
- * 
- */ -public final class Documentation extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.api.Documentation) - DocumentationOrBuilder { - // Use Documentation.newBuilder() to construct. - private Documentation(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Documentation() { - summary_ = ""; - pages_ = java.util.Collections.emptyList(); - rules_ = java.util.Collections.emptyList(); - documentationRootUrl_ = ""; - overview_ = ""; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private Documentation( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - int mutable_bitField0_ = 0; - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!input.skipField(tag)) { - done = true; - } - break; - } - case 10: { - String s = input.readStringRequireUtf8(); - - summary_ = s; - break; - } - case 18: { - String s = input.readStringRequireUtf8(); - - overview_ = s; - break; - } - case 26: { - if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { - rules_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - rules_.add(input.readMessage(com.google.api.DocumentationRule.parser(), extensionRegistry)); - break; - } - case 34: { - String s = input.readStringRequireUtf8(); - - documentationRootUrl_ = s; - break; - } - case 42: { - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - pages_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - pages_.add(input.readMessage(com.google.api.Page.parser(), extensionRegistry)); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { - rules_ = java.util.Collections.unmodifiableList(rules_); - } - if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - pages_ = java.util.Collections.unmodifiableList(pages_); - } - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.api.DocumentationProto.internal_static_google_api_Documentation_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.api.DocumentationProto.internal_static_google_api_Documentation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.api.Documentation.class, com.google.api.Documentation.Builder.class); - } - - private int bitField0_; - public static final int SUMMARY_FIELD_NUMBER = 1; - private volatile java.lang.Object summary_; - /** - * optional string summary = 1; - * - *
-   * A short summary of what the service does. Can only be provided by
-   * plain text.
-   * 
- */ - public java.lang.String getSummary() { - java.lang.Object ref = summary_; - 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(); - summary_ = s; - return s; - } - } - /** - * optional string summary = 1; - * - *
-   * A short summary of what the service does. Can only be provided by
-   * plain text.
-   * 
- */ - public com.google.protobuf.ByteString - getSummaryBytes() { - java.lang.Object ref = summary_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - summary_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PAGES_FIELD_NUMBER = 5; - private java.util.List pages_; - /** - * repeated .google.api.Page pages = 5; - * - *
-   * The top level pages for the documentation set.
-   * 
- */ - public java.util.List getPagesList() { - return pages_; - } - /** - * repeated .google.api.Page pages = 5; - * - *
-   * The top level pages for the documentation set.
-   * 
- */ - public java.util.List - getPagesOrBuilderList() { - return pages_; - } - /** - * repeated .google.api.Page pages = 5; - * - *
-   * The top level pages for the documentation set.
-   * 
- */ - public int getPagesCount() { - return pages_.size(); - } - /** - * repeated .google.api.Page pages = 5; - * - *
-   * The top level pages for the documentation set.
-   * 
- */ - public com.google.api.Page getPages(int index) { - return pages_.get(index); - } - /** - * repeated .google.api.Page pages = 5; - * - *
-   * The top level pages for the documentation set.
-   * 
- */ - public com.google.api.PageOrBuilder getPagesOrBuilder( - int index) { - return pages_.get(index); - } - - public static final int RULES_FIELD_NUMBER = 3; - private java.util.List rules_; - /** - * repeated .google.api.DocumentationRule rules = 3; - * - *
-   * Documentation rules for individual elements of the service.
-   * 
- */ - public java.util.List getRulesList() { - return rules_; - } - /** - * repeated .google.api.DocumentationRule rules = 3; - * - *
-   * Documentation rules for individual elements of the service.
-   * 
- */ - public java.util.List - getRulesOrBuilderList() { - return rules_; - } - /** - * repeated .google.api.DocumentationRule rules = 3; - * - *
-   * Documentation rules for individual elements of the service.
-   * 
- */ - public int getRulesCount() { - return rules_.size(); - } - /** - * repeated .google.api.DocumentationRule rules = 3; - * - *
-   * Documentation rules for individual elements of the service.
-   * 
- */ - public com.google.api.DocumentationRule getRules(int index) { - return rules_.get(index); - } - /** - * repeated .google.api.DocumentationRule rules = 3; - * - *
-   * Documentation rules for individual elements of the service.
-   * 
- */ - public com.google.api.DocumentationRuleOrBuilder getRulesOrBuilder( - int index) { - return rules_.get(index); - } - - public static final int DOCUMENTATION_ROOT_URL_FIELD_NUMBER = 4; - private volatile java.lang.Object documentationRootUrl_; - /** - * optional string documentation_root_url = 4; - * - *
-   * The URL to the root of documentation.
-   * 
- */ - public java.lang.String getDocumentationRootUrl() { - java.lang.Object ref = documentationRootUrl_; - 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(); - documentationRootUrl_ = s; - return s; - } - } - /** - * optional string documentation_root_url = 4; - * - *
-   * The URL to the root of documentation.
-   * 
- */ - public com.google.protobuf.ByteString - getDocumentationRootUrlBytes() { - java.lang.Object ref = documentationRootUrl_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - documentationRootUrl_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int OVERVIEW_FIELD_NUMBER = 2; - private volatile java.lang.Object overview_; - /** - * optional string overview = 2; - * - *
-   * Declares a single overview page. For example:
-   *     documentation:
-   *       summary: ...
-   *       overview: (== include overview.md ==)
-   * This is a shortcut for the following declaration (using pages style):
-   *     documentation:
-   *       summary: ...
-   *       pages:
-   *       - name: Overview
-   *         content: (== include overview.md ==)
-   * Note: you cannot specify both `overview` field and `pages` field.
-   * 
- */ - public java.lang.String getOverview() { - java.lang.Object ref = overview_; - 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(); - overview_ = s; - return s; - } - } - /** - * optional string overview = 2; - * - *
-   * Declares a single overview page. For example:
-   *     documentation:
-   *       summary: ...
-   *       overview: (== include overview.md ==)
-   * This is a shortcut for the following declaration (using pages style):
-   *     documentation:
-   *       summary: ...
-   *       pages:
-   *       - name: Overview
-   *         content: (== include overview.md ==)
-   * Note: you cannot specify both `overview` field and `pages` field.
-   * 
- */ - public com.google.protobuf.ByteString - getOverviewBytes() { - java.lang.Object ref = overview_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - overview_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!getSummaryBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, summary_); - } - if (!getOverviewBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, overview_); - } - for (int i = 0; i < rules_.size(); i++) { - output.writeMessage(3, rules_.get(i)); - } - if (!getDocumentationRootUrlBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 4, documentationRootUrl_); - } - for (int i = 0; i < pages_.size(); i++) { - output.writeMessage(5, pages_.get(i)); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getSummaryBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, summary_); - } - if (!getOverviewBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, overview_); - } - for (int i = 0; i < rules_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, rules_.get(i)); - } - if (!getDocumentationRootUrlBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(4, documentationRootUrl_); - } - for (int i = 0; i < pages_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, pages_.get(i)); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static com.google.api.Documentation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.api.Documentation 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.api.Documentation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.api.Documentation parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.api.Documentation parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.api.Documentation parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.api.Documentation parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.api.Documentation parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.api.Documentation parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.api.Documentation parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.api.Documentation prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - 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; - } - /** - * Protobuf type {@code google.api.Documentation} - * - *
-   * `Documentation` provides the information for describing a service.
-   * Example:
-   *     documentation:
-   *       summary: >
-   *         The Google Calendar API gives access
-   *         to most calendar features.
-   *       pages:
-   *       - name: Overview
-   *         content: (== include google/foo/overview.md ==)
-   *       - name: Tutorial
-   *         content: (== include google/foo/tutorial.md ==)
-   *         subpages;
-   *         - name: Java
-   *           content: (== include google/foo/tutorial_java.md ==)
-   *       rules:
-   *       - selector: google.calendar.Calendar.Get
-   *         description: >
-   *           ...
-   *       - selector: google.calendar.Calendar.Put
-   *         description: >
-   *           ...
-   * Documentation is provided in markdown syntax. In addition to
-   * standard markdown features, definition lists, tables and fenced
-   * code blocks are supported. Section headers can be provided and are
-   * interpreted relative to the section nesting of the context where
-   * a documentation fragment is embedded.
-   * Documentation from the IDL is merged with documentation defined
-   * via the config at normalization time, where documentation provided
-   * by config rules overrides IDL provided.
-   * A number of constructs specific to the API platform are supported
-   * in documentation text.
-   * In order to reference a proto element, the following
-   * notation can be used:
-   * <pre><code>&#91;display text]&#91;fully.qualified.proto.name]
-   * &#91;fully.qualified.proto.name]&#91;]</code></pre>
-   * Text can be excluded from doc using the following notation:
-   * <pre><code>&#40;-- internal comment --&#41;</code></pre>
-   * Comments can be made conditional using a visibility label. The below
-   * text will be only rendered if the `BETA` label is available:
-   * <pre><code>&#40;--BETA: comment for BETA users --&#41;</code></pre>
-   * A few directives are available in documentation. Note that
-   * directives must appear on a single line to be properly
-   * identified. The `include` directive includes a markdown file from
-   * an external source:
-   *     (== include path/to/file> ==)
-   * The `resource_for` directive marks a message to be the resource of
-   * a collection in REST view. If it is not specified, tools attempt
-   * to infer the resource from the operations in a collection:
-   *     (== resource_for v1.shelves.books ==)
-   * The directive `suppress_warning` is not directly effecting documentation
-   * and is documented together with service config validation.
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.api.Documentation) - com.google.api.DocumentationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.api.DocumentationProto.internal_static_google_api_Documentation_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.api.DocumentationProto.internal_static_google_api_Documentation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.api.Documentation.class, com.google.api.Documentation.Builder.class); - } - - // Construct using com.google.api.Documentation.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getPagesFieldBuilder(); - getRulesFieldBuilder(); - } - } - public Builder clear() { - super.clear(); - summary_ = ""; - - if (pagesBuilder_ == null) { - pages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - pagesBuilder_.clear(); - } - if (rulesBuilder_ == null) { - rules_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - } else { - rulesBuilder_.clear(); - } - documentationRootUrl_ = ""; - - overview_ = ""; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.api.DocumentationProto.internal_static_google_api_Documentation_descriptor; - } - - public com.google.api.Documentation getDefaultInstanceForType() { - return com.google.api.Documentation.getDefaultInstance(); - } - - public com.google.api.Documentation build() { - com.google.api.Documentation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.api.Documentation buildPartial() { - com.google.api.Documentation result = new com.google.api.Documentation(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - result.summary_ = summary_; - if (pagesBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002)) { - pages_ = java.util.Collections.unmodifiableList(pages_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.pages_ = pages_; - } else { - result.pages_ = pagesBuilder_.build(); - } - if (rulesBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004)) { - rules_ = java.util.Collections.unmodifiableList(rules_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.rules_ = rules_; - } else { - result.rules_ = rulesBuilder_.build(); - } - result.documentationRootUrl_ = documentationRootUrl_; - result.overview_ = overview_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.api.Documentation) { - return mergeFrom((com.google.api.Documentation)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.api.Documentation other) { - if (other == com.google.api.Documentation.getDefaultInstance()) return this; - if (!other.getSummary().isEmpty()) { - summary_ = other.summary_; - onChanged(); - } - if (pagesBuilder_ == null) { - if (!other.pages_.isEmpty()) { - if (pages_.isEmpty()) { - pages_ = other.pages_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensurePagesIsMutable(); - pages_.addAll(other.pages_); - } - onChanged(); - } - } else { - if (!other.pages_.isEmpty()) { - if (pagesBuilder_.isEmpty()) { - pagesBuilder_.dispose(); - pagesBuilder_ = null; - pages_ = other.pages_; - bitField0_ = (bitField0_ & ~0x00000002); - pagesBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getPagesFieldBuilder() : null; - } else { - pagesBuilder_.addAllMessages(other.pages_); - } - } - } - if (rulesBuilder_ == null) { - if (!other.rules_.isEmpty()) { - if (rules_.isEmpty()) { - rules_ = other.rules_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureRulesIsMutable(); - rules_.addAll(other.rules_); - } - onChanged(); - } - } else { - if (!other.rules_.isEmpty()) { - if (rulesBuilder_.isEmpty()) { - rulesBuilder_.dispose(); - rulesBuilder_ = null; - rules_ = other.rules_; - bitField0_ = (bitField0_ & ~0x00000004); - rulesBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getRulesFieldBuilder() : null; - } else { - rulesBuilder_.addAllMessages(other.rules_); - } - } - } - if (!other.getDocumentationRootUrl().isEmpty()) { - documentationRootUrl_ = other.documentationRootUrl_; - onChanged(); - } - if (!other.getOverview().isEmpty()) { - overview_ = other.overview_; - onChanged(); - } - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.api.Documentation parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.api.Documentation) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object summary_ = ""; - /** - * optional string summary = 1; - * - *
-     * A short summary of what the service does. Can only be provided by
-     * plain text.
-     * 
- */ - public java.lang.String getSummary() { - java.lang.Object ref = summary_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - summary_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string summary = 1; - * - *
-     * A short summary of what the service does. Can only be provided by
-     * plain text.
-     * 
- */ - public com.google.protobuf.ByteString - getSummaryBytes() { - java.lang.Object ref = summary_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - summary_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string summary = 1; - * - *
-     * A short summary of what the service does. Can only be provided by
-     * plain text.
-     * 
- */ - public Builder setSummary( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - summary_ = value; - onChanged(); - return this; - } - /** - * optional string summary = 1; - * - *
-     * A short summary of what the service does. Can only be provided by
-     * plain text.
-     * 
- */ - public Builder clearSummary() { - - summary_ = getDefaultInstance().getSummary(); - onChanged(); - return this; - } - /** - * optional string summary = 1; - * - *
-     * A short summary of what the service does. Can only be provided by
-     * plain text.
-     * 
- */ - public Builder setSummaryBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - summary_ = value; - onChanged(); - return this; - } - - private java.util.List pages_ = - java.util.Collections.emptyList(); - private void ensurePagesIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { - pages_ = new java.util.ArrayList(pages_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.api.Page, com.google.api.Page.Builder, com.google.api.PageOrBuilder> pagesBuilder_; - - /** - * repeated .google.api.Page pages = 5; - * - *
-     * The top level pages for the documentation set.
-     * 
- */ - public java.util.List getPagesList() { - if (pagesBuilder_ == null) { - return java.util.Collections.unmodifiableList(pages_); - } else { - return pagesBuilder_.getMessageList(); - } - } - /** - * repeated .google.api.Page pages = 5; - * - *
-     * The top level pages for the documentation set.
-     * 
- */ - public int getPagesCount() { - if (pagesBuilder_ == null) { - return pages_.size(); - } else { - return pagesBuilder_.getCount(); - } - } - /** - * repeated .google.api.Page pages = 5; - * - *
-     * The top level pages for the documentation set.
-     * 
- */ - public com.google.api.Page getPages(int index) { - if (pagesBuilder_ == null) { - return pages_.get(index); - } else { - return pagesBuilder_.getMessage(index); - } - } - /** - * repeated .google.api.Page pages = 5; - * - *
-     * The top level pages for the documentation set.
-     * 
- */ - public Builder setPages( - int index, com.google.api.Page value) { - if (pagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePagesIsMutable(); - pages_.set(index, value); - onChanged(); - } else { - pagesBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .google.api.Page pages = 5; - * - *
-     * The top level pages for the documentation set.
-     * 
- */ - public Builder setPages( - int index, com.google.api.Page.Builder builderForValue) { - if (pagesBuilder_ == null) { - ensurePagesIsMutable(); - pages_.set(index, builderForValue.build()); - onChanged(); - } else { - pagesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.api.Page pages = 5; - * - *
-     * The top level pages for the documentation set.
-     * 
- */ - public Builder addPages(com.google.api.Page value) { - if (pagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePagesIsMutable(); - pages_.add(value); - onChanged(); - } else { - pagesBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .google.api.Page pages = 5; - * - *
-     * The top level pages for the documentation set.
-     * 
- */ - public Builder addPages( - int index, com.google.api.Page value) { - if (pagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePagesIsMutable(); - pages_.add(index, value); - onChanged(); - } else { - pagesBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .google.api.Page pages = 5; - * - *
-     * The top level pages for the documentation set.
-     * 
- */ - public Builder addPages( - com.google.api.Page.Builder builderForValue) { - if (pagesBuilder_ == null) { - ensurePagesIsMutable(); - pages_.add(builderForValue.build()); - onChanged(); - } else { - pagesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .google.api.Page pages = 5; - * - *
-     * The top level pages for the documentation set.
-     * 
- */ - public Builder addPages( - int index, com.google.api.Page.Builder builderForValue) { - if (pagesBuilder_ == null) { - ensurePagesIsMutable(); - pages_.add(index, builderForValue.build()); - onChanged(); - } else { - pagesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.api.Page pages = 5; - * - *
-     * The top level pages for the documentation set.
-     * 
- */ - public Builder addAllPages( - java.lang.Iterable values) { - if (pagesBuilder_ == null) { - ensurePagesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, pages_); - onChanged(); - } else { - pagesBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .google.api.Page pages = 5; - * - *
-     * The top level pages for the documentation set.
-     * 
- */ - public Builder clearPages() { - if (pagesBuilder_ == null) { - pages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - pagesBuilder_.clear(); - } - return this; - } - /** - * repeated .google.api.Page pages = 5; - * - *
-     * The top level pages for the documentation set.
-     * 
- */ - public Builder removePages(int index) { - if (pagesBuilder_ == null) { - ensurePagesIsMutable(); - pages_.remove(index); - onChanged(); - } else { - pagesBuilder_.remove(index); - } - return this; - } - /** - * repeated .google.api.Page pages = 5; - * - *
-     * The top level pages for the documentation set.
-     * 
- */ - public com.google.api.Page.Builder getPagesBuilder( - int index) { - return getPagesFieldBuilder().getBuilder(index); - } - /** - * repeated .google.api.Page pages = 5; - * - *
-     * The top level pages for the documentation set.
-     * 
- */ - public com.google.api.PageOrBuilder getPagesOrBuilder( - int index) { - if (pagesBuilder_ == null) { - return pages_.get(index); } else { - return pagesBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .google.api.Page pages = 5; - * - *
-     * The top level pages for the documentation set.
-     * 
- */ - public java.util.List - getPagesOrBuilderList() { - if (pagesBuilder_ != null) { - return pagesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(pages_); - } - } - /** - * repeated .google.api.Page pages = 5; - * - *
-     * The top level pages for the documentation set.
-     * 
- */ - public com.google.api.Page.Builder addPagesBuilder() { - return getPagesFieldBuilder().addBuilder( - com.google.api.Page.getDefaultInstance()); - } - /** - * repeated .google.api.Page pages = 5; - * - *
-     * The top level pages for the documentation set.
-     * 
- */ - public com.google.api.Page.Builder addPagesBuilder( - int index) { - return getPagesFieldBuilder().addBuilder( - index, com.google.api.Page.getDefaultInstance()); - } - /** - * repeated .google.api.Page pages = 5; - * - *
-     * The top level pages for the documentation set.
-     * 
- */ - public java.util.List - getPagesBuilderList() { - return getPagesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - com.google.api.Page, com.google.api.Page.Builder, com.google.api.PageOrBuilder> - getPagesFieldBuilder() { - if (pagesBuilder_ == null) { - pagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - com.google.api.Page, com.google.api.Page.Builder, com.google.api.PageOrBuilder>( - pages_, - ((bitField0_ & 0x00000002) == 0x00000002), - getParentForChildren(), - isClean()); - pages_ = null; - } - return pagesBuilder_; - } - - private java.util.List rules_ = - java.util.Collections.emptyList(); - private void ensureRulesIsMutable() { - if (!((bitField0_ & 0x00000004) == 0x00000004)) { - rules_ = new java.util.ArrayList(rules_); - bitField0_ |= 0x00000004; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.api.DocumentationRule, com.google.api.DocumentationRule.Builder, com.google.api.DocumentationRuleOrBuilder> rulesBuilder_; - - /** - * repeated .google.api.DocumentationRule rules = 3; - * - *
-     * Documentation rules for individual elements of the service.
-     * 
- */ - public java.util.List getRulesList() { - if (rulesBuilder_ == null) { - return java.util.Collections.unmodifiableList(rules_); - } else { - return rulesBuilder_.getMessageList(); - } - } - /** - * repeated .google.api.DocumentationRule rules = 3; - * - *
-     * Documentation rules for individual elements of the service.
-     * 
- */ - public int getRulesCount() { - if (rulesBuilder_ == null) { - return rules_.size(); - } else { - return rulesBuilder_.getCount(); - } - } - /** - * repeated .google.api.DocumentationRule rules = 3; - * - *
-     * Documentation rules for individual elements of the service.
-     * 
- */ - public com.google.api.DocumentationRule getRules(int index) { - if (rulesBuilder_ == null) { - return rules_.get(index); - } else { - return rulesBuilder_.getMessage(index); - } - } - /** - * repeated .google.api.DocumentationRule rules = 3; - * - *
-     * Documentation rules for individual elements of the service.
-     * 
- */ - public Builder setRules( - int index, com.google.api.DocumentationRule value) { - if (rulesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRulesIsMutable(); - rules_.set(index, value); - onChanged(); - } else { - rulesBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .google.api.DocumentationRule rules = 3; - * - *
-     * Documentation rules for individual elements of the service.
-     * 
- */ - public Builder setRules( - int index, com.google.api.DocumentationRule.Builder builderForValue) { - if (rulesBuilder_ == null) { - ensureRulesIsMutable(); - rules_.set(index, builderForValue.build()); - onChanged(); - } else { - rulesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.api.DocumentationRule rules = 3; - * - *
-     * Documentation rules for individual elements of the service.
-     * 
- */ - public Builder addRules(com.google.api.DocumentationRule value) { - if (rulesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRulesIsMutable(); - rules_.add(value); - onChanged(); - } else { - rulesBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .google.api.DocumentationRule rules = 3; - * - *
-     * Documentation rules for individual elements of the service.
-     * 
- */ - public Builder addRules( - int index, com.google.api.DocumentationRule value) { - if (rulesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRulesIsMutable(); - rules_.add(index, value); - onChanged(); - } else { - rulesBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .google.api.DocumentationRule rules = 3; - * - *
-     * Documentation rules for individual elements of the service.
-     * 
- */ - public Builder addRules( - com.google.api.DocumentationRule.Builder builderForValue) { - if (rulesBuilder_ == null) { - ensureRulesIsMutable(); - rules_.add(builderForValue.build()); - onChanged(); - } else { - rulesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .google.api.DocumentationRule rules = 3; - * - *
-     * Documentation rules for individual elements of the service.
-     * 
- */ - public Builder addRules( - int index, com.google.api.DocumentationRule.Builder builderForValue) { - if (rulesBuilder_ == null) { - ensureRulesIsMutable(); - rules_.add(index, builderForValue.build()); - onChanged(); - } else { - rulesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.api.DocumentationRule rules = 3; - * - *
-     * Documentation rules for individual elements of the service.
-     * 
- */ - public Builder addAllRules( - java.lang.Iterable values) { - if (rulesBuilder_ == null) { - ensureRulesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, rules_); - onChanged(); - } else { - rulesBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .google.api.DocumentationRule rules = 3; - * - *
-     * Documentation rules for individual elements of the service.
-     * 
- */ - public Builder clearRules() { - if (rulesBuilder_ == null) { - rules_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - } else { - rulesBuilder_.clear(); - } - return this; - } - /** - * repeated .google.api.DocumentationRule rules = 3; - * - *
-     * Documentation rules for individual elements of the service.
-     * 
- */ - public Builder removeRules(int index) { - if (rulesBuilder_ == null) { - ensureRulesIsMutable(); - rules_.remove(index); - onChanged(); - } else { - rulesBuilder_.remove(index); - } - return this; - } - /** - * repeated .google.api.DocumentationRule rules = 3; - * - *
-     * Documentation rules for individual elements of the service.
-     * 
- */ - public com.google.api.DocumentationRule.Builder getRulesBuilder( - int index) { - return getRulesFieldBuilder().getBuilder(index); - } - /** - * repeated .google.api.DocumentationRule rules = 3; - * - *
-     * Documentation rules for individual elements of the service.
-     * 
- */ - public com.google.api.DocumentationRuleOrBuilder getRulesOrBuilder( - int index) { - if (rulesBuilder_ == null) { - return rules_.get(index); } else { - return rulesBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .google.api.DocumentationRule rules = 3; - * - *
-     * Documentation rules for individual elements of the service.
-     * 
- */ - public java.util.List - getRulesOrBuilderList() { - if (rulesBuilder_ != null) { - return rulesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(rules_); - } - } - /** - * repeated .google.api.DocumentationRule rules = 3; - * - *
-     * Documentation rules for individual elements of the service.
-     * 
- */ - public com.google.api.DocumentationRule.Builder addRulesBuilder() { - return getRulesFieldBuilder().addBuilder( - com.google.api.DocumentationRule.getDefaultInstance()); - } - /** - * repeated .google.api.DocumentationRule rules = 3; - * - *
-     * Documentation rules for individual elements of the service.
-     * 
- */ - public com.google.api.DocumentationRule.Builder addRulesBuilder( - int index) { - return getRulesFieldBuilder().addBuilder( - index, com.google.api.DocumentationRule.getDefaultInstance()); - } - /** - * repeated .google.api.DocumentationRule rules = 3; - * - *
-     * Documentation rules for individual elements of the service.
-     * 
- */ - public java.util.List - getRulesBuilderList() { - return getRulesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - com.google.api.DocumentationRule, com.google.api.DocumentationRule.Builder, com.google.api.DocumentationRuleOrBuilder> - getRulesFieldBuilder() { - if (rulesBuilder_ == null) { - rulesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - com.google.api.DocumentationRule, com.google.api.DocumentationRule.Builder, com.google.api.DocumentationRuleOrBuilder>( - rules_, - ((bitField0_ & 0x00000004) == 0x00000004), - getParentForChildren(), - isClean()); - rules_ = null; - } - return rulesBuilder_; - } - - private java.lang.Object documentationRootUrl_ = ""; - /** - * optional string documentation_root_url = 4; - * - *
-     * The URL to the root of documentation.
-     * 
- */ - public java.lang.String getDocumentationRootUrl() { - java.lang.Object ref = documentationRootUrl_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - documentationRootUrl_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string documentation_root_url = 4; - * - *
-     * The URL to the root of documentation.
-     * 
- */ - public com.google.protobuf.ByteString - getDocumentationRootUrlBytes() { - java.lang.Object ref = documentationRootUrl_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - documentationRootUrl_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string documentation_root_url = 4; - * - *
-     * The URL to the root of documentation.
-     * 
- */ - public Builder setDocumentationRootUrl( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - documentationRootUrl_ = value; - onChanged(); - return this; - } - /** - * optional string documentation_root_url = 4; - * - *
-     * The URL to the root of documentation.
-     * 
- */ - public Builder clearDocumentationRootUrl() { - - documentationRootUrl_ = getDefaultInstance().getDocumentationRootUrl(); - onChanged(); - return this; - } - /** - * optional string documentation_root_url = 4; - * - *
-     * The URL to the root of documentation.
-     * 
- */ - public Builder setDocumentationRootUrlBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - documentationRootUrl_ = value; - onChanged(); - return this; - } - - private java.lang.Object overview_ = ""; - /** - * optional string overview = 2; - * - *
-     * Declares a single overview page. For example:
-     *     documentation:
-     *       summary: ...
-     *       overview: (== include overview.md ==)
-     * This is a shortcut for the following declaration (using pages style):
-     *     documentation:
-     *       summary: ...
-     *       pages:
-     *       - name: Overview
-     *         content: (== include overview.md ==)
-     * Note: you cannot specify both `overview` field and `pages` field.
-     * 
- */ - public java.lang.String getOverview() { - java.lang.Object ref = overview_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - overview_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string overview = 2; - * - *
-     * Declares a single overview page. For example:
-     *     documentation:
-     *       summary: ...
-     *       overview: (== include overview.md ==)
-     * This is a shortcut for the following declaration (using pages style):
-     *     documentation:
-     *       summary: ...
-     *       pages:
-     *       - name: Overview
-     *         content: (== include overview.md ==)
-     * Note: you cannot specify both `overview` field and `pages` field.
-     * 
- */ - public com.google.protobuf.ByteString - getOverviewBytes() { - java.lang.Object ref = overview_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - overview_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string overview = 2; - * - *
-     * Declares a single overview page. For example:
-     *     documentation:
-     *       summary: ...
-     *       overview: (== include overview.md ==)
-     * This is a shortcut for the following declaration (using pages style):
-     *     documentation:
-     *       summary: ...
-     *       pages:
-     *       - name: Overview
-     *         content: (== include overview.md ==)
-     * Note: you cannot specify both `overview` field and `pages` field.
-     * 
- */ - public Builder setOverview( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - overview_ = value; - onChanged(); - return this; - } - /** - * optional string overview = 2; - * - *
-     * Declares a single overview page. For example:
-     *     documentation:
-     *       summary: ...
-     *       overview: (== include overview.md ==)
-     * This is a shortcut for the following declaration (using pages style):
-     *     documentation:
-     *       summary: ...
-     *       pages:
-     *       - name: Overview
-     *         content: (== include overview.md ==)
-     * Note: you cannot specify both `overview` field and `pages` field.
-     * 
- */ - public Builder clearOverview() { - - overview_ = getDefaultInstance().getOverview(); - onChanged(); - return this; - } - /** - * optional string overview = 2; - * - *
-     * Declares a single overview page. For example:
-     *     documentation:
-     *       summary: ...
-     *       overview: (== include overview.md ==)
-     * This is a shortcut for the following declaration (using pages style):
-     *     documentation:
-     *       summary: ...
-     *       pages:
-     *       - name: Overview
-     *         content: (== include overview.md ==)
-     * Note: you cannot specify both `overview` field and `pages` field.
-     * 
- */ - public Builder setOverviewBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - overview_ = value; - onChanged(); - return this; - } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - - // @@protoc_insertion_point(builder_scope:google.api.Documentation) - } - - // @@protoc_insertion_point(class_scope:google.api.Documentation) - private static final com.google.api.Documentation DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.api.Documentation(); - } - - public static com.google.api.Documentation getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public Documentation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new Documentation(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public com.google.api.Documentation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/DocumentationOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/api/DocumentationOrBuilder.java deleted file mode 100644 index 96368c4a792b..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/DocumentationOrBuilder.java +++ /dev/null @@ -1,173 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/api/documentation.proto - -package com.google.api; - -public interface DocumentationOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.api.Documentation) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string summary = 1; - * - *
-   * A short summary of what the service does. Can only be provided by
-   * plain text.
-   * 
- */ - java.lang.String getSummary(); - /** - * optional string summary = 1; - * - *
-   * A short summary of what the service does. Can only be provided by
-   * plain text.
-   * 
- */ - com.google.protobuf.ByteString - getSummaryBytes(); - - /** - * repeated .google.api.Page pages = 5; - * - *
-   * The top level pages for the documentation set.
-   * 
- */ - java.util.List - getPagesList(); - /** - * repeated .google.api.Page pages = 5; - * - *
-   * The top level pages for the documentation set.
-   * 
- */ - com.google.api.Page getPages(int index); - /** - * repeated .google.api.Page pages = 5; - * - *
-   * The top level pages for the documentation set.
-   * 
- */ - int getPagesCount(); - /** - * repeated .google.api.Page pages = 5; - * - *
-   * The top level pages for the documentation set.
-   * 
- */ - java.util.List - getPagesOrBuilderList(); - /** - * repeated .google.api.Page pages = 5; - * - *
-   * The top level pages for the documentation set.
-   * 
- */ - com.google.api.PageOrBuilder getPagesOrBuilder( - int index); - - /** - * repeated .google.api.DocumentationRule rules = 3; - * - *
-   * Documentation rules for individual elements of the service.
-   * 
- */ - java.util.List - getRulesList(); - /** - * repeated .google.api.DocumentationRule rules = 3; - * - *
-   * Documentation rules for individual elements of the service.
-   * 
- */ - com.google.api.DocumentationRule getRules(int index); - /** - * repeated .google.api.DocumentationRule rules = 3; - * - *
-   * Documentation rules for individual elements of the service.
-   * 
- */ - int getRulesCount(); - /** - * repeated .google.api.DocumentationRule rules = 3; - * - *
-   * Documentation rules for individual elements of the service.
-   * 
- */ - java.util.List - getRulesOrBuilderList(); - /** - * repeated .google.api.DocumentationRule rules = 3; - * - *
-   * Documentation rules for individual elements of the service.
-   * 
- */ - com.google.api.DocumentationRuleOrBuilder getRulesOrBuilder( - int index); - - /** - * optional string documentation_root_url = 4; - * - *
-   * The URL to the root of documentation.
-   * 
- */ - java.lang.String getDocumentationRootUrl(); - /** - * optional string documentation_root_url = 4; - * - *
-   * The URL to the root of documentation.
-   * 
- */ - com.google.protobuf.ByteString - getDocumentationRootUrlBytes(); - - /** - * optional string overview = 2; - * - *
-   * Declares a single overview page. For example:
-   *     documentation:
-   *       summary: ...
-   *       overview: (== include overview.md ==)
-   * This is a shortcut for the following declaration (using pages style):
-   *     documentation:
-   *       summary: ...
-   *       pages:
-   *       - name: Overview
-   *         content: (== include overview.md ==)
-   * Note: you cannot specify both `overview` field and `pages` field.
-   * 
- */ - java.lang.String getOverview(); - /** - * optional string overview = 2; - * - *
-   * Declares a single overview page. For example:
-   *     documentation:
-   *       summary: ...
-   *       overview: (== include overview.md ==)
-   * This is a shortcut for the following declaration (using pages style):
-   *     documentation:
-   *       summary: ...
-   *       pages:
-   *       - name: Overview
-   *         content: (== include overview.md ==)
-   * Note: you cannot specify both `overview` field and `pages` field.
-   * 
- */ - com.google.protobuf.ByteString - getOverviewBytes(); -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/DocumentationProto.java b/gcloud-java-gax/generated/src/main/java/com/google/api/DocumentationProto.java deleted file mode 100644 index f31f29d4752c..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/DocumentationProto.java +++ /dev/null @@ -1,79 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/api/documentation.proto - -package com.google.api; - -public final class DocumentationProto { - private DocumentationProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - } - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_api_Documentation_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_api_Documentation_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_api_DocumentationRule_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_api_DocumentationRule_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_api_Page_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_api_Page_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\036google/api/documentation.proto\022\ngoogle" + - ".api\"\241\001\n\rDocumentation\022\017\n\007summary\030\001 \001(\t\022" + - "\037\n\005pages\030\005 \003(\0132\020.google.api.Page\022,\n\005rule" + - "s\030\003 \003(\0132\035.google.api.DocumentationRule\022\036" + - "\n\026documentation_root_url\030\004 \001(\t\022\020\n\010overvi" + - "ew\030\002 \001(\t\":\n\021DocumentationRule\022\020\n\010selecto" + - "r\030\001 \001(\t\022\023\n\013description\030\002 \001(\t\"I\n\004Page\022\014\n\004" + - "name\030\001 \001(\t\022\017\n\007content\030\002 \001(\t\022\"\n\010subpages\030" + - "\003 \003(\0132\020.google.api.PageB&\n\016com.google.ap" + - "iB\022DocumentationProtoP\001b\006proto3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }, assigner); - internal_static_google_api_Documentation_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_api_Documentation_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_api_Documentation_descriptor, - new java.lang.String[] { "Summary", "Pages", "Rules", "DocumentationRootUrl", "Overview", }); - internal_static_google_api_DocumentationRule_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_api_DocumentationRule_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_api_DocumentationRule_descriptor, - new java.lang.String[] { "Selector", "Description", }); - internal_static_google_api_Page_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_google_api_Page_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_api_Page_descriptor, - new java.lang.String[] { "Name", "Content", "Subpages", }); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/DocumentationRule.java b/gcloud-java-gax/generated/src/main/java/com/google/api/DocumentationRule.java deleted file mode 100644 index 5f9b9853026b..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/DocumentationRule.java +++ /dev/null @@ -1,662 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/api/documentation.proto - -package com.google.api; - -/** - * Protobuf type {@code google.api.DocumentationRule} - * - *
- * A documentation rule provides information about individual API elements.
- * 
- */ -public final class DocumentationRule extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.api.DocumentationRule) - DocumentationRuleOrBuilder { - // Use DocumentationRule.newBuilder() to construct. - private DocumentationRule(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private DocumentationRule() { - selector_ = ""; - description_ = ""; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private DocumentationRule( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - int mutable_bitField0_ = 0; - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!input.skipField(tag)) { - done = true; - } - break; - } - case 10: { - String s = input.readStringRequireUtf8(); - - selector_ = s; - break; - } - case 18: { - String s = input.readStringRequireUtf8(); - - description_ = s; - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.api.DocumentationProto.internal_static_google_api_DocumentationRule_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.api.DocumentationProto.internal_static_google_api_DocumentationRule_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.api.DocumentationRule.class, com.google.api.DocumentationRule.Builder.class); - } - - public static final int SELECTOR_FIELD_NUMBER = 1; - private volatile java.lang.Object selector_; - /** - * optional string selector = 1; - * - *
-   * The selector is a comma-separated list of pattern. Each parttern is a
-   * qualified name of the element which may end in "*", indicating a wildcard.
-   * Wildcards are only allowed at the end and for a whole component of the
-   * qualified name, i.e. "foo.*" is ok, but not "foo.b*" or "foo.*.bar". To
-   * specify a default for all applicable elements, the whole pattern "*"
-   * is used.
-   * 
- */ - public java.lang.String getSelector() { - java.lang.Object ref = selector_; - 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(); - selector_ = s; - return s; - } - } - /** - * optional string selector = 1; - * - *
-   * The selector is a comma-separated list of pattern. Each parttern is a
-   * qualified name of the element which may end in "*", indicating a wildcard.
-   * Wildcards are only allowed at the end and for a whole component of the
-   * qualified name, i.e. "foo.*" is ok, but not "foo.b*" or "foo.*.bar". To
-   * specify a default for all applicable elements, the whole pattern "*"
-   * is used.
-   * 
- */ - public com.google.protobuf.ByteString - getSelectorBytes() { - java.lang.Object ref = selector_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - selector_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DESCRIPTION_FIELD_NUMBER = 2; - private volatile java.lang.Object description_; - /** - * optional string description = 2; - * - *
-   * Description of the selected API(s).
-   * 
- */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - 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(); - description_ = s; - return s; - } - } - /** - * optional string description = 2; - * - *
-   * Description of the selected API(s).
-   * 
- */ - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!getSelectorBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, selector_); - } - if (!getDescriptionBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, description_); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getSelectorBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, selector_); - } - if (!getDescriptionBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, description_); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static com.google.api.DocumentationRule parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.api.DocumentationRule 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.api.DocumentationRule parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.api.DocumentationRule parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.api.DocumentationRule parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.api.DocumentationRule parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.api.DocumentationRule parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.api.DocumentationRule parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.api.DocumentationRule parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.api.DocumentationRule parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.api.DocumentationRule prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - 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; - } - /** - * Protobuf type {@code google.api.DocumentationRule} - * - *
-   * A documentation rule provides information about individual API elements.
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.api.DocumentationRule) - com.google.api.DocumentationRuleOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.api.DocumentationProto.internal_static_google_api_DocumentationRule_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.api.DocumentationProto.internal_static_google_api_DocumentationRule_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.api.DocumentationRule.class, com.google.api.DocumentationRule.Builder.class); - } - - // Construct using com.google.api.DocumentationRule.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - selector_ = ""; - - description_ = ""; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.api.DocumentationProto.internal_static_google_api_DocumentationRule_descriptor; - } - - public com.google.api.DocumentationRule getDefaultInstanceForType() { - return com.google.api.DocumentationRule.getDefaultInstance(); - } - - public com.google.api.DocumentationRule build() { - com.google.api.DocumentationRule result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.api.DocumentationRule buildPartial() { - com.google.api.DocumentationRule result = new com.google.api.DocumentationRule(this); - result.selector_ = selector_; - result.description_ = description_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.api.DocumentationRule) { - return mergeFrom((com.google.api.DocumentationRule)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.api.DocumentationRule other) { - if (other == com.google.api.DocumentationRule.getDefaultInstance()) return this; - if (!other.getSelector().isEmpty()) { - selector_ = other.selector_; - onChanged(); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - onChanged(); - } - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.api.DocumentationRule parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.api.DocumentationRule) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object selector_ = ""; - /** - * optional string selector = 1; - * - *
-     * The selector is a comma-separated list of pattern. Each parttern is a
-     * qualified name of the element which may end in "*", indicating a wildcard.
-     * Wildcards are only allowed at the end and for a whole component of the
-     * qualified name, i.e. "foo.*" is ok, but not "foo.b*" or "foo.*.bar". To
-     * specify a default for all applicable elements, the whole pattern "*"
-     * is used.
-     * 
- */ - public java.lang.String getSelector() { - java.lang.Object ref = selector_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - selector_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string selector = 1; - * - *
-     * The selector is a comma-separated list of pattern. Each parttern is a
-     * qualified name of the element which may end in "*", indicating a wildcard.
-     * Wildcards are only allowed at the end and for a whole component of the
-     * qualified name, i.e. "foo.*" is ok, but not "foo.b*" or "foo.*.bar". To
-     * specify a default for all applicable elements, the whole pattern "*"
-     * is used.
-     * 
- */ - public com.google.protobuf.ByteString - getSelectorBytes() { - java.lang.Object ref = selector_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - selector_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string selector = 1; - * - *
-     * The selector is a comma-separated list of pattern. Each parttern is a
-     * qualified name of the element which may end in "*", indicating a wildcard.
-     * Wildcards are only allowed at the end and for a whole component of the
-     * qualified name, i.e. "foo.*" is ok, but not "foo.b*" or "foo.*.bar". To
-     * specify a default for all applicable elements, the whole pattern "*"
-     * is used.
-     * 
- */ - public Builder setSelector( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - selector_ = value; - onChanged(); - return this; - } - /** - * optional string selector = 1; - * - *
-     * The selector is a comma-separated list of pattern. Each parttern is a
-     * qualified name of the element which may end in "*", indicating a wildcard.
-     * Wildcards are only allowed at the end and for a whole component of the
-     * qualified name, i.e. "foo.*" is ok, but not "foo.b*" or "foo.*.bar". To
-     * specify a default for all applicable elements, the whole pattern "*"
-     * is used.
-     * 
- */ - public Builder clearSelector() { - - selector_ = getDefaultInstance().getSelector(); - onChanged(); - return this; - } - /** - * optional string selector = 1; - * - *
-     * The selector is a comma-separated list of pattern. Each parttern is a
-     * qualified name of the element which may end in "*", indicating a wildcard.
-     * Wildcards are only allowed at the end and for a whole component of the
-     * qualified name, i.e. "foo.*" is ok, but not "foo.b*" or "foo.*.bar". To
-     * specify a default for all applicable elements, the whole pattern "*"
-     * is used.
-     * 
- */ - public Builder setSelectorBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - selector_ = value; - onChanged(); - return this; - } - - private java.lang.Object description_ = ""; - /** - * optional string description = 2; - * - *
-     * Description of the selected API(s).
-     * 
- */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string description = 2; - * - *
-     * Description of the selected API(s).
-     * 
- */ - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string description = 2; - * - *
-     * Description of the selected API(s).
-     * 
- */ - public Builder setDescription( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - description_ = value; - onChanged(); - return this; - } - /** - * optional string description = 2; - * - *
-     * Description of the selected API(s).
-     * 
- */ - public Builder clearDescription() { - - description_ = getDefaultInstance().getDescription(); - onChanged(); - return this; - } - /** - * optional string description = 2; - * - *
-     * Description of the selected API(s).
-     * 
- */ - public Builder setDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - description_ = value; - onChanged(); - return this; - } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - - // @@protoc_insertion_point(builder_scope:google.api.DocumentationRule) - } - - // @@protoc_insertion_point(class_scope:google.api.DocumentationRule) - private static final com.google.api.DocumentationRule DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.api.DocumentationRule(); - } - - public static com.google.api.DocumentationRule getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public DocumentationRule parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new DocumentationRule(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public com.google.api.DocumentationRule getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/DocumentationRuleOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/api/DocumentationRuleOrBuilder.java deleted file mode 100644 index 859e1afd25af..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/DocumentationRuleOrBuilder.java +++ /dev/null @@ -1,55 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/api/documentation.proto - -package com.google.api; - -public interface DocumentationRuleOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.api.DocumentationRule) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string selector = 1; - * - *
-   * The selector is a comma-separated list of pattern. Each parttern is a
-   * qualified name of the element which may end in "*", indicating a wildcard.
-   * Wildcards are only allowed at the end and for a whole component of the
-   * qualified name, i.e. "foo.*" is ok, but not "foo.b*" or "foo.*.bar". To
-   * specify a default for all applicable elements, the whole pattern "*"
-   * is used.
-   * 
- */ - java.lang.String getSelector(); - /** - * optional string selector = 1; - * - *
-   * The selector is a comma-separated list of pattern. Each parttern is a
-   * qualified name of the element which may end in "*", indicating a wildcard.
-   * Wildcards are only allowed at the end and for a whole component of the
-   * qualified name, i.e. "foo.*" is ok, but not "foo.b*" or "foo.*.bar". To
-   * specify a default for all applicable elements, the whole pattern "*"
-   * is used.
-   * 
- */ - com.google.protobuf.ByteString - getSelectorBytes(); - - /** - * optional string description = 2; - * - *
-   * Description of the selected API(s).
-   * 
- */ - java.lang.String getDescription(); - /** - * optional string description = 2; - * - *
-   * Description of the selected API(s).
-   * 
- */ - com.google.protobuf.ByteString - getDescriptionBytes(); -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/ErrorFormatProto.java b/gcloud-java-gax/generated/src/main/java/com/google/api/ErrorFormatProto.java deleted file mode 100644 index c1cbe4a2c182..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/ErrorFormatProto.java +++ /dev/null @@ -1,65 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/api/error.proto - -package com.google.api; - -public final class ErrorFormatProto { - private ErrorFormatProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - } - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_api_CustomError_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_api_CustomError_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_api_CustomErrorRule_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_api_CustomErrorRule_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\026google/api/error.proto\022\ngoogle.api\"H\n\013" + - "CustomError\022*\n\005rules\030\001 \003(\0132\033.google.api." + - "CustomErrorRule\022\r\n\005types\030\002 \003(\t\"U\n\017Custom" + - "ErrorRule\022\020\n\010selector\030\001 \001(\t\022\031\n\rstubby_br" + - "idge\030\002 \001(\005B\002\030\001\022\025\n\ris_error_type\030\003 \001(\010B\'\n" + - "\016com.google.apiB\020ErrorFormatProtoP\001\370\001\001b\006" + - "proto3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }, assigner); - internal_static_google_api_CustomError_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_api_CustomError_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_api_CustomError_descriptor, - new java.lang.String[] { "Rules", "Types", }); - internal_static_google_api_CustomErrorRule_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_api_CustomErrorRule_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_api_CustomErrorRule_descriptor, - new java.lang.String[] { "Selector", "StubbyBridge", "IsErrorType", }); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/Http.java b/gcloud-java-gax/generated/src/main/java/com/google/api/Http.java deleted file mode 100644 index b382bc022260..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/Http.java +++ /dev/null @@ -1,759 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/api/http.proto - -package com.google.api; - -/** - * Protobuf type {@code google.api.Http} - * - *
- * Defines the HTTP configuration for a service. It contains a list of
- * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method
- * to one or more HTTP REST API methods.
- * 
- */ -public final class Http extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.api.Http) - HttpOrBuilder { - // Use Http.newBuilder() to construct. - private Http(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Http() { - rules_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private Http( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - int mutable_bitField0_ = 0; - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!input.skipField(tag)) { - done = true; - } - break; - } - case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - rules_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - rules_.add(input.readMessage(com.google.api.HttpRule.parser(), extensionRegistry)); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - rules_ = java.util.Collections.unmodifiableList(rules_); - } - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.api.HttpProto.internal_static_google_api_Http_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.api.HttpProto.internal_static_google_api_Http_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.api.Http.class, com.google.api.Http.Builder.class); - } - - public static final int RULES_FIELD_NUMBER = 1; - private java.util.List rules_; - /** - * repeated .google.api.HttpRule rules = 1; - * - *
-   * A list of HTTP rules for configuring the HTTP REST API methods.
-   * 
- */ - public java.util.List getRulesList() { - return rules_; - } - /** - * repeated .google.api.HttpRule rules = 1; - * - *
-   * A list of HTTP rules for configuring the HTTP REST API methods.
-   * 
- */ - public java.util.List - getRulesOrBuilderList() { - return rules_; - } - /** - * repeated .google.api.HttpRule rules = 1; - * - *
-   * A list of HTTP rules for configuring the HTTP REST API methods.
-   * 
- */ - public int getRulesCount() { - return rules_.size(); - } - /** - * repeated .google.api.HttpRule rules = 1; - * - *
-   * A list of HTTP rules for configuring the HTTP REST API methods.
-   * 
- */ - public com.google.api.HttpRule getRules(int index) { - return rules_.get(index); - } - /** - * repeated .google.api.HttpRule rules = 1; - * - *
-   * A list of HTTP rules for configuring the HTTP REST API methods.
-   * 
- */ - public com.google.api.HttpRuleOrBuilder getRulesOrBuilder( - int index) { - return rules_.get(index); - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < rules_.size(); i++) { - output.writeMessage(1, rules_.get(i)); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < rules_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, rules_.get(i)); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static com.google.api.Http parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.api.Http 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.api.Http parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.api.Http parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.api.Http parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.api.Http parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.api.Http parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.api.Http parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.api.Http parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.api.Http parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.api.Http prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - 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; - } - /** - * Protobuf type {@code google.api.Http} - * - *
-   * Defines the HTTP configuration for a service. It contains a list of
-   * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method
-   * to one or more HTTP REST API methods.
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.api.Http) - com.google.api.HttpOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.api.HttpProto.internal_static_google_api_Http_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.api.HttpProto.internal_static_google_api_Http_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.api.Http.class, com.google.api.Http.Builder.class); - } - - // Construct using com.google.api.Http.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getRulesFieldBuilder(); - } - } - public Builder clear() { - super.clear(); - if (rulesBuilder_ == null) { - rules_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - rulesBuilder_.clear(); - } - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.api.HttpProto.internal_static_google_api_Http_descriptor; - } - - public com.google.api.Http getDefaultInstanceForType() { - return com.google.api.Http.getDefaultInstance(); - } - - public com.google.api.Http build() { - com.google.api.Http result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.api.Http buildPartial() { - com.google.api.Http result = new com.google.api.Http(this); - int from_bitField0_ = bitField0_; - if (rulesBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - rules_ = java.util.Collections.unmodifiableList(rules_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.rules_ = rules_; - } else { - result.rules_ = rulesBuilder_.build(); - } - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.api.Http) { - return mergeFrom((com.google.api.Http)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.api.Http other) { - if (other == com.google.api.Http.getDefaultInstance()) return this; - if (rulesBuilder_ == null) { - if (!other.rules_.isEmpty()) { - if (rules_.isEmpty()) { - rules_ = other.rules_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureRulesIsMutable(); - rules_.addAll(other.rules_); - } - onChanged(); - } - } else { - if (!other.rules_.isEmpty()) { - if (rulesBuilder_.isEmpty()) { - rulesBuilder_.dispose(); - rulesBuilder_ = null; - rules_ = other.rules_; - bitField0_ = (bitField0_ & ~0x00000001); - rulesBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getRulesFieldBuilder() : null; - } else { - rulesBuilder_.addAllMessages(other.rules_); - } - } - } - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.api.Http parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.api.Http) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List rules_ = - java.util.Collections.emptyList(); - private void ensureRulesIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { - rules_ = new java.util.ArrayList(rules_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.api.HttpRule, com.google.api.HttpRule.Builder, com.google.api.HttpRuleOrBuilder> rulesBuilder_; - - /** - * repeated .google.api.HttpRule rules = 1; - * - *
-     * A list of HTTP rules for configuring the HTTP REST API methods.
-     * 
- */ - public java.util.List getRulesList() { - if (rulesBuilder_ == null) { - return java.util.Collections.unmodifiableList(rules_); - } else { - return rulesBuilder_.getMessageList(); - } - } - /** - * repeated .google.api.HttpRule rules = 1; - * - *
-     * A list of HTTP rules for configuring the HTTP REST API methods.
-     * 
- */ - public int getRulesCount() { - if (rulesBuilder_ == null) { - return rules_.size(); - } else { - return rulesBuilder_.getCount(); - } - } - /** - * repeated .google.api.HttpRule rules = 1; - * - *
-     * A list of HTTP rules for configuring the HTTP REST API methods.
-     * 
- */ - public com.google.api.HttpRule getRules(int index) { - if (rulesBuilder_ == null) { - return rules_.get(index); - } else { - return rulesBuilder_.getMessage(index); - } - } - /** - * repeated .google.api.HttpRule rules = 1; - * - *
-     * A list of HTTP rules for configuring the HTTP REST API methods.
-     * 
- */ - public Builder setRules( - int index, com.google.api.HttpRule value) { - if (rulesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRulesIsMutable(); - rules_.set(index, value); - onChanged(); - } else { - rulesBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .google.api.HttpRule rules = 1; - * - *
-     * A list of HTTP rules for configuring the HTTP REST API methods.
-     * 
- */ - public Builder setRules( - int index, com.google.api.HttpRule.Builder builderForValue) { - if (rulesBuilder_ == null) { - ensureRulesIsMutable(); - rules_.set(index, builderForValue.build()); - onChanged(); - } else { - rulesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.api.HttpRule rules = 1; - * - *
-     * A list of HTTP rules for configuring the HTTP REST API methods.
-     * 
- */ - public Builder addRules(com.google.api.HttpRule value) { - if (rulesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRulesIsMutable(); - rules_.add(value); - onChanged(); - } else { - rulesBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .google.api.HttpRule rules = 1; - * - *
-     * A list of HTTP rules for configuring the HTTP REST API methods.
-     * 
- */ - public Builder addRules( - int index, com.google.api.HttpRule value) { - if (rulesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRulesIsMutable(); - rules_.add(index, value); - onChanged(); - } else { - rulesBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .google.api.HttpRule rules = 1; - * - *
-     * A list of HTTP rules for configuring the HTTP REST API methods.
-     * 
- */ - public Builder addRules( - com.google.api.HttpRule.Builder builderForValue) { - if (rulesBuilder_ == null) { - ensureRulesIsMutable(); - rules_.add(builderForValue.build()); - onChanged(); - } else { - rulesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .google.api.HttpRule rules = 1; - * - *
-     * A list of HTTP rules for configuring the HTTP REST API methods.
-     * 
- */ - public Builder addRules( - int index, com.google.api.HttpRule.Builder builderForValue) { - if (rulesBuilder_ == null) { - ensureRulesIsMutable(); - rules_.add(index, builderForValue.build()); - onChanged(); - } else { - rulesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.api.HttpRule rules = 1; - * - *
-     * A list of HTTP rules for configuring the HTTP REST API methods.
-     * 
- */ - public Builder addAllRules( - java.lang.Iterable values) { - if (rulesBuilder_ == null) { - ensureRulesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, rules_); - onChanged(); - } else { - rulesBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .google.api.HttpRule rules = 1; - * - *
-     * A list of HTTP rules for configuring the HTTP REST API methods.
-     * 
- */ - public Builder clearRules() { - if (rulesBuilder_ == null) { - rules_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - rulesBuilder_.clear(); - } - return this; - } - /** - * repeated .google.api.HttpRule rules = 1; - * - *
-     * A list of HTTP rules for configuring the HTTP REST API methods.
-     * 
- */ - public Builder removeRules(int index) { - if (rulesBuilder_ == null) { - ensureRulesIsMutable(); - rules_.remove(index); - onChanged(); - } else { - rulesBuilder_.remove(index); - } - return this; - } - /** - * repeated .google.api.HttpRule rules = 1; - * - *
-     * A list of HTTP rules for configuring the HTTP REST API methods.
-     * 
- */ - public com.google.api.HttpRule.Builder getRulesBuilder( - int index) { - return getRulesFieldBuilder().getBuilder(index); - } - /** - * repeated .google.api.HttpRule rules = 1; - * - *
-     * A list of HTTP rules for configuring the HTTP REST API methods.
-     * 
- */ - public com.google.api.HttpRuleOrBuilder getRulesOrBuilder( - int index) { - if (rulesBuilder_ == null) { - return rules_.get(index); } else { - return rulesBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .google.api.HttpRule rules = 1; - * - *
-     * A list of HTTP rules for configuring the HTTP REST API methods.
-     * 
- */ - public java.util.List - getRulesOrBuilderList() { - if (rulesBuilder_ != null) { - return rulesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(rules_); - } - } - /** - * repeated .google.api.HttpRule rules = 1; - * - *
-     * A list of HTTP rules for configuring the HTTP REST API methods.
-     * 
- */ - public com.google.api.HttpRule.Builder addRulesBuilder() { - return getRulesFieldBuilder().addBuilder( - com.google.api.HttpRule.getDefaultInstance()); - } - /** - * repeated .google.api.HttpRule rules = 1; - * - *
-     * A list of HTTP rules for configuring the HTTP REST API methods.
-     * 
- */ - public com.google.api.HttpRule.Builder addRulesBuilder( - int index) { - return getRulesFieldBuilder().addBuilder( - index, com.google.api.HttpRule.getDefaultInstance()); - } - /** - * repeated .google.api.HttpRule rules = 1; - * - *
-     * A list of HTTP rules for configuring the HTTP REST API methods.
-     * 
- */ - public java.util.List - getRulesBuilderList() { - return getRulesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - com.google.api.HttpRule, com.google.api.HttpRule.Builder, com.google.api.HttpRuleOrBuilder> - getRulesFieldBuilder() { - if (rulesBuilder_ == null) { - rulesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - com.google.api.HttpRule, com.google.api.HttpRule.Builder, com.google.api.HttpRuleOrBuilder>( - rules_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); - rules_ = null; - } - return rulesBuilder_; - } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - - // @@protoc_insertion_point(builder_scope:google.api.Http) - } - - // @@protoc_insertion_point(class_scope:google.api.Http) - private static final com.google.api.Http DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.api.Http(); - } - - public static com.google.api.Http getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public Http parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new Http(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public com.google.api.Http getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/HttpOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/api/HttpOrBuilder.java deleted file mode 100644 index 22192448d7ee..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/HttpOrBuilder.java +++ /dev/null @@ -1,53 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/api/http.proto - -package com.google.api; - -public interface HttpOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.api.Http) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated .google.api.HttpRule rules = 1; - * - *
-   * A list of HTTP rules for configuring the HTTP REST API methods.
-   * 
- */ - java.util.List - getRulesList(); - /** - * repeated .google.api.HttpRule rules = 1; - * - *
-   * A list of HTTP rules for configuring the HTTP REST API methods.
-   * 
- */ - com.google.api.HttpRule getRules(int index); - /** - * repeated .google.api.HttpRule rules = 1; - * - *
-   * A list of HTTP rules for configuring the HTTP REST API methods.
-   * 
- */ - int getRulesCount(); - /** - * repeated .google.api.HttpRule rules = 1; - * - *
-   * A list of HTTP rules for configuring the HTTP REST API methods.
-   * 
- */ - java.util.List - getRulesOrBuilderList(); - /** - * repeated .google.api.HttpRule rules = 1; - * - *
-   * A list of HTTP rules for configuring the HTTP REST API methods.
-   * 
- */ - com.google.api.HttpRuleOrBuilder getRulesOrBuilder( - int index); -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/HttpProto.java b/gcloud-java-gax/generated/src/main/java/com/google/api/HttpProto.java deleted file mode 100644 index 7ef3d1fdaa97..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/HttpProto.java +++ /dev/null @@ -1,106 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/api/http.proto - -package com.google.api; - -public final class HttpProto { - private HttpProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - } - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_api_Http_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_api_Http_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_api_HttpRule_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_api_HttpRule_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_api_CustomHttpPattern_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_api_CustomHttpPattern_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_api_MediaUpload_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_api_MediaUpload_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_api_MediaDownload_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_api_MediaDownload_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\025google/api/http.proto\022\ngoogle.api\"+\n\004H" + - "ttp\022#\n\005rules\030\001 \003(\0132\024.google.api.HttpRule" + - "\"\314\002\n\010HttpRule\022\020\n\010selector\030\001 \001(\t\022\r\n\003get\030\002" + - " \001(\tH\000\022\r\n\003put\030\003 \001(\tH\000\022\016\n\004post\030\004 \001(\tH\000\022\020\n" + - "\006delete\030\005 \001(\tH\000\022\017\n\005patch\030\006 \001(\tH\000\022/\n\006cust" + - "om\030\010 \001(\0132\035.google.api.CustomHttpPatternH" + - "\000\022\014\n\004body\030\007 \001(\t\022-\n\014media_upload\030\t \001(\0132\027." + - "google.api.MediaUpload\0221\n\016media_download" + - "\030\n \001(\0132\031.google.api.MediaDownload\0221\n\023add" + - "itional_bindings\030\013 \003(\0132\024.google.api.Http", - "RuleB\t\n\007pattern\"/\n\021CustomHttpPattern\022\014\n\004" + - "kind\030\001 \001(\t\022\014\n\004path\030\002 \001(\t\"\036\n\013MediaUpload\022" + - "\017\n\007enabled\030\003 \001(\010\" \n\rMediaDownload\022\017\n\007ena" + - "bled\030\001 \001(\010B \n\016com.google.apiB\tHttpProtoP" + - "\001\370\001\001b\006proto3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }, assigner); - internal_static_google_api_Http_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_api_Http_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_api_Http_descriptor, - new java.lang.String[] { "Rules", }); - internal_static_google_api_HttpRule_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_api_HttpRule_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_api_HttpRule_descriptor, - new java.lang.String[] { "Selector", "Get", "Put", "Post", "Delete", "Patch", "Custom", "Body", "MediaUpload", "MediaDownload", "AdditionalBindings", "Pattern", }); - internal_static_google_api_CustomHttpPattern_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_google_api_CustomHttpPattern_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_api_CustomHttpPattern_descriptor, - new java.lang.String[] { "Kind", "Path", }); - internal_static_google_api_MediaUpload_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_google_api_MediaUpload_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_api_MediaUpload_descriptor, - new java.lang.String[] { "Enabled", }); - internal_static_google_api_MediaDownload_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_google_api_MediaDownload_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_api_MediaDownload_descriptor, - new java.lang.String[] { "Enabled", }); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/HttpRule.java b/gcloud-java-gax/generated/src/main/java/com/google/api/HttpRule.java deleted file mode 100644 index e37c48096fdd..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/HttpRule.java +++ /dev/null @@ -1,3069 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/api/http.proto - -package com.google.api; - -/** - * Protobuf type {@code google.api.HttpRule} - * - *
- * `HttpRule` defines the mapping of an RPC method to one or more HTTP
- * REST APIs.  The mapping determines what portions of the request
- * message are populated from the path, query parameters, or body of
- * the HTTP request.  The mapping is typically specified as an
- * `google.api.http` annotation, see "google/api/annotations.proto"
- * for details.
- * The mapping consists of a field specifying the path template and
- * method kind.  The path template can refer to fields in the request
- * message, as in the example below which describes a REST GET
- * operation on a resource collection of messages:
- * ```proto
- * service Messaging {
- *   rpc GetMessage(GetMessageRequest) returns (Message) {
- *     option (google.api.http).get = "/v1/messages/{message_id}";
- *   }
- * }
- * message GetMessageRequest {
- *   string message_id = 1; // mapped to the URL
- * }
- * message Message {
- *   string text = 1; // content of the resource
- * }
- * ```
- * This definition enables an automatic, bidrectional mapping of HTTP
- * JSON to RPC. Example:
- * HTTP | RPC
- * -----|-----
- * `GET /v1/messages/123456`  | `GetMessage(message_id: "123456")`
- * In general, not only fields but also field paths can be referenced
- * from a path pattern. Fields mapped to the path pattern cannot be
- * repeated and must have a primitive (non-message) type.
- * Any fields in the request message which are not bound by the path
- * pattern automatically become (optional) HTTP query
- * parameters. Assume the following definition of the request message:
- * ```proto
- * message GetMessageRequest {
- *   string message_id = 1; // mapped to the URL
- *   int64 revision = 2;    // becomes a parameter
- * }
- * ```
- * This enables a HTTP JSON to RPC mapping as below:
- * HTTP | RPC
- * -----|-----
- * `GET /v1/messages/123456?revision=2` | `GetMessage(message_id: "123456" revision: 2)`
- * Note that fields which are mapped to HTTP parameters must have a
- * primitive type or a repeated primitive type. Message types are not
- * allowed. In the case of a repeated type, the parameter can be
- * repeated in the URL, as in `...?param=A&param=B`.
- * For HTTP method kinds which allow a request body, the `body` field
- * specifies the mapping. Consider a REST update method on the
- * message resource collection:
- * ```proto
- * service Messaging {
- *   rpc UpdateMessage(UpdateMessageRequest) returns (Message) {
- *     option (google.api.http) = {
- *       put: "/v1/messages/{message_id}"
- *       body: "message"
- *   }
- * }
- * message UpdateMessageRequest {
- *   string message_id = 1; // mapped to the URL
- *   Message message = 2;   // mapped to the body
- * }
- * ```
- * The following HTTP JSON to RPC mapping is enabled, where the
- * representation of the JSON in the request body is determined by
- * protos JSON encoding:
- * HTTP | RPC
- * -----|-----
- * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })`
- * The special name `*` can be used in the body mapping to define that
- * every field not bound by the path template should be mapped to the
- * request body.  This enables the following alternative definition of
- * the update method:
- * ```proto
- * service Messaging {
- *   rpc UpdateMessage(Message) returns (Message) {
- *     option (google.api.http) = {
- *       put: "/v1/messages/{message_id}"
- *       body: "*"
- *   }
- * }
- * message Message {
- *   string message_id = 2;
- *   string text = 2;
- * }
- * ```
- * The following HTTP JSON to RPC mapping is enabled:
- * HTTP | RPC
- * -----|-----
- * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")`
- * Note that when using `*` in the body mapping, it is not possible to
- * have HTTP parameters, as all fields not bound by the path end in
- * the body. This makes this option more rarely used in practice of
- * defining REST APIs. The common usage of `*` is in custom methods
- * which don't use the URL at all for transferring data.
- * It is possible to define multiple HTTP methods for one RPC by using
- * the `additional_bindings` option. Example:
- * ```proto
- * service Messaging {
- *   rpc GetMessage(GetMessageRequest) returns (Message) {
- *     option (google.api.http) = {
- *       get: "/v1/messages/{message_id}"
- *       additional_bindings {
- *         get: "/v1/users/{user_id}/messages/{message_id}"
- *       }
- *   }
- * }
- * message GetMessageRequest {
- *   string message_id = 1;
- *   string user_id = 2;
- * }
- * ```
- * This enables the following two alternative HTTP JSON to RPC
- * mappings:
- * HTTP | RPC
- * -----|-----
- * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")`
- * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")`
- * # Rules for HTTP mapping
- * The rules for mapping HTTP path, query parameters, and body fields
- * to the request message are as follows:
- * 1. The `body` field specifies either `*` or a field path, or is
- *    omitted. If omitted, it assumes there is no HTTP body.
- * 2. Leaf fields (recursive expansion of nested messages in the
- *    request) can be classified into three types:
- *     (a) Matched in the URL template.
- *     (b) Covered by body (if body is `*`, everything except (a) fields;
- *         else everything under the body field)
- *     (c) All other fields.
- * 3. URL query parameters found in the HTTP request are mapped to (c) fields.
- * 4. Any body sent with an HTTP request can contain only (b) fields.
- * The syntax of the path template is as follows:
- *     Template = "/" Segments [ Verb ] ;
- *     Segments = Segment { "/" Segment } ;
- *     Segment  = "*" | "**" | LITERAL | Variable ;
- *     Variable = "{" FieldPath [ "=" Segments ] "}" ;
- *     FieldPath = IDENT { "." IDENT } ;
- *     Verb     = ":" LITERAL ;
- * The syntax `*` matches a single path segment. It follows the semantics of
- * [RFC 6570](https://tools.ietf.org/html.rfc6570) Section 3.2.2 Simple String
- * Expansion.
- * The syntax `**` matches zero or more path segments. It follows the semantics
- * of [RFC 6570](https://tools.ietf.org/html.rfc6570) Section 3.2.3 Reserved
- * Expansion.
- * The syntax `LITERAL` matches literal text in the URL path.
- * The syntax `Variable` matches the entire path as specified by its template;
- * this nested template must not contain further variables. If a variable
- * matches a single path segment, its template may be omitted, e.g. `{var}`
- * is equivalent to `{var=*}`.
- * NOTE: the field paths in variables and in the `body` must not refer to
- * repeated fields or map fields.
- * Use CustomHttpPattern to specify any HTTP method that is not included in the
- * `pattern` field, such as HEAD, or "*" to leave the HTTP method unspecified for
- * a given URL path rule. The wild-card rule is useful for services that provide
- * content to Web (HTML) clients.
- * 
- */ -public final class HttpRule extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.api.HttpRule) - HttpRuleOrBuilder { - // Use HttpRule.newBuilder() to construct. - private HttpRule(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private HttpRule() { - selector_ = ""; - body_ = ""; - additionalBindings_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private HttpRule( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - int mutable_bitField0_ = 0; - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!input.skipField(tag)) { - done = true; - } - break; - } - case 10: { - String s = input.readStringRequireUtf8(); - - selector_ = s; - break; - } - case 18: { - String s = input.readStringRequireUtf8(); - patternCase_ = 2; - pattern_ = s; - break; - } - case 26: { - String s = input.readStringRequireUtf8(); - patternCase_ = 3; - pattern_ = s; - break; - } - case 34: { - String s = input.readStringRequireUtf8(); - patternCase_ = 4; - pattern_ = s; - break; - } - case 42: { - String s = input.readStringRequireUtf8(); - patternCase_ = 5; - pattern_ = s; - break; - } - case 50: { - String s = input.readStringRequireUtf8(); - patternCase_ = 6; - pattern_ = s; - break; - } - case 58: { - String s = input.readStringRequireUtf8(); - - body_ = s; - break; - } - case 66: { - com.google.api.CustomHttpPattern.Builder subBuilder = null; - if (patternCase_ == 8) { - subBuilder = ((com.google.api.CustomHttpPattern) pattern_).toBuilder(); - } - pattern_ = - input.readMessage(com.google.api.CustomHttpPattern.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.api.CustomHttpPattern) pattern_); - pattern_ = subBuilder.buildPartial(); - } - patternCase_ = 8; - break; - } - case 74: { - com.google.api.MediaUpload.Builder subBuilder = null; - if (mediaUpload_ != null) { - subBuilder = mediaUpload_.toBuilder(); - } - mediaUpload_ = input.readMessage(com.google.api.MediaUpload.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(mediaUpload_); - mediaUpload_ = subBuilder.buildPartial(); - } - - break; - } - case 82: { - com.google.api.MediaDownload.Builder subBuilder = null; - if (mediaDownload_ != null) { - subBuilder = mediaDownload_.toBuilder(); - } - mediaDownload_ = input.readMessage(com.google.api.MediaDownload.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(mediaDownload_); - mediaDownload_ = subBuilder.buildPartial(); - } - - break; - } - case 90: { - if (!((mutable_bitField0_ & 0x00000400) == 0x00000400)) { - additionalBindings_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000400; - } - additionalBindings_.add(input.readMessage(com.google.api.HttpRule.parser(), extensionRegistry)); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - if (((mutable_bitField0_ & 0x00000400) == 0x00000400)) { - additionalBindings_ = java.util.Collections.unmodifiableList(additionalBindings_); - } - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.api.HttpProto.internal_static_google_api_HttpRule_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.api.HttpProto.internal_static_google_api_HttpRule_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.api.HttpRule.class, com.google.api.HttpRule.Builder.class); - } - - private int bitField0_; - private int patternCase_ = 0; - private java.lang.Object pattern_; - public enum PatternCase - implements com.google.protobuf.Internal.EnumLite { - GET(2), - PUT(3), - POST(4), - DELETE(5), - PATCH(6), - CUSTOM(8), - PATTERN_NOT_SET(0); - private int value = 0; - private PatternCase(int value) { - this.value = value; - } - public static PatternCase valueOf(int value) { - switch (value) { - case 2: return GET; - case 3: return PUT; - case 4: return POST; - case 5: return DELETE; - case 6: return PATCH; - case 8: return CUSTOM; - case 0: return PATTERN_NOT_SET; - default: throw new java.lang.IllegalArgumentException( - "Value is undefined for this oneof enum."); - } - } - public int getNumber() { - return this.value; - } - }; - - public PatternCase - getPatternCase() { - return PatternCase.valueOf( - patternCase_); - } - - public static final int SELECTOR_FIELD_NUMBER = 1; - private volatile java.lang.Object selector_; - /** - * optional string selector = 1; - * - *
-   * Selects methods to which this rule applies.
-   * Refer to [selector][DocumentationRule.selector] for syntax details.
-   * 
- */ - public java.lang.String getSelector() { - java.lang.Object ref = selector_; - 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(); - selector_ = s; - return s; - } - } - /** - * optional string selector = 1; - * - *
-   * Selects methods to which this rule applies.
-   * Refer to [selector][DocumentationRule.selector] for syntax details.
-   * 
- */ - public com.google.protobuf.ByteString - getSelectorBytes() { - java.lang.Object ref = selector_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - selector_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int GET_FIELD_NUMBER = 2; - /** - * optional string get = 2; - * - *
-   * Used for listing and getting information about resources.
-   * 
- */ - public java.lang.String getGet() { - java.lang.Object ref = ""; - if (patternCase_ == 2) { - ref = pattern_; - } - 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(); - if (patternCase_ == 2) { - pattern_ = s; - } - return s; - } - } - /** - * optional string get = 2; - * - *
-   * Used for listing and getting information about resources.
-   * 
- */ - public com.google.protobuf.ByteString - getGetBytes() { - java.lang.Object ref = ""; - if (patternCase_ == 2) { - ref = pattern_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (patternCase_ == 2) { - pattern_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PUT_FIELD_NUMBER = 3; - /** - * optional string put = 3; - * - *
-   * Used for updating a resource.
-   * 
- */ - public java.lang.String getPut() { - java.lang.Object ref = ""; - if (patternCase_ == 3) { - ref = pattern_; - } - 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(); - if (patternCase_ == 3) { - pattern_ = s; - } - return s; - } - } - /** - * optional string put = 3; - * - *
-   * Used for updating a resource.
-   * 
- */ - public com.google.protobuf.ByteString - getPutBytes() { - java.lang.Object ref = ""; - if (patternCase_ == 3) { - ref = pattern_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (patternCase_ == 3) { - pattern_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int POST_FIELD_NUMBER = 4; - /** - * optional string post = 4; - * - *
-   * Used for creating a resource.
-   * 
- */ - public java.lang.String getPost() { - java.lang.Object ref = ""; - if (patternCase_ == 4) { - ref = pattern_; - } - 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(); - if (patternCase_ == 4) { - pattern_ = s; - } - return s; - } - } - /** - * optional string post = 4; - * - *
-   * Used for creating a resource.
-   * 
- */ - public com.google.protobuf.ByteString - getPostBytes() { - java.lang.Object ref = ""; - if (patternCase_ == 4) { - ref = pattern_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (patternCase_ == 4) { - pattern_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DELETE_FIELD_NUMBER = 5; - /** - * optional string delete = 5; - * - *
-   * Used for deleting a resource.
-   * 
- */ - public java.lang.String getDelete() { - java.lang.Object ref = ""; - if (patternCase_ == 5) { - ref = pattern_; - } - 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(); - if (patternCase_ == 5) { - pattern_ = s; - } - return s; - } - } - /** - * optional string delete = 5; - * - *
-   * Used for deleting a resource.
-   * 
- */ - public com.google.protobuf.ByteString - getDeleteBytes() { - java.lang.Object ref = ""; - if (patternCase_ == 5) { - ref = pattern_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (patternCase_ == 5) { - pattern_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PATCH_FIELD_NUMBER = 6; - /** - * optional string patch = 6; - * - *
-   * Used for updating a resource.
-   * 
- */ - public java.lang.String getPatch() { - java.lang.Object ref = ""; - if (patternCase_ == 6) { - ref = pattern_; - } - 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(); - if (patternCase_ == 6) { - pattern_ = s; - } - return s; - } - } - /** - * optional string patch = 6; - * - *
-   * Used for updating a resource.
-   * 
- */ - public com.google.protobuf.ByteString - getPatchBytes() { - java.lang.Object ref = ""; - if (patternCase_ == 6) { - ref = pattern_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (patternCase_ == 6) { - pattern_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CUSTOM_FIELD_NUMBER = 8; - /** - * optional .google.api.CustomHttpPattern custom = 8; - * - *
-   * Custom pattern is used for defining custom verbs.
-   * 
- */ - public com.google.api.CustomHttpPattern getCustom() { - if (patternCase_ == 8) { - return (com.google.api.CustomHttpPattern) pattern_; - } - return com.google.api.CustomHttpPattern.getDefaultInstance(); - } - /** - * optional .google.api.CustomHttpPattern custom = 8; - * - *
-   * Custom pattern is used for defining custom verbs.
-   * 
- */ - public com.google.api.CustomHttpPatternOrBuilder getCustomOrBuilder() { - if (patternCase_ == 8) { - return (com.google.api.CustomHttpPattern) pattern_; - } - return com.google.api.CustomHttpPattern.getDefaultInstance(); - } - - public static final int BODY_FIELD_NUMBER = 7; - private volatile java.lang.Object body_; - /** - * optional string body = 7; - * - *
-   * The name of the request field whose value is mapped to the HTTP body, or
-   * `*` for mapping all fields not captured by the path pattern to the HTTP
-   * body. NOTE: the referred field must not be a repeated field.
-   * 
- */ - public java.lang.String getBody() { - java.lang.Object ref = body_; - 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(); - body_ = s; - return s; - } - } - /** - * optional string body = 7; - * - *
-   * The name of the request field whose value is mapped to the HTTP body, or
-   * `*` for mapping all fields not captured by the path pattern to the HTTP
-   * body. NOTE: the referred field must not be a repeated field.
-   * 
- */ - public com.google.protobuf.ByteString - getBodyBytes() { - java.lang.Object ref = body_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - body_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int MEDIA_UPLOAD_FIELD_NUMBER = 9; - private com.google.api.MediaUpload mediaUpload_; - /** - * optional .google.api.MediaUpload media_upload = 9; - * - *
-   * Do not use this. For media support, add instead
-   * [][google.bytestream.RestByteStream] as an API to your
-   * configuration.
-   * 
- */ - public boolean hasMediaUpload() { - return mediaUpload_ != null; - } - /** - * optional .google.api.MediaUpload media_upload = 9; - * - *
-   * Do not use this. For media support, add instead
-   * [][google.bytestream.RestByteStream] as an API to your
-   * configuration.
-   * 
- */ - public com.google.api.MediaUpload getMediaUpload() { - return mediaUpload_ == null ? com.google.api.MediaUpload.getDefaultInstance() : mediaUpload_; - } - /** - * optional .google.api.MediaUpload media_upload = 9; - * - *
-   * Do not use this. For media support, add instead
-   * [][google.bytestream.RestByteStream] as an API to your
-   * configuration.
-   * 
- */ - public com.google.api.MediaUploadOrBuilder getMediaUploadOrBuilder() { - return getMediaUpload(); - } - - public static final int MEDIA_DOWNLOAD_FIELD_NUMBER = 10; - private com.google.api.MediaDownload mediaDownload_; - /** - * optional .google.api.MediaDownload media_download = 10; - * - *
-   * Do not use this. For media support, add instead
-   * [][google.bytestream.RestByteStream] as an API to your
-   * configuration.
-   * 
- */ - public boolean hasMediaDownload() { - return mediaDownload_ != null; - } - /** - * optional .google.api.MediaDownload media_download = 10; - * - *
-   * Do not use this. For media support, add instead
-   * [][google.bytestream.RestByteStream] as an API to your
-   * configuration.
-   * 
- */ - public com.google.api.MediaDownload getMediaDownload() { - return mediaDownload_ == null ? com.google.api.MediaDownload.getDefaultInstance() : mediaDownload_; - } - /** - * optional .google.api.MediaDownload media_download = 10; - * - *
-   * Do not use this. For media support, add instead
-   * [][google.bytestream.RestByteStream] as an API to your
-   * configuration.
-   * 
- */ - public com.google.api.MediaDownloadOrBuilder getMediaDownloadOrBuilder() { - return getMediaDownload(); - } - - public static final int ADDITIONAL_BINDINGS_FIELD_NUMBER = 11; - private java.util.List additionalBindings_; - /** - * repeated .google.api.HttpRule additional_bindings = 11; - * - *
-   * Additional HTTP bindings for the selector. Nested bindings must
-   * not contain an `additional_bindings` field themselves (that is,
-   * the nesting may only be one level deep).
-   * 
- */ - public java.util.List getAdditionalBindingsList() { - return additionalBindings_; - } - /** - * repeated .google.api.HttpRule additional_bindings = 11; - * - *
-   * Additional HTTP bindings for the selector. Nested bindings must
-   * not contain an `additional_bindings` field themselves (that is,
-   * the nesting may only be one level deep).
-   * 
- */ - public java.util.List - getAdditionalBindingsOrBuilderList() { - return additionalBindings_; - } - /** - * repeated .google.api.HttpRule additional_bindings = 11; - * - *
-   * Additional HTTP bindings for the selector. Nested bindings must
-   * not contain an `additional_bindings` field themselves (that is,
-   * the nesting may only be one level deep).
-   * 
- */ - public int getAdditionalBindingsCount() { - return additionalBindings_.size(); - } - /** - * repeated .google.api.HttpRule additional_bindings = 11; - * - *
-   * Additional HTTP bindings for the selector. Nested bindings must
-   * not contain an `additional_bindings` field themselves (that is,
-   * the nesting may only be one level deep).
-   * 
- */ - public com.google.api.HttpRule getAdditionalBindings(int index) { - return additionalBindings_.get(index); - } - /** - * repeated .google.api.HttpRule additional_bindings = 11; - * - *
-   * Additional HTTP bindings for the selector. Nested bindings must
-   * not contain an `additional_bindings` field themselves (that is,
-   * the nesting may only be one level deep).
-   * 
- */ - public com.google.api.HttpRuleOrBuilder getAdditionalBindingsOrBuilder( - int index) { - return additionalBindings_.get(index); - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!getSelectorBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, selector_); - } - if (patternCase_ == 2) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, pattern_); - } - if (patternCase_ == 3) { - com.google.protobuf.GeneratedMessage.writeString(output, 3, pattern_); - } - if (patternCase_ == 4) { - com.google.protobuf.GeneratedMessage.writeString(output, 4, pattern_); - } - if (patternCase_ == 5) { - com.google.protobuf.GeneratedMessage.writeString(output, 5, pattern_); - } - if (patternCase_ == 6) { - com.google.protobuf.GeneratedMessage.writeString(output, 6, pattern_); - } - if (!getBodyBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 7, body_); - } - if (patternCase_ == 8) { - output.writeMessage(8, (com.google.api.CustomHttpPattern) pattern_); - } - if (mediaUpload_ != null) { - output.writeMessage(9, getMediaUpload()); - } - if (mediaDownload_ != null) { - output.writeMessage(10, getMediaDownload()); - } - for (int i = 0; i < additionalBindings_.size(); i++) { - output.writeMessage(11, additionalBindings_.get(i)); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getSelectorBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, selector_); - } - if (patternCase_ == 2) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, pattern_); - } - if (patternCase_ == 3) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pattern_); - } - if (patternCase_ == 4) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(4, pattern_); - } - if (patternCase_ == 5) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(5, pattern_); - } - if (patternCase_ == 6) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(6, pattern_); - } - if (!getBodyBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(7, body_); - } - if (patternCase_ == 8) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(8, (com.google.api.CustomHttpPattern) pattern_); - } - if (mediaUpload_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(9, getMediaUpload()); - } - if (mediaDownload_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(10, getMediaDownload()); - } - for (int i = 0; i < additionalBindings_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(11, additionalBindings_.get(i)); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static com.google.api.HttpRule parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.api.HttpRule 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.api.HttpRule parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.api.HttpRule parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.api.HttpRule parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.api.HttpRule parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.api.HttpRule parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.api.HttpRule parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.api.HttpRule parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.api.HttpRule parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.api.HttpRule prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - 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; - } - /** - * Protobuf type {@code google.api.HttpRule} - * - *
-   * `HttpRule` defines the mapping of an RPC method to one or more HTTP
-   * REST APIs.  The mapping determines what portions of the request
-   * message are populated from the path, query parameters, or body of
-   * the HTTP request.  The mapping is typically specified as an
-   * `google.api.http` annotation, see "google/api/annotations.proto"
-   * for details.
-   * The mapping consists of a field specifying the path template and
-   * method kind.  The path template can refer to fields in the request
-   * message, as in the example below which describes a REST GET
-   * operation on a resource collection of messages:
-   * ```proto
-   * service Messaging {
-   *   rpc GetMessage(GetMessageRequest) returns (Message) {
-   *     option (google.api.http).get = "/v1/messages/{message_id}";
-   *   }
-   * }
-   * message GetMessageRequest {
-   *   string message_id = 1; // mapped to the URL
-   * }
-   * message Message {
-   *   string text = 1; // content of the resource
-   * }
-   * ```
-   * This definition enables an automatic, bidrectional mapping of HTTP
-   * JSON to RPC. Example:
-   * HTTP | RPC
-   * -----|-----
-   * `GET /v1/messages/123456`  | `GetMessage(message_id: "123456")`
-   * In general, not only fields but also field paths can be referenced
-   * from a path pattern. Fields mapped to the path pattern cannot be
-   * repeated and must have a primitive (non-message) type.
-   * Any fields in the request message which are not bound by the path
-   * pattern automatically become (optional) HTTP query
-   * parameters. Assume the following definition of the request message:
-   * ```proto
-   * message GetMessageRequest {
-   *   string message_id = 1; // mapped to the URL
-   *   int64 revision = 2;    // becomes a parameter
-   * }
-   * ```
-   * This enables a HTTP JSON to RPC mapping as below:
-   * HTTP | RPC
-   * -----|-----
-   * `GET /v1/messages/123456?revision=2` | `GetMessage(message_id: "123456" revision: 2)`
-   * Note that fields which are mapped to HTTP parameters must have a
-   * primitive type or a repeated primitive type. Message types are not
-   * allowed. In the case of a repeated type, the parameter can be
-   * repeated in the URL, as in `...?param=A&param=B`.
-   * For HTTP method kinds which allow a request body, the `body` field
-   * specifies the mapping. Consider a REST update method on the
-   * message resource collection:
-   * ```proto
-   * service Messaging {
-   *   rpc UpdateMessage(UpdateMessageRequest) returns (Message) {
-   *     option (google.api.http) = {
-   *       put: "/v1/messages/{message_id}"
-   *       body: "message"
-   *   }
-   * }
-   * message UpdateMessageRequest {
-   *   string message_id = 1; // mapped to the URL
-   *   Message message = 2;   // mapped to the body
-   * }
-   * ```
-   * The following HTTP JSON to RPC mapping is enabled, where the
-   * representation of the JSON in the request body is determined by
-   * protos JSON encoding:
-   * HTTP | RPC
-   * -----|-----
-   * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })`
-   * The special name `*` can be used in the body mapping to define that
-   * every field not bound by the path template should be mapped to the
-   * request body.  This enables the following alternative definition of
-   * the update method:
-   * ```proto
-   * service Messaging {
-   *   rpc UpdateMessage(Message) returns (Message) {
-   *     option (google.api.http) = {
-   *       put: "/v1/messages/{message_id}"
-   *       body: "*"
-   *   }
-   * }
-   * message Message {
-   *   string message_id = 2;
-   *   string text = 2;
-   * }
-   * ```
-   * The following HTTP JSON to RPC mapping is enabled:
-   * HTTP | RPC
-   * -----|-----
-   * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")`
-   * Note that when using `*` in the body mapping, it is not possible to
-   * have HTTP parameters, as all fields not bound by the path end in
-   * the body. This makes this option more rarely used in practice of
-   * defining REST APIs. The common usage of `*` is in custom methods
-   * which don't use the URL at all for transferring data.
-   * It is possible to define multiple HTTP methods for one RPC by using
-   * the `additional_bindings` option. Example:
-   * ```proto
-   * service Messaging {
-   *   rpc GetMessage(GetMessageRequest) returns (Message) {
-   *     option (google.api.http) = {
-   *       get: "/v1/messages/{message_id}"
-   *       additional_bindings {
-   *         get: "/v1/users/{user_id}/messages/{message_id}"
-   *       }
-   *   }
-   * }
-   * message GetMessageRequest {
-   *   string message_id = 1;
-   *   string user_id = 2;
-   * }
-   * ```
-   * This enables the following two alternative HTTP JSON to RPC
-   * mappings:
-   * HTTP | RPC
-   * -----|-----
-   * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")`
-   * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")`
-   * # Rules for HTTP mapping
-   * The rules for mapping HTTP path, query parameters, and body fields
-   * to the request message are as follows:
-   * 1. The `body` field specifies either `*` or a field path, or is
-   *    omitted. If omitted, it assumes there is no HTTP body.
-   * 2. Leaf fields (recursive expansion of nested messages in the
-   *    request) can be classified into three types:
-   *     (a) Matched in the URL template.
-   *     (b) Covered by body (if body is `*`, everything except (a) fields;
-   *         else everything under the body field)
-   *     (c) All other fields.
-   * 3. URL query parameters found in the HTTP request are mapped to (c) fields.
-   * 4. Any body sent with an HTTP request can contain only (b) fields.
-   * The syntax of the path template is as follows:
-   *     Template = "/" Segments [ Verb ] ;
-   *     Segments = Segment { "/" Segment } ;
-   *     Segment  = "*" | "**" | LITERAL | Variable ;
-   *     Variable = "{" FieldPath [ "=" Segments ] "}" ;
-   *     FieldPath = IDENT { "." IDENT } ;
-   *     Verb     = ":" LITERAL ;
-   * The syntax `*` matches a single path segment. It follows the semantics of
-   * [RFC 6570](https://tools.ietf.org/html.rfc6570) Section 3.2.2 Simple String
-   * Expansion.
-   * The syntax `**` matches zero or more path segments. It follows the semantics
-   * of [RFC 6570](https://tools.ietf.org/html.rfc6570) Section 3.2.3 Reserved
-   * Expansion.
-   * The syntax `LITERAL` matches literal text in the URL path.
-   * The syntax `Variable` matches the entire path as specified by its template;
-   * this nested template must not contain further variables. If a variable
-   * matches a single path segment, its template may be omitted, e.g. `{var}`
-   * is equivalent to `{var=*}`.
-   * NOTE: the field paths in variables and in the `body` must not refer to
-   * repeated fields or map fields.
-   * Use CustomHttpPattern to specify any HTTP method that is not included in the
-   * `pattern` field, such as HEAD, or "*" to leave the HTTP method unspecified for
-   * a given URL path rule. The wild-card rule is useful for services that provide
-   * content to Web (HTML) clients.
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.api.HttpRule) - com.google.api.HttpRuleOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.api.HttpProto.internal_static_google_api_HttpRule_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.api.HttpProto.internal_static_google_api_HttpRule_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.api.HttpRule.class, com.google.api.HttpRule.Builder.class); - } - - // Construct using com.google.api.HttpRule.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getAdditionalBindingsFieldBuilder(); - } - } - public Builder clear() { - super.clear(); - selector_ = ""; - - body_ = ""; - - if (mediaUploadBuilder_ == null) { - mediaUpload_ = null; - } else { - mediaUpload_ = null; - mediaUploadBuilder_ = null; - } - if (mediaDownloadBuilder_ == null) { - mediaDownload_ = null; - } else { - mediaDownload_ = null; - mediaDownloadBuilder_ = null; - } - if (additionalBindingsBuilder_ == null) { - additionalBindings_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000400); - } else { - additionalBindingsBuilder_.clear(); - } - patternCase_ = 0; - pattern_ = null; - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.api.HttpProto.internal_static_google_api_HttpRule_descriptor; - } - - public com.google.api.HttpRule getDefaultInstanceForType() { - return com.google.api.HttpRule.getDefaultInstance(); - } - - public com.google.api.HttpRule build() { - com.google.api.HttpRule result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.api.HttpRule buildPartial() { - com.google.api.HttpRule result = new com.google.api.HttpRule(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - result.selector_ = selector_; - if (patternCase_ == 2) { - result.pattern_ = pattern_; - } - if (patternCase_ == 3) { - result.pattern_ = pattern_; - } - if (patternCase_ == 4) { - result.pattern_ = pattern_; - } - if (patternCase_ == 5) { - result.pattern_ = pattern_; - } - if (patternCase_ == 6) { - result.pattern_ = pattern_; - } - if (patternCase_ == 8) { - if (customBuilder_ == null) { - result.pattern_ = pattern_; - } else { - result.pattern_ = customBuilder_.build(); - } - } - result.body_ = body_; - if (mediaUploadBuilder_ == null) { - result.mediaUpload_ = mediaUpload_; - } else { - result.mediaUpload_ = mediaUploadBuilder_.build(); - } - if (mediaDownloadBuilder_ == null) { - result.mediaDownload_ = mediaDownload_; - } else { - result.mediaDownload_ = mediaDownloadBuilder_.build(); - } - if (additionalBindingsBuilder_ == null) { - if (((bitField0_ & 0x00000400) == 0x00000400)) { - additionalBindings_ = java.util.Collections.unmodifiableList(additionalBindings_); - bitField0_ = (bitField0_ & ~0x00000400); - } - result.additionalBindings_ = additionalBindings_; - } else { - result.additionalBindings_ = additionalBindingsBuilder_.build(); - } - result.bitField0_ = to_bitField0_; - result.patternCase_ = patternCase_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.api.HttpRule) { - return mergeFrom((com.google.api.HttpRule)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.api.HttpRule other) { - if (other == com.google.api.HttpRule.getDefaultInstance()) return this; - if (!other.getSelector().isEmpty()) { - selector_ = other.selector_; - onChanged(); - } - if (!other.getBody().isEmpty()) { - body_ = other.body_; - onChanged(); - } - if (other.hasMediaUpload()) { - mergeMediaUpload(other.getMediaUpload()); - } - if (other.hasMediaDownload()) { - mergeMediaDownload(other.getMediaDownload()); - } - if (additionalBindingsBuilder_ == null) { - if (!other.additionalBindings_.isEmpty()) { - if (additionalBindings_.isEmpty()) { - additionalBindings_ = other.additionalBindings_; - bitField0_ = (bitField0_ & ~0x00000400); - } else { - ensureAdditionalBindingsIsMutable(); - additionalBindings_.addAll(other.additionalBindings_); - } - onChanged(); - } - } else { - if (!other.additionalBindings_.isEmpty()) { - if (additionalBindingsBuilder_.isEmpty()) { - additionalBindingsBuilder_.dispose(); - additionalBindingsBuilder_ = null; - additionalBindings_ = other.additionalBindings_; - bitField0_ = (bitField0_ & ~0x00000400); - additionalBindingsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getAdditionalBindingsFieldBuilder() : null; - } else { - additionalBindingsBuilder_.addAllMessages(other.additionalBindings_); - } - } - } - switch (other.getPatternCase()) { - case GET: { - patternCase_ = 2; - pattern_ = other.pattern_; - onChanged(); - break; - } - case PUT: { - patternCase_ = 3; - pattern_ = other.pattern_; - onChanged(); - break; - } - case POST: { - patternCase_ = 4; - pattern_ = other.pattern_; - onChanged(); - break; - } - case DELETE: { - patternCase_ = 5; - pattern_ = other.pattern_; - onChanged(); - break; - } - case PATCH: { - patternCase_ = 6; - pattern_ = other.pattern_; - onChanged(); - break; - } - case CUSTOM: { - mergeCustom(other.getCustom()); - break; - } - case PATTERN_NOT_SET: { - break; - } - } - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.api.HttpRule parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.api.HttpRule) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int patternCase_ = 0; - private java.lang.Object pattern_; - public PatternCase - getPatternCase() { - return PatternCase.valueOf( - patternCase_); - } - - public Builder clearPattern() { - patternCase_ = 0; - pattern_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private java.lang.Object selector_ = ""; - /** - * optional string selector = 1; - * - *
-     * Selects methods to which this rule applies.
-     * Refer to [selector][DocumentationRule.selector] for syntax details.
-     * 
- */ - public java.lang.String getSelector() { - java.lang.Object ref = selector_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - selector_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string selector = 1; - * - *
-     * Selects methods to which this rule applies.
-     * Refer to [selector][DocumentationRule.selector] for syntax details.
-     * 
- */ - public com.google.protobuf.ByteString - getSelectorBytes() { - java.lang.Object ref = selector_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - selector_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string selector = 1; - * - *
-     * Selects methods to which this rule applies.
-     * Refer to [selector][DocumentationRule.selector] for syntax details.
-     * 
- */ - public Builder setSelector( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - selector_ = value; - onChanged(); - return this; - } - /** - * optional string selector = 1; - * - *
-     * Selects methods to which this rule applies.
-     * Refer to [selector][DocumentationRule.selector] for syntax details.
-     * 
- */ - public Builder clearSelector() { - - selector_ = getDefaultInstance().getSelector(); - onChanged(); - return this; - } - /** - * optional string selector = 1; - * - *
-     * Selects methods to which this rule applies.
-     * Refer to [selector][DocumentationRule.selector] for syntax details.
-     * 
- */ - public Builder setSelectorBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - selector_ = value; - onChanged(); - return this; - } - - /** - * optional string get = 2; - * - *
-     * Used for listing and getting information about resources.
-     * 
- */ - public java.lang.String getGet() { - java.lang.Object ref = ""; - if (patternCase_ == 2) { - ref = pattern_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (patternCase_ == 2) { - pattern_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string get = 2; - * - *
-     * Used for listing and getting information about resources.
-     * 
- */ - public com.google.protobuf.ByteString - getGetBytes() { - java.lang.Object ref = ""; - if (patternCase_ == 2) { - ref = pattern_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (patternCase_ == 2) { - pattern_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string get = 2; - * - *
-     * Used for listing and getting information about resources.
-     * 
- */ - public Builder setGet( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - patternCase_ = 2; - pattern_ = value; - onChanged(); - return this; - } - /** - * optional string get = 2; - * - *
-     * Used for listing and getting information about resources.
-     * 
- */ - public Builder clearGet() { - if (patternCase_ == 2) { - patternCase_ = 0; - pattern_ = null; - onChanged(); - } - return this; - } - /** - * optional string get = 2; - * - *
-     * Used for listing and getting information about resources.
-     * 
- */ - public Builder setGetBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - patternCase_ = 2; - pattern_ = value; - onChanged(); - return this; - } - - /** - * optional string put = 3; - * - *
-     * Used for updating a resource.
-     * 
- */ - public java.lang.String getPut() { - java.lang.Object ref = ""; - if (patternCase_ == 3) { - ref = pattern_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (patternCase_ == 3) { - pattern_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string put = 3; - * - *
-     * Used for updating a resource.
-     * 
- */ - public com.google.protobuf.ByteString - getPutBytes() { - java.lang.Object ref = ""; - if (patternCase_ == 3) { - ref = pattern_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (patternCase_ == 3) { - pattern_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string put = 3; - * - *
-     * Used for updating a resource.
-     * 
- */ - public Builder setPut( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - patternCase_ = 3; - pattern_ = value; - onChanged(); - return this; - } - /** - * optional string put = 3; - * - *
-     * Used for updating a resource.
-     * 
- */ - public Builder clearPut() { - if (patternCase_ == 3) { - patternCase_ = 0; - pattern_ = null; - onChanged(); - } - return this; - } - /** - * optional string put = 3; - * - *
-     * Used for updating a resource.
-     * 
- */ - public Builder setPutBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - patternCase_ = 3; - pattern_ = value; - onChanged(); - return this; - } - - /** - * optional string post = 4; - * - *
-     * Used for creating a resource.
-     * 
- */ - public java.lang.String getPost() { - java.lang.Object ref = ""; - if (patternCase_ == 4) { - ref = pattern_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (patternCase_ == 4) { - pattern_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string post = 4; - * - *
-     * Used for creating a resource.
-     * 
- */ - public com.google.protobuf.ByteString - getPostBytes() { - java.lang.Object ref = ""; - if (patternCase_ == 4) { - ref = pattern_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (patternCase_ == 4) { - pattern_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string post = 4; - * - *
-     * Used for creating a resource.
-     * 
- */ - public Builder setPost( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - patternCase_ = 4; - pattern_ = value; - onChanged(); - return this; - } - /** - * optional string post = 4; - * - *
-     * Used for creating a resource.
-     * 
- */ - public Builder clearPost() { - if (patternCase_ == 4) { - patternCase_ = 0; - pattern_ = null; - onChanged(); - } - return this; - } - /** - * optional string post = 4; - * - *
-     * Used for creating a resource.
-     * 
- */ - public Builder setPostBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - patternCase_ = 4; - pattern_ = value; - onChanged(); - return this; - } - - /** - * optional string delete = 5; - * - *
-     * Used for deleting a resource.
-     * 
- */ - public java.lang.String getDelete() { - java.lang.Object ref = ""; - if (patternCase_ == 5) { - ref = pattern_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (patternCase_ == 5) { - pattern_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string delete = 5; - * - *
-     * Used for deleting a resource.
-     * 
- */ - public com.google.protobuf.ByteString - getDeleteBytes() { - java.lang.Object ref = ""; - if (patternCase_ == 5) { - ref = pattern_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (patternCase_ == 5) { - pattern_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string delete = 5; - * - *
-     * Used for deleting a resource.
-     * 
- */ - public Builder setDelete( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - patternCase_ = 5; - pattern_ = value; - onChanged(); - return this; - } - /** - * optional string delete = 5; - * - *
-     * Used for deleting a resource.
-     * 
- */ - public Builder clearDelete() { - if (patternCase_ == 5) { - patternCase_ = 0; - pattern_ = null; - onChanged(); - } - return this; - } - /** - * optional string delete = 5; - * - *
-     * Used for deleting a resource.
-     * 
- */ - public Builder setDeleteBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - patternCase_ = 5; - pattern_ = value; - onChanged(); - return this; - } - - /** - * optional string patch = 6; - * - *
-     * Used for updating a resource.
-     * 
- */ - public java.lang.String getPatch() { - java.lang.Object ref = ""; - if (patternCase_ == 6) { - ref = pattern_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (patternCase_ == 6) { - pattern_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string patch = 6; - * - *
-     * Used for updating a resource.
-     * 
- */ - public com.google.protobuf.ByteString - getPatchBytes() { - java.lang.Object ref = ""; - if (patternCase_ == 6) { - ref = pattern_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (patternCase_ == 6) { - pattern_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string patch = 6; - * - *
-     * Used for updating a resource.
-     * 
- */ - public Builder setPatch( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - patternCase_ = 6; - pattern_ = value; - onChanged(); - return this; - } - /** - * optional string patch = 6; - * - *
-     * Used for updating a resource.
-     * 
- */ - public Builder clearPatch() { - if (patternCase_ == 6) { - patternCase_ = 0; - pattern_ = null; - onChanged(); - } - return this; - } - /** - * optional string patch = 6; - * - *
-     * Used for updating a resource.
-     * 
- */ - public Builder setPatchBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - patternCase_ = 6; - pattern_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.SingleFieldBuilder< - com.google.api.CustomHttpPattern, com.google.api.CustomHttpPattern.Builder, com.google.api.CustomHttpPatternOrBuilder> customBuilder_; - /** - * optional .google.api.CustomHttpPattern custom = 8; - * - *
-     * Custom pattern is used for defining custom verbs.
-     * 
- */ - public com.google.api.CustomHttpPattern getCustom() { - if (customBuilder_ == null) { - if (patternCase_ == 8) { - return (com.google.api.CustomHttpPattern) pattern_; - } - return com.google.api.CustomHttpPattern.getDefaultInstance(); - } else { - if (patternCase_ == 8) { - return customBuilder_.getMessage(); - } - return com.google.api.CustomHttpPattern.getDefaultInstance(); - } - } - /** - * optional .google.api.CustomHttpPattern custom = 8; - * - *
-     * Custom pattern is used for defining custom verbs.
-     * 
- */ - public Builder setCustom(com.google.api.CustomHttpPattern value) { - if (customBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - pattern_ = value; - onChanged(); - } else { - customBuilder_.setMessage(value); - } - patternCase_ = 8; - return this; - } - /** - * optional .google.api.CustomHttpPattern custom = 8; - * - *
-     * Custom pattern is used for defining custom verbs.
-     * 
- */ - public Builder setCustom( - com.google.api.CustomHttpPattern.Builder builderForValue) { - if (customBuilder_ == null) { - pattern_ = builderForValue.build(); - onChanged(); - } else { - customBuilder_.setMessage(builderForValue.build()); - } - patternCase_ = 8; - return this; - } - /** - * optional .google.api.CustomHttpPattern custom = 8; - * - *
-     * Custom pattern is used for defining custom verbs.
-     * 
- */ - public Builder mergeCustom(com.google.api.CustomHttpPattern value) { - if (customBuilder_ == null) { - if (patternCase_ == 8 && - pattern_ != com.google.api.CustomHttpPattern.getDefaultInstance()) { - pattern_ = com.google.api.CustomHttpPattern.newBuilder((com.google.api.CustomHttpPattern) pattern_) - .mergeFrom(value).buildPartial(); - } else { - pattern_ = value; - } - onChanged(); - } else { - if (patternCase_ == 8) { - customBuilder_.mergeFrom(value); - } - customBuilder_.setMessage(value); - } - patternCase_ = 8; - return this; - } - /** - * optional .google.api.CustomHttpPattern custom = 8; - * - *
-     * Custom pattern is used for defining custom verbs.
-     * 
- */ - public Builder clearCustom() { - if (customBuilder_ == null) { - if (patternCase_ == 8) { - patternCase_ = 0; - pattern_ = null; - onChanged(); - } - } else { - if (patternCase_ == 8) { - patternCase_ = 0; - pattern_ = null; - } - customBuilder_.clear(); - } - return this; - } - /** - * optional .google.api.CustomHttpPattern custom = 8; - * - *
-     * Custom pattern is used for defining custom verbs.
-     * 
- */ - public com.google.api.CustomHttpPattern.Builder getCustomBuilder() { - return getCustomFieldBuilder().getBuilder(); - } - /** - * optional .google.api.CustomHttpPattern custom = 8; - * - *
-     * Custom pattern is used for defining custom verbs.
-     * 
- */ - public com.google.api.CustomHttpPatternOrBuilder getCustomOrBuilder() { - if ((patternCase_ == 8) && (customBuilder_ != null)) { - return customBuilder_.getMessageOrBuilder(); - } else { - if (patternCase_ == 8) { - return (com.google.api.CustomHttpPattern) pattern_; - } - return com.google.api.CustomHttpPattern.getDefaultInstance(); - } - } - /** - * optional .google.api.CustomHttpPattern custom = 8; - * - *
-     * Custom pattern is used for defining custom verbs.
-     * 
- */ - private com.google.protobuf.SingleFieldBuilder< - com.google.api.CustomHttpPattern, com.google.api.CustomHttpPattern.Builder, com.google.api.CustomHttpPatternOrBuilder> - getCustomFieldBuilder() { - if (customBuilder_ == null) { - if (!(patternCase_ == 8)) { - pattern_ = com.google.api.CustomHttpPattern.getDefaultInstance(); - } - customBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.api.CustomHttpPattern, com.google.api.CustomHttpPattern.Builder, com.google.api.CustomHttpPatternOrBuilder>( - (com.google.api.CustomHttpPattern) pattern_, - getParentForChildren(), - isClean()); - pattern_ = null; - } - patternCase_ = 8; - onChanged();; - return customBuilder_; - } - - private java.lang.Object body_ = ""; - /** - * optional string body = 7; - * - *
-     * The name of the request field whose value is mapped to the HTTP body, or
-     * `*` for mapping all fields not captured by the path pattern to the HTTP
-     * body. NOTE: the referred field must not be a repeated field.
-     * 
- */ - public java.lang.String getBody() { - java.lang.Object ref = body_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - body_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string body = 7; - * - *
-     * The name of the request field whose value is mapped to the HTTP body, or
-     * `*` for mapping all fields not captured by the path pattern to the HTTP
-     * body. NOTE: the referred field must not be a repeated field.
-     * 
- */ - public com.google.protobuf.ByteString - getBodyBytes() { - java.lang.Object ref = body_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - body_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string body = 7; - * - *
-     * The name of the request field whose value is mapped to the HTTP body, or
-     * `*` for mapping all fields not captured by the path pattern to the HTTP
-     * body. NOTE: the referred field must not be a repeated field.
-     * 
- */ - public Builder setBody( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - body_ = value; - onChanged(); - return this; - } - /** - * optional string body = 7; - * - *
-     * The name of the request field whose value is mapped to the HTTP body, or
-     * `*` for mapping all fields not captured by the path pattern to the HTTP
-     * body. NOTE: the referred field must not be a repeated field.
-     * 
- */ - public Builder clearBody() { - - body_ = getDefaultInstance().getBody(); - onChanged(); - return this; - } - /** - * optional string body = 7; - * - *
-     * The name of the request field whose value is mapped to the HTTP body, or
-     * `*` for mapping all fields not captured by the path pattern to the HTTP
-     * body. NOTE: the referred field must not be a repeated field.
-     * 
- */ - public Builder setBodyBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - body_ = value; - onChanged(); - return this; - } - - private com.google.api.MediaUpload mediaUpload_ = null; - private com.google.protobuf.SingleFieldBuilder< - com.google.api.MediaUpload, com.google.api.MediaUpload.Builder, com.google.api.MediaUploadOrBuilder> mediaUploadBuilder_; - /** - * optional .google.api.MediaUpload media_upload = 9; - * - *
-     * Do not use this. For media support, add instead
-     * [][google.bytestream.RestByteStream] as an API to your
-     * configuration.
-     * 
- */ - public boolean hasMediaUpload() { - return mediaUploadBuilder_ != null || mediaUpload_ != null; - } - /** - * optional .google.api.MediaUpload media_upload = 9; - * - *
-     * Do not use this. For media support, add instead
-     * [][google.bytestream.RestByteStream] as an API to your
-     * configuration.
-     * 
- */ - public com.google.api.MediaUpload getMediaUpload() { - if (mediaUploadBuilder_ == null) { - return mediaUpload_ == null ? com.google.api.MediaUpload.getDefaultInstance() : mediaUpload_; - } else { - return mediaUploadBuilder_.getMessage(); - } - } - /** - * optional .google.api.MediaUpload media_upload = 9; - * - *
-     * Do not use this. For media support, add instead
-     * [][google.bytestream.RestByteStream] as an API to your
-     * configuration.
-     * 
- */ - public Builder setMediaUpload(com.google.api.MediaUpload value) { - if (mediaUploadBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - mediaUpload_ = value; - onChanged(); - } else { - mediaUploadBuilder_.setMessage(value); - } - - return this; - } - /** - * optional .google.api.MediaUpload media_upload = 9; - * - *
-     * Do not use this. For media support, add instead
-     * [][google.bytestream.RestByteStream] as an API to your
-     * configuration.
-     * 
- */ - public Builder setMediaUpload( - com.google.api.MediaUpload.Builder builderForValue) { - if (mediaUploadBuilder_ == null) { - mediaUpload_ = builderForValue.build(); - onChanged(); - } else { - mediaUploadBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * optional .google.api.MediaUpload media_upload = 9; - * - *
-     * Do not use this. For media support, add instead
-     * [][google.bytestream.RestByteStream] as an API to your
-     * configuration.
-     * 
- */ - public Builder mergeMediaUpload(com.google.api.MediaUpload value) { - if (mediaUploadBuilder_ == null) { - if (mediaUpload_ != null) { - mediaUpload_ = - com.google.api.MediaUpload.newBuilder(mediaUpload_).mergeFrom(value).buildPartial(); - } else { - mediaUpload_ = value; - } - onChanged(); - } else { - mediaUploadBuilder_.mergeFrom(value); - } - - return this; - } - /** - * optional .google.api.MediaUpload media_upload = 9; - * - *
-     * Do not use this. For media support, add instead
-     * [][google.bytestream.RestByteStream] as an API to your
-     * configuration.
-     * 
- */ - public Builder clearMediaUpload() { - if (mediaUploadBuilder_ == null) { - mediaUpload_ = null; - onChanged(); - } else { - mediaUpload_ = null; - mediaUploadBuilder_ = null; - } - - return this; - } - /** - * optional .google.api.MediaUpload media_upload = 9; - * - *
-     * Do not use this. For media support, add instead
-     * [][google.bytestream.RestByteStream] as an API to your
-     * configuration.
-     * 
- */ - public com.google.api.MediaUpload.Builder getMediaUploadBuilder() { - - onChanged(); - return getMediaUploadFieldBuilder().getBuilder(); - } - /** - * optional .google.api.MediaUpload media_upload = 9; - * - *
-     * Do not use this. For media support, add instead
-     * [][google.bytestream.RestByteStream] as an API to your
-     * configuration.
-     * 
- */ - public com.google.api.MediaUploadOrBuilder getMediaUploadOrBuilder() { - if (mediaUploadBuilder_ != null) { - return mediaUploadBuilder_.getMessageOrBuilder(); - } else { - return mediaUpload_ == null ? - com.google.api.MediaUpload.getDefaultInstance() : mediaUpload_; - } - } - /** - * optional .google.api.MediaUpload media_upload = 9; - * - *
-     * Do not use this. For media support, add instead
-     * [][google.bytestream.RestByteStream] as an API to your
-     * configuration.
-     * 
- */ - private com.google.protobuf.SingleFieldBuilder< - com.google.api.MediaUpload, com.google.api.MediaUpload.Builder, com.google.api.MediaUploadOrBuilder> - getMediaUploadFieldBuilder() { - if (mediaUploadBuilder_ == null) { - mediaUploadBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.api.MediaUpload, com.google.api.MediaUpload.Builder, com.google.api.MediaUploadOrBuilder>( - getMediaUpload(), - getParentForChildren(), - isClean()); - mediaUpload_ = null; - } - return mediaUploadBuilder_; - } - - private com.google.api.MediaDownload mediaDownload_ = null; - private com.google.protobuf.SingleFieldBuilder< - com.google.api.MediaDownload, com.google.api.MediaDownload.Builder, com.google.api.MediaDownloadOrBuilder> mediaDownloadBuilder_; - /** - * optional .google.api.MediaDownload media_download = 10; - * - *
-     * Do not use this. For media support, add instead
-     * [][google.bytestream.RestByteStream] as an API to your
-     * configuration.
-     * 
- */ - public boolean hasMediaDownload() { - return mediaDownloadBuilder_ != null || mediaDownload_ != null; - } - /** - * optional .google.api.MediaDownload media_download = 10; - * - *
-     * Do not use this. For media support, add instead
-     * [][google.bytestream.RestByteStream] as an API to your
-     * configuration.
-     * 
- */ - public com.google.api.MediaDownload getMediaDownload() { - if (mediaDownloadBuilder_ == null) { - return mediaDownload_ == null ? com.google.api.MediaDownload.getDefaultInstance() : mediaDownload_; - } else { - return mediaDownloadBuilder_.getMessage(); - } - } - /** - * optional .google.api.MediaDownload media_download = 10; - * - *
-     * Do not use this. For media support, add instead
-     * [][google.bytestream.RestByteStream] as an API to your
-     * configuration.
-     * 
- */ - public Builder setMediaDownload(com.google.api.MediaDownload value) { - if (mediaDownloadBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - mediaDownload_ = value; - onChanged(); - } else { - mediaDownloadBuilder_.setMessage(value); - } - - return this; - } - /** - * optional .google.api.MediaDownload media_download = 10; - * - *
-     * Do not use this. For media support, add instead
-     * [][google.bytestream.RestByteStream] as an API to your
-     * configuration.
-     * 
- */ - public Builder setMediaDownload( - com.google.api.MediaDownload.Builder builderForValue) { - if (mediaDownloadBuilder_ == null) { - mediaDownload_ = builderForValue.build(); - onChanged(); - } else { - mediaDownloadBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * optional .google.api.MediaDownload media_download = 10; - * - *
-     * Do not use this. For media support, add instead
-     * [][google.bytestream.RestByteStream] as an API to your
-     * configuration.
-     * 
- */ - public Builder mergeMediaDownload(com.google.api.MediaDownload value) { - if (mediaDownloadBuilder_ == null) { - if (mediaDownload_ != null) { - mediaDownload_ = - com.google.api.MediaDownload.newBuilder(mediaDownload_).mergeFrom(value).buildPartial(); - } else { - mediaDownload_ = value; - } - onChanged(); - } else { - mediaDownloadBuilder_.mergeFrom(value); - } - - return this; - } - /** - * optional .google.api.MediaDownload media_download = 10; - * - *
-     * Do not use this. For media support, add instead
-     * [][google.bytestream.RestByteStream] as an API to your
-     * configuration.
-     * 
- */ - public Builder clearMediaDownload() { - if (mediaDownloadBuilder_ == null) { - mediaDownload_ = null; - onChanged(); - } else { - mediaDownload_ = null; - mediaDownloadBuilder_ = null; - } - - return this; - } - /** - * optional .google.api.MediaDownload media_download = 10; - * - *
-     * Do not use this. For media support, add instead
-     * [][google.bytestream.RestByteStream] as an API to your
-     * configuration.
-     * 
- */ - public com.google.api.MediaDownload.Builder getMediaDownloadBuilder() { - - onChanged(); - return getMediaDownloadFieldBuilder().getBuilder(); - } - /** - * optional .google.api.MediaDownload media_download = 10; - * - *
-     * Do not use this. For media support, add instead
-     * [][google.bytestream.RestByteStream] as an API to your
-     * configuration.
-     * 
- */ - public com.google.api.MediaDownloadOrBuilder getMediaDownloadOrBuilder() { - if (mediaDownloadBuilder_ != null) { - return mediaDownloadBuilder_.getMessageOrBuilder(); - } else { - return mediaDownload_ == null ? - com.google.api.MediaDownload.getDefaultInstance() : mediaDownload_; - } - } - /** - * optional .google.api.MediaDownload media_download = 10; - * - *
-     * Do not use this. For media support, add instead
-     * [][google.bytestream.RestByteStream] as an API to your
-     * configuration.
-     * 
- */ - private com.google.protobuf.SingleFieldBuilder< - com.google.api.MediaDownload, com.google.api.MediaDownload.Builder, com.google.api.MediaDownloadOrBuilder> - getMediaDownloadFieldBuilder() { - if (mediaDownloadBuilder_ == null) { - mediaDownloadBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.api.MediaDownload, com.google.api.MediaDownload.Builder, com.google.api.MediaDownloadOrBuilder>( - getMediaDownload(), - getParentForChildren(), - isClean()); - mediaDownload_ = null; - } - return mediaDownloadBuilder_; - } - - private java.util.List additionalBindings_ = - java.util.Collections.emptyList(); - private void ensureAdditionalBindingsIsMutable() { - if (!((bitField0_ & 0x00000400) == 0x00000400)) { - additionalBindings_ = new java.util.ArrayList(additionalBindings_); - bitField0_ |= 0x00000400; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.api.HttpRule, com.google.api.HttpRule.Builder, com.google.api.HttpRuleOrBuilder> additionalBindingsBuilder_; - - /** - * repeated .google.api.HttpRule additional_bindings = 11; - * - *
-     * Additional HTTP bindings for the selector. Nested bindings must
-     * not contain an `additional_bindings` field themselves (that is,
-     * the nesting may only be one level deep).
-     * 
- */ - public java.util.List getAdditionalBindingsList() { - if (additionalBindingsBuilder_ == null) { - return java.util.Collections.unmodifiableList(additionalBindings_); - } else { - return additionalBindingsBuilder_.getMessageList(); - } - } - /** - * repeated .google.api.HttpRule additional_bindings = 11; - * - *
-     * Additional HTTP bindings for the selector. Nested bindings must
-     * not contain an `additional_bindings` field themselves (that is,
-     * the nesting may only be one level deep).
-     * 
- */ - public int getAdditionalBindingsCount() { - if (additionalBindingsBuilder_ == null) { - return additionalBindings_.size(); - } else { - return additionalBindingsBuilder_.getCount(); - } - } - /** - * repeated .google.api.HttpRule additional_bindings = 11; - * - *
-     * Additional HTTP bindings for the selector. Nested bindings must
-     * not contain an `additional_bindings` field themselves (that is,
-     * the nesting may only be one level deep).
-     * 
- */ - public com.google.api.HttpRule getAdditionalBindings(int index) { - if (additionalBindingsBuilder_ == null) { - return additionalBindings_.get(index); - } else { - return additionalBindingsBuilder_.getMessage(index); - } - } - /** - * repeated .google.api.HttpRule additional_bindings = 11; - * - *
-     * Additional HTTP bindings for the selector. Nested bindings must
-     * not contain an `additional_bindings` field themselves (that is,
-     * the nesting may only be one level deep).
-     * 
- */ - public Builder setAdditionalBindings( - int index, com.google.api.HttpRule value) { - if (additionalBindingsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAdditionalBindingsIsMutable(); - additionalBindings_.set(index, value); - onChanged(); - } else { - additionalBindingsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .google.api.HttpRule additional_bindings = 11; - * - *
-     * Additional HTTP bindings for the selector. Nested bindings must
-     * not contain an `additional_bindings` field themselves (that is,
-     * the nesting may only be one level deep).
-     * 
- */ - public Builder setAdditionalBindings( - int index, com.google.api.HttpRule.Builder builderForValue) { - if (additionalBindingsBuilder_ == null) { - ensureAdditionalBindingsIsMutable(); - additionalBindings_.set(index, builderForValue.build()); - onChanged(); - } else { - additionalBindingsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.api.HttpRule additional_bindings = 11; - * - *
-     * Additional HTTP bindings for the selector. Nested bindings must
-     * not contain an `additional_bindings` field themselves (that is,
-     * the nesting may only be one level deep).
-     * 
- */ - public Builder addAdditionalBindings(com.google.api.HttpRule value) { - if (additionalBindingsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAdditionalBindingsIsMutable(); - additionalBindings_.add(value); - onChanged(); - } else { - additionalBindingsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .google.api.HttpRule additional_bindings = 11; - * - *
-     * Additional HTTP bindings for the selector. Nested bindings must
-     * not contain an `additional_bindings` field themselves (that is,
-     * the nesting may only be one level deep).
-     * 
- */ - public Builder addAdditionalBindings( - int index, com.google.api.HttpRule value) { - if (additionalBindingsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAdditionalBindingsIsMutable(); - additionalBindings_.add(index, value); - onChanged(); - } else { - additionalBindingsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .google.api.HttpRule additional_bindings = 11; - * - *
-     * Additional HTTP bindings for the selector. Nested bindings must
-     * not contain an `additional_bindings` field themselves (that is,
-     * the nesting may only be one level deep).
-     * 
- */ - public Builder addAdditionalBindings( - com.google.api.HttpRule.Builder builderForValue) { - if (additionalBindingsBuilder_ == null) { - ensureAdditionalBindingsIsMutable(); - additionalBindings_.add(builderForValue.build()); - onChanged(); - } else { - additionalBindingsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .google.api.HttpRule additional_bindings = 11; - * - *
-     * Additional HTTP bindings for the selector. Nested bindings must
-     * not contain an `additional_bindings` field themselves (that is,
-     * the nesting may only be one level deep).
-     * 
- */ - public Builder addAdditionalBindings( - int index, com.google.api.HttpRule.Builder builderForValue) { - if (additionalBindingsBuilder_ == null) { - ensureAdditionalBindingsIsMutable(); - additionalBindings_.add(index, builderForValue.build()); - onChanged(); - } else { - additionalBindingsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.api.HttpRule additional_bindings = 11; - * - *
-     * Additional HTTP bindings for the selector. Nested bindings must
-     * not contain an `additional_bindings` field themselves (that is,
-     * the nesting may only be one level deep).
-     * 
- */ - public Builder addAllAdditionalBindings( - java.lang.Iterable values) { - if (additionalBindingsBuilder_ == null) { - ensureAdditionalBindingsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, additionalBindings_); - onChanged(); - } else { - additionalBindingsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .google.api.HttpRule additional_bindings = 11; - * - *
-     * Additional HTTP bindings for the selector. Nested bindings must
-     * not contain an `additional_bindings` field themselves (that is,
-     * the nesting may only be one level deep).
-     * 
- */ - public Builder clearAdditionalBindings() { - if (additionalBindingsBuilder_ == null) { - additionalBindings_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000400); - onChanged(); - } else { - additionalBindingsBuilder_.clear(); - } - return this; - } - /** - * repeated .google.api.HttpRule additional_bindings = 11; - * - *
-     * Additional HTTP bindings for the selector. Nested bindings must
-     * not contain an `additional_bindings` field themselves (that is,
-     * the nesting may only be one level deep).
-     * 
- */ - public Builder removeAdditionalBindings(int index) { - if (additionalBindingsBuilder_ == null) { - ensureAdditionalBindingsIsMutable(); - additionalBindings_.remove(index); - onChanged(); - } else { - additionalBindingsBuilder_.remove(index); - } - return this; - } - /** - * repeated .google.api.HttpRule additional_bindings = 11; - * - *
-     * Additional HTTP bindings for the selector. Nested bindings must
-     * not contain an `additional_bindings` field themselves (that is,
-     * the nesting may only be one level deep).
-     * 
- */ - public com.google.api.HttpRule.Builder getAdditionalBindingsBuilder( - int index) { - return getAdditionalBindingsFieldBuilder().getBuilder(index); - } - /** - * repeated .google.api.HttpRule additional_bindings = 11; - * - *
-     * Additional HTTP bindings for the selector. Nested bindings must
-     * not contain an `additional_bindings` field themselves (that is,
-     * the nesting may only be one level deep).
-     * 
- */ - public com.google.api.HttpRuleOrBuilder getAdditionalBindingsOrBuilder( - int index) { - if (additionalBindingsBuilder_ == null) { - return additionalBindings_.get(index); } else { - return additionalBindingsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .google.api.HttpRule additional_bindings = 11; - * - *
-     * Additional HTTP bindings for the selector. Nested bindings must
-     * not contain an `additional_bindings` field themselves (that is,
-     * the nesting may only be one level deep).
-     * 
- */ - public java.util.List - getAdditionalBindingsOrBuilderList() { - if (additionalBindingsBuilder_ != null) { - return additionalBindingsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(additionalBindings_); - } - } - /** - * repeated .google.api.HttpRule additional_bindings = 11; - * - *
-     * Additional HTTP bindings for the selector. Nested bindings must
-     * not contain an `additional_bindings` field themselves (that is,
-     * the nesting may only be one level deep).
-     * 
- */ - public com.google.api.HttpRule.Builder addAdditionalBindingsBuilder() { - return getAdditionalBindingsFieldBuilder().addBuilder( - com.google.api.HttpRule.getDefaultInstance()); - } - /** - * repeated .google.api.HttpRule additional_bindings = 11; - * - *
-     * Additional HTTP bindings for the selector. Nested bindings must
-     * not contain an `additional_bindings` field themselves (that is,
-     * the nesting may only be one level deep).
-     * 
- */ - public com.google.api.HttpRule.Builder addAdditionalBindingsBuilder( - int index) { - return getAdditionalBindingsFieldBuilder().addBuilder( - index, com.google.api.HttpRule.getDefaultInstance()); - } - /** - * repeated .google.api.HttpRule additional_bindings = 11; - * - *
-     * Additional HTTP bindings for the selector. Nested bindings must
-     * not contain an `additional_bindings` field themselves (that is,
-     * the nesting may only be one level deep).
-     * 
- */ - public java.util.List - getAdditionalBindingsBuilderList() { - return getAdditionalBindingsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - com.google.api.HttpRule, com.google.api.HttpRule.Builder, com.google.api.HttpRuleOrBuilder> - getAdditionalBindingsFieldBuilder() { - if (additionalBindingsBuilder_ == null) { - additionalBindingsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - com.google.api.HttpRule, com.google.api.HttpRule.Builder, com.google.api.HttpRuleOrBuilder>( - additionalBindings_, - ((bitField0_ & 0x00000400) == 0x00000400), - getParentForChildren(), - isClean()); - additionalBindings_ = null; - } - return additionalBindingsBuilder_; - } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - - // @@protoc_insertion_point(builder_scope:google.api.HttpRule) - } - - // @@protoc_insertion_point(class_scope:google.api.HttpRule) - private static final com.google.api.HttpRule DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.api.HttpRule(); - } - - public static com.google.api.HttpRule getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public HttpRule parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new HttpRule(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public com.google.api.HttpRule getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/HttpRuleOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/api/HttpRuleOrBuilder.java deleted file mode 100644 index 9a29370416a8..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/HttpRuleOrBuilder.java +++ /dev/null @@ -1,276 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/api/http.proto - -package com.google.api; - -public interface HttpRuleOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.api.HttpRule) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string selector = 1; - * - *
-   * Selects methods to which this rule applies.
-   * Refer to [selector][DocumentationRule.selector] for syntax details.
-   * 
- */ - java.lang.String getSelector(); - /** - * optional string selector = 1; - * - *
-   * Selects methods to which this rule applies.
-   * Refer to [selector][DocumentationRule.selector] for syntax details.
-   * 
- */ - com.google.protobuf.ByteString - getSelectorBytes(); - - /** - * optional string get = 2; - * - *
-   * Used for listing and getting information about resources.
-   * 
- */ - java.lang.String getGet(); - /** - * optional string get = 2; - * - *
-   * Used for listing and getting information about resources.
-   * 
- */ - com.google.protobuf.ByteString - getGetBytes(); - - /** - * optional string put = 3; - * - *
-   * Used for updating a resource.
-   * 
- */ - java.lang.String getPut(); - /** - * optional string put = 3; - * - *
-   * Used for updating a resource.
-   * 
- */ - com.google.protobuf.ByteString - getPutBytes(); - - /** - * optional string post = 4; - * - *
-   * Used for creating a resource.
-   * 
- */ - java.lang.String getPost(); - /** - * optional string post = 4; - * - *
-   * Used for creating a resource.
-   * 
- */ - com.google.protobuf.ByteString - getPostBytes(); - - /** - * optional string delete = 5; - * - *
-   * Used for deleting a resource.
-   * 
- */ - java.lang.String getDelete(); - /** - * optional string delete = 5; - * - *
-   * Used for deleting a resource.
-   * 
- */ - com.google.protobuf.ByteString - getDeleteBytes(); - - /** - * optional string patch = 6; - * - *
-   * Used for updating a resource.
-   * 
- */ - java.lang.String getPatch(); - /** - * optional string patch = 6; - * - *
-   * Used for updating a resource.
-   * 
- */ - com.google.protobuf.ByteString - getPatchBytes(); - - /** - * optional .google.api.CustomHttpPattern custom = 8; - * - *
-   * Custom pattern is used for defining custom verbs.
-   * 
- */ - com.google.api.CustomHttpPattern getCustom(); - /** - * optional .google.api.CustomHttpPattern custom = 8; - * - *
-   * Custom pattern is used for defining custom verbs.
-   * 
- */ - com.google.api.CustomHttpPatternOrBuilder getCustomOrBuilder(); - - /** - * optional string body = 7; - * - *
-   * The name of the request field whose value is mapped to the HTTP body, or
-   * `*` for mapping all fields not captured by the path pattern to the HTTP
-   * body. NOTE: the referred field must not be a repeated field.
-   * 
- */ - java.lang.String getBody(); - /** - * optional string body = 7; - * - *
-   * The name of the request field whose value is mapped to the HTTP body, or
-   * `*` for mapping all fields not captured by the path pattern to the HTTP
-   * body. NOTE: the referred field must not be a repeated field.
-   * 
- */ - com.google.protobuf.ByteString - getBodyBytes(); - - /** - * optional .google.api.MediaUpload media_upload = 9; - * - *
-   * Do not use this. For media support, add instead
-   * [][google.bytestream.RestByteStream] as an API to your
-   * configuration.
-   * 
- */ - boolean hasMediaUpload(); - /** - * optional .google.api.MediaUpload media_upload = 9; - * - *
-   * Do not use this. For media support, add instead
-   * [][google.bytestream.RestByteStream] as an API to your
-   * configuration.
-   * 
- */ - com.google.api.MediaUpload getMediaUpload(); - /** - * optional .google.api.MediaUpload media_upload = 9; - * - *
-   * Do not use this. For media support, add instead
-   * [][google.bytestream.RestByteStream] as an API to your
-   * configuration.
-   * 
- */ - com.google.api.MediaUploadOrBuilder getMediaUploadOrBuilder(); - - /** - * optional .google.api.MediaDownload media_download = 10; - * - *
-   * Do not use this. For media support, add instead
-   * [][google.bytestream.RestByteStream] as an API to your
-   * configuration.
-   * 
- */ - boolean hasMediaDownload(); - /** - * optional .google.api.MediaDownload media_download = 10; - * - *
-   * Do not use this. For media support, add instead
-   * [][google.bytestream.RestByteStream] as an API to your
-   * configuration.
-   * 
- */ - com.google.api.MediaDownload getMediaDownload(); - /** - * optional .google.api.MediaDownload media_download = 10; - * - *
-   * Do not use this. For media support, add instead
-   * [][google.bytestream.RestByteStream] as an API to your
-   * configuration.
-   * 
- */ - com.google.api.MediaDownloadOrBuilder getMediaDownloadOrBuilder(); - - /** - * repeated .google.api.HttpRule additional_bindings = 11; - * - *
-   * Additional HTTP bindings for the selector. Nested bindings must
-   * not contain an `additional_bindings` field themselves (that is,
-   * the nesting may only be one level deep).
-   * 
- */ - java.util.List - getAdditionalBindingsList(); - /** - * repeated .google.api.HttpRule additional_bindings = 11; - * - *
-   * Additional HTTP bindings for the selector. Nested bindings must
-   * not contain an `additional_bindings` field themselves (that is,
-   * the nesting may only be one level deep).
-   * 
- */ - com.google.api.HttpRule getAdditionalBindings(int index); - /** - * repeated .google.api.HttpRule additional_bindings = 11; - * - *
-   * Additional HTTP bindings for the selector. Nested bindings must
-   * not contain an `additional_bindings` field themselves (that is,
-   * the nesting may only be one level deep).
-   * 
- */ - int getAdditionalBindingsCount(); - /** - * repeated .google.api.HttpRule additional_bindings = 11; - * - *
-   * Additional HTTP bindings for the selector. Nested bindings must
-   * not contain an `additional_bindings` field themselves (that is,
-   * the nesting may only be one level deep).
-   * 
- */ - java.util.List - getAdditionalBindingsOrBuilderList(); - /** - * repeated .google.api.HttpRule additional_bindings = 11; - * - *
-   * Additional HTTP bindings for the selector. Nested bindings must
-   * not contain an `additional_bindings` field themselves (that is,
-   * the nesting may only be one level deep).
-   * 
- */ - com.google.api.HttpRuleOrBuilder getAdditionalBindingsOrBuilder( - int index); - - public com.google.api.HttpRule.PatternCase getPatternCase(); -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/MediaDownload.java b/gcloud-java-gax/generated/src/main/java/com/google/api/MediaDownload.java deleted file mode 100644 index 7134429cae8e..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/MediaDownload.java +++ /dev/null @@ -1,399 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/api/http.proto - -package com.google.api; - -/** - * Protobuf type {@code google.api.MediaDownload} - * - *
- * Do not use this. For media support, add instead
- * [][google.bytestream.RestByteStream] as an API to your
- * configuration.
- * 
- */ -public final class MediaDownload extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.api.MediaDownload) - MediaDownloadOrBuilder { - // Use MediaDownload.newBuilder() to construct. - private MediaDownload(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private MediaDownload() { - enabled_ = false; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private MediaDownload( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - int mutable_bitField0_ = 0; - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!input.skipField(tag)) { - done = true; - } - break; - } - case 8: { - - enabled_ = input.readBool(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.api.HttpProto.internal_static_google_api_MediaDownload_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.api.HttpProto.internal_static_google_api_MediaDownload_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.api.MediaDownload.class, com.google.api.MediaDownload.Builder.class); - } - - public static final int ENABLED_FIELD_NUMBER = 1; - private boolean enabled_; - /** - * optional bool enabled = 1; - * - *
-   * Whether download is enabled.
-   * 
- */ - public boolean getEnabled() { - return enabled_; - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (enabled_ != false) { - output.writeBool(1, enabled_); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (enabled_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(1, enabled_); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static com.google.api.MediaDownload parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.api.MediaDownload 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.api.MediaDownload parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.api.MediaDownload parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.api.MediaDownload parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.api.MediaDownload parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.api.MediaDownload parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.api.MediaDownload parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.api.MediaDownload parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.api.MediaDownload parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.api.MediaDownload prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - 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; - } - /** - * Protobuf type {@code google.api.MediaDownload} - * - *
-   * Do not use this. For media support, add instead
-   * [][google.bytestream.RestByteStream] as an API to your
-   * configuration.
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.api.MediaDownload) - com.google.api.MediaDownloadOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.api.HttpProto.internal_static_google_api_MediaDownload_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.api.HttpProto.internal_static_google_api_MediaDownload_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.api.MediaDownload.class, com.google.api.MediaDownload.Builder.class); - } - - // Construct using com.google.api.MediaDownload.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - enabled_ = false; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.api.HttpProto.internal_static_google_api_MediaDownload_descriptor; - } - - public com.google.api.MediaDownload getDefaultInstanceForType() { - return com.google.api.MediaDownload.getDefaultInstance(); - } - - public com.google.api.MediaDownload build() { - com.google.api.MediaDownload result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.api.MediaDownload buildPartial() { - com.google.api.MediaDownload result = new com.google.api.MediaDownload(this); - result.enabled_ = enabled_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.api.MediaDownload) { - return mergeFrom((com.google.api.MediaDownload)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.api.MediaDownload other) { - if (other == com.google.api.MediaDownload.getDefaultInstance()) return this; - if (other.getEnabled() != false) { - setEnabled(other.getEnabled()); - } - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.api.MediaDownload parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.api.MediaDownload) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private boolean enabled_ ; - /** - * optional bool enabled = 1; - * - *
-     * Whether download is enabled.
-     * 
- */ - public boolean getEnabled() { - return enabled_; - } - /** - * optional bool enabled = 1; - * - *
-     * Whether download is enabled.
-     * 
- */ - public Builder setEnabled(boolean value) { - - enabled_ = value; - onChanged(); - return this; - } - /** - * optional bool enabled = 1; - * - *
-     * Whether download is enabled.
-     * 
- */ - public Builder clearEnabled() { - - enabled_ = false; - onChanged(); - return this; - } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - - // @@protoc_insertion_point(builder_scope:google.api.MediaDownload) - } - - // @@protoc_insertion_point(class_scope:google.api.MediaDownload) - private static final com.google.api.MediaDownload DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.api.MediaDownload(); - } - - public static com.google.api.MediaDownload getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public MediaDownload parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new MediaDownload(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public com.google.api.MediaDownload getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/MediaDownloadOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/api/MediaDownloadOrBuilder.java deleted file mode 100644 index e07a3988c7fe..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/MediaDownloadOrBuilder.java +++ /dev/null @@ -1,18 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/api/http.proto - -package com.google.api; - -public interface MediaDownloadOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.api.MediaDownload) - com.google.protobuf.MessageOrBuilder { - - /** - * optional bool enabled = 1; - * - *
-   * Whether download is enabled.
-   * 
- */ - boolean getEnabled(); -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/MediaUpload.java b/gcloud-java-gax/generated/src/main/java/com/google/api/MediaUpload.java deleted file mode 100644 index 856b2954dcea..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/MediaUpload.java +++ /dev/null @@ -1,399 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/api/http.proto - -package com.google.api; - -/** - * Protobuf type {@code google.api.MediaUpload} - * - *
- * Do not use this. For media support, add instead
- * [][google.bytestream.RestByteStream] as an API to your
- * configuration.
- * 
- */ -public final class MediaUpload extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.api.MediaUpload) - MediaUploadOrBuilder { - // Use MediaUpload.newBuilder() to construct. - private MediaUpload(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private MediaUpload() { - enabled_ = false; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private MediaUpload( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - int mutable_bitField0_ = 0; - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!input.skipField(tag)) { - done = true; - } - break; - } - case 24: { - - enabled_ = input.readBool(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.api.HttpProto.internal_static_google_api_MediaUpload_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.api.HttpProto.internal_static_google_api_MediaUpload_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.api.MediaUpload.class, com.google.api.MediaUpload.Builder.class); - } - - public static final int ENABLED_FIELD_NUMBER = 3; - private boolean enabled_; - /** - * optional bool enabled = 3; - * - *
-   * Whether upload is enabled.
-   * 
- */ - public boolean getEnabled() { - return enabled_; - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (enabled_ != false) { - output.writeBool(3, enabled_); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (enabled_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(3, enabled_); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static com.google.api.MediaUpload parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.api.MediaUpload 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.api.MediaUpload parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.api.MediaUpload parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.api.MediaUpload parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.api.MediaUpload parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.api.MediaUpload parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.api.MediaUpload parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.api.MediaUpload parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.api.MediaUpload parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.api.MediaUpload prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - 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; - } - /** - * Protobuf type {@code google.api.MediaUpload} - * - *
-   * Do not use this. For media support, add instead
-   * [][google.bytestream.RestByteStream] as an API to your
-   * configuration.
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.api.MediaUpload) - com.google.api.MediaUploadOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.api.HttpProto.internal_static_google_api_MediaUpload_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.api.HttpProto.internal_static_google_api_MediaUpload_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.api.MediaUpload.class, com.google.api.MediaUpload.Builder.class); - } - - // Construct using com.google.api.MediaUpload.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - enabled_ = false; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.api.HttpProto.internal_static_google_api_MediaUpload_descriptor; - } - - public com.google.api.MediaUpload getDefaultInstanceForType() { - return com.google.api.MediaUpload.getDefaultInstance(); - } - - public com.google.api.MediaUpload build() { - com.google.api.MediaUpload result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.api.MediaUpload buildPartial() { - com.google.api.MediaUpload result = new com.google.api.MediaUpload(this); - result.enabled_ = enabled_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.api.MediaUpload) { - return mergeFrom((com.google.api.MediaUpload)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.api.MediaUpload other) { - if (other == com.google.api.MediaUpload.getDefaultInstance()) return this; - if (other.getEnabled() != false) { - setEnabled(other.getEnabled()); - } - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.api.MediaUpload parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.api.MediaUpload) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private boolean enabled_ ; - /** - * optional bool enabled = 3; - * - *
-     * Whether upload is enabled.
-     * 
- */ - public boolean getEnabled() { - return enabled_; - } - /** - * optional bool enabled = 3; - * - *
-     * Whether upload is enabled.
-     * 
- */ - public Builder setEnabled(boolean value) { - - enabled_ = value; - onChanged(); - return this; - } - /** - * optional bool enabled = 3; - * - *
-     * Whether upload is enabled.
-     * 
- */ - public Builder clearEnabled() { - - enabled_ = false; - onChanged(); - return this; - } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - - // @@protoc_insertion_point(builder_scope:google.api.MediaUpload) - } - - // @@protoc_insertion_point(class_scope:google.api.MediaUpload) - private static final com.google.api.MediaUpload DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.api.MediaUpload(); - } - - public static com.google.api.MediaUpload getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public MediaUpload parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new MediaUpload(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public com.google.api.MediaUpload getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/MediaUploadOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/api/MediaUploadOrBuilder.java deleted file mode 100644 index a3c55034ce00..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/MediaUploadOrBuilder.java +++ /dev/null @@ -1,18 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/api/http.proto - -package com.google.api; - -public interface MediaUploadOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.api.MediaUpload) - com.google.protobuf.MessageOrBuilder { - - /** - * optional bool enabled = 3; - * - *
-   * Whether upload is enabled.
-   * 
- */ - boolean getEnabled(); -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/Page.java b/gcloud-java-gax/generated/src/main/java/com/google/api/Page.java deleted file mode 100644 index 0ed13fb48cf4..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/Page.java +++ /dev/null @@ -1,1176 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/api/documentation.proto - -package com.google.api; - -/** - * Protobuf type {@code google.api.Page} - * - *
- * Represents a documentation page. A page can contain subpages to represent
- * nested documentation set structure.
- * 
- */ -public final class Page extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.api.Page) - PageOrBuilder { - // Use Page.newBuilder() to construct. - private Page(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Page() { - name_ = ""; - content_ = ""; - subpages_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private Page( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - int mutable_bitField0_ = 0; - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!input.skipField(tag)) { - done = true; - } - break; - } - case 10: { - String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: { - String s = input.readStringRequireUtf8(); - - content_ = s; - break; - } - case 26: { - if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { - subpages_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - subpages_.add(input.readMessage(com.google.api.Page.parser(), extensionRegistry)); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { - subpages_ = java.util.Collections.unmodifiableList(subpages_); - } - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.api.DocumentationProto.internal_static_google_api_Page_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.api.DocumentationProto.internal_static_google_api_Page_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.api.Page.class, com.google.api.Page.Builder.class); - } - - private int bitField0_; - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * optional string name = 1; - * - *
-   * The name of the page. It will be used as an identity of the page to
-   * generate URI of the page, text of the link to this page in navigation,
-   * etc. The full page name (start from the root page name to this page
-   * concatenated with `.`) can be used as reference to the page in your
-   * documentation. For example:
-   *     pages:
-   *     - name: Tutorial
-   *       content: (== include tutorial.md ==)
-   *       subpages:
-   *       - name: Java
-   *         content: (== include tutorial_java.md ==)
-   * You can reference `Java` page using Markdown reference link syntax:
-   * `[Java][Tutorial.Java]`.
-   * 
- */ - 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; - } - } - /** - * optional string name = 1; - * - *
-   * The name of the page. It will be used as an identity of the page to
-   * generate URI of the page, text of the link to this page in navigation,
-   * etc. The full page name (start from the root page name to this page
-   * concatenated with `.`) can be used as reference to the page in your
-   * documentation. For example:
-   *     pages:
-   *     - name: Tutorial
-   *       content: (== include tutorial.md ==)
-   *       subpages:
-   *       - name: Java
-   *         content: (== include tutorial_java.md ==)
-   * You can reference `Java` page using Markdown reference link syntax:
-   * `[Java][Tutorial.Java]`.
-   * 
- */ - 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 CONTENT_FIELD_NUMBER = 2; - private volatile java.lang.Object content_; - /** - * optional string content = 2; - * - *
-   * The Markdown content of the page. You can use `&#40;== include {path} ==&#41;`
-   * to include content from a Markdown file.
-   * 
- */ - public java.lang.String getContent() { - java.lang.Object ref = content_; - 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(); - content_ = s; - return s; - } - } - /** - * optional string content = 2; - * - *
-   * The Markdown content of the page. You can use `&#40;== include {path} ==&#41;`
-   * to include content from a Markdown file.
-   * 
- */ - public com.google.protobuf.ByteString - getContentBytes() { - java.lang.Object ref = content_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - content_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SUBPAGES_FIELD_NUMBER = 3; - private java.util.List subpages_; - /** - * repeated .google.api.Page subpages = 3; - * - *
-   * Subpages of this page. The order of subpages specified here will be
-   * honored in the generated docset.
-   * 
- */ - public java.util.List getSubpagesList() { - return subpages_; - } - /** - * repeated .google.api.Page subpages = 3; - * - *
-   * Subpages of this page. The order of subpages specified here will be
-   * honored in the generated docset.
-   * 
- */ - public java.util.List - getSubpagesOrBuilderList() { - return subpages_; - } - /** - * repeated .google.api.Page subpages = 3; - * - *
-   * Subpages of this page. The order of subpages specified here will be
-   * honored in the generated docset.
-   * 
- */ - public int getSubpagesCount() { - return subpages_.size(); - } - /** - * repeated .google.api.Page subpages = 3; - * - *
-   * Subpages of this page. The order of subpages specified here will be
-   * honored in the generated docset.
-   * 
- */ - public com.google.api.Page getSubpages(int index) { - return subpages_.get(index); - } - /** - * repeated .google.api.Page subpages = 3; - * - *
-   * Subpages of this page. The order of subpages specified here will be
-   * honored in the generated docset.
-   * 
- */ - public com.google.api.PageOrBuilder getSubpagesOrBuilder( - int index) { - return subpages_.get(index); - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); - } - if (!getContentBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, content_); - } - for (int i = 0; i < subpages_.size(); i++) { - output.writeMessage(3, subpages_.get(i)); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); - } - if (!getContentBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, content_); - } - for (int i = 0; i < subpages_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, subpages_.get(i)); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static com.google.api.Page parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.api.Page 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.api.Page parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.api.Page parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.api.Page parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.api.Page parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.api.Page parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.api.Page parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.api.Page parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.api.Page parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.api.Page prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - 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; - } - /** - * Protobuf type {@code google.api.Page} - * - *
-   * Represents a documentation page. A page can contain subpages to represent
-   * nested documentation set structure.
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.api.Page) - com.google.api.PageOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.api.DocumentationProto.internal_static_google_api_Page_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.api.DocumentationProto.internal_static_google_api_Page_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.api.Page.class, com.google.api.Page.Builder.class); - } - - // Construct using com.google.api.Page.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getSubpagesFieldBuilder(); - } - } - public Builder clear() { - super.clear(); - name_ = ""; - - content_ = ""; - - if (subpagesBuilder_ == null) { - subpages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - } else { - subpagesBuilder_.clear(); - } - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.api.DocumentationProto.internal_static_google_api_Page_descriptor; - } - - public com.google.api.Page getDefaultInstanceForType() { - return com.google.api.Page.getDefaultInstance(); - } - - public com.google.api.Page build() { - com.google.api.Page result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.api.Page buildPartial() { - com.google.api.Page result = new com.google.api.Page(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - result.name_ = name_; - result.content_ = content_; - if (subpagesBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004)) { - subpages_ = java.util.Collections.unmodifiableList(subpages_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.subpages_ = subpages_; - } else { - result.subpages_ = subpagesBuilder_.build(); - } - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.api.Page) { - return mergeFrom((com.google.api.Page)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.api.Page other) { - if (other == com.google.api.Page.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getContent().isEmpty()) { - content_ = other.content_; - onChanged(); - } - if (subpagesBuilder_ == null) { - if (!other.subpages_.isEmpty()) { - if (subpages_.isEmpty()) { - subpages_ = other.subpages_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureSubpagesIsMutable(); - subpages_.addAll(other.subpages_); - } - onChanged(); - } - } else { - if (!other.subpages_.isEmpty()) { - if (subpagesBuilder_.isEmpty()) { - subpagesBuilder_.dispose(); - subpagesBuilder_ = null; - subpages_ = other.subpages_; - bitField0_ = (bitField0_ & ~0x00000004); - subpagesBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getSubpagesFieldBuilder() : null; - } else { - subpagesBuilder_.addAllMessages(other.subpages_); - } - } - } - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.api.Page parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.api.Page) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - * optional string name = 1; - * - *
-     * The name of the page. It will be used as an identity of the page to
-     * generate URI of the page, text of the link to this page in navigation,
-     * etc. The full page name (start from the root page name to this page
-     * concatenated with `.`) can be used as reference to the page in your
-     * documentation. For example:
-     *     pages:
-     *     - name: Tutorial
-     *       content: (== include tutorial.md ==)
-     *       subpages:
-     *       - name: Java
-     *         content: (== include tutorial_java.md ==)
-     * You can reference `Java` page using Markdown reference link syntax:
-     * `[Java][Tutorial.Java]`.
-     * 
- */ - 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; - } - } - /** - * optional string name = 1; - * - *
-     * The name of the page. It will be used as an identity of the page to
-     * generate URI of the page, text of the link to this page in navigation,
-     * etc. The full page name (start from the root page name to this page
-     * concatenated with `.`) can be used as reference to the page in your
-     * documentation. For example:
-     *     pages:
-     *     - name: Tutorial
-     *       content: (== include tutorial.md ==)
-     *       subpages:
-     *       - name: Java
-     *         content: (== include tutorial_java.md ==)
-     * You can reference `Java` page using Markdown reference link syntax:
-     * `[Java][Tutorial.Java]`.
-     * 
- */ - 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; - } - } - /** - * optional string name = 1; - * - *
-     * The name of the page. It will be used as an identity of the page to
-     * generate URI of the page, text of the link to this page in navigation,
-     * etc. The full page name (start from the root page name to this page
-     * concatenated with `.`) can be used as reference to the page in your
-     * documentation. For example:
-     *     pages:
-     *     - name: Tutorial
-     *       content: (== include tutorial.md ==)
-     *       subpages:
-     *       - name: Java
-     *         content: (== include tutorial_java.md ==)
-     * You can reference `Java` page using Markdown reference link syntax:
-     * `[Java][Tutorial.Java]`.
-     * 
- */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * optional string name = 1; - * - *
-     * The name of the page. It will be used as an identity of the page to
-     * generate URI of the page, text of the link to this page in navigation,
-     * etc. The full page name (start from the root page name to this page
-     * concatenated with `.`) can be used as reference to the page in your
-     * documentation. For example:
-     *     pages:
-     *     - name: Tutorial
-     *       content: (== include tutorial.md ==)
-     *       subpages:
-     *       - name: Java
-     *         content: (== include tutorial_java.md ==)
-     * You can reference `Java` page using Markdown reference link syntax:
-     * `[Java][Tutorial.Java]`.
-     * 
- */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * optional string name = 1; - * - *
-     * The name of the page. It will be used as an identity of the page to
-     * generate URI of the page, text of the link to this page in navigation,
-     * etc. The full page name (start from the root page name to this page
-     * concatenated with `.`) can be used as reference to the page in your
-     * documentation. For example:
-     *     pages:
-     *     - name: Tutorial
-     *       content: (== include tutorial.md ==)
-     *       subpages:
-     *       - name: Java
-     *         content: (== include tutorial_java.md ==)
-     * You can reference `Java` page using Markdown reference link syntax:
-     * `[Java][Tutorial.Java]`.
-     * 
- */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.lang.Object content_ = ""; - /** - * optional string content = 2; - * - *
-     * The Markdown content of the page. You can use `&#40;== include {path} ==&#41;`
-     * to include content from a Markdown file.
-     * 
- */ - public java.lang.String getContent() { - java.lang.Object ref = content_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - content_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string content = 2; - * - *
-     * The Markdown content of the page. You can use `&#40;== include {path} ==&#41;`
-     * to include content from a Markdown file.
-     * 
- */ - public com.google.protobuf.ByteString - getContentBytes() { - java.lang.Object ref = content_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - content_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string content = 2; - * - *
-     * The Markdown content of the page. You can use `&#40;== include {path} ==&#41;`
-     * to include content from a Markdown file.
-     * 
- */ - public Builder setContent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - content_ = value; - onChanged(); - return this; - } - /** - * optional string content = 2; - * - *
-     * The Markdown content of the page. You can use `&#40;== include {path} ==&#41;`
-     * to include content from a Markdown file.
-     * 
- */ - public Builder clearContent() { - - content_ = getDefaultInstance().getContent(); - onChanged(); - return this; - } - /** - * optional string content = 2; - * - *
-     * The Markdown content of the page. You can use `&#40;== include {path} ==&#41;`
-     * to include content from a Markdown file.
-     * 
- */ - public Builder setContentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - content_ = value; - onChanged(); - return this; - } - - private java.util.List subpages_ = - java.util.Collections.emptyList(); - private void ensureSubpagesIsMutable() { - if (!((bitField0_ & 0x00000004) == 0x00000004)) { - subpages_ = new java.util.ArrayList(subpages_); - bitField0_ |= 0x00000004; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.api.Page, com.google.api.Page.Builder, com.google.api.PageOrBuilder> subpagesBuilder_; - - /** - * repeated .google.api.Page subpages = 3; - * - *
-     * Subpages of this page. The order of subpages specified here will be
-     * honored in the generated docset.
-     * 
- */ - public java.util.List getSubpagesList() { - if (subpagesBuilder_ == null) { - return java.util.Collections.unmodifiableList(subpages_); - } else { - return subpagesBuilder_.getMessageList(); - } - } - /** - * repeated .google.api.Page subpages = 3; - * - *
-     * Subpages of this page. The order of subpages specified here will be
-     * honored in the generated docset.
-     * 
- */ - public int getSubpagesCount() { - if (subpagesBuilder_ == null) { - return subpages_.size(); - } else { - return subpagesBuilder_.getCount(); - } - } - /** - * repeated .google.api.Page subpages = 3; - * - *
-     * Subpages of this page. The order of subpages specified here will be
-     * honored in the generated docset.
-     * 
- */ - public com.google.api.Page getSubpages(int index) { - if (subpagesBuilder_ == null) { - return subpages_.get(index); - } else { - return subpagesBuilder_.getMessage(index); - } - } - /** - * repeated .google.api.Page subpages = 3; - * - *
-     * Subpages of this page. The order of subpages specified here will be
-     * honored in the generated docset.
-     * 
- */ - public Builder setSubpages( - int index, com.google.api.Page value) { - if (subpagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSubpagesIsMutable(); - subpages_.set(index, value); - onChanged(); - } else { - subpagesBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .google.api.Page subpages = 3; - * - *
-     * Subpages of this page. The order of subpages specified here will be
-     * honored in the generated docset.
-     * 
- */ - public Builder setSubpages( - int index, com.google.api.Page.Builder builderForValue) { - if (subpagesBuilder_ == null) { - ensureSubpagesIsMutable(); - subpages_.set(index, builderForValue.build()); - onChanged(); - } else { - subpagesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.api.Page subpages = 3; - * - *
-     * Subpages of this page. The order of subpages specified here will be
-     * honored in the generated docset.
-     * 
- */ - public Builder addSubpages(com.google.api.Page value) { - if (subpagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSubpagesIsMutable(); - subpages_.add(value); - onChanged(); - } else { - subpagesBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .google.api.Page subpages = 3; - * - *
-     * Subpages of this page. The order of subpages specified here will be
-     * honored in the generated docset.
-     * 
- */ - public Builder addSubpages( - int index, com.google.api.Page value) { - if (subpagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSubpagesIsMutable(); - subpages_.add(index, value); - onChanged(); - } else { - subpagesBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .google.api.Page subpages = 3; - * - *
-     * Subpages of this page. The order of subpages specified here will be
-     * honored in the generated docset.
-     * 
- */ - public Builder addSubpages( - com.google.api.Page.Builder builderForValue) { - if (subpagesBuilder_ == null) { - ensureSubpagesIsMutable(); - subpages_.add(builderForValue.build()); - onChanged(); - } else { - subpagesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .google.api.Page subpages = 3; - * - *
-     * Subpages of this page. The order of subpages specified here will be
-     * honored in the generated docset.
-     * 
- */ - public Builder addSubpages( - int index, com.google.api.Page.Builder builderForValue) { - if (subpagesBuilder_ == null) { - ensureSubpagesIsMutable(); - subpages_.add(index, builderForValue.build()); - onChanged(); - } else { - subpagesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.api.Page subpages = 3; - * - *
-     * Subpages of this page. The order of subpages specified here will be
-     * honored in the generated docset.
-     * 
- */ - public Builder addAllSubpages( - java.lang.Iterable values) { - if (subpagesBuilder_ == null) { - ensureSubpagesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, subpages_); - onChanged(); - } else { - subpagesBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .google.api.Page subpages = 3; - * - *
-     * Subpages of this page. The order of subpages specified here will be
-     * honored in the generated docset.
-     * 
- */ - public Builder clearSubpages() { - if (subpagesBuilder_ == null) { - subpages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - } else { - subpagesBuilder_.clear(); - } - return this; - } - /** - * repeated .google.api.Page subpages = 3; - * - *
-     * Subpages of this page. The order of subpages specified here will be
-     * honored in the generated docset.
-     * 
- */ - public Builder removeSubpages(int index) { - if (subpagesBuilder_ == null) { - ensureSubpagesIsMutable(); - subpages_.remove(index); - onChanged(); - } else { - subpagesBuilder_.remove(index); - } - return this; - } - /** - * repeated .google.api.Page subpages = 3; - * - *
-     * Subpages of this page. The order of subpages specified here will be
-     * honored in the generated docset.
-     * 
- */ - public com.google.api.Page.Builder getSubpagesBuilder( - int index) { - return getSubpagesFieldBuilder().getBuilder(index); - } - /** - * repeated .google.api.Page subpages = 3; - * - *
-     * Subpages of this page. The order of subpages specified here will be
-     * honored in the generated docset.
-     * 
- */ - public com.google.api.PageOrBuilder getSubpagesOrBuilder( - int index) { - if (subpagesBuilder_ == null) { - return subpages_.get(index); } else { - return subpagesBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .google.api.Page subpages = 3; - * - *
-     * Subpages of this page. The order of subpages specified here will be
-     * honored in the generated docset.
-     * 
- */ - public java.util.List - getSubpagesOrBuilderList() { - if (subpagesBuilder_ != null) { - return subpagesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(subpages_); - } - } - /** - * repeated .google.api.Page subpages = 3; - * - *
-     * Subpages of this page. The order of subpages specified here will be
-     * honored in the generated docset.
-     * 
- */ - public com.google.api.Page.Builder addSubpagesBuilder() { - return getSubpagesFieldBuilder().addBuilder( - com.google.api.Page.getDefaultInstance()); - } - /** - * repeated .google.api.Page subpages = 3; - * - *
-     * Subpages of this page. The order of subpages specified here will be
-     * honored in the generated docset.
-     * 
- */ - public com.google.api.Page.Builder addSubpagesBuilder( - int index) { - return getSubpagesFieldBuilder().addBuilder( - index, com.google.api.Page.getDefaultInstance()); - } - /** - * repeated .google.api.Page subpages = 3; - * - *
-     * Subpages of this page. The order of subpages specified here will be
-     * honored in the generated docset.
-     * 
- */ - public java.util.List - getSubpagesBuilderList() { - return getSubpagesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - com.google.api.Page, com.google.api.Page.Builder, com.google.api.PageOrBuilder> - getSubpagesFieldBuilder() { - if (subpagesBuilder_ == null) { - subpagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - com.google.api.Page, com.google.api.Page.Builder, com.google.api.PageOrBuilder>( - subpages_, - ((bitField0_ & 0x00000004) == 0x00000004), - getParentForChildren(), - isClean()); - subpages_ = null; - } - return subpagesBuilder_; - } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - - // @@protoc_insertion_point(builder_scope:google.api.Page) - } - - // @@protoc_insertion_point(class_scope:google.api.Page) - private static final com.google.api.Page DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.api.Page(); - } - - public static com.google.api.Page getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public Page parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new Page(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public com.google.api.Page getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/PageOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/api/PageOrBuilder.java deleted file mode 100644 index 5a566c4ad030..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/PageOrBuilder.java +++ /dev/null @@ -1,120 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/api/documentation.proto - -package com.google.api; - -public interface PageOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.api.Page) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string name = 1; - * - *
-   * The name of the page. It will be used as an identity of the page to
-   * generate URI of the page, text of the link to this page in navigation,
-   * etc. The full page name (start from the root page name to this page
-   * concatenated with `.`) can be used as reference to the page in your
-   * documentation. For example:
-   *     pages:
-   *     - name: Tutorial
-   *       content: (== include tutorial.md ==)
-   *       subpages:
-   *       - name: Java
-   *         content: (== include tutorial_java.md ==)
-   * You can reference `Java` page using Markdown reference link syntax:
-   * `[Java][Tutorial.Java]`.
-   * 
- */ - java.lang.String getName(); - /** - * optional string name = 1; - * - *
-   * The name of the page. It will be used as an identity of the page to
-   * generate URI of the page, text of the link to this page in navigation,
-   * etc. The full page name (start from the root page name to this page
-   * concatenated with `.`) can be used as reference to the page in your
-   * documentation. For example:
-   *     pages:
-   *     - name: Tutorial
-   *       content: (== include tutorial.md ==)
-   *       subpages:
-   *       - name: Java
-   *         content: (== include tutorial_java.md ==)
-   * You can reference `Java` page using Markdown reference link syntax:
-   * `[Java][Tutorial.Java]`.
-   * 
- */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - * optional string content = 2; - * - *
-   * The Markdown content of the page. You can use `&#40;== include {path} ==&#41;`
-   * to include content from a Markdown file.
-   * 
- */ - java.lang.String getContent(); - /** - * optional string content = 2; - * - *
-   * The Markdown content of the page. You can use `&#40;== include {path} ==&#41;`
-   * to include content from a Markdown file.
-   * 
- */ - com.google.protobuf.ByteString - getContentBytes(); - - /** - * repeated .google.api.Page subpages = 3; - * - *
-   * Subpages of this page. The order of subpages specified here will be
-   * honored in the generated docset.
-   * 
- */ - java.util.List - getSubpagesList(); - /** - * repeated .google.api.Page subpages = 3; - * - *
-   * Subpages of this page. The order of subpages specified here will be
-   * honored in the generated docset.
-   * 
- */ - com.google.api.Page getSubpages(int index); - /** - * repeated .google.api.Page subpages = 3; - * - *
-   * Subpages of this page. The order of subpages specified here will be
-   * honored in the generated docset.
-   * 
- */ - int getSubpagesCount(); - /** - * repeated .google.api.Page subpages = 3; - * - *
-   * Subpages of this page. The order of subpages specified here will be
-   * honored in the generated docset.
-   * 
- */ - java.util.List - getSubpagesOrBuilderList(); - /** - * repeated .google.api.Page subpages = 3; - * - *
-   * Subpages of this page. The order of subpages specified here will be
-   * honored in the generated docset.
-   * 
- */ - com.google.api.PageOrBuilder getSubpagesOrBuilder( - int index); -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/Service.java b/gcloud-java-gax/generated/src/main/java/com/google/api/Service.java deleted file mode 100644 index 1ba6c8e37d79..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/Service.java +++ /dev/null @@ -1,4591 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/api/service.proto - -package com.google.api; - -/** - * Protobuf type {@code google.api.Service} - * - *
- * (== page basics ==)
- * `Service` is the root object of the configuration schema. It
- * describes basic information like the name of the service and the
- * exposed API interfaces, and delegates other aspects to configuration
- * sub-sections.
- * Example:
- *     type: google.api.Service
- *     config_version: 1
- *     name: calendar.googleapis.com
- *     title: Google Calendar API
- *     apis:
- *     - name: google.calendar.Calendar
- *     visibility:
- *       rules:
- *       - selector: "*"
- *         restriction: TRUSTED_TESTER
- *     backend:
- *       rules:
- *       - selector: "*"
- *         address: calendar-prod-backend.gslb.googleapis.com
- * 
- */ -public final class Service extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.api.Service) - ServiceOrBuilder { - // Use Service.newBuilder() to construct. - private Service(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Service() { - name_ = ""; - title_ = ""; - producerProjectId_ = ""; - apis_ = java.util.Collections.emptyList(); - types_ = java.util.Collections.emptyList(); - enums_ = java.util.Collections.emptyList(); - systemTypes_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private Service( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - int mutable_bitField0_ = 0; - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!input.skipField(tag)) { - done = true; - } - break; - } - case 10: { - String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: { - String s = input.readStringRequireUtf8(); - - title_ = s; - break; - } - case 26: { - if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) { - apis_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000010; - } - apis_.add(input.readMessage(com.google.protobuf.Api.parser(), extensionRegistry)); - break; - } - case 34: { - if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) { - types_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000020; - } - types_.add(input.readMessage(com.google.protobuf.Type.parser(), extensionRegistry)); - break; - } - case 42: { - if (!((mutable_bitField0_ & 0x00000040) == 0x00000040)) { - enums_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000040; - } - enums_.add(input.readMessage(com.google.protobuf.Enum.parser(), extensionRegistry)); - break; - } - case 50: { - com.google.api.Documentation.Builder subBuilder = null; - if (documentation_ != null) { - subBuilder = documentation_.toBuilder(); - } - documentation_ = input.readMessage(com.google.api.Documentation.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(documentation_); - documentation_ = subBuilder.buildPartial(); - } - - break; - } - case 58: { - com.google.api.Visibility.Builder subBuilder = null; - if (visibility_ != null) { - subBuilder = visibility_.toBuilder(); - } - visibility_ = input.readMessage(com.google.api.Visibility.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(visibility_); - visibility_ = subBuilder.buildPartial(); - } - - break; - } - case 74: { - com.google.api.Http.Builder subBuilder = null; - if (http_ != null) { - subBuilder = http_.toBuilder(); - } - http_ = input.readMessage(com.google.api.Http.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(http_); - http_ = subBuilder.buildPartial(); - } - - break; - } - case 98: { - com.google.api.Context.Builder subBuilder = null; - if (context_ != null) { - subBuilder = context_.toBuilder(); - } - context_ = input.readMessage(com.google.api.Context.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(context_); - context_ = subBuilder.buildPartial(); - } - - break; - } - case 130: { - com.google.api.CustomError.Builder subBuilder = null; - if (customError_ != null) { - subBuilder = customError_.toBuilder(); - } - customError_ = input.readMessage(com.google.api.CustomError.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(customError_); - customError_ = subBuilder.buildPartial(); - } - - break; - } - case 162: { - com.google.protobuf.UInt32Value.Builder subBuilder = null; - if (configVersion_ != null) { - subBuilder = configVersion_.toBuilder(); - } - configVersion_ = input.readMessage(com.google.protobuf.UInt32Value.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(configVersion_); - configVersion_ = subBuilder.buildPartial(); - } - - break; - } - case 178: { - String s = input.readStringRequireUtf8(); - - producerProjectId_ = s; - break; - } - case 802: { - com.google.protobuf.Any.Builder subBuilder = null; - if (derivedData_ != null) { - subBuilder = derivedData_.toBuilder(); - } - derivedData_ = input.readMessage(com.google.protobuf.Any.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(derivedData_); - derivedData_ = subBuilder.buildPartial(); - } - - break; - } - case 818: { - if (!((mutable_bitField0_ & 0x00002000) == 0x00002000)) { - systemTypes_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00002000; - } - systemTypes_.add(input.readMessage(com.google.protobuf.Type.parser(), extensionRegistry)); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) { - apis_ = java.util.Collections.unmodifiableList(apis_); - } - if (((mutable_bitField0_ & 0x00000020) == 0x00000020)) { - types_ = java.util.Collections.unmodifiableList(types_); - } - if (((mutable_bitField0_ & 0x00000040) == 0x00000040)) { - enums_ = java.util.Collections.unmodifiableList(enums_); - } - if (((mutable_bitField0_ & 0x00002000) == 0x00002000)) { - systemTypes_ = java.util.Collections.unmodifiableList(systemTypes_); - } - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.api.ServiceProto.internal_static_google_api_Service_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.api.ServiceProto.internal_static_google_api_Service_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.api.Service.class, com.google.api.Service.Builder.class); - } - - private int bitField0_; - public static final int CONFIG_VERSION_FIELD_NUMBER = 20; - private com.google.protobuf.UInt32Value configVersion_; - /** - * optional .google.protobuf.UInt32Value config_version = 20; - * - *
-   * The version of the service configuration. The config version may
-   * influence interpretation of the configuration, for example
-   * determine defaults. This is documented together with applicable
-   * options. The current default for the config version itself is `1`.
-   * 
- */ - public boolean hasConfigVersion() { - return configVersion_ != null; - } - /** - * optional .google.protobuf.UInt32Value config_version = 20; - * - *
-   * The version of the service configuration. The config version may
-   * influence interpretation of the configuration, for example
-   * determine defaults. This is documented together with applicable
-   * options. The current default for the config version itself is `1`.
-   * 
- */ - public com.google.protobuf.UInt32Value getConfigVersion() { - return configVersion_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : configVersion_; - } - /** - * optional .google.protobuf.UInt32Value config_version = 20; - * - *
-   * The version of the service configuration. The config version may
-   * influence interpretation of the configuration, for example
-   * determine defaults. This is documented together with applicable
-   * options. The current default for the config version itself is `1`.
-   * 
- */ - public com.google.protobuf.UInt32ValueOrBuilder getConfigVersionOrBuilder() { - return getConfigVersion(); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * optional string name = 1; - * - *
-   * The DNS address at which this service is available,
-   * e.g. `calendar.googleapis.com`.
-   * 
- */ - 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; - } - } - /** - * optional string name = 1; - * - *
-   * The DNS address at which this service is available,
-   * e.g. `calendar.googleapis.com`.
-   * 
- */ - 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 TITLE_FIELD_NUMBER = 2; - private volatile java.lang.Object title_; - /** - * optional string title = 2; - * - *
-   * The product title associated with this service.
-   * 
- */ - public java.lang.String getTitle() { - java.lang.Object ref = title_; - 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(); - title_ = s; - return s; - } - } - /** - * optional string title = 2; - * - *
-   * The product title associated with this service.
-   * 
- */ - public com.google.protobuf.ByteString - getTitleBytes() { - java.lang.Object ref = title_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - title_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PRODUCER_PROJECT_ID_FIELD_NUMBER = 22; - private volatile java.lang.Object producerProjectId_; - /** - * optional string producer_project_id = 22; - * - *
-   * The id of the Google developer project that owns the service.
-   * Members of this project can manage the service configuration,
-   * manage consumption of the service, etc.
-   * 
- */ - public java.lang.String getProducerProjectId() { - java.lang.Object ref = producerProjectId_; - 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(); - producerProjectId_ = s; - return s; - } - } - /** - * optional string producer_project_id = 22; - * - *
-   * The id of the Google developer project that owns the service.
-   * Members of this project can manage the service configuration,
-   * manage consumption of the service, etc.
-   * 
- */ - public com.google.protobuf.ByteString - getProducerProjectIdBytes() { - java.lang.Object ref = producerProjectId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - producerProjectId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int APIS_FIELD_NUMBER = 3; - private java.util.List apis_; - /** - * repeated .google.protobuf.Api apis = 3; - * - *
-   * A list of API interfaces exported by this service. Only the `name` field
-   * of the [google.protobuf.Api][] needs to be provided by the configuration
-   * author, as the remaining fields will be derived from the IDL during the
-   * normalization process. It is an error to specify an API interface here
-   * which cannot be resolved against the associated IDL files.
-   * 
- */ - public java.util.List getApisList() { - return apis_; - } - /** - * repeated .google.protobuf.Api apis = 3; - * - *
-   * A list of API interfaces exported by this service. Only the `name` field
-   * of the [google.protobuf.Api][] needs to be provided by the configuration
-   * author, as the remaining fields will be derived from the IDL during the
-   * normalization process. It is an error to specify an API interface here
-   * which cannot be resolved against the associated IDL files.
-   * 
- */ - public java.util.List - getApisOrBuilderList() { - return apis_; - } - /** - * repeated .google.protobuf.Api apis = 3; - * - *
-   * A list of API interfaces exported by this service. Only the `name` field
-   * of the [google.protobuf.Api][] needs to be provided by the configuration
-   * author, as the remaining fields will be derived from the IDL during the
-   * normalization process. It is an error to specify an API interface here
-   * which cannot be resolved against the associated IDL files.
-   * 
- */ - public int getApisCount() { - return apis_.size(); - } - /** - * repeated .google.protobuf.Api apis = 3; - * - *
-   * A list of API interfaces exported by this service. Only the `name` field
-   * of the [google.protobuf.Api][] needs to be provided by the configuration
-   * author, as the remaining fields will be derived from the IDL during the
-   * normalization process. It is an error to specify an API interface here
-   * which cannot be resolved against the associated IDL files.
-   * 
- */ - public com.google.protobuf.Api getApis(int index) { - return apis_.get(index); - } - /** - * repeated .google.protobuf.Api apis = 3; - * - *
-   * A list of API interfaces exported by this service. Only the `name` field
-   * of the [google.protobuf.Api][] needs to be provided by the configuration
-   * author, as the remaining fields will be derived from the IDL during the
-   * normalization process. It is an error to specify an API interface here
-   * which cannot be resolved against the associated IDL files.
-   * 
- */ - public com.google.protobuf.ApiOrBuilder getApisOrBuilder( - int index) { - return apis_.get(index); - } - - public static final int TYPES_FIELD_NUMBER = 4; - private java.util.List types_; - /** - * repeated .google.protobuf.Type types = 4; - * - *
-   * A list of all proto message types included in this API service.
-   * Types referenced directly or indirectly by the `apis` are
-   * automatically included.  Messages which are not referenced but
-   * shall be included, such as types used by the `google.protobuf.Any` type,
-   * should be listed here by name. Example:
-   *     types:
-   *     - name: google.protobuf.Int32
-   * 
- */ - public java.util.List getTypesList() { - return types_; - } - /** - * repeated .google.protobuf.Type types = 4; - * - *
-   * A list of all proto message types included in this API service.
-   * Types referenced directly or indirectly by the `apis` are
-   * automatically included.  Messages which are not referenced but
-   * shall be included, such as types used by the `google.protobuf.Any` type,
-   * should be listed here by name. Example:
-   *     types:
-   *     - name: google.protobuf.Int32
-   * 
- */ - public java.util.List - getTypesOrBuilderList() { - return types_; - } - /** - * repeated .google.protobuf.Type types = 4; - * - *
-   * A list of all proto message types included in this API service.
-   * Types referenced directly or indirectly by the `apis` are
-   * automatically included.  Messages which are not referenced but
-   * shall be included, such as types used by the `google.protobuf.Any` type,
-   * should be listed here by name. Example:
-   *     types:
-   *     - name: google.protobuf.Int32
-   * 
- */ - public int getTypesCount() { - return types_.size(); - } - /** - * repeated .google.protobuf.Type types = 4; - * - *
-   * A list of all proto message types included in this API service.
-   * Types referenced directly or indirectly by the `apis` are
-   * automatically included.  Messages which are not referenced but
-   * shall be included, such as types used by the `google.protobuf.Any` type,
-   * should be listed here by name. Example:
-   *     types:
-   *     - name: google.protobuf.Int32
-   * 
- */ - public com.google.protobuf.Type getTypes(int index) { - return types_.get(index); - } - /** - * repeated .google.protobuf.Type types = 4; - * - *
-   * A list of all proto message types included in this API service.
-   * Types referenced directly or indirectly by the `apis` are
-   * automatically included.  Messages which are not referenced but
-   * shall be included, such as types used by the `google.protobuf.Any` type,
-   * should be listed here by name. Example:
-   *     types:
-   *     - name: google.protobuf.Int32
-   * 
- */ - public com.google.protobuf.TypeOrBuilder getTypesOrBuilder( - int index) { - return types_.get(index); - } - - public static final int ENUMS_FIELD_NUMBER = 5; - private java.util.List enums_; - /** - * repeated .google.protobuf.Enum enums = 5; - * - *
-   * A list of all enum types included in this API service.  Enums
-   * referenced directly or indirectly by the `apis` are automatically
-   * included.  Enums which are not referenced but shall be included
-   * should be listed here by name. Example:
-   *     enums:
-   *     - name: google.someapi.v1.SomeEnum
-   * 
- */ - public java.util.List getEnumsList() { - return enums_; - } - /** - * repeated .google.protobuf.Enum enums = 5; - * - *
-   * A list of all enum types included in this API service.  Enums
-   * referenced directly or indirectly by the `apis` are automatically
-   * included.  Enums which are not referenced but shall be included
-   * should be listed here by name. Example:
-   *     enums:
-   *     - name: google.someapi.v1.SomeEnum
-   * 
- */ - public java.util.List - getEnumsOrBuilderList() { - return enums_; - } - /** - * repeated .google.protobuf.Enum enums = 5; - * - *
-   * A list of all enum types included in this API service.  Enums
-   * referenced directly or indirectly by the `apis` are automatically
-   * included.  Enums which are not referenced but shall be included
-   * should be listed here by name. Example:
-   *     enums:
-   *     - name: google.someapi.v1.SomeEnum
-   * 
- */ - public int getEnumsCount() { - return enums_.size(); - } - /** - * repeated .google.protobuf.Enum enums = 5; - * - *
-   * A list of all enum types included in this API service.  Enums
-   * referenced directly or indirectly by the `apis` are automatically
-   * included.  Enums which are not referenced but shall be included
-   * should be listed here by name. Example:
-   *     enums:
-   *     - name: google.someapi.v1.SomeEnum
-   * 
- */ - public com.google.protobuf.Enum getEnums(int index) { - return enums_.get(index); - } - /** - * repeated .google.protobuf.Enum enums = 5; - * - *
-   * A list of all enum types included in this API service.  Enums
-   * referenced directly or indirectly by the `apis` are automatically
-   * included.  Enums which are not referenced but shall be included
-   * should be listed here by name. Example:
-   *     enums:
-   *     - name: google.someapi.v1.SomeEnum
-   * 
- */ - public com.google.protobuf.EnumOrBuilder getEnumsOrBuilder( - int index) { - return enums_.get(index); - } - - public static final int DOCUMENTATION_FIELD_NUMBER = 6; - private com.google.api.Documentation documentation_; - /** - * optional .google.api.Documentation documentation = 6; - * - *
-   * Additional API documentation.
-   * 
- */ - public boolean hasDocumentation() { - return documentation_ != null; - } - /** - * optional .google.api.Documentation documentation = 6; - * - *
-   * Additional API documentation.
-   * 
- */ - public com.google.api.Documentation getDocumentation() { - return documentation_ == null ? com.google.api.Documentation.getDefaultInstance() : documentation_; - } - /** - * optional .google.api.Documentation documentation = 6; - * - *
-   * Additional API documentation.
-   * 
- */ - public com.google.api.DocumentationOrBuilder getDocumentationOrBuilder() { - return getDocumentation(); - } - - public static final int VISIBILITY_FIELD_NUMBER = 7; - private com.google.api.Visibility visibility_; - /** - * optional .google.api.Visibility visibility = 7; - * - *
-   * API visibility configuration.
-   * 
- */ - public boolean hasVisibility() { - return visibility_ != null; - } - /** - * optional .google.api.Visibility visibility = 7; - * - *
-   * API visibility configuration.
-   * 
- */ - public com.google.api.Visibility getVisibility() { - return visibility_ == null ? com.google.api.Visibility.getDefaultInstance() : visibility_; - } - /** - * optional .google.api.Visibility visibility = 7; - * - *
-   * API visibility configuration.
-   * 
- */ - public com.google.api.VisibilityOrBuilder getVisibilityOrBuilder() { - return getVisibility(); - } - - public static final int HTTP_FIELD_NUMBER = 9; - private com.google.api.Http http_; - /** - * optional .google.api.Http http = 9; - * - *
-   * HTTP configuration.
-   * 
- */ - public boolean hasHttp() { - return http_ != null; - } - /** - * optional .google.api.Http http = 9; - * - *
-   * HTTP configuration.
-   * 
- */ - public com.google.api.Http getHttp() { - return http_ == null ? com.google.api.Http.getDefaultInstance() : http_; - } - /** - * optional .google.api.Http http = 9; - * - *
-   * HTTP configuration.
-   * 
- */ - public com.google.api.HttpOrBuilder getHttpOrBuilder() { - return getHttp(); - } - - public static final int CONTEXT_FIELD_NUMBER = 12; - private com.google.api.Context context_; - /** - * optional .google.api.Context context = 12; - * - *
-   * Context configuration.
-   * 
- */ - public boolean hasContext() { - return context_ != null; - } - /** - * optional .google.api.Context context = 12; - * - *
-   * Context configuration.
-   * 
- */ - public com.google.api.Context getContext() { - return context_ == null ? com.google.api.Context.getDefaultInstance() : context_; - } - /** - * optional .google.api.Context context = 12; - * - *
-   * Context configuration.
-   * 
- */ - public com.google.api.ContextOrBuilder getContextOrBuilder() { - return getContext(); - } - - public static final int CUSTOM_ERROR_FIELD_NUMBER = 16; - private com.google.api.CustomError customError_; - /** - * optional .google.api.CustomError custom_error = 16; - * - *
-   * Custom error configuration.
-   * 
- */ - public boolean hasCustomError() { - return customError_ != null; - } - /** - * optional .google.api.CustomError custom_error = 16; - * - *
-   * Custom error configuration.
-   * 
- */ - public com.google.api.CustomError getCustomError() { - return customError_ == null ? com.google.api.CustomError.getDefaultInstance() : customError_; - } - /** - * optional .google.api.CustomError custom_error = 16; - * - *
-   * Custom error configuration.
-   * 
- */ - public com.google.api.CustomErrorOrBuilder getCustomErrorOrBuilder() { - return getCustomError(); - } - - public static final int DERIVED_DATA_FIELD_NUMBER = 100; - private com.google.protobuf.Any derivedData_; - /** - * optional .google.protobuf.Any derived_data = 100; - * - *
-   * Service attributes derived by the configuration toolchain, for
-   * use at runtime.  Type is defined in
-   * `//google/internal/api/derived_service.proto`.
-   * 
- */ - public boolean hasDerivedData() { - return derivedData_ != null; - } - /** - * optional .google.protobuf.Any derived_data = 100; - * - *
-   * Service attributes derived by the configuration toolchain, for
-   * use at runtime.  Type is defined in
-   * `//google/internal/api/derived_service.proto`.
-   * 
- */ - public com.google.protobuf.Any getDerivedData() { - return derivedData_ == null ? com.google.protobuf.Any.getDefaultInstance() : derivedData_; - } - /** - * optional .google.protobuf.Any derived_data = 100; - * - *
-   * Service attributes derived by the configuration toolchain, for
-   * use at runtime.  Type is defined in
-   * `//google/internal/api/derived_service.proto`.
-   * 
- */ - public com.google.protobuf.AnyOrBuilder getDerivedDataOrBuilder() { - return getDerivedData(); - } - - public static final int SYSTEM_TYPES_FIELD_NUMBER = 102; - private java.util.List systemTypes_; - /** - * repeated .google.protobuf.Type system_types = 102; - * - *
-   * A list of all proto message types included in this API service.
-   * It serves similar purpose as [google.api.Service.types], except that
-   * these types are not needed by user-defined APIs. Therefore, they will not
-   * show up in the generated discovery doc. This field should only be used
-   * to define system APIs in ESF.
-   * 
- */ - public java.util.List getSystemTypesList() { - return systemTypes_; - } - /** - * repeated .google.protobuf.Type system_types = 102; - * - *
-   * A list of all proto message types included in this API service.
-   * It serves similar purpose as [google.api.Service.types], except that
-   * these types are not needed by user-defined APIs. Therefore, they will not
-   * show up in the generated discovery doc. This field should only be used
-   * to define system APIs in ESF.
-   * 
- */ - public java.util.List - getSystemTypesOrBuilderList() { - return systemTypes_; - } - /** - * repeated .google.protobuf.Type system_types = 102; - * - *
-   * A list of all proto message types included in this API service.
-   * It serves similar purpose as [google.api.Service.types], except that
-   * these types are not needed by user-defined APIs. Therefore, they will not
-   * show up in the generated discovery doc. This field should only be used
-   * to define system APIs in ESF.
-   * 
- */ - public int getSystemTypesCount() { - return systemTypes_.size(); - } - /** - * repeated .google.protobuf.Type system_types = 102; - * - *
-   * A list of all proto message types included in this API service.
-   * It serves similar purpose as [google.api.Service.types], except that
-   * these types are not needed by user-defined APIs. Therefore, they will not
-   * show up in the generated discovery doc. This field should only be used
-   * to define system APIs in ESF.
-   * 
- */ - public com.google.protobuf.Type getSystemTypes(int index) { - return systemTypes_.get(index); - } - /** - * repeated .google.protobuf.Type system_types = 102; - * - *
-   * A list of all proto message types included in this API service.
-   * It serves similar purpose as [google.api.Service.types], except that
-   * these types are not needed by user-defined APIs. Therefore, they will not
-   * show up in the generated discovery doc. This field should only be used
-   * to define system APIs in ESF.
-   * 
- */ - public com.google.protobuf.TypeOrBuilder getSystemTypesOrBuilder( - int index) { - return systemTypes_.get(index); - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); - } - if (!getTitleBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, title_); - } - for (int i = 0; i < apis_.size(); i++) { - output.writeMessage(3, apis_.get(i)); - } - for (int i = 0; i < types_.size(); i++) { - output.writeMessage(4, types_.get(i)); - } - for (int i = 0; i < enums_.size(); i++) { - output.writeMessage(5, enums_.get(i)); - } - if (documentation_ != null) { - output.writeMessage(6, getDocumentation()); - } - if (visibility_ != null) { - output.writeMessage(7, getVisibility()); - } - if (http_ != null) { - output.writeMessage(9, getHttp()); - } - if (context_ != null) { - output.writeMessage(12, getContext()); - } - if (customError_ != null) { - output.writeMessage(16, getCustomError()); - } - if (configVersion_ != null) { - output.writeMessage(20, getConfigVersion()); - } - if (!getProducerProjectIdBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 22, producerProjectId_); - } - if (derivedData_ != null) { - output.writeMessage(100, getDerivedData()); - } - for (int i = 0; i < systemTypes_.size(); i++) { - output.writeMessage(102, systemTypes_.get(i)); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); - } - if (!getTitleBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, title_); - } - for (int i = 0; i < apis_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, apis_.get(i)); - } - for (int i = 0; i < types_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, types_.get(i)); - } - for (int i = 0; i < enums_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, enums_.get(i)); - } - if (documentation_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, getDocumentation()); - } - if (visibility_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, getVisibility()); - } - if (http_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(9, getHttp()); - } - if (context_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(12, getContext()); - } - if (customError_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(16, getCustomError()); - } - if (configVersion_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(20, getConfigVersion()); - } - if (!getProducerProjectIdBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(22, producerProjectId_); - } - if (derivedData_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(100, getDerivedData()); - } - for (int i = 0; i < systemTypes_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(102, systemTypes_.get(i)); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static com.google.api.Service parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.api.Service 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.api.Service parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.api.Service parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.api.Service parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.api.Service parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.api.Service parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.api.Service parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.api.Service parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.api.Service parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.api.Service prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - 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; - } - /** - * Protobuf type {@code google.api.Service} - * - *
-   * (== page basics ==)
-   * `Service` is the root object of the configuration schema. It
-   * describes basic information like the name of the service and the
-   * exposed API interfaces, and delegates other aspects to configuration
-   * sub-sections.
-   * Example:
-   *     type: google.api.Service
-   *     config_version: 1
-   *     name: calendar.googleapis.com
-   *     title: Google Calendar API
-   *     apis:
-   *     - name: google.calendar.Calendar
-   *     visibility:
-   *       rules:
-   *       - selector: "*"
-   *         restriction: TRUSTED_TESTER
-   *     backend:
-   *       rules:
-   *       - selector: "*"
-   *         address: calendar-prod-backend.gslb.googleapis.com
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.api.Service) - com.google.api.ServiceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.api.ServiceProto.internal_static_google_api_Service_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.api.ServiceProto.internal_static_google_api_Service_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.api.Service.class, com.google.api.Service.Builder.class); - } - - // Construct using com.google.api.Service.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getApisFieldBuilder(); - getTypesFieldBuilder(); - getEnumsFieldBuilder(); - getSystemTypesFieldBuilder(); - } - } - public Builder clear() { - super.clear(); - if (configVersionBuilder_ == null) { - configVersion_ = null; - } else { - configVersion_ = null; - configVersionBuilder_ = null; - } - name_ = ""; - - title_ = ""; - - producerProjectId_ = ""; - - if (apisBuilder_ == null) { - apis_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); - } else { - apisBuilder_.clear(); - } - if (typesBuilder_ == null) { - types_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); - } else { - typesBuilder_.clear(); - } - if (enumsBuilder_ == null) { - enums_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000040); - } else { - enumsBuilder_.clear(); - } - if (documentationBuilder_ == null) { - documentation_ = null; - } else { - documentation_ = null; - documentationBuilder_ = null; - } - if (visibilityBuilder_ == null) { - visibility_ = null; - } else { - visibility_ = null; - visibilityBuilder_ = null; - } - if (httpBuilder_ == null) { - http_ = null; - } else { - http_ = null; - httpBuilder_ = null; - } - if (contextBuilder_ == null) { - context_ = null; - } else { - context_ = null; - contextBuilder_ = null; - } - if (customErrorBuilder_ == null) { - customError_ = null; - } else { - customError_ = null; - customErrorBuilder_ = null; - } - if (derivedDataBuilder_ == null) { - derivedData_ = null; - } else { - derivedData_ = null; - derivedDataBuilder_ = null; - } - if (systemTypesBuilder_ == null) { - systemTypes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00002000); - } else { - systemTypesBuilder_.clear(); - } - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.api.ServiceProto.internal_static_google_api_Service_descriptor; - } - - public com.google.api.Service getDefaultInstanceForType() { - return com.google.api.Service.getDefaultInstance(); - } - - public com.google.api.Service build() { - com.google.api.Service result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.api.Service buildPartial() { - com.google.api.Service result = new com.google.api.Service(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (configVersionBuilder_ == null) { - result.configVersion_ = configVersion_; - } else { - result.configVersion_ = configVersionBuilder_.build(); - } - result.name_ = name_; - result.title_ = title_; - result.producerProjectId_ = producerProjectId_; - if (apisBuilder_ == null) { - if (((bitField0_ & 0x00000010) == 0x00000010)) { - apis_ = java.util.Collections.unmodifiableList(apis_); - bitField0_ = (bitField0_ & ~0x00000010); - } - result.apis_ = apis_; - } else { - result.apis_ = apisBuilder_.build(); - } - if (typesBuilder_ == null) { - if (((bitField0_ & 0x00000020) == 0x00000020)) { - types_ = java.util.Collections.unmodifiableList(types_); - bitField0_ = (bitField0_ & ~0x00000020); - } - result.types_ = types_; - } else { - result.types_ = typesBuilder_.build(); - } - if (enumsBuilder_ == null) { - if (((bitField0_ & 0x00000040) == 0x00000040)) { - enums_ = java.util.Collections.unmodifiableList(enums_); - bitField0_ = (bitField0_ & ~0x00000040); - } - result.enums_ = enums_; - } else { - result.enums_ = enumsBuilder_.build(); - } - if (documentationBuilder_ == null) { - result.documentation_ = documentation_; - } else { - result.documentation_ = documentationBuilder_.build(); - } - if (visibilityBuilder_ == null) { - result.visibility_ = visibility_; - } else { - result.visibility_ = visibilityBuilder_.build(); - } - if (httpBuilder_ == null) { - result.http_ = http_; - } else { - result.http_ = httpBuilder_.build(); - } - if (contextBuilder_ == null) { - result.context_ = context_; - } else { - result.context_ = contextBuilder_.build(); - } - if (customErrorBuilder_ == null) { - result.customError_ = customError_; - } else { - result.customError_ = customErrorBuilder_.build(); - } - if (derivedDataBuilder_ == null) { - result.derivedData_ = derivedData_; - } else { - result.derivedData_ = derivedDataBuilder_.build(); - } - if (systemTypesBuilder_ == null) { - if (((bitField0_ & 0x00002000) == 0x00002000)) { - systemTypes_ = java.util.Collections.unmodifiableList(systemTypes_); - bitField0_ = (bitField0_ & ~0x00002000); - } - result.systemTypes_ = systemTypes_; - } else { - result.systemTypes_ = systemTypesBuilder_.build(); - } - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.api.Service) { - return mergeFrom((com.google.api.Service)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.api.Service other) { - if (other == com.google.api.Service.getDefaultInstance()) return this; - if (other.hasConfigVersion()) { - mergeConfigVersion(other.getConfigVersion()); - } - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getTitle().isEmpty()) { - title_ = other.title_; - onChanged(); - } - if (!other.getProducerProjectId().isEmpty()) { - producerProjectId_ = other.producerProjectId_; - onChanged(); - } - if (apisBuilder_ == null) { - if (!other.apis_.isEmpty()) { - if (apis_.isEmpty()) { - apis_ = other.apis_; - bitField0_ = (bitField0_ & ~0x00000010); - } else { - ensureApisIsMutable(); - apis_.addAll(other.apis_); - } - onChanged(); - } - } else { - if (!other.apis_.isEmpty()) { - if (apisBuilder_.isEmpty()) { - apisBuilder_.dispose(); - apisBuilder_ = null; - apis_ = other.apis_; - bitField0_ = (bitField0_ & ~0x00000010); - apisBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getApisFieldBuilder() : null; - } else { - apisBuilder_.addAllMessages(other.apis_); - } - } - } - if (typesBuilder_ == null) { - if (!other.types_.isEmpty()) { - if (types_.isEmpty()) { - types_ = other.types_; - bitField0_ = (bitField0_ & ~0x00000020); - } else { - ensureTypesIsMutable(); - types_.addAll(other.types_); - } - onChanged(); - } - } else { - if (!other.types_.isEmpty()) { - if (typesBuilder_.isEmpty()) { - typesBuilder_.dispose(); - typesBuilder_ = null; - types_ = other.types_; - bitField0_ = (bitField0_ & ~0x00000020); - typesBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getTypesFieldBuilder() : null; - } else { - typesBuilder_.addAllMessages(other.types_); - } - } - } - if (enumsBuilder_ == null) { - if (!other.enums_.isEmpty()) { - if (enums_.isEmpty()) { - enums_ = other.enums_; - bitField0_ = (bitField0_ & ~0x00000040); - } else { - ensureEnumsIsMutable(); - enums_.addAll(other.enums_); - } - onChanged(); - } - } else { - if (!other.enums_.isEmpty()) { - if (enumsBuilder_.isEmpty()) { - enumsBuilder_.dispose(); - enumsBuilder_ = null; - enums_ = other.enums_; - bitField0_ = (bitField0_ & ~0x00000040); - enumsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getEnumsFieldBuilder() : null; - } else { - enumsBuilder_.addAllMessages(other.enums_); - } - } - } - if (other.hasDocumentation()) { - mergeDocumentation(other.getDocumentation()); - } - if (other.hasVisibility()) { - mergeVisibility(other.getVisibility()); - } - if (other.hasHttp()) { - mergeHttp(other.getHttp()); - } - if (other.hasContext()) { - mergeContext(other.getContext()); - } - if (other.hasCustomError()) { - mergeCustomError(other.getCustomError()); - } - if (other.hasDerivedData()) { - mergeDerivedData(other.getDerivedData()); - } - if (systemTypesBuilder_ == null) { - if (!other.systemTypes_.isEmpty()) { - if (systemTypes_.isEmpty()) { - systemTypes_ = other.systemTypes_; - bitField0_ = (bitField0_ & ~0x00002000); - } else { - ensureSystemTypesIsMutable(); - systemTypes_.addAll(other.systemTypes_); - } - onChanged(); - } - } else { - if (!other.systemTypes_.isEmpty()) { - if (systemTypesBuilder_.isEmpty()) { - systemTypesBuilder_.dispose(); - systemTypesBuilder_ = null; - systemTypes_ = other.systemTypes_; - bitField0_ = (bitField0_ & ~0x00002000); - systemTypesBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getSystemTypesFieldBuilder() : null; - } else { - systemTypesBuilder_.addAllMessages(other.systemTypes_); - } - } - } - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.api.Service parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.api.Service) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.protobuf.UInt32Value configVersion_ = null; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder> configVersionBuilder_; - /** - * optional .google.protobuf.UInt32Value config_version = 20; - * - *
-     * The version of the service configuration. The config version may
-     * influence interpretation of the configuration, for example
-     * determine defaults. This is documented together with applicable
-     * options. The current default for the config version itself is `1`.
-     * 
- */ - public boolean hasConfigVersion() { - return configVersionBuilder_ != null || configVersion_ != null; - } - /** - * optional .google.protobuf.UInt32Value config_version = 20; - * - *
-     * The version of the service configuration. The config version may
-     * influence interpretation of the configuration, for example
-     * determine defaults. This is documented together with applicable
-     * options. The current default for the config version itself is `1`.
-     * 
- */ - public com.google.protobuf.UInt32Value getConfigVersion() { - if (configVersionBuilder_ == null) { - return configVersion_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : configVersion_; - } else { - return configVersionBuilder_.getMessage(); - } - } - /** - * optional .google.protobuf.UInt32Value config_version = 20; - * - *
-     * The version of the service configuration. The config version may
-     * influence interpretation of the configuration, for example
-     * determine defaults. This is documented together with applicable
-     * options. The current default for the config version itself is `1`.
-     * 
- */ - public Builder setConfigVersion(com.google.protobuf.UInt32Value value) { - if (configVersionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - configVersion_ = value; - onChanged(); - } else { - configVersionBuilder_.setMessage(value); - } - - return this; - } - /** - * optional .google.protobuf.UInt32Value config_version = 20; - * - *
-     * The version of the service configuration. The config version may
-     * influence interpretation of the configuration, for example
-     * determine defaults. This is documented together with applicable
-     * options. The current default for the config version itself is `1`.
-     * 
- */ - public Builder setConfigVersion( - com.google.protobuf.UInt32Value.Builder builderForValue) { - if (configVersionBuilder_ == null) { - configVersion_ = builderForValue.build(); - onChanged(); - } else { - configVersionBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * optional .google.protobuf.UInt32Value config_version = 20; - * - *
-     * The version of the service configuration. The config version may
-     * influence interpretation of the configuration, for example
-     * determine defaults. This is documented together with applicable
-     * options. The current default for the config version itself is `1`.
-     * 
- */ - public Builder mergeConfigVersion(com.google.protobuf.UInt32Value value) { - if (configVersionBuilder_ == null) { - if (configVersion_ != null) { - configVersion_ = - com.google.protobuf.UInt32Value.newBuilder(configVersion_).mergeFrom(value).buildPartial(); - } else { - configVersion_ = value; - } - onChanged(); - } else { - configVersionBuilder_.mergeFrom(value); - } - - return this; - } - /** - * optional .google.protobuf.UInt32Value config_version = 20; - * - *
-     * The version of the service configuration. The config version may
-     * influence interpretation of the configuration, for example
-     * determine defaults. This is documented together with applicable
-     * options. The current default for the config version itself is `1`.
-     * 
- */ - public Builder clearConfigVersion() { - if (configVersionBuilder_ == null) { - configVersion_ = null; - onChanged(); - } else { - configVersion_ = null; - configVersionBuilder_ = null; - } - - return this; - } - /** - * optional .google.protobuf.UInt32Value config_version = 20; - * - *
-     * The version of the service configuration. The config version may
-     * influence interpretation of the configuration, for example
-     * determine defaults. This is documented together with applicable
-     * options. The current default for the config version itself is `1`.
-     * 
- */ - public com.google.protobuf.UInt32Value.Builder getConfigVersionBuilder() { - - onChanged(); - return getConfigVersionFieldBuilder().getBuilder(); - } - /** - * optional .google.protobuf.UInt32Value config_version = 20; - * - *
-     * The version of the service configuration. The config version may
-     * influence interpretation of the configuration, for example
-     * determine defaults. This is documented together with applicable
-     * options. The current default for the config version itself is `1`.
-     * 
- */ - public com.google.protobuf.UInt32ValueOrBuilder getConfigVersionOrBuilder() { - if (configVersionBuilder_ != null) { - return configVersionBuilder_.getMessageOrBuilder(); - } else { - return configVersion_ == null ? - com.google.protobuf.UInt32Value.getDefaultInstance() : configVersion_; - } - } - /** - * optional .google.protobuf.UInt32Value config_version = 20; - * - *
-     * The version of the service configuration. The config version may
-     * influence interpretation of the configuration, for example
-     * determine defaults. This is documented together with applicable
-     * options. The current default for the config version itself is `1`.
-     * 
- */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder> - getConfigVersionFieldBuilder() { - if (configVersionBuilder_ == null) { - configVersionBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>( - getConfigVersion(), - getParentForChildren(), - isClean()); - configVersion_ = null; - } - return configVersionBuilder_; - } - - private java.lang.Object name_ = ""; - /** - * optional string name = 1; - * - *
-     * The DNS address at which this service is available,
-     * e.g. `calendar.googleapis.com`.
-     * 
- */ - 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; - } - } - /** - * optional string name = 1; - * - *
-     * The DNS address at which this service is available,
-     * e.g. `calendar.googleapis.com`.
-     * 
- */ - 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; - } - } - /** - * optional string name = 1; - * - *
-     * The DNS address at which this service is available,
-     * e.g. `calendar.googleapis.com`.
-     * 
- */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * optional string name = 1; - * - *
-     * The DNS address at which this service is available,
-     * e.g. `calendar.googleapis.com`.
-     * 
- */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * optional string name = 1; - * - *
-     * The DNS address at which this service is available,
-     * e.g. `calendar.googleapis.com`.
-     * 
- */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.lang.Object title_ = ""; - /** - * optional string title = 2; - * - *
-     * The product title associated with this service.
-     * 
- */ - public java.lang.String getTitle() { - java.lang.Object ref = title_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - title_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string title = 2; - * - *
-     * The product title associated with this service.
-     * 
- */ - public com.google.protobuf.ByteString - getTitleBytes() { - java.lang.Object ref = title_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - title_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string title = 2; - * - *
-     * The product title associated with this service.
-     * 
- */ - public Builder setTitle( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - title_ = value; - onChanged(); - return this; - } - /** - * optional string title = 2; - * - *
-     * The product title associated with this service.
-     * 
- */ - public Builder clearTitle() { - - title_ = getDefaultInstance().getTitle(); - onChanged(); - return this; - } - /** - * optional string title = 2; - * - *
-     * The product title associated with this service.
-     * 
- */ - public Builder setTitleBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - title_ = value; - onChanged(); - return this; - } - - private java.lang.Object producerProjectId_ = ""; - /** - * optional string producer_project_id = 22; - * - *
-     * The id of the Google developer project that owns the service.
-     * Members of this project can manage the service configuration,
-     * manage consumption of the service, etc.
-     * 
- */ - public java.lang.String getProducerProjectId() { - java.lang.Object ref = producerProjectId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - producerProjectId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string producer_project_id = 22; - * - *
-     * The id of the Google developer project that owns the service.
-     * Members of this project can manage the service configuration,
-     * manage consumption of the service, etc.
-     * 
- */ - public com.google.protobuf.ByteString - getProducerProjectIdBytes() { - java.lang.Object ref = producerProjectId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - producerProjectId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string producer_project_id = 22; - * - *
-     * The id of the Google developer project that owns the service.
-     * Members of this project can manage the service configuration,
-     * manage consumption of the service, etc.
-     * 
- */ - public Builder setProducerProjectId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - producerProjectId_ = value; - onChanged(); - return this; - } - /** - * optional string producer_project_id = 22; - * - *
-     * The id of the Google developer project that owns the service.
-     * Members of this project can manage the service configuration,
-     * manage consumption of the service, etc.
-     * 
- */ - public Builder clearProducerProjectId() { - - producerProjectId_ = getDefaultInstance().getProducerProjectId(); - onChanged(); - return this; - } - /** - * optional string producer_project_id = 22; - * - *
-     * The id of the Google developer project that owns the service.
-     * Members of this project can manage the service configuration,
-     * manage consumption of the service, etc.
-     * 
- */ - public Builder setProducerProjectIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - producerProjectId_ = value; - onChanged(); - return this; - } - - private java.util.List apis_ = - java.util.Collections.emptyList(); - private void ensureApisIsMutable() { - if (!((bitField0_ & 0x00000010) == 0x00000010)) { - apis_ = new java.util.ArrayList(apis_); - bitField0_ |= 0x00000010; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Api, com.google.protobuf.Api.Builder, com.google.protobuf.ApiOrBuilder> apisBuilder_; - - /** - * repeated .google.protobuf.Api apis = 3; - * - *
-     * A list of API interfaces exported by this service. Only the `name` field
-     * of the [google.protobuf.Api][] needs to be provided by the configuration
-     * author, as the remaining fields will be derived from the IDL during the
-     * normalization process. It is an error to specify an API interface here
-     * which cannot be resolved against the associated IDL files.
-     * 
- */ - public java.util.List getApisList() { - if (apisBuilder_ == null) { - return java.util.Collections.unmodifiableList(apis_); - } else { - return apisBuilder_.getMessageList(); - } - } - /** - * repeated .google.protobuf.Api apis = 3; - * - *
-     * A list of API interfaces exported by this service. Only the `name` field
-     * of the [google.protobuf.Api][] needs to be provided by the configuration
-     * author, as the remaining fields will be derived from the IDL during the
-     * normalization process. It is an error to specify an API interface here
-     * which cannot be resolved against the associated IDL files.
-     * 
- */ - public int getApisCount() { - if (apisBuilder_ == null) { - return apis_.size(); - } else { - return apisBuilder_.getCount(); - } - } - /** - * repeated .google.protobuf.Api apis = 3; - * - *
-     * A list of API interfaces exported by this service. Only the `name` field
-     * of the [google.protobuf.Api][] needs to be provided by the configuration
-     * author, as the remaining fields will be derived from the IDL during the
-     * normalization process. It is an error to specify an API interface here
-     * which cannot be resolved against the associated IDL files.
-     * 
- */ - public com.google.protobuf.Api getApis(int index) { - if (apisBuilder_ == null) { - return apis_.get(index); - } else { - return apisBuilder_.getMessage(index); - } - } - /** - * repeated .google.protobuf.Api apis = 3; - * - *
-     * A list of API interfaces exported by this service. Only the `name` field
-     * of the [google.protobuf.Api][] needs to be provided by the configuration
-     * author, as the remaining fields will be derived from the IDL during the
-     * normalization process. It is an error to specify an API interface here
-     * which cannot be resolved against the associated IDL files.
-     * 
- */ - public Builder setApis( - int index, com.google.protobuf.Api value) { - if (apisBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureApisIsMutable(); - apis_.set(index, value); - onChanged(); - } else { - apisBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .google.protobuf.Api apis = 3; - * - *
-     * A list of API interfaces exported by this service. Only the `name` field
-     * of the [google.protobuf.Api][] needs to be provided by the configuration
-     * author, as the remaining fields will be derived from the IDL during the
-     * normalization process. It is an error to specify an API interface here
-     * which cannot be resolved against the associated IDL files.
-     * 
- */ - public Builder setApis( - int index, com.google.protobuf.Api.Builder builderForValue) { - if (apisBuilder_ == null) { - ensureApisIsMutable(); - apis_.set(index, builderForValue.build()); - onChanged(); - } else { - apisBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.protobuf.Api apis = 3; - * - *
-     * A list of API interfaces exported by this service. Only the `name` field
-     * of the [google.protobuf.Api][] needs to be provided by the configuration
-     * author, as the remaining fields will be derived from the IDL during the
-     * normalization process. It is an error to specify an API interface here
-     * which cannot be resolved against the associated IDL files.
-     * 
- */ - public Builder addApis(com.google.protobuf.Api value) { - if (apisBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureApisIsMutable(); - apis_.add(value); - onChanged(); - } else { - apisBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .google.protobuf.Api apis = 3; - * - *
-     * A list of API interfaces exported by this service. Only the `name` field
-     * of the [google.protobuf.Api][] needs to be provided by the configuration
-     * author, as the remaining fields will be derived from the IDL during the
-     * normalization process. It is an error to specify an API interface here
-     * which cannot be resolved against the associated IDL files.
-     * 
- */ - public Builder addApis( - int index, com.google.protobuf.Api value) { - if (apisBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureApisIsMutable(); - apis_.add(index, value); - onChanged(); - } else { - apisBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .google.protobuf.Api apis = 3; - * - *
-     * A list of API interfaces exported by this service. Only the `name` field
-     * of the [google.protobuf.Api][] needs to be provided by the configuration
-     * author, as the remaining fields will be derived from the IDL during the
-     * normalization process. It is an error to specify an API interface here
-     * which cannot be resolved against the associated IDL files.
-     * 
- */ - public Builder addApis( - com.google.protobuf.Api.Builder builderForValue) { - if (apisBuilder_ == null) { - ensureApisIsMutable(); - apis_.add(builderForValue.build()); - onChanged(); - } else { - apisBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .google.protobuf.Api apis = 3; - * - *
-     * A list of API interfaces exported by this service. Only the `name` field
-     * of the [google.protobuf.Api][] needs to be provided by the configuration
-     * author, as the remaining fields will be derived from the IDL during the
-     * normalization process. It is an error to specify an API interface here
-     * which cannot be resolved against the associated IDL files.
-     * 
- */ - public Builder addApis( - int index, com.google.protobuf.Api.Builder builderForValue) { - if (apisBuilder_ == null) { - ensureApisIsMutable(); - apis_.add(index, builderForValue.build()); - onChanged(); - } else { - apisBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.protobuf.Api apis = 3; - * - *
-     * A list of API interfaces exported by this service. Only the `name` field
-     * of the [google.protobuf.Api][] needs to be provided by the configuration
-     * author, as the remaining fields will be derived from the IDL during the
-     * normalization process. It is an error to specify an API interface here
-     * which cannot be resolved against the associated IDL files.
-     * 
- */ - public Builder addAllApis( - java.lang.Iterable values) { - if (apisBuilder_ == null) { - ensureApisIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, apis_); - onChanged(); - } else { - apisBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .google.protobuf.Api apis = 3; - * - *
-     * A list of API interfaces exported by this service. Only the `name` field
-     * of the [google.protobuf.Api][] needs to be provided by the configuration
-     * author, as the remaining fields will be derived from the IDL during the
-     * normalization process. It is an error to specify an API interface here
-     * which cannot be resolved against the associated IDL files.
-     * 
- */ - public Builder clearApis() { - if (apisBuilder_ == null) { - apis_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - } else { - apisBuilder_.clear(); - } - return this; - } - /** - * repeated .google.protobuf.Api apis = 3; - * - *
-     * A list of API interfaces exported by this service. Only the `name` field
-     * of the [google.protobuf.Api][] needs to be provided by the configuration
-     * author, as the remaining fields will be derived from the IDL during the
-     * normalization process. It is an error to specify an API interface here
-     * which cannot be resolved against the associated IDL files.
-     * 
- */ - public Builder removeApis(int index) { - if (apisBuilder_ == null) { - ensureApisIsMutable(); - apis_.remove(index); - onChanged(); - } else { - apisBuilder_.remove(index); - } - return this; - } - /** - * repeated .google.protobuf.Api apis = 3; - * - *
-     * A list of API interfaces exported by this service. Only the `name` field
-     * of the [google.protobuf.Api][] needs to be provided by the configuration
-     * author, as the remaining fields will be derived from the IDL during the
-     * normalization process. It is an error to specify an API interface here
-     * which cannot be resolved against the associated IDL files.
-     * 
- */ - public com.google.protobuf.Api.Builder getApisBuilder( - int index) { - return getApisFieldBuilder().getBuilder(index); - } - /** - * repeated .google.protobuf.Api apis = 3; - * - *
-     * A list of API interfaces exported by this service. Only the `name` field
-     * of the [google.protobuf.Api][] needs to be provided by the configuration
-     * author, as the remaining fields will be derived from the IDL during the
-     * normalization process. It is an error to specify an API interface here
-     * which cannot be resolved against the associated IDL files.
-     * 
- */ - public com.google.protobuf.ApiOrBuilder getApisOrBuilder( - int index) { - if (apisBuilder_ == null) { - return apis_.get(index); } else { - return apisBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .google.protobuf.Api apis = 3; - * - *
-     * A list of API interfaces exported by this service. Only the `name` field
-     * of the [google.protobuf.Api][] needs to be provided by the configuration
-     * author, as the remaining fields will be derived from the IDL during the
-     * normalization process. It is an error to specify an API interface here
-     * which cannot be resolved against the associated IDL files.
-     * 
- */ - public java.util.List - getApisOrBuilderList() { - if (apisBuilder_ != null) { - return apisBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(apis_); - } - } - /** - * repeated .google.protobuf.Api apis = 3; - * - *
-     * A list of API interfaces exported by this service. Only the `name` field
-     * of the [google.protobuf.Api][] needs to be provided by the configuration
-     * author, as the remaining fields will be derived from the IDL during the
-     * normalization process. It is an error to specify an API interface here
-     * which cannot be resolved against the associated IDL files.
-     * 
- */ - public com.google.protobuf.Api.Builder addApisBuilder() { - return getApisFieldBuilder().addBuilder( - com.google.protobuf.Api.getDefaultInstance()); - } - /** - * repeated .google.protobuf.Api apis = 3; - * - *
-     * A list of API interfaces exported by this service. Only the `name` field
-     * of the [google.protobuf.Api][] needs to be provided by the configuration
-     * author, as the remaining fields will be derived from the IDL during the
-     * normalization process. It is an error to specify an API interface here
-     * which cannot be resolved against the associated IDL files.
-     * 
- */ - public com.google.protobuf.Api.Builder addApisBuilder( - int index) { - return getApisFieldBuilder().addBuilder( - index, com.google.protobuf.Api.getDefaultInstance()); - } - /** - * repeated .google.protobuf.Api apis = 3; - * - *
-     * A list of API interfaces exported by this service. Only the `name` field
-     * of the [google.protobuf.Api][] needs to be provided by the configuration
-     * author, as the remaining fields will be derived from the IDL during the
-     * normalization process. It is an error to specify an API interface here
-     * which cannot be resolved against the associated IDL files.
-     * 
- */ - public java.util.List - getApisBuilderList() { - return getApisFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Api, com.google.protobuf.Api.Builder, com.google.protobuf.ApiOrBuilder> - getApisFieldBuilder() { - if (apisBuilder_ == null) { - apisBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Api, com.google.protobuf.Api.Builder, com.google.protobuf.ApiOrBuilder>( - apis_, - ((bitField0_ & 0x00000010) == 0x00000010), - getParentForChildren(), - isClean()); - apis_ = null; - } - return apisBuilder_; - } - - private java.util.List types_ = - java.util.Collections.emptyList(); - private void ensureTypesIsMutable() { - if (!((bitField0_ & 0x00000020) == 0x00000020)) { - types_ = new java.util.ArrayList(types_); - bitField0_ |= 0x00000020; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Type, com.google.protobuf.Type.Builder, com.google.protobuf.TypeOrBuilder> typesBuilder_; - - /** - * repeated .google.protobuf.Type types = 4; - * - *
-     * A list of all proto message types included in this API service.
-     * Types referenced directly or indirectly by the `apis` are
-     * automatically included.  Messages which are not referenced but
-     * shall be included, such as types used by the `google.protobuf.Any` type,
-     * should be listed here by name. Example:
-     *     types:
-     *     - name: google.protobuf.Int32
-     * 
- */ - public java.util.List getTypesList() { - if (typesBuilder_ == null) { - return java.util.Collections.unmodifiableList(types_); - } else { - return typesBuilder_.getMessageList(); - } - } - /** - * repeated .google.protobuf.Type types = 4; - * - *
-     * A list of all proto message types included in this API service.
-     * Types referenced directly or indirectly by the `apis` are
-     * automatically included.  Messages which are not referenced but
-     * shall be included, such as types used by the `google.protobuf.Any` type,
-     * should be listed here by name. Example:
-     *     types:
-     *     - name: google.protobuf.Int32
-     * 
- */ - public int getTypesCount() { - if (typesBuilder_ == null) { - return types_.size(); - } else { - return typesBuilder_.getCount(); - } - } - /** - * repeated .google.protobuf.Type types = 4; - * - *
-     * A list of all proto message types included in this API service.
-     * Types referenced directly or indirectly by the `apis` are
-     * automatically included.  Messages which are not referenced but
-     * shall be included, such as types used by the `google.protobuf.Any` type,
-     * should be listed here by name. Example:
-     *     types:
-     *     - name: google.protobuf.Int32
-     * 
- */ - public com.google.protobuf.Type getTypes(int index) { - if (typesBuilder_ == null) { - return types_.get(index); - } else { - return typesBuilder_.getMessage(index); - } - } - /** - * repeated .google.protobuf.Type types = 4; - * - *
-     * A list of all proto message types included in this API service.
-     * Types referenced directly or indirectly by the `apis` are
-     * automatically included.  Messages which are not referenced but
-     * shall be included, such as types used by the `google.protobuf.Any` type,
-     * should be listed here by name. Example:
-     *     types:
-     *     - name: google.protobuf.Int32
-     * 
- */ - public Builder setTypes( - int index, com.google.protobuf.Type value) { - if (typesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTypesIsMutable(); - types_.set(index, value); - onChanged(); - } else { - typesBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .google.protobuf.Type types = 4; - * - *
-     * A list of all proto message types included in this API service.
-     * Types referenced directly or indirectly by the `apis` are
-     * automatically included.  Messages which are not referenced but
-     * shall be included, such as types used by the `google.protobuf.Any` type,
-     * should be listed here by name. Example:
-     *     types:
-     *     - name: google.protobuf.Int32
-     * 
- */ - public Builder setTypes( - int index, com.google.protobuf.Type.Builder builderForValue) { - if (typesBuilder_ == null) { - ensureTypesIsMutable(); - types_.set(index, builderForValue.build()); - onChanged(); - } else { - typesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.protobuf.Type types = 4; - * - *
-     * A list of all proto message types included in this API service.
-     * Types referenced directly or indirectly by the `apis` are
-     * automatically included.  Messages which are not referenced but
-     * shall be included, such as types used by the `google.protobuf.Any` type,
-     * should be listed here by name. Example:
-     *     types:
-     *     - name: google.protobuf.Int32
-     * 
- */ - public Builder addTypes(com.google.protobuf.Type value) { - if (typesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTypesIsMutable(); - types_.add(value); - onChanged(); - } else { - typesBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .google.protobuf.Type types = 4; - * - *
-     * A list of all proto message types included in this API service.
-     * Types referenced directly or indirectly by the `apis` are
-     * automatically included.  Messages which are not referenced but
-     * shall be included, such as types used by the `google.protobuf.Any` type,
-     * should be listed here by name. Example:
-     *     types:
-     *     - name: google.protobuf.Int32
-     * 
- */ - public Builder addTypes( - int index, com.google.protobuf.Type value) { - if (typesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTypesIsMutable(); - types_.add(index, value); - onChanged(); - } else { - typesBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .google.protobuf.Type types = 4; - * - *
-     * A list of all proto message types included in this API service.
-     * Types referenced directly or indirectly by the `apis` are
-     * automatically included.  Messages which are not referenced but
-     * shall be included, such as types used by the `google.protobuf.Any` type,
-     * should be listed here by name. Example:
-     *     types:
-     *     - name: google.protobuf.Int32
-     * 
- */ - public Builder addTypes( - com.google.protobuf.Type.Builder builderForValue) { - if (typesBuilder_ == null) { - ensureTypesIsMutable(); - types_.add(builderForValue.build()); - onChanged(); - } else { - typesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .google.protobuf.Type types = 4; - * - *
-     * A list of all proto message types included in this API service.
-     * Types referenced directly or indirectly by the `apis` are
-     * automatically included.  Messages which are not referenced but
-     * shall be included, such as types used by the `google.protobuf.Any` type,
-     * should be listed here by name. Example:
-     *     types:
-     *     - name: google.protobuf.Int32
-     * 
- */ - public Builder addTypes( - int index, com.google.protobuf.Type.Builder builderForValue) { - if (typesBuilder_ == null) { - ensureTypesIsMutable(); - types_.add(index, builderForValue.build()); - onChanged(); - } else { - typesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.protobuf.Type types = 4; - * - *
-     * A list of all proto message types included in this API service.
-     * Types referenced directly or indirectly by the `apis` are
-     * automatically included.  Messages which are not referenced but
-     * shall be included, such as types used by the `google.protobuf.Any` type,
-     * should be listed here by name. Example:
-     *     types:
-     *     - name: google.protobuf.Int32
-     * 
- */ - public Builder addAllTypes( - java.lang.Iterable values) { - if (typesBuilder_ == null) { - ensureTypesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, types_); - onChanged(); - } else { - typesBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .google.protobuf.Type types = 4; - * - *
-     * A list of all proto message types included in this API service.
-     * Types referenced directly or indirectly by the `apis` are
-     * automatically included.  Messages which are not referenced but
-     * shall be included, such as types used by the `google.protobuf.Any` type,
-     * should be listed here by name. Example:
-     *     types:
-     *     - name: google.protobuf.Int32
-     * 
- */ - public Builder clearTypes() { - if (typesBuilder_ == null) { - types_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - } else { - typesBuilder_.clear(); - } - return this; - } - /** - * repeated .google.protobuf.Type types = 4; - * - *
-     * A list of all proto message types included in this API service.
-     * Types referenced directly or indirectly by the `apis` are
-     * automatically included.  Messages which are not referenced but
-     * shall be included, such as types used by the `google.protobuf.Any` type,
-     * should be listed here by name. Example:
-     *     types:
-     *     - name: google.protobuf.Int32
-     * 
- */ - public Builder removeTypes(int index) { - if (typesBuilder_ == null) { - ensureTypesIsMutable(); - types_.remove(index); - onChanged(); - } else { - typesBuilder_.remove(index); - } - return this; - } - /** - * repeated .google.protobuf.Type types = 4; - * - *
-     * A list of all proto message types included in this API service.
-     * Types referenced directly or indirectly by the `apis` are
-     * automatically included.  Messages which are not referenced but
-     * shall be included, such as types used by the `google.protobuf.Any` type,
-     * should be listed here by name. Example:
-     *     types:
-     *     - name: google.protobuf.Int32
-     * 
- */ - public com.google.protobuf.Type.Builder getTypesBuilder( - int index) { - return getTypesFieldBuilder().getBuilder(index); - } - /** - * repeated .google.protobuf.Type types = 4; - * - *
-     * A list of all proto message types included in this API service.
-     * Types referenced directly or indirectly by the `apis` are
-     * automatically included.  Messages which are not referenced but
-     * shall be included, such as types used by the `google.protobuf.Any` type,
-     * should be listed here by name. Example:
-     *     types:
-     *     - name: google.protobuf.Int32
-     * 
- */ - public com.google.protobuf.TypeOrBuilder getTypesOrBuilder( - int index) { - if (typesBuilder_ == null) { - return types_.get(index); } else { - return typesBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .google.protobuf.Type types = 4; - * - *
-     * A list of all proto message types included in this API service.
-     * Types referenced directly or indirectly by the `apis` are
-     * automatically included.  Messages which are not referenced but
-     * shall be included, such as types used by the `google.protobuf.Any` type,
-     * should be listed here by name. Example:
-     *     types:
-     *     - name: google.protobuf.Int32
-     * 
- */ - public java.util.List - getTypesOrBuilderList() { - if (typesBuilder_ != null) { - return typesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(types_); - } - } - /** - * repeated .google.protobuf.Type types = 4; - * - *
-     * A list of all proto message types included in this API service.
-     * Types referenced directly or indirectly by the `apis` are
-     * automatically included.  Messages which are not referenced but
-     * shall be included, such as types used by the `google.protobuf.Any` type,
-     * should be listed here by name. Example:
-     *     types:
-     *     - name: google.protobuf.Int32
-     * 
- */ - public com.google.protobuf.Type.Builder addTypesBuilder() { - return getTypesFieldBuilder().addBuilder( - com.google.protobuf.Type.getDefaultInstance()); - } - /** - * repeated .google.protobuf.Type types = 4; - * - *
-     * A list of all proto message types included in this API service.
-     * Types referenced directly or indirectly by the `apis` are
-     * automatically included.  Messages which are not referenced but
-     * shall be included, such as types used by the `google.protobuf.Any` type,
-     * should be listed here by name. Example:
-     *     types:
-     *     - name: google.protobuf.Int32
-     * 
- */ - public com.google.protobuf.Type.Builder addTypesBuilder( - int index) { - return getTypesFieldBuilder().addBuilder( - index, com.google.protobuf.Type.getDefaultInstance()); - } - /** - * repeated .google.protobuf.Type types = 4; - * - *
-     * A list of all proto message types included in this API service.
-     * Types referenced directly or indirectly by the `apis` are
-     * automatically included.  Messages which are not referenced but
-     * shall be included, such as types used by the `google.protobuf.Any` type,
-     * should be listed here by name. Example:
-     *     types:
-     *     - name: google.protobuf.Int32
-     * 
- */ - public java.util.List - getTypesBuilderList() { - return getTypesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Type, com.google.protobuf.Type.Builder, com.google.protobuf.TypeOrBuilder> - getTypesFieldBuilder() { - if (typesBuilder_ == null) { - typesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Type, com.google.protobuf.Type.Builder, com.google.protobuf.TypeOrBuilder>( - types_, - ((bitField0_ & 0x00000020) == 0x00000020), - getParentForChildren(), - isClean()); - types_ = null; - } - return typesBuilder_; - } - - private java.util.List enums_ = - java.util.Collections.emptyList(); - private void ensureEnumsIsMutable() { - if (!((bitField0_ & 0x00000040) == 0x00000040)) { - enums_ = new java.util.ArrayList(enums_); - bitField0_ |= 0x00000040; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Enum, com.google.protobuf.Enum.Builder, com.google.protobuf.EnumOrBuilder> enumsBuilder_; - - /** - * repeated .google.protobuf.Enum enums = 5; - * - *
-     * A list of all enum types included in this API service.  Enums
-     * referenced directly or indirectly by the `apis` are automatically
-     * included.  Enums which are not referenced but shall be included
-     * should be listed here by name. Example:
-     *     enums:
-     *     - name: google.someapi.v1.SomeEnum
-     * 
- */ - public java.util.List getEnumsList() { - if (enumsBuilder_ == null) { - return java.util.Collections.unmodifiableList(enums_); - } else { - return enumsBuilder_.getMessageList(); - } - } - /** - * repeated .google.protobuf.Enum enums = 5; - * - *
-     * A list of all enum types included in this API service.  Enums
-     * referenced directly or indirectly by the `apis` are automatically
-     * included.  Enums which are not referenced but shall be included
-     * should be listed here by name. Example:
-     *     enums:
-     *     - name: google.someapi.v1.SomeEnum
-     * 
- */ - public int getEnumsCount() { - if (enumsBuilder_ == null) { - return enums_.size(); - } else { - return enumsBuilder_.getCount(); - } - } - /** - * repeated .google.protobuf.Enum enums = 5; - * - *
-     * A list of all enum types included in this API service.  Enums
-     * referenced directly or indirectly by the `apis` are automatically
-     * included.  Enums which are not referenced but shall be included
-     * should be listed here by name. Example:
-     *     enums:
-     *     - name: google.someapi.v1.SomeEnum
-     * 
- */ - public com.google.protobuf.Enum getEnums(int index) { - if (enumsBuilder_ == null) { - return enums_.get(index); - } else { - return enumsBuilder_.getMessage(index); - } - } - /** - * repeated .google.protobuf.Enum enums = 5; - * - *
-     * A list of all enum types included in this API service.  Enums
-     * referenced directly or indirectly by the `apis` are automatically
-     * included.  Enums which are not referenced but shall be included
-     * should be listed here by name. Example:
-     *     enums:
-     *     - name: google.someapi.v1.SomeEnum
-     * 
- */ - public Builder setEnums( - int index, com.google.protobuf.Enum value) { - if (enumsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureEnumsIsMutable(); - enums_.set(index, value); - onChanged(); - } else { - enumsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .google.protobuf.Enum enums = 5; - * - *
-     * A list of all enum types included in this API service.  Enums
-     * referenced directly or indirectly by the `apis` are automatically
-     * included.  Enums which are not referenced but shall be included
-     * should be listed here by name. Example:
-     *     enums:
-     *     - name: google.someapi.v1.SomeEnum
-     * 
- */ - public Builder setEnums( - int index, com.google.protobuf.Enum.Builder builderForValue) { - if (enumsBuilder_ == null) { - ensureEnumsIsMutable(); - enums_.set(index, builderForValue.build()); - onChanged(); - } else { - enumsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.protobuf.Enum enums = 5; - * - *
-     * A list of all enum types included in this API service.  Enums
-     * referenced directly or indirectly by the `apis` are automatically
-     * included.  Enums which are not referenced but shall be included
-     * should be listed here by name. Example:
-     *     enums:
-     *     - name: google.someapi.v1.SomeEnum
-     * 
- */ - public Builder addEnums(com.google.protobuf.Enum value) { - if (enumsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureEnumsIsMutable(); - enums_.add(value); - onChanged(); - } else { - enumsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .google.protobuf.Enum enums = 5; - * - *
-     * A list of all enum types included in this API service.  Enums
-     * referenced directly or indirectly by the `apis` are automatically
-     * included.  Enums which are not referenced but shall be included
-     * should be listed here by name. Example:
-     *     enums:
-     *     - name: google.someapi.v1.SomeEnum
-     * 
- */ - public Builder addEnums( - int index, com.google.protobuf.Enum value) { - if (enumsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureEnumsIsMutable(); - enums_.add(index, value); - onChanged(); - } else { - enumsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .google.protobuf.Enum enums = 5; - * - *
-     * A list of all enum types included in this API service.  Enums
-     * referenced directly or indirectly by the `apis` are automatically
-     * included.  Enums which are not referenced but shall be included
-     * should be listed here by name. Example:
-     *     enums:
-     *     - name: google.someapi.v1.SomeEnum
-     * 
- */ - public Builder addEnums( - com.google.protobuf.Enum.Builder builderForValue) { - if (enumsBuilder_ == null) { - ensureEnumsIsMutable(); - enums_.add(builderForValue.build()); - onChanged(); - } else { - enumsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .google.protobuf.Enum enums = 5; - * - *
-     * A list of all enum types included in this API service.  Enums
-     * referenced directly or indirectly by the `apis` are automatically
-     * included.  Enums which are not referenced but shall be included
-     * should be listed here by name. Example:
-     *     enums:
-     *     - name: google.someapi.v1.SomeEnum
-     * 
- */ - public Builder addEnums( - int index, com.google.protobuf.Enum.Builder builderForValue) { - if (enumsBuilder_ == null) { - ensureEnumsIsMutable(); - enums_.add(index, builderForValue.build()); - onChanged(); - } else { - enumsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.protobuf.Enum enums = 5; - * - *
-     * A list of all enum types included in this API service.  Enums
-     * referenced directly or indirectly by the `apis` are automatically
-     * included.  Enums which are not referenced but shall be included
-     * should be listed here by name. Example:
-     *     enums:
-     *     - name: google.someapi.v1.SomeEnum
-     * 
- */ - public Builder addAllEnums( - java.lang.Iterable values) { - if (enumsBuilder_ == null) { - ensureEnumsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, enums_); - onChanged(); - } else { - enumsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .google.protobuf.Enum enums = 5; - * - *
-     * A list of all enum types included in this API service.  Enums
-     * referenced directly or indirectly by the `apis` are automatically
-     * included.  Enums which are not referenced but shall be included
-     * should be listed here by name. Example:
-     *     enums:
-     *     - name: google.someapi.v1.SomeEnum
-     * 
- */ - public Builder clearEnums() { - if (enumsBuilder_ == null) { - enums_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000040); - onChanged(); - } else { - enumsBuilder_.clear(); - } - return this; - } - /** - * repeated .google.protobuf.Enum enums = 5; - * - *
-     * A list of all enum types included in this API service.  Enums
-     * referenced directly or indirectly by the `apis` are automatically
-     * included.  Enums which are not referenced but shall be included
-     * should be listed here by name. Example:
-     *     enums:
-     *     - name: google.someapi.v1.SomeEnum
-     * 
- */ - public Builder removeEnums(int index) { - if (enumsBuilder_ == null) { - ensureEnumsIsMutable(); - enums_.remove(index); - onChanged(); - } else { - enumsBuilder_.remove(index); - } - return this; - } - /** - * repeated .google.protobuf.Enum enums = 5; - * - *
-     * A list of all enum types included in this API service.  Enums
-     * referenced directly or indirectly by the `apis` are automatically
-     * included.  Enums which are not referenced but shall be included
-     * should be listed here by name. Example:
-     *     enums:
-     *     - name: google.someapi.v1.SomeEnum
-     * 
- */ - public com.google.protobuf.Enum.Builder getEnumsBuilder( - int index) { - return getEnumsFieldBuilder().getBuilder(index); - } - /** - * repeated .google.protobuf.Enum enums = 5; - * - *
-     * A list of all enum types included in this API service.  Enums
-     * referenced directly or indirectly by the `apis` are automatically
-     * included.  Enums which are not referenced but shall be included
-     * should be listed here by name. Example:
-     *     enums:
-     *     - name: google.someapi.v1.SomeEnum
-     * 
- */ - public com.google.protobuf.EnumOrBuilder getEnumsOrBuilder( - int index) { - if (enumsBuilder_ == null) { - return enums_.get(index); } else { - return enumsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .google.protobuf.Enum enums = 5; - * - *
-     * A list of all enum types included in this API service.  Enums
-     * referenced directly or indirectly by the `apis` are automatically
-     * included.  Enums which are not referenced but shall be included
-     * should be listed here by name. Example:
-     *     enums:
-     *     - name: google.someapi.v1.SomeEnum
-     * 
- */ - public java.util.List - getEnumsOrBuilderList() { - if (enumsBuilder_ != null) { - return enumsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(enums_); - } - } - /** - * repeated .google.protobuf.Enum enums = 5; - * - *
-     * A list of all enum types included in this API service.  Enums
-     * referenced directly or indirectly by the `apis` are automatically
-     * included.  Enums which are not referenced but shall be included
-     * should be listed here by name. Example:
-     *     enums:
-     *     - name: google.someapi.v1.SomeEnum
-     * 
- */ - public com.google.protobuf.Enum.Builder addEnumsBuilder() { - return getEnumsFieldBuilder().addBuilder( - com.google.protobuf.Enum.getDefaultInstance()); - } - /** - * repeated .google.protobuf.Enum enums = 5; - * - *
-     * A list of all enum types included in this API service.  Enums
-     * referenced directly or indirectly by the `apis` are automatically
-     * included.  Enums which are not referenced but shall be included
-     * should be listed here by name. Example:
-     *     enums:
-     *     - name: google.someapi.v1.SomeEnum
-     * 
- */ - public com.google.protobuf.Enum.Builder addEnumsBuilder( - int index) { - return getEnumsFieldBuilder().addBuilder( - index, com.google.protobuf.Enum.getDefaultInstance()); - } - /** - * repeated .google.protobuf.Enum enums = 5; - * - *
-     * A list of all enum types included in this API service.  Enums
-     * referenced directly or indirectly by the `apis` are automatically
-     * included.  Enums which are not referenced but shall be included
-     * should be listed here by name. Example:
-     *     enums:
-     *     - name: google.someapi.v1.SomeEnum
-     * 
- */ - public java.util.List - getEnumsBuilderList() { - return getEnumsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Enum, com.google.protobuf.Enum.Builder, com.google.protobuf.EnumOrBuilder> - getEnumsFieldBuilder() { - if (enumsBuilder_ == null) { - enumsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Enum, com.google.protobuf.Enum.Builder, com.google.protobuf.EnumOrBuilder>( - enums_, - ((bitField0_ & 0x00000040) == 0x00000040), - getParentForChildren(), - isClean()); - enums_ = null; - } - return enumsBuilder_; - } - - private com.google.api.Documentation documentation_ = null; - private com.google.protobuf.SingleFieldBuilder< - com.google.api.Documentation, com.google.api.Documentation.Builder, com.google.api.DocumentationOrBuilder> documentationBuilder_; - /** - * optional .google.api.Documentation documentation = 6; - * - *
-     * Additional API documentation.
-     * 
- */ - public boolean hasDocumentation() { - return documentationBuilder_ != null || documentation_ != null; - } - /** - * optional .google.api.Documentation documentation = 6; - * - *
-     * Additional API documentation.
-     * 
- */ - public com.google.api.Documentation getDocumentation() { - if (documentationBuilder_ == null) { - return documentation_ == null ? com.google.api.Documentation.getDefaultInstance() : documentation_; - } else { - return documentationBuilder_.getMessage(); - } - } - /** - * optional .google.api.Documentation documentation = 6; - * - *
-     * Additional API documentation.
-     * 
- */ - public Builder setDocumentation(com.google.api.Documentation value) { - if (documentationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - documentation_ = value; - onChanged(); - } else { - documentationBuilder_.setMessage(value); - } - - return this; - } - /** - * optional .google.api.Documentation documentation = 6; - * - *
-     * Additional API documentation.
-     * 
- */ - public Builder setDocumentation( - com.google.api.Documentation.Builder builderForValue) { - if (documentationBuilder_ == null) { - documentation_ = builderForValue.build(); - onChanged(); - } else { - documentationBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * optional .google.api.Documentation documentation = 6; - * - *
-     * Additional API documentation.
-     * 
- */ - public Builder mergeDocumentation(com.google.api.Documentation value) { - if (documentationBuilder_ == null) { - if (documentation_ != null) { - documentation_ = - com.google.api.Documentation.newBuilder(documentation_).mergeFrom(value).buildPartial(); - } else { - documentation_ = value; - } - onChanged(); - } else { - documentationBuilder_.mergeFrom(value); - } - - return this; - } - /** - * optional .google.api.Documentation documentation = 6; - * - *
-     * Additional API documentation.
-     * 
- */ - public Builder clearDocumentation() { - if (documentationBuilder_ == null) { - documentation_ = null; - onChanged(); - } else { - documentation_ = null; - documentationBuilder_ = null; - } - - return this; - } - /** - * optional .google.api.Documentation documentation = 6; - * - *
-     * Additional API documentation.
-     * 
- */ - public com.google.api.Documentation.Builder getDocumentationBuilder() { - - onChanged(); - return getDocumentationFieldBuilder().getBuilder(); - } - /** - * optional .google.api.Documentation documentation = 6; - * - *
-     * Additional API documentation.
-     * 
- */ - public com.google.api.DocumentationOrBuilder getDocumentationOrBuilder() { - if (documentationBuilder_ != null) { - return documentationBuilder_.getMessageOrBuilder(); - } else { - return documentation_ == null ? - com.google.api.Documentation.getDefaultInstance() : documentation_; - } - } - /** - * optional .google.api.Documentation documentation = 6; - * - *
-     * Additional API documentation.
-     * 
- */ - private com.google.protobuf.SingleFieldBuilder< - com.google.api.Documentation, com.google.api.Documentation.Builder, com.google.api.DocumentationOrBuilder> - getDocumentationFieldBuilder() { - if (documentationBuilder_ == null) { - documentationBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.api.Documentation, com.google.api.Documentation.Builder, com.google.api.DocumentationOrBuilder>( - getDocumentation(), - getParentForChildren(), - isClean()); - documentation_ = null; - } - return documentationBuilder_; - } - - private com.google.api.Visibility visibility_ = null; - private com.google.protobuf.SingleFieldBuilder< - com.google.api.Visibility, com.google.api.Visibility.Builder, com.google.api.VisibilityOrBuilder> visibilityBuilder_; - /** - * optional .google.api.Visibility visibility = 7; - * - *
-     * API visibility configuration.
-     * 
- */ - public boolean hasVisibility() { - return visibilityBuilder_ != null || visibility_ != null; - } - /** - * optional .google.api.Visibility visibility = 7; - * - *
-     * API visibility configuration.
-     * 
- */ - public com.google.api.Visibility getVisibility() { - if (visibilityBuilder_ == null) { - return visibility_ == null ? com.google.api.Visibility.getDefaultInstance() : visibility_; - } else { - return visibilityBuilder_.getMessage(); - } - } - /** - * optional .google.api.Visibility visibility = 7; - * - *
-     * API visibility configuration.
-     * 
- */ - public Builder setVisibility(com.google.api.Visibility value) { - if (visibilityBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - visibility_ = value; - onChanged(); - } else { - visibilityBuilder_.setMessage(value); - } - - return this; - } - /** - * optional .google.api.Visibility visibility = 7; - * - *
-     * API visibility configuration.
-     * 
- */ - public Builder setVisibility( - com.google.api.Visibility.Builder builderForValue) { - if (visibilityBuilder_ == null) { - visibility_ = builderForValue.build(); - onChanged(); - } else { - visibilityBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * optional .google.api.Visibility visibility = 7; - * - *
-     * API visibility configuration.
-     * 
- */ - public Builder mergeVisibility(com.google.api.Visibility value) { - if (visibilityBuilder_ == null) { - if (visibility_ != null) { - visibility_ = - com.google.api.Visibility.newBuilder(visibility_).mergeFrom(value).buildPartial(); - } else { - visibility_ = value; - } - onChanged(); - } else { - visibilityBuilder_.mergeFrom(value); - } - - return this; - } - /** - * optional .google.api.Visibility visibility = 7; - * - *
-     * API visibility configuration.
-     * 
- */ - public Builder clearVisibility() { - if (visibilityBuilder_ == null) { - visibility_ = null; - onChanged(); - } else { - visibility_ = null; - visibilityBuilder_ = null; - } - - return this; - } - /** - * optional .google.api.Visibility visibility = 7; - * - *
-     * API visibility configuration.
-     * 
- */ - public com.google.api.Visibility.Builder getVisibilityBuilder() { - - onChanged(); - return getVisibilityFieldBuilder().getBuilder(); - } - /** - * optional .google.api.Visibility visibility = 7; - * - *
-     * API visibility configuration.
-     * 
- */ - public com.google.api.VisibilityOrBuilder getVisibilityOrBuilder() { - if (visibilityBuilder_ != null) { - return visibilityBuilder_.getMessageOrBuilder(); - } else { - return visibility_ == null ? - com.google.api.Visibility.getDefaultInstance() : visibility_; - } - } - /** - * optional .google.api.Visibility visibility = 7; - * - *
-     * API visibility configuration.
-     * 
- */ - private com.google.protobuf.SingleFieldBuilder< - com.google.api.Visibility, com.google.api.Visibility.Builder, com.google.api.VisibilityOrBuilder> - getVisibilityFieldBuilder() { - if (visibilityBuilder_ == null) { - visibilityBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.api.Visibility, com.google.api.Visibility.Builder, com.google.api.VisibilityOrBuilder>( - getVisibility(), - getParentForChildren(), - isClean()); - visibility_ = null; - } - return visibilityBuilder_; - } - - private com.google.api.Http http_ = null; - private com.google.protobuf.SingleFieldBuilder< - com.google.api.Http, com.google.api.Http.Builder, com.google.api.HttpOrBuilder> httpBuilder_; - /** - * optional .google.api.Http http = 9; - * - *
-     * HTTP configuration.
-     * 
- */ - public boolean hasHttp() { - return httpBuilder_ != null || http_ != null; - } - /** - * optional .google.api.Http http = 9; - * - *
-     * HTTP configuration.
-     * 
- */ - public com.google.api.Http getHttp() { - if (httpBuilder_ == null) { - return http_ == null ? com.google.api.Http.getDefaultInstance() : http_; - } else { - return httpBuilder_.getMessage(); - } - } - /** - * optional .google.api.Http http = 9; - * - *
-     * HTTP configuration.
-     * 
- */ - public Builder setHttp(com.google.api.Http value) { - if (httpBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - http_ = value; - onChanged(); - } else { - httpBuilder_.setMessage(value); - } - - return this; - } - /** - * optional .google.api.Http http = 9; - * - *
-     * HTTP configuration.
-     * 
- */ - public Builder setHttp( - com.google.api.Http.Builder builderForValue) { - if (httpBuilder_ == null) { - http_ = builderForValue.build(); - onChanged(); - } else { - httpBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * optional .google.api.Http http = 9; - * - *
-     * HTTP configuration.
-     * 
- */ - public Builder mergeHttp(com.google.api.Http value) { - if (httpBuilder_ == null) { - if (http_ != null) { - http_ = - com.google.api.Http.newBuilder(http_).mergeFrom(value).buildPartial(); - } else { - http_ = value; - } - onChanged(); - } else { - httpBuilder_.mergeFrom(value); - } - - return this; - } - /** - * optional .google.api.Http http = 9; - * - *
-     * HTTP configuration.
-     * 
- */ - public Builder clearHttp() { - if (httpBuilder_ == null) { - http_ = null; - onChanged(); - } else { - http_ = null; - httpBuilder_ = null; - } - - return this; - } - /** - * optional .google.api.Http http = 9; - * - *
-     * HTTP configuration.
-     * 
- */ - public com.google.api.Http.Builder getHttpBuilder() { - - onChanged(); - return getHttpFieldBuilder().getBuilder(); - } - /** - * optional .google.api.Http http = 9; - * - *
-     * HTTP configuration.
-     * 
- */ - public com.google.api.HttpOrBuilder getHttpOrBuilder() { - if (httpBuilder_ != null) { - return httpBuilder_.getMessageOrBuilder(); - } else { - return http_ == null ? - com.google.api.Http.getDefaultInstance() : http_; - } - } - /** - * optional .google.api.Http http = 9; - * - *
-     * HTTP configuration.
-     * 
- */ - private com.google.protobuf.SingleFieldBuilder< - com.google.api.Http, com.google.api.Http.Builder, com.google.api.HttpOrBuilder> - getHttpFieldBuilder() { - if (httpBuilder_ == null) { - httpBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.api.Http, com.google.api.Http.Builder, com.google.api.HttpOrBuilder>( - getHttp(), - getParentForChildren(), - isClean()); - http_ = null; - } - return httpBuilder_; - } - - private com.google.api.Context context_ = null; - private com.google.protobuf.SingleFieldBuilder< - com.google.api.Context, com.google.api.Context.Builder, com.google.api.ContextOrBuilder> contextBuilder_; - /** - * optional .google.api.Context context = 12; - * - *
-     * Context configuration.
-     * 
- */ - public boolean hasContext() { - return contextBuilder_ != null || context_ != null; - } - /** - * optional .google.api.Context context = 12; - * - *
-     * Context configuration.
-     * 
- */ - public com.google.api.Context getContext() { - if (contextBuilder_ == null) { - return context_ == null ? com.google.api.Context.getDefaultInstance() : context_; - } else { - return contextBuilder_.getMessage(); - } - } - /** - * optional .google.api.Context context = 12; - * - *
-     * Context configuration.
-     * 
- */ - public Builder setContext(com.google.api.Context value) { - if (contextBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - context_ = value; - onChanged(); - } else { - contextBuilder_.setMessage(value); - } - - return this; - } - /** - * optional .google.api.Context context = 12; - * - *
-     * Context configuration.
-     * 
- */ - public Builder setContext( - com.google.api.Context.Builder builderForValue) { - if (contextBuilder_ == null) { - context_ = builderForValue.build(); - onChanged(); - } else { - contextBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * optional .google.api.Context context = 12; - * - *
-     * Context configuration.
-     * 
- */ - public Builder mergeContext(com.google.api.Context value) { - if (contextBuilder_ == null) { - if (context_ != null) { - context_ = - com.google.api.Context.newBuilder(context_).mergeFrom(value).buildPartial(); - } else { - context_ = value; - } - onChanged(); - } else { - contextBuilder_.mergeFrom(value); - } - - return this; - } - /** - * optional .google.api.Context context = 12; - * - *
-     * Context configuration.
-     * 
- */ - public Builder clearContext() { - if (contextBuilder_ == null) { - context_ = null; - onChanged(); - } else { - context_ = null; - contextBuilder_ = null; - } - - return this; - } - /** - * optional .google.api.Context context = 12; - * - *
-     * Context configuration.
-     * 
- */ - public com.google.api.Context.Builder getContextBuilder() { - - onChanged(); - return getContextFieldBuilder().getBuilder(); - } - /** - * optional .google.api.Context context = 12; - * - *
-     * Context configuration.
-     * 
- */ - public com.google.api.ContextOrBuilder getContextOrBuilder() { - if (contextBuilder_ != null) { - return contextBuilder_.getMessageOrBuilder(); - } else { - return context_ == null ? - com.google.api.Context.getDefaultInstance() : context_; - } - } - /** - * optional .google.api.Context context = 12; - * - *
-     * Context configuration.
-     * 
- */ - private com.google.protobuf.SingleFieldBuilder< - com.google.api.Context, com.google.api.Context.Builder, com.google.api.ContextOrBuilder> - getContextFieldBuilder() { - if (contextBuilder_ == null) { - contextBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.api.Context, com.google.api.Context.Builder, com.google.api.ContextOrBuilder>( - getContext(), - getParentForChildren(), - isClean()); - context_ = null; - } - return contextBuilder_; - } - - private com.google.api.CustomError customError_ = null; - private com.google.protobuf.SingleFieldBuilder< - com.google.api.CustomError, com.google.api.CustomError.Builder, com.google.api.CustomErrorOrBuilder> customErrorBuilder_; - /** - * optional .google.api.CustomError custom_error = 16; - * - *
-     * Custom error configuration.
-     * 
- */ - public boolean hasCustomError() { - return customErrorBuilder_ != null || customError_ != null; - } - /** - * optional .google.api.CustomError custom_error = 16; - * - *
-     * Custom error configuration.
-     * 
- */ - public com.google.api.CustomError getCustomError() { - if (customErrorBuilder_ == null) { - return customError_ == null ? com.google.api.CustomError.getDefaultInstance() : customError_; - } else { - return customErrorBuilder_.getMessage(); - } - } - /** - * optional .google.api.CustomError custom_error = 16; - * - *
-     * Custom error configuration.
-     * 
- */ - public Builder setCustomError(com.google.api.CustomError value) { - if (customErrorBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - customError_ = value; - onChanged(); - } else { - customErrorBuilder_.setMessage(value); - } - - return this; - } - /** - * optional .google.api.CustomError custom_error = 16; - * - *
-     * Custom error configuration.
-     * 
- */ - public Builder setCustomError( - com.google.api.CustomError.Builder builderForValue) { - if (customErrorBuilder_ == null) { - customError_ = builderForValue.build(); - onChanged(); - } else { - customErrorBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * optional .google.api.CustomError custom_error = 16; - * - *
-     * Custom error configuration.
-     * 
- */ - public Builder mergeCustomError(com.google.api.CustomError value) { - if (customErrorBuilder_ == null) { - if (customError_ != null) { - customError_ = - com.google.api.CustomError.newBuilder(customError_).mergeFrom(value).buildPartial(); - } else { - customError_ = value; - } - onChanged(); - } else { - customErrorBuilder_.mergeFrom(value); - } - - return this; - } - /** - * optional .google.api.CustomError custom_error = 16; - * - *
-     * Custom error configuration.
-     * 
- */ - public Builder clearCustomError() { - if (customErrorBuilder_ == null) { - customError_ = null; - onChanged(); - } else { - customError_ = null; - customErrorBuilder_ = null; - } - - return this; - } - /** - * optional .google.api.CustomError custom_error = 16; - * - *
-     * Custom error configuration.
-     * 
- */ - public com.google.api.CustomError.Builder getCustomErrorBuilder() { - - onChanged(); - return getCustomErrorFieldBuilder().getBuilder(); - } - /** - * optional .google.api.CustomError custom_error = 16; - * - *
-     * Custom error configuration.
-     * 
- */ - public com.google.api.CustomErrorOrBuilder getCustomErrorOrBuilder() { - if (customErrorBuilder_ != null) { - return customErrorBuilder_.getMessageOrBuilder(); - } else { - return customError_ == null ? - com.google.api.CustomError.getDefaultInstance() : customError_; - } - } - /** - * optional .google.api.CustomError custom_error = 16; - * - *
-     * Custom error configuration.
-     * 
- */ - private com.google.protobuf.SingleFieldBuilder< - com.google.api.CustomError, com.google.api.CustomError.Builder, com.google.api.CustomErrorOrBuilder> - getCustomErrorFieldBuilder() { - if (customErrorBuilder_ == null) { - customErrorBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.api.CustomError, com.google.api.CustomError.Builder, com.google.api.CustomErrorOrBuilder>( - getCustomError(), - getParentForChildren(), - isClean()); - customError_ = null; - } - return customErrorBuilder_; - } - - private com.google.protobuf.Any derivedData_ = null; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> derivedDataBuilder_; - /** - * optional .google.protobuf.Any derived_data = 100; - * - *
-     * Service attributes derived by the configuration toolchain, for
-     * use at runtime.  Type is defined in
-     * `//google/internal/api/derived_service.proto`.
-     * 
- */ - public boolean hasDerivedData() { - return derivedDataBuilder_ != null || derivedData_ != null; - } - /** - * optional .google.protobuf.Any derived_data = 100; - * - *
-     * Service attributes derived by the configuration toolchain, for
-     * use at runtime.  Type is defined in
-     * `//google/internal/api/derived_service.proto`.
-     * 
- */ - public com.google.protobuf.Any getDerivedData() { - if (derivedDataBuilder_ == null) { - return derivedData_ == null ? com.google.protobuf.Any.getDefaultInstance() : derivedData_; - } else { - return derivedDataBuilder_.getMessage(); - } - } - /** - * optional .google.protobuf.Any derived_data = 100; - * - *
-     * Service attributes derived by the configuration toolchain, for
-     * use at runtime.  Type is defined in
-     * `//google/internal/api/derived_service.proto`.
-     * 
- */ - public Builder setDerivedData(com.google.protobuf.Any value) { - if (derivedDataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - derivedData_ = value; - onChanged(); - } else { - derivedDataBuilder_.setMessage(value); - } - - return this; - } - /** - * optional .google.protobuf.Any derived_data = 100; - * - *
-     * Service attributes derived by the configuration toolchain, for
-     * use at runtime.  Type is defined in
-     * `//google/internal/api/derived_service.proto`.
-     * 
- */ - public Builder setDerivedData( - com.google.protobuf.Any.Builder builderForValue) { - if (derivedDataBuilder_ == null) { - derivedData_ = builderForValue.build(); - onChanged(); - } else { - derivedDataBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * optional .google.protobuf.Any derived_data = 100; - * - *
-     * Service attributes derived by the configuration toolchain, for
-     * use at runtime.  Type is defined in
-     * `//google/internal/api/derived_service.proto`.
-     * 
- */ - public Builder mergeDerivedData(com.google.protobuf.Any value) { - if (derivedDataBuilder_ == null) { - if (derivedData_ != null) { - derivedData_ = - com.google.protobuf.Any.newBuilder(derivedData_).mergeFrom(value).buildPartial(); - } else { - derivedData_ = value; - } - onChanged(); - } else { - derivedDataBuilder_.mergeFrom(value); - } - - return this; - } - /** - * optional .google.protobuf.Any derived_data = 100; - * - *
-     * Service attributes derived by the configuration toolchain, for
-     * use at runtime.  Type is defined in
-     * `//google/internal/api/derived_service.proto`.
-     * 
- */ - public Builder clearDerivedData() { - if (derivedDataBuilder_ == null) { - derivedData_ = null; - onChanged(); - } else { - derivedData_ = null; - derivedDataBuilder_ = null; - } - - return this; - } - /** - * optional .google.protobuf.Any derived_data = 100; - * - *
-     * Service attributes derived by the configuration toolchain, for
-     * use at runtime.  Type is defined in
-     * `//google/internal/api/derived_service.proto`.
-     * 
- */ - public com.google.protobuf.Any.Builder getDerivedDataBuilder() { - - onChanged(); - return getDerivedDataFieldBuilder().getBuilder(); - } - /** - * optional .google.protobuf.Any derived_data = 100; - * - *
-     * Service attributes derived by the configuration toolchain, for
-     * use at runtime.  Type is defined in
-     * `//google/internal/api/derived_service.proto`.
-     * 
- */ - public com.google.protobuf.AnyOrBuilder getDerivedDataOrBuilder() { - if (derivedDataBuilder_ != null) { - return derivedDataBuilder_.getMessageOrBuilder(); - } else { - return derivedData_ == null ? - com.google.protobuf.Any.getDefaultInstance() : derivedData_; - } - } - /** - * optional .google.protobuf.Any derived_data = 100; - * - *
-     * Service attributes derived by the configuration toolchain, for
-     * use at runtime.  Type is defined in
-     * `//google/internal/api/derived_service.proto`.
-     * 
- */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> - getDerivedDataFieldBuilder() { - if (derivedDataBuilder_ == null) { - derivedDataBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>( - getDerivedData(), - getParentForChildren(), - isClean()); - derivedData_ = null; - } - return derivedDataBuilder_; - } - - private java.util.List systemTypes_ = - java.util.Collections.emptyList(); - private void ensureSystemTypesIsMutable() { - if (!((bitField0_ & 0x00002000) == 0x00002000)) { - systemTypes_ = new java.util.ArrayList(systemTypes_); - bitField0_ |= 0x00002000; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Type, com.google.protobuf.Type.Builder, com.google.protobuf.TypeOrBuilder> systemTypesBuilder_; - - /** - * repeated .google.protobuf.Type system_types = 102; - * - *
-     * A list of all proto message types included in this API service.
-     * It serves similar purpose as [google.api.Service.types], except that
-     * these types are not needed by user-defined APIs. Therefore, they will not
-     * show up in the generated discovery doc. This field should only be used
-     * to define system APIs in ESF.
-     * 
- */ - public java.util.List getSystemTypesList() { - if (systemTypesBuilder_ == null) { - return java.util.Collections.unmodifiableList(systemTypes_); - } else { - return systemTypesBuilder_.getMessageList(); - } - } - /** - * repeated .google.protobuf.Type system_types = 102; - * - *
-     * A list of all proto message types included in this API service.
-     * It serves similar purpose as [google.api.Service.types], except that
-     * these types are not needed by user-defined APIs. Therefore, they will not
-     * show up in the generated discovery doc. This field should only be used
-     * to define system APIs in ESF.
-     * 
- */ - public int getSystemTypesCount() { - if (systemTypesBuilder_ == null) { - return systemTypes_.size(); - } else { - return systemTypesBuilder_.getCount(); - } - } - /** - * repeated .google.protobuf.Type system_types = 102; - * - *
-     * A list of all proto message types included in this API service.
-     * It serves similar purpose as [google.api.Service.types], except that
-     * these types are not needed by user-defined APIs. Therefore, they will not
-     * show up in the generated discovery doc. This field should only be used
-     * to define system APIs in ESF.
-     * 
- */ - public com.google.protobuf.Type getSystemTypes(int index) { - if (systemTypesBuilder_ == null) { - return systemTypes_.get(index); - } else { - return systemTypesBuilder_.getMessage(index); - } - } - /** - * repeated .google.protobuf.Type system_types = 102; - * - *
-     * A list of all proto message types included in this API service.
-     * It serves similar purpose as [google.api.Service.types], except that
-     * these types are not needed by user-defined APIs. Therefore, they will not
-     * show up in the generated discovery doc. This field should only be used
-     * to define system APIs in ESF.
-     * 
- */ - public Builder setSystemTypes( - int index, com.google.protobuf.Type value) { - if (systemTypesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSystemTypesIsMutable(); - systemTypes_.set(index, value); - onChanged(); - } else { - systemTypesBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .google.protobuf.Type system_types = 102; - * - *
-     * A list of all proto message types included in this API service.
-     * It serves similar purpose as [google.api.Service.types], except that
-     * these types are not needed by user-defined APIs. Therefore, they will not
-     * show up in the generated discovery doc. This field should only be used
-     * to define system APIs in ESF.
-     * 
- */ - public Builder setSystemTypes( - int index, com.google.protobuf.Type.Builder builderForValue) { - if (systemTypesBuilder_ == null) { - ensureSystemTypesIsMutable(); - systemTypes_.set(index, builderForValue.build()); - onChanged(); - } else { - systemTypesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.protobuf.Type system_types = 102; - * - *
-     * A list of all proto message types included in this API service.
-     * It serves similar purpose as [google.api.Service.types], except that
-     * these types are not needed by user-defined APIs. Therefore, they will not
-     * show up in the generated discovery doc. This field should only be used
-     * to define system APIs in ESF.
-     * 
- */ - public Builder addSystemTypes(com.google.protobuf.Type value) { - if (systemTypesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSystemTypesIsMutable(); - systemTypes_.add(value); - onChanged(); - } else { - systemTypesBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .google.protobuf.Type system_types = 102; - * - *
-     * A list of all proto message types included in this API service.
-     * It serves similar purpose as [google.api.Service.types], except that
-     * these types are not needed by user-defined APIs. Therefore, they will not
-     * show up in the generated discovery doc. This field should only be used
-     * to define system APIs in ESF.
-     * 
- */ - public Builder addSystemTypes( - int index, com.google.protobuf.Type value) { - if (systemTypesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSystemTypesIsMutable(); - systemTypes_.add(index, value); - onChanged(); - } else { - systemTypesBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .google.protobuf.Type system_types = 102; - * - *
-     * A list of all proto message types included in this API service.
-     * It serves similar purpose as [google.api.Service.types], except that
-     * these types are not needed by user-defined APIs. Therefore, they will not
-     * show up in the generated discovery doc. This field should only be used
-     * to define system APIs in ESF.
-     * 
- */ - public Builder addSystemTypes( - com.google.protobuf.Type.Builder builderForValue) { - if (systemTypesBuilder_ == null) { - ensureSystemTypesIsMutable(); - systemTypes_.add(builderForValue.build()); - onChanged(); - } else { - systemTypesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .google.protobuf.Type system_types = 102; - * - *
-     * A list of all proto message types included in this API service.
-     * It serves similar purpose as [google.api.Service.types], except that
-     * these types are not needed by user-defined APIs. Therefore, they will not
-     * show up in the generated discovery doc. This field should only be used
-     * to define system APIs in ESF.
-     * 
- */ - public Builder addSystemTypes( - int index, com.google.protobuf.Type.Builder builderForValue) { - if (systemTypesBuilder_ == null) { - ensureSystemTypesIsMutable(); - systemTypes_.add(index, builderForValue.build()); - onChanged(); - } else { - systemTypesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.protobuf.Type system_types = 102; - * - *
-     * A list of all proto message types included in this API service.
-     * It serves similar purpose as [google.api.Service.types], except that
-     * these types are not needed by user-defined APIs. Therefore, they will not
-     * show up in the generated discovery doc. This field should only be used
-     * to define system APIs in ESF.
-     * 
- */ - public Builder addAllSystemTypes( - java.lang.Iterable values) { - if (systemTypesBuilder_ == null) { - ensureSystemTypesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, systemTypes_); - onChanged(); - } else { - systemTypesBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .google.protobuf.Type system_types = 102; - * - *
-     * A list of all proto message types included in this API service.
-     * It serves similar purpose as [google.api.Service.types], except that
-     * these types are not needed by user-defined APIs. Therefore, they will not
-     * show up in the generated discovery doc. This field should only be used
-     * to define system APIs in ESF.
-     * 
- */ - public Builder clearSystemTypes() { - if (systemTypesBuilder_ == null) { - systemTypes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00002000); - onChanged(); - } else { - systemTypesBuilder_.clear(); - } - return this; - } - /** - * repeated .google.protobuf.Type system_types = 102; - * - *
-     * A list of all proto message types included in this API service.
-     * It serves similar purpose as [google.api.Service.types], except that
-     * these types are not needed by user-defined APIs. Therefore, they will not
-     * show up in the generated discovery doc. This field should only be used
-     * to define system APIs in ESF.
-     * 
- */ - public Builder removeSystemTypes(int index) { - if (systemTypesBuilder_ == null) { - ensureSystemTypesIsMutable(); - systemTypes_.remove(index); - onChanged(); - } else { - systemTypesBuilder_.remove(index); - } - return this; - } - /** - * repeated .google.protobuf.Type system_types = 102; - * - *
-     * A list of all proto message types included in this API service.
-     * It serves similar purpose as [google.api.Service.types], except that
-     * these types are not needed by user-defined APIs. Therefore, they will not
-     * show up in the generated discovery doc. This field should only be used
-     * to define system APIs in ESF.
-     * 
- */ - public com.google.protobuf.Type.Builder getSystemTypesBuilder( - int index) { - return getSystemTypesFieldBuilder().getBuilder(index); - } - /** - * repeated .google.protobuf.Type system_types = 102; - * - *
-     * A list of all proto message types included in this API service.
-     * It serves similar purpose as [google.api.Service.types], except that
-     * these types are not needed by user-defined APIs. Therefore, they will not
-     * show up in the generated discovery doc. This field should only be used
-     * to define system APIs in ESF.
-     * 
- */ - public com.google.protobuf.TypeOrBuilder getSystemTypesOrBuilder( - int index) { - if (systemTypesBuilder_ == null) { - return systemTypes_.get(index); } else { - return systemTypesBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .google.protobuf.Type system_types = 102; - * - *
-     * A list of all proto message types included in this API service.
-     * It serves similar purpose as [google.api.Service.types], except that
-     * these types are not needed by user-defined APIs. Therefore, they will not
-     * show up in the generated discovery doc. This field should only be used
-     * to define system APIs in ESF.
-     * 
- */ - public java.util.List - getSystemTypesOrBuilderList() { - if (systemTypesBuilder_ != null) { - return systemTypesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(systemTypes_); - } - } - /** - * repeated .google.protobuf.Type system_types = 102; - * - *
-     * A list of all proto message types included in this API service.
-     * It serves similar purpose as [google.api.Service.types], except that
-     * these types are not needed by user-defined APIs. Therefore, they will not
-     * show up in the generated discovery doc. This field should only be used
-     * to define system APIs in ESF.
-     * 
- */ - public com.google.protobuf.Type.Builder addSystemTypesBuilder() { - return getSystemTypesFieldBuilder().addBuilder( - com.google.protobuf.Type.getDefaultInstance()); - } - /** - * repeated .google.protobuf.Type system_types = 102; - * - *
-     * A list of all proto message types included in this API service.
-     * It serves similar purpose as [google.api.Service.types], except that
-     * these types are not needed by user-defined APIs. Therefore, they will not
-     * show up in the generated discovery doc. This field should only be used
-     * to define system APIs in ESF.
-     * 
- */ - public com.google.protobuf.Type.Builder addSystemTypesBuilder( - int index) { - return getSystemTypesFieldBuilder().addBuilder( - index, com.google.protobuf.Type.getDefaultInstance()); - } - /** - * repeated .google.protobuf.Type system_types = 102; - * - *
-     * A list of all proto message types included in this API service.
-     * It serves similar purpose as [google.api.Service.types], except that
-     * these types are not needed by user-defined APIs. Therefore, they will not
-     * show up in the generated discovery doc. This field should only be used
-     * to define system APIs in ESF.
-     * 
- */ - public java.util.List - getSystemTypesBuilderList() { - return getSystemTypesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Type, com.google.protobuf.Type.Builder, com.google.protobuf.TypeOrBuilder> - getSystemTypesFieldBuilder() { - if (systemTypesBuilder_ == null) { - systemTypesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Type, com.google.protobuf.Type.Builder, com.google.protobuf.TypeOrBuilder>( - systemTypes_, - ((bitField0_ & 0x00002000) == 0x00002000), - getParentForChildren(), - isClean()); - systemTypes_ = null; - } - return systemTypesBuilder_; - } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - - // @@protoc_insertion_point(builder_scope:google.api.Service) - } - - // @@protoc_insertion_point(class_scope:google.api.Service) - private static final com.google.api.Service DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.api.Service(); - } - - public static com.google.api.Service getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public Service parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new Service(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public com.google.api.Service getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/ServiceOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/api/ServiceOrBuilder.java deleted file mode 100644 index f3a729e886a7..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/ServiceOrBuilder.java +++ /dev/null @@ -1,530 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/api/service.proto - -package com.google.api; - -public interface ServiceOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.api.Service) - com.google.protobuf.MessageOrBuilder { - - /** - * optional .google.protobuf.UInt32Value config_version = 20; - * - *
-   * The version of the service configuration. The config version may
-   * influence interpretation of the configuration, for example
-   * determine defaults. This is documented together with applicable
-   * options. The current default for the config version itself is `1`.
-   * 
- */ - boolean hasConfigVersion(); - /** - * optional .google.protobuf.UInt32Value config_version = 20; - * - *
-   * The version of the service configuration. The config version may
-   * influence interpretation of the configuration, for example
-   * determine defaults. This is documented together with applicable
-   * options. The current default for the config version itself is `1`.
-   * 
- */ - com.google.protobuf.UInt32Value getConfigVersion(); - /** - * optional .google.protobuf.UInt32Value config_version = 20; - * - *
-   * The version of the service configuration. The config version may
-   * influence interpretation of the configuration, for example
-   * determine defaults. This is documented together with applicable
-   * options. The current default for the config version itself is `1`.
-   * 
- */ - com.google.protobuf.UInt32ValueOrBuilder getConfigVersionOrBuilder(); - - /** - * optional string name = 1; - * - *
-   * The DNS address at which this service is available,
-   * e.g. `calendar.googleapis.com`.
-   * 
- */ - java.lang.String getName(); - /** - * optional string name = 1; - * - *
-   * The DNS address at which this service is available,
-   * e.g. `calendar.googleapis.com`.
-   * 
- */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - * optional string title = 2; - * - *
-   * The product title associated with this service.
-   * 
- */ - java.lang.String getTitle(); - /** - * optional string title = 2; - * - *
-   * The product title associated with this service.
-   * 
- */ - com.google.protobuf.ByteString - getTitleBytes(); - - /** - * optional string producer_project_id = 22; - * - *
-   * The id of the Google developer project that owns the service.
-   * Members of this project can manage the service configuration,
-   * manage consumption of the service, etc.
-   * 
- */ - java.lang.String getProducerProjectId(); - /** - * optional string producer_project_id = 22; - * - *
-   * The id of the Google developer project that owns the service.
-   * Members of this project can manage the service configuration,
-   * manage consumption of the service, etc.
-   * 
- */ - com.google.protobuf.ByteString - getProducerProjectIdBytes(); - - /** - * repeated .google.protobuf.Api apis = 3; - * - *
-   * A list of API interfaces exported by this service. Only the `name` field
-   * of the [google.protobuf.Api][] needs to be provided by the configuration
-   * author, as the remaining fields will be derived from the IDL during the
-   * normalization process. It is an error to specify an API interface here
-   * which cannot be resolved against the associated IDL files.
-   * 
- */ - java.util.List - getApisList(); - /** - * repeated .google.protobuf.Api apis = 3; - * - *
-   * A list of API interfaces exported by this service. Only the `name` field
-   * of the [google.protobuf.Api][] needs to be provided by the configuration
-   * author, as the remaining fields will be derived from the IDL during the
-   * normalization process. It is an error to specify an API interface here
-   * which cannot be resolved against the associated IDL files.
-   * 
- */ - com.google.protobuf.Api getApis(int index); - /** - * repeated .google.protobuf.Api apis = 3; - * - *
-   * A list of API interfaces exported by this service. Only the `name` field
-   * of the [google.protobuf.Api][] needs to be provided by the configuration
-   * author, as the remaining fields will be derived from the IDL during the
-   * normalization process. It is an error to specify an API interface here
-   * which cannot be resolved against the associated IDL files.
-   * 
- */ - int getApisCount(); - /** - * repeated .google.protobuf.Api apis = 3; - * - *
-   * A list of API interfaces exported by this service. Only the `name` field
-   * of the [google.protobuf.Api][] needs to be provided by the configuration
-   * author, as the remaining fields will be derived from the IDL during the
-   * normalization process. It is an error to specify an API interface here
-   * which cannot be resolved against the associated IDL files.
-   * 
- */ - java.util.List - getApisOrBuilderList(); - /** - * repeated .google.protobuf.Api apis = 3; - * - *
-   * A list of API interfaces exported by this service. Only the `name` field
-   * of the [google.protobuf.Api][] needs to be provided by the configuration
-   * author, as the remaining fields will be derived from the IDL during the
-   * normalization process. It is an error to specify an API interface here
-   * which cannot be resolved against the associated IDL files.
-   * 
- */ - com.google.protobuf.ApiOrBuilder getApisOrBuilder( - int index); - - /** - * repeated .google.protobuf.Type types = 4; - * - *
-   * A list of all proto message types included in this API service.
-   * Types referenced directly or indirectly by the `apis` are
-   * automatically included.  Messages which are not referenced but
-   * shall be included, such as types used by the `google.protobuf.Any` type,
-   * should be listed here by name. Example:
-   *     types:
-   *     - name: google.protobuf.Int32
-   * 
- */ - java.util.List - getTypesList(); - /** - * repeated .google.protobuf.Type types = 4; - * - *
-   * A list of all proto message types included in this API service.
-   * Types referenced directly or indirectly by the `apis` are
-   * automatically included.  Messages which are not referenced but
-   * shall be included, such as types used by the `google.protobuf.Any` type,
-   * should be listed here by name. Example:
-   *     types:
-   *     - name: google.protobuf.Int32
-   * 
- */ - com.google.protobuf.Type getTypes(int index); - /** - * repeated .google.protobuf.Type types = 4; - * - *
-   * A list of all proto message types included in this API service.
-   * Types referenced directly or indirectly by the `apis` are
-   * automatically included.  Messages which are not referenced but
-   * shall be included, such as types used by the `google.protobuf.Any` type,
-   * should be listed here by name. Example:
-   *     types:
-   *     - name: google.protobuf.Int32
-   * 
- */ - int getTypesCount(); - /** - * repeated .google.protobuf.Type types = 4; - * - *
-   * A list of all proto message types included in this API service.
-   * Types referenced directly or indirectly by the `apis` are
-   * automatically included.  Messages which are not referenced but
-   * shall be included, such as types used by the `google.protobuf.Any` type,
-   * should be listed here by name. Example:
-   *     types:
-   *     - name: google.protobuf.Int32
-   * 
- */ - java.util.List - getTypesOrBuilderList(); - /** - * repeated .google.protobuf.Type types = 4; - * - *
-   * A list of all proto message types included in this API service.
-   * Types referenced directly or indirectly by the `apis` are
-   * automatically included.  Messages which are not referenced but
-   * shall be included, such as types used by the `google.protobuf.Any` type,
-   * should be listed here by name. Example:
-   *     types:
-   *     - name: google.protobuf.Int32
-   * 
- */ - com.google.protobuf.TypeOrBuilder getTypesOrBuilder( - int index); - - /** - * repeated .google.protobuf.Enum enums = 5; - * - *
-   * A list of all enum types included in this API service.  Enums
-   * referenced directly or indirectly by the `apis` are automatically
-   * included.  Enums which are not referenced but shall be included
-   * should be listed here by name. Example:
-   *     enums:
-   *     - name: google.someapi.v1.SomeEnum
-   * 
- */ - java.util.List - getEnumsList(); - /** - * repeated .google.protobuf.Enum enums = 5; - * - *
-   * A list of all enum types included in this API service.  Enums
-   * referenced directly or indirectly by the `apis` are automatically
-   * included.  Enums which are not referenced but shall be included
-   * should be listed here by name. Example:
-   *     enums:
-   *     - name: google.someapi.v1.SomeEnum
-   * 
- */ - com.google.protobuf.Enum getEnums(int index); - /** - * repeated .google.protobuf.Enum enums = 5; - * - *
-   * A list of all enum types included in this API service.  Enums
-   * referenced directly or indirectly by the `apis` are automatically
-   * included.  Enums which are not referenced but shall be included
-   * should be listed here by name. Example:
-   *     enums:
-   *     - name: google.someapi.v1.SomeEnum
-   * 
- */ - int getEnumsCount(); - /** - * repeated .google.protobuf.Enum enums = 5; - * - *
-   * A list of all enum types included in this API service.  Enums
-   * referenced directly or indirectly by the `apis` are automatically
-   * included.  Enums which are not referenced but shall be included
-   * should be listed here by name. Example:
-   *     enums:
-   *     - name: google.someapi.v1.SomeEnum
-   * 
- */ - java.util.List - getEnumsOrBuilderList(); - /** - * repeated .google.protobuf.Enum enums = 5; - * - *
-   * A list of all enum types included in this API service.  Enums
-   * referenced directly or indirectly by the `apis` are automatically
-   * included.  Enums which are not referenced but shall be included
-   * should be listed here by name. Example:
-   *     enums:
-   *     - name: google.someapi.v1.SomeEnum
-   * 
- */ - com.google.protobuf.EnumOrBuilder getEnumsOrBuilder( - int index); - - /** - * optional .google.api.Documentation documentation = 6; - * - *
-   * Additional API documentation.
-   * 
- */ - boolean hasDocumentation(); - /** - * optional .google.api.Documentation documentation = 6; - * - *
-   * Additional API documentation.
-   * 
- */ - com.google.api.Documentation getDocumentation(); - /** - * optional .google.api.Documentation documentation = 6; - * - *
-   * Additional API documentation.
-   * 
- */ - com.google.api.DocumentationOrBuilder getDocumentationOrBuilder(); - - /** - * optional .google.api.Visibility visibility = 7; - * - *
-   * API visibility configuration.
-   * 
- */ - boolean hasVisibility(); - /** - * optional .google.api.Visibility visibility = 7; - * - *
-   * API visibility configuration.
-   * 
- */ - com.google.api.Visibility getVisibility(); - /** - * optional .google.api.Visibility visibility = 7; - * - *
-   * API visibility configuration.
-   * 
- */ - com.google.api.VisibilityOrBuilder getVisibilityOrBuilder(); - - /** - * optional .google.api.Http http = 9; - * - *
-   * HTTP configuration.
-   * 
- */ - boolean hasHttp(); - /** - * optional .google.api.Http http = 9; - * - *
-   * HTTP configuration.
-   * 
- */ - com.google.api.Http getHttp(); - /** - * optional .google.api.Http http = 9; - * - *
-   * HTTP configuration.
-   * 
- */ - com.google.api.HttpOrBuilder getHttpOrBuilder(); - - /** - * optional .google.api.Context context = 12; - * - *
-   * Context configuration.
-   * 
- */ - boolean hasContext(); - /** - * optional .google.api.Context context = 12; - * - *
-   * Context configuration.
-   * 
- */ - com.google.api.Context getContext(); - /** - * optional .google.api.Context context = 12; - * - *
-   * Context configuration.
-   * 
- */ - com.google.api.ContextOrBuilder getContextOrBuilder(); - - /** - * optional .google.api.CustomError custom_error = 16; - * - *
-   * Custom error configuration.
-   * 
- */ - boolean hasCustomError(); - /** - * optional .google.api.CustomError custom_error = 16; - * - *
-   * Custom error configuration.
-   * 
- */ - com.google.api.CustomError getCustomError(); - /** - * optional .google.api.CustomError custom_error = 16; - * - *
-   * Custom error configuration.
-   * 
- */ - com.google.api.CustomErrorOrBuilder getCustomErrorOrBuilder(); - - /** - * optional .google.protobuf.Any derived_data = 100; - * - *
-   * Service attributes derived by the configuration toolchain, for
-   * use at runtime.  Type is defined in
-   * `//google/internal/api/derived_service.proto`.
-   * 
- */ - boolean hasDerivedData(); - /** - * optional .google.protobuf.Any derived_data = 100; - * - *
-   * Service attributes derived by the configuration toolchain, for
-   * use at runtime.  Type is defined in
-   * `//google/internal/api/derived_service.proto`.
-   * 
- */ - com.google.protobuf.Any getDerivedData(); - /** - * optional .google.protobuf.Any derived_data = 100; - * - *
-   * Service attributes derived by the configuration toolchain, for
-   * use at runtime.  Type is defined in
-   * `//google/internal/api/derived_service.proto`.
-   * 
- */ - com.google.protobuf.AnyOrBuilder getDerivedDataOrBuilder(); - - /** - * repeated .google.protobuf.Type system_types = 102; - * - *
-   * A list of all proto message types included in this API service.
-   * It serves similar purpose as [google.api.Service.types], except that
-   * these types are not needed by user-defined APIs. Therefore, they will not
-   * show up in the generated discovery doc. This field should only be used
-   * to define system APIs in ESF.
-   * 
- */ - java.util.List - getSystemTypesList(); - /** - * repeated .google.protobuf.Type system_types = 102; - * - *
-   * A list of all proto message types included in this API service.
-   * It serves similar purpose as [google.api.Service.types], except that
-   * these types are not needed by user-defined APIs. Therefore, they will not
-   * show up in the generated discovery doc. This field should only be used
-   * to define system APIs in ESF.
-   * 
- */ - com.google.protobuf.Type getSystemTypes(int index); - /** - * repeated .google.protobuf.Type system_types = 102; - * - *
-   * A list of all proto message types included in this API service.
-   * It serves similar purpose as [google.api.Service.types], except that
-   * these types are not needed by user-defined APIs. Therefore, they will not
-   * show up in the generated discovery doc. This field should only be used
-   * to define system APIs in ESF.
-   * 
- */ - int getSystemTypesCount(); - /** - * repeated .google.protobuf.Type system_types = 102; - * - *
-   * A list of all proto message types included in this API service.
-   * It serves similar purpose as [google.api.Service.types], except that
-   * these types are not needed by user-defined APIs. Therefore, they will not
-   * show up in the generated discovery doc. This field should only be used
-   * to define system APIs in ESF.
-   * 
- */ - java.util.List - getSystemTypesOrBuilderList(); - /** - * repeated .google.protobuf.Type system_types = 102; - * - *
-   * A list of all proto message types included in this API service.
-   * It serves similar purpose as [google.api.Service.types], except that
-   * these types are not needed by user-defined APIs. Therefore, they will not
-   * show up in the generated discovery doc. This field should only be used
-   * to define system APIs in ESF.
-   * 
- */ - com.google.protobuf.TypeOrBuilder getSystemTypesOrBuilder( - int index); -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/ServiceProto.java b/gcloud-java-gax/generated/src/main/java/com/google/api/ServiceProto.java deleted file mode 100644 index fa6c564c7644..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/ServiceProto.java +++ /dev/null @@ -1,95 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/api/service.proto - -package com.google.api; - -public final class ServiceProto { - private ServiceProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - } - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_api_Service_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_api_Service_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\030google/api/service.proto\022\ngoogle.api\032\031" + - "google/protobuf/any.proto\032\031google/protob" + - "uf/api.proto\032\032google/protobuf/type.proto" + - "\032\036google/protobuf/wrappers.proto\032\034google" + - "/api/annotations.proto\032\030google/api/conte" + - "xt.proto\032\036google/api/documentation.proto" + - "\032\026google/api/error.proto\032\025google/api/htt" + - "p.proto\032\033google/api/visibility.proto\"\253\004\n" + - "\007Service\0224\n\016config_version\030\024 \001(\0132\034.googl" + - "e.protobuf.UInt32Value\022\014\n\004name\030\001 \001(\t\022\r\n\005", - "title\030\002 \001(\t\022\033\n\023producer_project_id\030\026 \001(\t" + - "\022\"\n\004apis\030\003 \003(\0132\024.google.protobuf.Api\022$\n\005" + - "types\030\004 \003(\0132\025.google.protobuf.Type\022$\n\005en" + - "ums\030\005 \003(\0132\025.google.protobuf.Enum\0220\n\rdocu" + - "mentation\030\006 \001(\0132\031.google.api.Documentati" + - "on\022*\n\nvisibility\030\007 \001(\0132\026.google.api.Visi" + - "bility\022\036\n\004http\030\t \001(\0132\020.google.api.Http\022$" + - "\n\007context\030\014 \001(\0132\023.google.api.Context\022-\n\014" + - "custom_error\030\020 \001(\0132\027.google.api.CustomEr" + - "ror\022@\n\014derived_data\030d \001(\0132\024.google.proto", - "buf.AnyB\024\372\322\344\223\002\016\022\014GOOGLE_TOOLS\022+\n\014system_" + - "types\030f \003(\0132\025.google.protobuf.TypeB \n\016co" + - "m.google.apiB\014ServiceProtoP\001b\006proto3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.protobuf.AnyProto.getDescriptor(), - com.google.protobuf.ApiProto.getDescriptor(), - com.google.protobuf.TypeProto.getDescriptor(), - com.google.protobuf.WrappersProto.getDescriptor(), - com.google.api.AnnotationsProto.getDescriptor(), - com.google.api.ContextProto.getDescriptor(), - com.google.api.DocumentationProto.getDescriptor(), - com.google.api.ErrorFormatProto.getDescriptor(), - com.google.api.HttpProto.getDescriptor(), - com.google.api.VisibilityProto.getDescriptor(), - }, assigner); - internal_static_google_api_Service_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_api_Service_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_api_Service_descriptor, - new java.lang.String[] { "ConfigVersion", "Name", "Title", "ProducerProjectId", "Apis", "Types", "Enums", "Documentation", "Visibility", "Http", "Context", "CustomError", "DerivedData", "SystemTypes", }); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(com.google.api.AnnotationsProto.fieldVisibility); - com.google.protobuf.Descriptors.FileDescriptor - .internalUpdateFileDescriptor(descriptor, registry); - com.google.protobuf.AnyProto.getDescriptor(); - com.google.protobuf.ApiProto.getDescriptor(); - com.google.protobuf.TypeProto.getDescriptor(); - com.google.protobuf.WrappersProto.getDescriptor(); - com.google.api.AnnotationsProto.getDescriptor(); - com.google.api.ContextProto.getDescriptor(); - com.google.api.DocumentationProto.getDescriptor(); - com.google.api.ErrorFormatProto.getDescriptor(); - com.google.api.HttpProto.getDescriptor(); - com.google.api.VisibilityProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/Visibility.java b/gcloud-java-gax/generated/src/main/java/com/google/api/Visibility.java deleted file mode 100644 index 2ef3f2b0442d..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/Visibility.java +++ /dev/null @@ -1,1370 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/api/visibility.proto - -package com.google.api; - -/** - * Protobuf type {@code google.api.Visibility} - * - *
- * `Visibility` defines restrictions for the visibility of service
- * elements.  Restrictions are specified using visibility labels
- * (e.g., TRUSTED_TESTER) that are elsewhere linked to users and projects.
- * User and projects can have access to more than one visibility label. The
- * effective visibility for multiple labels is the union of each label's
- * elements, plus any unrestricted elements. You must list any supported label
- * combinations in `label_combinations`.
- * If an element and its parents have no restrictions, visibility is
- * unconditionally granted.
- * Example:
- *     visibility:
- *       label_combinations:
- *       - GOOGLE_INTERNAL, TRUSTED_TESTER
- *       rules:
- *       - selector: google.calendar.Calendar.EnhancedSearch
- *         restriction: TRUSTED_TESTER
- *       - selector: google.calendar.Calendar.Delegate
- *         restriction: GOOGLE_INTERNAL
- * Here, all methods are publicly visible except for the restricted methods
- * EnhancedSearch and Delegate. In addition, since `label_combinations`
- * lists both GOOGLE_INTERNAL and TRUSTED_TESTER, users and projects can be
- * given access to a combined visibility with both EnhancedSearch and Delegate.
- * 
- */ -public final class Visibility extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.api.Visibility) - VisibilityOrBuilder { - // Use Visibility.newBuilder() to construct. - private Visibility(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Visibility() { - rules_ = java.util.Collections.emptyList(); - labelCombinations_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private Visibility( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - int mutable_bitField0_ = 0; - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!input.skipField(tag)) { - done = true; - } - break; - } - case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - rules_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - rules_.add(input.readMessage(com.google.api.VisibilityRule.parser(), extensionRegistry)); - break; - } - case 18: { - String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - labelCombinations_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - labelCombinations_.add(s); - break; - } - case 26: { - com.google.protobuf.BoolValue.Builder subBuilder = null; - if (enforceRuntimeVisibility_ != null) { - subBuilder = enforceRuntimeVisibility_.toBuilder(); - } - enforceRuntimeVisibility_ = input.readMessage(com.google.protobuf.BoolValue.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(enforceRuntimeVisibility_); - enforceRuntimeVisibility_ = subBuilder.buildPartial(); - } - - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - rules_ = java.util.Collections.unmodifiableList(rules_); - } - if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - labelCombinations_ = labelCombinations_.getUnmodifiableView(); - } - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.api.VisibilityProto.internal_static_google_api_Visibility_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.api.VisibilityProto.internal_static_google_api_Visibility_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.api.Visibility.class, com.google.api.Visibility.Builder.class); - } - - private int bitField0_; - public static final int RULES_FIELD_NUMBER = 1; - private java.util.List rules_; - /** - * repeated .google.api.VisibilityRule rules = 1; - * - *
-   * A list of visibility rules providing visibility configuration for
-   * individual API elements.
-   * 
- */ - public java.util.List getRulesList() { - return rules_; - } - /** - * repeated .google.api.VisibilityRule rules = 1; - * - *
-   * A list of visibility rules providing visibility configuration for
-   * individual API elements.
-   * 
- */ - public java.util.List - getRulesOrBuilderList() { - return rules_; - } - /** - * repeated .google.api.VisibilityRule rules = 1; - * - *
-   * A list of visibility rules providing visibility configuration for
-   * individual API elements.
-   * 
- */ - public int getRulesCount() { - return rules_.size(); - } - /** - * repeated .google.api.VisibilityRule rules = 1; - * - *
-   * A list of visibility rules providing visibility configuration for
-   * individual API elements.
-   * 
- */ - public com.google.api.VisibilityRule getRules(int index) { - return rules_.get(index); - } - /** - * repeated .google.api.VisibilityRule rules = 1; - * - *
-   * A list of visibility rules providing visibility configuration for
-   * individual API elements.
-   * 
- */ - public com.google.api.VisibilityRuleOrBuilder getRulesOrBuilder( - int index) { - return rules_.get(index); - } - - public static final int LABEL_COMBINATIONS_FIELD_NUMBER = 2; - private com.google.protobuf.LazyStringList labelCombinations_; - /** - * repeated string label_combinations = 2; - * - *
-   * Lists valid label combinations for this service in comma-delimited form.
-   * This lets users and projects see the union of these labels' elements.
-   * Removing a label combination can be a breaking change, as clients with
-   * access to the combination will now see non-restricted elements only.
-   * 
- */ - public com.google.protobuf.ProtocolStringList - getLabelCombinationsList() { - return labelCombinations_; - } - /** - * repeated string label_combinations = 2; - * - *
-   * Lists valid label combinations for this service in comma-delimited form.
-   * This lets users and projects see the union of these labels' elements.
-   * Removing a label combination can be a breaking change, as clients with
-   * access to the combination will now see non-restricted elements only.
-   * 
- */ - public int getLabelCombinationsCount() { - return labelCombinations_.size(); - } - /** - * repeated string label_combinations = 2; - * - *
-   * Lists valid label combinations for this service in comma-delimited form.
-   * This lets users and projects see the union of these labels' elements.
-   * Removing a label combination can be a breaking change, as clients with
-   * access to the combination will now see non-restricted elements only.
-   * 
- */ - public java.lang.String getLabelCombinations(int index) { - return labelCombinations_.get(index); - } - /** - * repeated string label_combinations = 2; - * - *
-   * Lists valid label combinations for this service in comma-delimited form.
-   * This lets users and projects see the union of these labels' elements.
-   * Removing a label combination can be a breaking change, as clients with
-   * access to the combination will now see non-restricted elements only.
-   * 
- */ - public com.google.protobuf.ByteString - getLabelCombinationsBytes(int index) { - return labelCombinations_.getByteString(index); - } - - public static final int ENFORCE_RUNTIME_VISIBILITY_FIELD_NUMBER = 3; - private com.google.protobuf.BoolValue enforceRuntimeVisibility_; - /** - * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; - * - *
-   * Controls whether visibility rules are enforced at runtime for requests to
-   * all APIs and methods.
-   * If true, requests without method visibility will receive a
-   * NOT_FOUND error, and any non-visible fields will be scrubbed from
-   * the response messages. The default is false.
-   * Note, the `enforce_runtime_visibility` specified in a visibility rule
-   * overrides this setting for the APIs or methods asscoiated with the rule.
-   * 
- */ - public boolean hasEnforceRuntimeVisibility() { - return enforceRuntimeVisibility_ != null; - } - /** - * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; - * - *
-   * Controls whether visibility rules are enforced at runtime for requests to
-   * all APIs and methods.
-   * If true, requests without method visibility will receive a
-   * NOT_FOUND error, and any non-visible fields will be scrubbed from
-   * the response messages. The default is false.
-   * Note, the `enforce_runtime_visibility` specified in a visibility rule
-   * overrides this setting for the APIs or methods asscoiated with the rule.
-   * 
- */ - public com.google.protobuf.BoolValue getEnforceRuntimeVisibility() { - return enforceRuntimeVisibility_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : enforceRuntimeVisibility_; - } - /** - * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; - * - *
-   * Controls whether visibility rules are enforced at runtime for requests to
-   * all APIs and methods.
-   * If true, requests without method visibility will receive a
-   * NOT_FOUND error, and any non-visible fields will be scrubbed from
-   * the response messages. The default is false.
-   * Note, the `enforce_runtime_visibility` specified in a visibility rule
-   * overrides this setting for the APIs or methods asscoiated with the rule.
-   * 
- */ - public com.google.protobuf.BoolValueOrBuilder getEnforceRuntimeVisibilityOrBuilder() { - return getEnforceRuntimeVisibility(); - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < rules_.size(); i++) { - output.writeMessage(1, rules_.get(i)); - } - for (int i = 0; i < labelCombinations_.size(); i++) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, labelCombinations_.getRaw(i)); - } - if (enforceRuntimeVisibility_ != null) { - output.writeMessage(3, getEnforceRuntimeVisibility()); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < rules_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, rules_.get(i)); - } - { - int dataSize = 0; - for (int i = 0; i < labelCombinations_.size(); i++) { - dataSize += computeStringSizeNoTag(labelCombinations_.getRaw(i)); - } - size += dataSize; - size += 1 * getLabelCombinationsList().size(); - } - if (enforceRuntimeVisibility_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getEnforceRuntimeVisibility()); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static com.google.api.Visibility parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.api.Visibility 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.api.Visibility parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.api.Visibility parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.api.Visibility parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.api.Visibility parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.api.Visibility parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.api.Visibility parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.api.Visibility parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.api.Visibility parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.api.Visibility prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - 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; - } - /** - * Protobuf type {@code google.api.Visibility} - * - *
-   * `Visibility` defines restrictions for the visibility of service
-   * elements.  Restrictions are specified using visibility labels
-   * (e.g., TRUSTED_TESTER) that are elsewhere linked to users and projects.
-   * User and projects can have access to more than one visibility label. The
-   * effective visibility for multiple labels is the union of each label's
-   * elements, plus any unrestricted elements. You must list any supported label
-   * combinations in `label_combinations`.
-   * If an element and its parents have no restrictions, visibility is
-   * unconditionally granted.
-   * Example:
-   *     visibility:
-   *       label_combinations:
-   *       - GOOGLE_INTERNAL, TRUSTED_TESTER
-   *       rules:
-   *       - selector: google.calendar.Calendar.EnhancedSearch
-   *         restriction: TRUSTED_TESTER
-   *       - selector: google.calendar.Calendar.Delegate
-   *         restriction: GOOGLE_INTERNAL
-   * Here, all methods are publicly visible except for the restricted methods
-   * EnhancedSearch and Delegate. In addition, since `label_combinations`
-   * lists both GOOGLE_INTERNAL and TRUSTED_TESTER, users and projects can be
-   * given access to a combined visibility with both EnhancedSearch and Delegate.
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.api.Visibility) - com.google.api.VisibilityOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.api.VisibilityProto.internal_static_google_api_Visibility_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.api.VisibilityProto.internal_static_google_api_Visibility_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.api.Visibility.class, com.google.api.Visibility.Builder.class); - } - - // Construct using com.google.api.Visibility.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getRulesFieldBuilder(); - } - } - public Builder clear() { - super.clear(); - if (rulesBuilder_ == null) { - rules_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - rulesBuilder_.clear(); - } - labelCombinations_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - if (enforceRuntimeVisibilityBuilder_ == null) { - enforceRuntimeVisibility_ = null; - } else { - enforceRuntimeVisibility_ = null; - enforceRuntimeVisibilityBuilder_ = null; - } - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.api.VisibilityProto.internal_static_google_api_Visibility_descriptor; - } - - public com.google.api.Visibility getDefaultInstanceForType() { - return com.google.api.Visibility.getDefaultInstance(); - } - - public com.google.api.Visibility build() { - com.google.api.Visibility result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.api.Visibility buildPartial() { - com.google.api.Visibility result = new com.google.api.Visibility(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (rulesBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - rules_ = java.util.Collections.unmodifiableList(rules_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.rules_ = rules_; - } else { - result.rules_ = rulesBuilder_.build(); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - labelCombinations_ = labelCombinations_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.labelCombinations_ = labelCombinations_; - if (enforceRuntimeVisibilityBuilder_ == null) { - result.enforceRuntimeVisibility_ = enforceRuntimeVisibility_; - } else { - result.enforceRuntimeVisibility_ = enforceRuntimeVisibilityBuilder_.build(); - } - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.api.Visibility) { - return mergeFrom((com.google.api.Visibility)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.api.Visibility other) { - if (other == com.google.api.Visibility.getDefaultInstance()) return this; - if (rulesBuilder_ == null) { - if (!other.rules_.isEmpty()) { - if (rules_.isEmpty()) { - rules_ = other.rules_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureRulesIsMutable(); - rules_.addAll(other.rules_); - } - onChanged(); - } - } else { - if (!other.rules_.isEmpty()) { - if (rulesBuilder_.isEmpty()) { - rulesBuilder_.dispose(); - rulesBuilder_ = null; - rules_ = other.rules_; - bitField0_ = (bitField0_ & ~0x00000001); - rulesBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getRulesFieldBuilder() : null; - } else { - rulesBuilder_.addAllMessages(other.rules_); - } - } - } - if (!other.labelCombinations_.isEmpty()) { - if (labelCombinations_.isEmpty()) { - labelCombinations_ = other.labelCombinations_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureLabelCombinationsIsMutable(); - labelCombinations_.addAll(other.labelCombinations_); - } - onChanged(); - } - if (other.hasEnforceRuntimeVisibility()) { - mergeEnforceRuntimeVisibility(other.getEnforceRuntimeVisibility()); - } - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.api.Visibility parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.api.Visibility) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List rules_ = - java.util.Collections.emptyList(); - private void ensureRulesIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { - rules_ = new java.util.ArrayList(rules_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.api.VisibilityRule, com.google.api.VisibilityRule.Builder, com.google.api.VisibilityRuleOrBuilder> rulesBuilder_; - - /** - * repeated .google.api.VisibilityRule rules = 1; - * - *
-     * A list of visibility rules providing visibility configuration for
-     * individual API elements.
-     * 
- */ - public java.util.List getRulesList() { - if (rulesBuilder_ == null) { - return java.util.Collections.unmodifiableList(rules_); - } else { - return rulesBuilder_.getMessageList(); - } - } - /** - * repeated .google.api.VisibilityRule rules = 1; - * - *
-     * A list of visibility rules providing visibility configuration for
-     * individual API elements.
-     * 
- */ - public int getRulesCount() { - if (rulesBuilder_ == null) { - return rules_.size(); - } else { - return rulesBuilder_.getCount(); - } - } - /** - * repeated .google.api.VisibilityRule rules = 1; - * - *
-     * A list of visibility rules providing visibility configuration for
-     * individual API elements.
-     * 
- */ - public com.google.api.VisibilityRule getRules(int index) { - if (rulesBuilder_ == null) { - return rules_.get(index); - } else { - return rulesBuilder_.getMessage(index); - } - } - /** - * repeated .google.api.VisibilityRule rules = 1; - * - *
-     * A list of visibility rules providing visibility configuration for
-     * individual API elements.
-     * 
- */ - public Builder setRules( - int index, com.google.api.VisibilityRule value) { - if (rulesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRulesIsMutable(); - rules_.set(index, value); - onChanged(); - } else { - rulesBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .google.api.VisibilityRule rules = 1; - * - *
-     * A list of visibility rules providing visibility configuration for
-     * individual API elements.
-     * 
- */ - public Builder setRules( - int index, com.google.api.VisibilityRule.Builder builderForValue) { - if (rulesBuilder_ == null) { - ensureRulesIsMutable(); - rules_.set(index, builderForValue.build()); - onChanged(); - } else { - rulesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.api.VisibilityRule rules = 1; - * - *
-     * A list of visibility rules providing visibility configuration for
-     * individual API elements.
-     * 
- */ - public Builder addRules(com.google.api.VisibilityRule value) { - if (rulesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRulesIsMutable(); - rules_.add(value); - onChanged(); - } else { - rulesBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .google.api.VisibilityRule rules = 1; - * - *
-     * A list of visibility rules providing visibility configuration for
-     * individual API elements.
-     * 
- */ - public Builder addRules( - int index, com.google.api.VisibilityRule value) { - if (rulesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRulesIsMutable(); - rules_.add(index, value); - onChanged(); - } else { - rulesBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .google.api.VisibilityRule rules = 1; - * - *
-     * A list of visibility rules providing visibility configuration for
-     * individual API elements.
-     * 
- */ - public Builder addRules( - com.google.api.VisibilityRule.Builder builderForValue) { - if (rulesBuilder_ == null) { - ensureRulesIsMutable(); - rules_.add(builderForValue.build()); - onChanged(); - } else { - rulesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .google.api.VisibilityRule rules = 1; - * - *
-     * A list of visibility rules providing visibility configuration for
-     * individual API elements.
-     * 
- */ - public Builder addRules( - int index, com.google.api.VisibilityRule.Builder builderForValue) { - if (rulesBuilder_ == null) { - ensureRulesIsMutable(); - rules_.add(index, builderForValue.build()); - onChanged(); - } else { - rulesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.api.VisibilityRule rules = 1; - * - *
-     * A list of visibility rules providing visibility configuration for
-     * individual API elements.
-     * 
- */ - public Builder addAllRules( - java.lang.Iterable values) { - if (rulesBuilder_ == null) { - ensureRulesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, rules_); - onChanged(); - } else { - rulesBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .google.api.VisibilityRule rules = 1; - * - *
-     * A list of visibility rules providing visibility configuration for
-     * individual API elements.
-     * 
- */ - public Builder clearRules() { - if (rulesBuilder_ == null) { - rules_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - rulesBuilder_.clear(); - } - return this; - } - /** - * repeated .google.api.VisibilityRule rules = 1; - * - *
-     * A list of visibility rules providing visibility configuration for
-     * individual API elements.
-     * 
- */ - public Builder removeRules(int index) { - if (rulesBuilder_ == null) { - ensureRulesIsMutable(); - rules_.remove(index); - onChanged(); - } else { - rulesBuilder_.remove(index); - } - return this; - } - /** - * repeated .google.api.VisibilityRule rules = 1; - * - *
-     * A list of visibility rules providing visibility configuration for
-     * individual API elements.
-     * 
- */ - public com.google.api.VisibilityRule.Builder getRulesBuilder( - int index) { - return getRulesFieldBuilder().getBuilder(index); - } - /** - * repeated .google.api.VisibilityRule rules = 1; - * - *
-     * A list of visibility rules providing visibility configuration for
-     * individual API elements.
-     * 
- */ - public com.google.api.VisibilityRuleOrBuilder getRulesOrBuilder( - int index) { - if (rulesBuilder_ == null) { - return rules_.get(index); } else { - return rulesBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .google.api.VisibilityRule rules = 1; - * - *
-     * A list of visibility rules providing visibility configuration for
-     * individual API elements.
-     * 
- */ - public java.util.List - getRulesOrBuilderList() { - if (rulesBuilder_ != null) { - return rulesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(rules_); - } - } - /** - * repeated .google.api.VisibilityRule rules = 1; - * - *
-     * A list of visibility rules providing visibility configuration for
-     * individual API elements.
-     * 
- */ - public com.google.api.VisibilityRule.Builder addRulesBuilder() { - return getRulesFieldBuilder().addBuilder( - com.google.api.VisibilityRule.getDefaultInstance()); - } - /** - * repeated .google.api.VisibilityRule rules = 1; - * - *
-     * A list of visibility rules providing visibility configuration for
-     * individual API elements.
-     * 
- */ - public com.google.api.VisibilityRule.Builder addRulesBuilder( - int index) { - return getRulesFieldBuilder().addBuilder( - index, com.google.api.VisibilityRule.getDefaultInstance()); - } - /** - * repeated .google.api.VisibilityRule rules = 1; - * - *
-     * A list of visibility rules providing visibility configuration for
-     * individual API elements.
-     * 
- */ - public java.util.List - getRulesBuilderList() { - return getRulesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - com.google.api.VisibilityRule, com.google.api.VisibilityRule.Builder, com.google.api.VisibilityRuleOrBuilder> - getRulesFieldBuilder() { - if (rulesBuilder_ == null) { - rulesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - com.google.api.VisibilityRule, com.google.api.VisibilityRule.Builder, com.google.api.VisibilityRuleOrBuilder>( - rules_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); - rules_ = null; - } - return rulesBuilder_; - } - - private com.google.protobuf.LazyStringList labelCombinations_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureLabelCombinationsIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { - labelCombinations_ = new com.google.protobuf.LazyStringArrayList(labelCombinations_); - bitField0_ |= 0x00000002; - } - } - /** - * repeated string label_combinations = 2; - * - *
-     * Lists valid label combinations for this service in comma-delimited form.
-     * This lets users and projects see the union of these labels' elements.
-     * Removing a label combination can be a breaking change, as clients with
-     * access to the combination will now see non-restricted elements only.
-     * 
- */ - public com.google.protobuf.ProtocolStringList - getLabelCombinationsList() { - return labelCombinations_.getUnmodifiableView(); - } - /** - * repeated string label_combinations = 2; - * - *
-     * Lists valid label combinations for this service in comma-delimited form.
-     * This lets users and projects see the union of these labels' elements.
-     * Removing a label combination can be a breaking change, as clients with
-     * access to the combination will now see non-restricted elements only.
-     * 
- */ - public int getLabelCombinationsCount() { - return labelCombinations_.size(); - } - /** - * repeated string label_combinations = 2; - * - *
-     * Lists valid label combinations for this service in comma-delimited form.
-     * This lets users and projects see the union of these labels' elements.
-     * Removing a label combination can be a breaking change, as clients with
-     * access to the combination will now see non-restricted elements only.
-     * 
- */ - public java.lang.String getLabelCombinations(int index) { - return labelCombinations_.get(index); - } - /** - * repeated string label_combinations = 2; - * - *
-     * Lists valid label combinations for this service in comma-delimited form.
-     * This lets users and projects see the union of these labels' elements.
-     * Removing a label combination can be a breaking change, as clients with
-     * access to the combination will now see non-restricted elements only.
-     * 
- */ - public com.google.protobuf.ByteString - getLabelCombinationsBytes(int index) { - return labelCombinations_.getByteString(index); - } - /** - * repeated string label_combinations = 2; - * - *
-     * Lists valid label combinations for this service in comma-delimited form.
-     * This lets users and projects see the union of these labels' elements.
-     * Removing a label combination can be a breaking change, as clients with
-     * access to the combination will now see non-restricted elements only.
-     * 
- */ - public Builder setLabelCombinations( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureLabelCombinationsIsMutable(); - labelCombinations_.set(index, value); - onChanged(); - return this; - } - /** - * repeated string label_combinations = 2; - * - *
-     * Lists valid label combinations for this service in comma-delimited form.
-     * This lets users and projects see the union of these labels' elements.
-     * Removing a label combination can be a breaking change, as clients with
-     * access to the combination will now see non-restricted elements only.
-     * 
- */ - public Builder addLabelCombinations( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureLabelCombinationsIsMutable(); - labelCombinations_.add(value); - onChanged(); - return this; - } - /** - * repeated string label_combinations = 2; - * - *
-     * Lists valid label combinations for this service in comma-delimited form.
-     * This lets users and projects see the union of these labels' elements.
-     * Removing a label combination can be a breaking change, as clients with
-     * access to the combination will now see non-restricted elements only.
-     * 
- */ - public Builder addAllLabelCombinations( - java.lang.Iterable values) { - ensureLabelCombinationsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, labelCombinations_); - onChanged(); - return this; - } - /** - * repeated string label_combinations = 2; - * - *
-     * Lists valid label combinations for this service in comma-delimited form.
-     * This lets users and projects see the union of these labels' elements.
-     * Removing a label combination can be a breaking change, as clients with
-     * access to the combination will now see non-restricted elements only.
-     * 
- */ - public Builder clearLabelCombinations() { - labelCombinations_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * repeated string label_combinations = 2; - * - *
-     * Lists valid label combinations for this service in comma-delimited form.
-     * This lets users and projects see the union of these labels' elements.
-     * Removing a label combination can be a breaking change, as clients with
-     * access to the combination will now see non-restricted elements only.
-     * 
- */ - public Builder addLabelCombinationsBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureLabelCombinationsIsMutable(); - labelCombinations_.add(value); - onChanged(); - return this; - } - - private com.google.protobuf.BoolValue enforceRuntimeVisibility_ = null; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> enforceRuntimeVisibilityBuilder_; - /** - * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; - * - *
-     * Controls whether visibility rules are enforced at runtime for requests to
-     * all APIs and methods.
-     * If true, requests without method visibility will receive a
-     * NOT_FOUND error, and any non-visible fields will be scrubbed from
-     * the response messages. The default is false.
-     * Note, the `enforce_runtime_visibility` specified in a visibility rule
-     * overrides this setting for the APIs or methods asscoiated with the rule.
-     * 
- */ - public boolean hasEnforceRuntimeVisibility() { - return enforceRuntimeVisibilityBuilder_ != null || enforceRuntimeVisibility_ != null; - } - /** - * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; - * - *
-     * Controls whether visibility rules are enforced at runtime for requests to
-     * all APIs and methods.
-     * If true, requests without method visibility will receive a
-     * NOT_FOUND error, and any non-visible fields will be scrubbed from
-     * the response messages. The default is false.
-     * Note, the `enforce_runtime_visibility` specified in a visibility rule
-     * overrides this setting for the APIs or methods asscoiated with the rule.
-     * 
- */ - public com.google.protobuf.BoolValue getEnforceRuntimeVisibility() { - if (enforceRuntimeVisibilityBuilder_ == null) { - return enforceRuntimeVisibility_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : enforceRuntimeVisibility_; - } else { - return enforceRuntimeVisibilityBuilder_.getMessage(); - } - } - /** - * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; - * - *
-     * Controls whether visibility rules are enforced at runtime for requests to
-     * all APIs and methods.
-     * If true, requests without method visibility will receive a
-     * NOT_FOUND error, and any non-visible fields will be scrubbed from
-     * the response messages. The default is false.
-     * Note, the `enforce_runtime_visibility` specified in a visibility rule
-     * overrides this setting for the APIs or methods asscoiated with the rule.
-     * 
- */ - public Builder setEnforceRuntimeVisibility(com.google.protobuf.BoolValue value) { - if (enforceRuntimeVisibilityBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - enforceRuntimeVisibility_ = value; - onChanged(); - } else { - enforceRuntimeVisibilityBuilder_.setMessage(value); - } - - return this; - } - /** - * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; - * - *
-     * Controls whether visibility rules are enforced at runtime for requests to
-     * all APIs and methods.
-     * If true, requests without method visibility will receive a
-     * NOT_FOUND error, and any non-visible fields will be scrubbed from
-     * the response messages. The default is false.
-     * Note, the `enforce_runtime_visibility` specified in a visibility rule
-     * overrides this setting for the APIs or methods asscoiated with the rule.
-     * 
- */ - public Builder setEnforceRuntimeVisibility( - com.google.protobuf.BoolValue.Builder builderForValue) { - if (enforceRuntimeVisibilityBuilder_ == null) { - enforceRuntimeVisibility_ = builderForValue.build(); - onChanged(); - } else { - enforceRuntimeVisibilityBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; - * - *
-     * Controls whether visibility rules are enforced at runtime for requests to
-     * all APIs and methods.
-     * If true, requests without method visibility will receive a
-     * NOT_FOUND error, and any non-visible fields will be scrubbed from
-     * the response messages. The default is false.
-     * Note, the `enforce_runtime_visibility` specified in a visibility rule
-     * overrides this setting for the APIs or methods asscoiated with the rule.
-     * 
- */ - public Builder mergeEnforceRuntimeVisibility(com.google.protobuf.BoolValue value) { - if (enforceRuntimeVisibilityBuilder_ == null) { - if (enforceRuntimeVisibility_ != null) { - enforceRuntimeVisibility_ = - com.google.protobuf.BoolValue.newBuilder(enforceRuntimeVisibility_).mergeFrom(value).buildPartial(); - } else { - enforceRuntimeVisibility_ = value; - } - onChanged(); - } else { - enforceRuntimeVisibilityBuilder_.mergeFrom(value); - } - - return this; - } - /** - * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; - * - *
-     * Controls whether visibility rules are enforced at runtime for requests to
-     * all APIs and methods.
-     * If true, requests without method visibility will receive a
-     * NOT_FOUND error, and any non-visible fields will be scrubbed from
-     * the response messages. The default is false.
-     * Note, the `enforce_runtime_visibility` specified in a visibility rule
-     * overrides this setting for the APIs or methods asscoiated with the rule.
-     * 
- */ - public Builder clearEnforceRuntimeVisibility() { - if (enforceRuntimeVisibilityBuilder_ == null) { - enforceRuntimeVisibility_ = null; - onChanged(); - } else { - enforceRuntimeVisibility_ = null; - enforceRuntimeVisibilityBuilder_ = null; - } - - return this; - } - /** - * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; - * - *
-     * Controls whether visibility rules are enforced at runtime for requests to
-     * all APIs and methods.
-     * If true, requests without method visibility will receive a
-     * NOT_FOUND error, and any non-visible fields will be scrubbed from
-     * the response messages. The default is false.
-     * Note, the `enforce_runtime_visibility` specified in a visibility rule
-     * overrides this setting for the APIs or methods asscoiated with the rule.
-     * 
- */ - public com.google.protobuf.BoolValue.Builder getEnforceRuntimeVisibilityBuilder() { - - onChanged(); - return getEnforceRuntimeVisibilityFieldBuilder().getBuilder(); - } - /** - * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; - * - *
-     * Controls whether visibility rules are enforced at runtime for requests to
-     * all APIs and methods.
-     * If true, requests without method visibility will receive a
-     * NOT_FOUND error, and any non-visible fields will be scrubbed from
-     * the response messages. The default is false.
-     * Note, the `enforce_runtime_visibility` specified in a visibility rule
-     * overrides this setting for the APIs or methods asscoiated with the rule.
-     * 
- */ - public com.google.protobuf.BoolValueOrBuilder getEnforceRuntimeVisibilityOrBuilder() { - if (enforceRuntimeVisibilityBuilder_ != null) { - return enforceRuntimeVisibilityBuilder_.getMessageOrBuilder(); - } else { - return enforceRuntimeVisibility_ == null ? - com.google.protobuf.BoolValue.getDefaultInstance() : enforceRuntimeVisibility_; - } - } - /** - * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; - * - *
-     * Controls whether visibility rules are enforced at runtime for requests to
-     * all APIs and methods.
-     * If true, requests without method visibility will receive a
-     * NOT_FOUND error, and any non-visible fields will be scrubbed from
-     * the response messages. The default is false.
-     * Note, the `enforce_runtime_visibility` specified in a visibility rule
-     * overrides this setting for the APIs or methods asscoiated with the rule.
-     * 
- */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> - getEnforceRuntimeVisibilityFieldBuilder() { - if (enforceRuntimeVisibilityBuilder_ == null) { - enforceRuntimeVisibilityBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>( - getEnforceRuntimeVisibility(), - getParentForChildren(), - isClean()); - enforceRuntimeVisibility_ = null; - } - return enforceRuntimeVisibilityBuilder_; - } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - - // @@protoc_insertion_point(builder_scope:google.api.Visibility) - } - - // @@protoc_insertion_point(class_scope:google.api.Visibility) - private static final com.google.api.Visibility DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.api.Visibility(); - } - - public static com.google.api.Visibility getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public Visibility parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new Visibility(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public com.google.api.Visibility getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/VisibilityOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/api/VisibilityOrBuilder.java deleted file mode 100644 index 1c8cb2bca4b8..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/VisibilityOrBuilder.java +++ /dev/null @@ -1,148 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/api/visibility.proto - -package com.google.api; - -public interface VisibilityOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.api.Visibility) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated .google.api.VisibilityRule rules = 1; - * - *
-   * A list of visibility rules providing visibility configuration for
-   * individual API elements.
-   * 
- */ - java.util.List - getRulesList(); - /** - * repeated .google.api.VisibilityRule rules = 1; - * - *
-   * A list of visibility rules providing visibility configuration for
-   * individual API elements.
-   * 
- */ - com.google.api.VisibilityRule getRules(int index); - /** - * repeated .google.api.VisibilityRule rules = 1; - * - *
-   * A list of visibility rules providing visibility configuration for
-   * individual API elements.
-   * 
- */ - int getRulesCount(); - /** - * repeated .google.api.VisibilityRule rules = 1; - * - *
-   * A list of visibility rules providing visibility configuration for
-   * individual API elements.
-   * 
- */ - java.util.List - getRulesOrBuilderList(); - /** - * repeated .google.api.VisibilityRule rules = 1; - * - *
-   * A list of visibility rules providing visibility configuration for
-   * individual API elements.
-   * 
- */ - com.google.api.VisibilityRuleOrBuilder getRulesOrBuilder( - int index); - - /** - * repeated string label_combinations = 2; - * - *
-   * Lists valid label combinations for this service in comma-delimited form.
-   * This lets users and projects see the union of these labels' elements.
-   * Removing a label combination can be a breaking change, as clients with
-   * access to the combination will now see non-restricted elements only.
-   * 
- */ - com.google.protobuf.ProtocolStringList - getLabelCombinationsList(); - /** - * repeated string label_combinations = 2; - * - *
-   * Lists valid label combinations for this service in comma-delimited form.
-   * This lets users and projects see the union of these labels' elements.
-   * Removing a label combination can be a breaking change, as clients with
-   * access to the combination will now see non-restricted elements only.
-   * 
- */ - int getLabelCombinationsCount(); - /** - * repeated string label_combinations = 2; - * - *
-   * Lists valid label combinations for this service in comma-delimited form.
-   * This lets users and projects see the union of these labels' elements.
-   * Removing a label combination can be a breaking change, as clients with
-   * access to the combination will now see non-restricted elements only.
-   * 
- */ - java.lang.String getLabelCombinations(int index); - /** - * repeated string label_combinations = 2; - * - *
-   * Lists valid label combinations for this service in comma-delimited form.
-   * This lets users and projects see the union of these labels' elements.
-   * Removing a label combination can be a breaking change, as clients with
-   * access to the combination will now see non-restricted elements only.
-   * 
- */ - com.google.protobuf.ByteString - getLabelCombinationsBytes(int index); - - /** - * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; - * - *
-   * Controls whether visibility rules are enforced at runtime for requests to
-   * all APIs and methods.
-   * If true, requests without method visibility will receive a
-   * NOT_FOUND error, and any non-visible fields will be scrubbed from
-   * the response messages. The default is false.
-   * Note, the `enforce_runtime_visibility` specified in a visibility rule
-   * overrides this setting for the APIs or methods asscoiated with the rule.
-   * 
- */ - boolean hasEnforceRuntimeVisibility(); - /** - * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; - * - *
-   * Controls whether visibility rules are enforced at runtime for requests to
-   * all APIs and methods.
-   * If true, requests without method visibility will receive a
-   * NOT_FOUND error, and any non-visible fields will be scrubbed from
-   * the response messages. The default is false.
-   * Note, the `enforce_runtime_visibility` specified in a visibility rule
-   * overrides this setting for the APIs or methods asscoiated with the rule.
-   * 
- */ - com.google.protobuf.BoolValue getEnforceRuntimeVisibility(); - /** - * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; - * - *
-   * Controls whether visibility rules are enforced at runtime for requests to
-   * all APIs and methods.
-   * If true, requests without method visibility will receive a
-   * NOT_FOUND error, and any non-visible fields will be scrubbed from
-   * the response messages. The default is false.
-   * Note, the `enforce_runtime_visibility` specified in a visibility rule
-   * overrides this setting for the APIs or methods asscoiated with the rule.
-   * 
- */ - com.google.protobuf.BoolValueOrBuilder getEnforceRuntimeVisibilityOrBuilder(); -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/VisibilityProto.java b/gcloud-java-gax/generated/src/main/java/com/google/api/VisibilityProto.java deleted file mode 100644 index 75f797d990e2..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/VisibilityProto.java +++ /dev/null @@ -1,70 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/api/visibility.proto - -package com.google.api; - -public final class VisibilityProto { - private VisibilityProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - } - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_api_Visibility_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_api_Visibility_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_api_VisibilityRule_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_api_VisibilityRule_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\033google/api/visibility.proto\022\ngoogle.ap" + - "i\032\036google/protobuf/wrappers.proto\"\223\001\n\nVi" + - "sibility\022)\n\005rules\030\001 \003(\0132\032.google.api.Vis" + - "ibilityRule\022\032\n\022label_combinations\030\002 \003(\t\022" + - ">\n\032enforce_runtime_visibility\030\003 \001(\0132\032.go" + - "ogle.protobuf.BoolValue\"w\n\016VisibilityRul" + - "e\022\020\n\010selector\030\001 \001(\t\022\023\n\013restriction\030\002 \001(\t" + - "\022>\n\032enforce_runtime_visibility\030\003 \001(\0132\032.g" + - "oogle.protobuf.BoolValueB&\n\016com.google.a" + - "piB\017VisibilityProtoP\001\370\001\001b\006proto3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.protobuf.WrappersProto.getDescriptor(), - }, assigner); - internal_static_google_api_Visibility_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_api_Visibility_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_api_Visibility_descriptor, - new java.lang.String[] { "Rules", "LabelCombinations", "EnforceRuntimeVisibility", }); - internal_static_google_api_VisibilityRule_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_api_VisibilityRule_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_api_VisibilityRule_descriptor, - new java.lang.String[] { "Selector", "Restriction", "EnforceRuntimeVisibility", }); - com.google.protobuf.WrappersProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/VisibilityRule.java b/gcloud-java-gax/generated/src/main/java/com/google/api/VisibilityRule.java deleted file mode 100644 index 1fcc76384b70..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/VisibilityRule.java +++ /dev/null @@ -1,998 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/api/visibility.proto - -package com.google.api; - -/** - * Protobuf type {@code google.api.VisibilityRule} - * - *
- * A visibility rule provides visibility configuration for an individual API
- * element.
- * 
- */ -public final class VisibilityRule extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.api.VisibilityRule) - VisibilityRuleOrBuilder { - // Use VisibilityRule.newBuilder() to construct. - private VisibilityRule(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private VisibilityRule() { - selector_ = ""; - restriction_ = ""; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private VisibilityRule( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - int mutable_bitField0_ = 0; - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!input.skipField(tag)) { - done = true; - } - break; - } - case 10: { - String s = input.readStringRequireUtf8(); - - selector_ = s; - break; - } - case 18: { - String s = input.readStringRequireUtf8(); - - restriction_ = s; - break; - } - case 26: { - com.google.protobuf.BoolValue.Builder subBuilder = null; - if (enforceRuntimeVisibility_ != null) { - subBuilder = enforceRuntimeVisibility_.toBuilder(); - } - enforceRuntimeVisibility_ = input.readMessage(com.google.protobuf.BoolValue.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(enforceRuntimeVisibility_); - enforceRuntimeVisibility_ = subBuilder.buildPartial(); - } - - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.api.VisibilityProto.internal_static_google_api_VisibilityRule_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.api.VisibilityProto.internal_static_google_api_VisibilityRule_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.api.VisibilityRule.class, com.google.api.VisibilityRule.Builder.class); - } - - public static final int SELECTOR_FIELD_NUMBER = 1; - private volatile java.lang.Object selector_; - /** - * optional string selector = 1; - * - *
-   * Selects methods, messages, fields, enums, etc. to which this rule applies.
-   * Refer to [selector][DocumentationRule.selector] for syntax details.
-   * 
- */ - public java.lang.String getSelector() { - java.lang.Object ref = selector_; - 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(); - selector_ = s; - return s; - } - } - /** - * optional string selector = 1; - * - *
-   * Selects methods, messages, fields, enums, etc. to which this rule applies.
-   * Refer to [selector][DocumentationRule.selector] for syntax details.
-   * 
- */ - public com.google.protobuf.ByteString - getSelectorBytes() { - java.lang.Object ref = selector_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - selector_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int RESTRICTION_FIELD_NUMBER = 2; - private volatile java.lang.Object restriction_; - /** - * optional string restriction = 2; - * - *
-   * Lists the visibility labels for this rule. Any of the listed labels grants
-   * visibility to the element.
-   * If a rule has multiple labels, removing one of the labels but not all of
-   * them can break clients.
-   * Example:
-   *     visibility:
-   *       rules:
-   *       - selector: google.calendar.Calendar.EnhancedSearch
-   *         restriction: GOOGLE_INTERNAL, TRUSTED_TESTER
-   * Removing GOOGLE_INTERNAL from this restriction will break clients that
-   * rely on this method and only had access to it through GOOGLE_INTERNAL.
-   * 
- */ - public java.lang.String getRestriction() { - java.lang.Object ref = restriction_; - 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(); - restriction_ = s; - return s; - } - } - /** - * optional string restriction = 2; - * - *
-   * Lists the visibility labels for this rule. Any of the listed labels grants
-   * visibility to the element.
-   * If a rule has multiple labels, removing one of the labels but not all of
-   * them can break clients.
-   * Example:
-   *     visibility:
-   *       rules:
-   *       - selector: google.calendar.Calendar.EnhancedSearch
-   *         restriction: GOOGLE_INTERNAL, TRUSTED_TESTER
-   * Removing GOOGLE_INTERNAL from this restriction will break clients that
-   * rely on this method and only had access to it through GOOGLE_INTERNAL.
-   * 
- */ - public com.google.protobuf.ByteString - getRestrictionBytes() { - java.lang.Object ref = restriction_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - restriction_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ENFORCE_RUNTIME_VISIBILITY_FIELD_NUMBER = 3; - private com.google.protobuf.BoolValue enforceRuntimeVisibility_; - /** - * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; - * - *
-   * Controls whether visibility is enforced at runtime for requests to an API
-   * method. This setting has meaning only when the selector applies to a method
-   * or an API.
-   * If true, requests without method visibility will receive a
-   * NOT_FOUND error, and any non-visible fields will be scrubbed from
-   * the response messages. The default is determined by the value of
-   * [google.api.Visibility.enforce_runtime_visibility][].
-   * 
- */ - public boolean hasEnforceRuntimeVisibility() { - return enforceRuntimeVisibility_ != null; - } - /** - * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; - * - *
-   * Controls whether visibility is enforced at runtime for requests to an API
-   * method. This setting has meaning only when the selector applies to a method
-   * or an API.
-   * If true, requests without method visibility will receive a
-   * NOT_FOUND error, and any non-visible fields will be scrubbed from
-   * the response messages. The default is determined by the value of
-   * [google.api.Visibility.enforce_runtime_visibility][].
-   * 
- */ - public com.google.protobuf.BoolValue getEnforceRuntimeVisibility() { - return enforceRuntimeVisibility_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : enforceRuntimeVisibility_; - } - /** - * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; - * - *
-   * Controls whether visibility is enforced at runtime for requests to an API
-   * method. This setting has meaning only when the selector applies to a method
-   * or an API.
-   * If true, requests without method visibility will receive a
-   * NOT_FOUND error, and any non-visible fields will be scrubbed from
-   * the response messages. The default is determined by the value of
-   * [google.api.Visibility.enforce_runtime_visibility][].
-   * 
- */ - public com.google.protobuf.BoolValueOrBuilder getEnforceRuntimeVisibilityOrBuilder() { - return getEnforceRuntimeVisibility(); - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!getSelectorBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, selector_); - } - if (!getRestrictionBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, restriction_); - } - if (enforceRuntimeVisibility_ != null) { - output.writeMessage(3, getEnforceRuntimeVisibility()); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getSelectorBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, selector_); - } - if (!getRestrictionBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, restriction_); - } - if (enforceRuntimeVisibility_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getEnforceRuntimeVisibility()); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static com.google.api.VisibilityRule parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.api.VisibilityRule 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.api.VisibilityRule parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.api.VisibilityRule parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.api.VisibilityRule parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.api.VisibilityRule parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.api.VisibilityRule parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.api.VisibilityRule parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.api.VisibilityRule parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.api.VisibilityRule parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.api.VisibilityRule prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - 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; - } - /** - * Protobuf type {@code google.api.VisibilityRule} - * - *
-   * A visibility rule provides visibility configuration for an individual API
-   * element.
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.api.VisibilityRule) - com.google.api.VisibilityRuleOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.api.VisibilityProto.internal_static_google_api_VisibilityRule_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.api.VisibilityProto.internal_static_google_api_VisibilityRule_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.api.VisibilityRule.class, com.google.api.VisibilityRule.Builder.class); - } - - // Construct using com.google.api.VisibilityRule.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - selector_ = ""; - - restriction_ = ""; - - if (enforceRuntimeVisibilityBuilder_ == null) { - enforceRuntimeVisibility_ = null; - } else { - enforceRuntimeVisibility_ = null; - enforceRuntimeVisibilityBuilder_ = null; - } - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.api.VisibilityProto.internal_static_google_api_VisibilityRule_descriptor; - } - - public com.google.api.VisibilityRule getDefaultInstanceForType() { - return com.google.api.VisibilityRule.getDefaultInstance(); - } - - public com.google.api.VisibilityRule build() { - com.google.api.VisibilityRule result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.api.VisibilityRule buildPartial() { - com.google.api.VisibilityRule result = new com.google.api.VisibilityRule(this); - result.selector_ = selector_; - result.restriction_ = restriction_; - if (enforceRuntimeVisibilityBuilder_ == null) { - result.enforceRuntimeVisibility_ = enforceRuntimeVisibility_; - } else { - result.enforceRuntimeVisibility_ = enforceRuntimeVisibilityBuilder_.build(); - } - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.api.VisibilityRule) { - return mergeFrom((com.google.api.VisibilityRule)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.api.VisibilityRule other) { - if (other == com.google.api.VisibilityRule.getDefaultInstance()) return this; - if (!other.getSelector().isEmpty()) { - selector_ = other.selector_; - onChanged(); - } - if (!other.getRestriction().isEmpty()) { - restriction_ = other.restriction_; - onChanged(); - } - if (other.hasEnforceRuntimeVisibility()) { - mergeEnforceRuntimeVisibility(other.getEnforceRuntimeVisibility()); - } - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.api.VisibilityRule parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.api.VisibilityRule) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object selector_ = ""; - /** - * optional string selector = 1; - * - *
-     * Selects methods, messages, fields, enums, etc. to which this rule applies.
-     * Refer to [selector][DocumentationRule.selector] for syntax details.
-     * 
- */ - public java.lang.String getSelector() { - java.lang.Object ref = selector_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - selector_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string selector = 1; - * - *
-     * Selects methods, messages, fields, enums, etc. to which this rule applies.
-     * Refer to [selector][DocumentationRule.selector] for syntax details.
-     * 
- */ - public com.google.protobuf.ByteString - getSelectorBytes() { - java.lang.Object ref = selector_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - selector_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string selector = 1; - * - *
-     * Selects methods, messages, fields, enums, etc. to which this rule applies.
-     * Refer to [selector][DocumentationRule.selector] for syntax details.
-     * 
- */ - public Builder setSelector( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - selector_ = value; - onChanged(); - return this; - } - /** - * optional string selector = 1; - * - *
-     * Selects methods, messages, fields, enums, etc. to which this rule applies.
-     * Refer to [selector][DocumentationRule.selector] for syntax details.
-     * 
- */ - public Builder clearSelector() { - - selector_ = getDefaultInstance().getSelector(); - onChanged(); - return this; - } - /** - * optional string selector = 1; - * - *
-     * Selects methods, messages, fields, enums, etc. to which this rule applies.
-     * Refer to [selector][DocumentationRule.selector] for syntax details.
-     * 
- */ - public Builder setSelectorBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - selector_ = value; - onChanged(); - return this; - } - - private java.lang.Object restriction_ = ""; - /** - * optional string restriction = 2; - * - *
-     * Lists the visibility labels for this rule. Any of the listed labels grants
-     * visibility to the element.
-     * If a rule has multiple labels, removing one of the labels but not all of
-     * them can break clients.
-     * Example:
-     *     visibility:
-     *       rules:
-     *       - selector: google.calendar.Calendar.EnhancedSearch
-     *         restriction: GOOGLE_INTERNAL, TRUSTED_TESTER
-     * Removing GOOGLE_INTERNAL from this restriction will break clients that
-     * rely on this method and only had access to it through GOOGLE_INTERNAL.
-     * 
- */ - public java.lang.String getRestriction() { - java.lang.Object ref = restriction_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - restriction_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string restriction = 2; - * - *
-     * Lists the visibility labels for this rule. Any of the listed labels grants
-     * visibility to the element.
-     * If a rule has multiple labels, removing one of the labels but not all of
-     * them can break clients.
-     * Example:
-     *     visibility:
-     *       rules:
-     *       - selector: google.calendar.Calendar.EnhancedSearch
-     *         restriction: GOOGLE_INTERNAL, TRUSTED_TESTER
-     * Removing GOOGLE_INTERNAL from this restriction will break clients that
-     * rely on this method and only had access to it through GOOGLE_INTERNAL.
-     * 
- */ - public com.google.protobuf.ByteString - getRestrictionBytes() { - java.lang.Object ref = restriction_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - restriction_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string restriction = 2; - * - *
-     * Lists the visibility labels for this rule. Any of the listed labels grants
-     * visibility to the element.
-     * If a rule has multiple labels, removing one of the labels but not all of
-     * them can break clients.
-     * Example:
-     *     visibility:
-     *       rules:
-     *       - selector: google.calendar.Calendar.EnhancedSearch
-     *         restriction: GOOGLE_INTERNAL, TRUSTED_TESTER
-     * Removing GOOGLE_INTERNAL from this restriction will break clients that
-     * rely on this method and only had access to it through GOOGLE_INTERNAL.
-     * 
- */ - public Builder setRestriction( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - restriction_ = value; - onChanged(); - return this; - } - /** - * optional string restriction = 2; - * - *
-     * Lists the visibility labels for this rule. Any of the listed labels grants
-     * visibility to the element.
-     * If a rule has multiple labels, removing one of the labels but not all of
-     * them can break clients.
-     * Example:
-     *     visibility:
-     *       rules:
-     *       - selector: google.calendar.Calendar.EnhancedSearch
-     *         restriction: GOOGLE_INTERNAL, TRUSTED_TESTER
-     * Removing GOOGLE_INTERNAL from this restriction will break clients that
-     * rely on this method and only had access to it through GOOGLE_INTERNAL.
-     * 
- */ - public Builder clearRestriction() { - - restriction_ = getDefaultInstance().getRestriction(); - onChanged(); - return this; - } - /** - * optional string restriction = 2; - * - *
-     * Lists the visibility labels for this rule. Any of the listed labels grants
-     * visibility to the element.
-     * If a rule has multiple labels, removing one of the labels but not all of
-     * them can break clients.
-     * Example:
-     *     visibility:
-     *       rules:
-     *       - selector: google.calendar.Calendar.EnhancedSearch
-     *         restriction: GOOGLE_INTERNAL, TRUSTED_TESTER
-     * Removing GOOGLE_INTERNAL from this restriction will break clients that
-     * rely on this method and only had access to it through GOOGLE_INTERNAL.
-     * 
- */ - public Builder setRestrictionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - restriction_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.BoolValue enforceRuntimeVisibility_ = null; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> enforceRuntimeVisibilityBuilder_; - /** - * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; - * - *
-     * Controls whether visibility is enforced at runtime for requests to an API
-     * method. This setting has meaning only when the selector applies to a method
-     * or an API.
-     * If true, requests without method visibility will receive a
-     * NOT_FOUND error, and any non-visible fields will be scrubbed from
-     * the response messages. The default is determined by the value of
-     * [google.api.Visibility.enforce_runtime_visibility][].
-     * 
- */ - public boolean hasEnforceRuntimeVisibility() { - return enforceRuntimeVisibilityBuilder_ != null || enforceRuntimeVisibility_ != null; - } - /** - * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; - * - *
-     * Controls whether visibility is enforced at runtime for requests to an API
-     * method. This setting has meaning only when the selector applies to a method
-     * or an API.
-     * If true, requests without method visibility will receive a
-     * NOT_FOUND error, and any non-visible fields will be scrubbed from
-     * the response messages. The default is determined by the value of
-     * [google.api.Visibility.enforce_runtime_visibility][].
-     * 
- */ - public com.google.protobuf.BoolValue getEnforceRuntimeVisibility() { - if (enforceRuntimeVisibilityBuilder_ == null) { - return enforceRuntimeVisibility_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : enforceRuntimeVisibility_; - } else { - return enforceRuntimeVisibilityBuilder_.getMessage(); - } - } - /** - * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; - * - *
-     * Controls whether visibility is enforced at runtime for requests to an API
-     * method. This setting has meaning only when the selector applies to a method
-     * or an API.
-     * If true, requests without method visibility will receive a
-     * NOT_FOUND error, and any non-visible fields will be scrubbed from
-     * the response messages. The default is determined by the value of
-     * [google.api.Visibility.enforce_runtime_visibility][].
-     * 
- */ - public Builder setEnforceRuntimeVisibility(com.google.protobuf.BoolValue value) { - if (enforceRuntimeVisibilityBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - enforceRuntimeVisibility_ = value; - onChanged(); - } else { - enforceRuntimeVisibilityBuilder_.setMessage(value); - } - - return this; - } - /** - * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; - * - *
-     * Controls whether visibility is enforced at runtime for requests to an API
-     * method. This setting has meaning only when the selector applies to a method
-     * or an API.
-     * If true, requests without method visibility will receive a
-     * NOT_FOUND error, and any non-visible fields will be scrubbed from
-     * the response messages. The default is determined by the value of
-     * [google.api.Visibility.enforce_runtime_visibility][].
-     * 
- */ - public Builder setEnforceRuntimeVisibility( - com.google.protobuf.BoolValue.Builder builderForValue) { - if (enforceRuntimeVisibilityBuilder_ == null) { - enforceRuntimeVisibility_ = builderForValue.build(); - onChanged(); - } else { - enforceRuntimeVisibilityBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; - * - *
-     * Controls whether visibility is enforced at runtime for requests to an API
-     * method. This setting has meaning only when the selector applies to a method
-     * or an API.
-     * If true, requests without method visibility will receive a
-     * NOT_FOUND error, and any non-visible fields will be scrubbed from
-     * the response messages. The default is determined by the value of
-     * [google.api.Visibility.enforce_runtime_visibility][].
-     * 
- */ - public Builder mergeEnforceRuntimeVisibility(com.google.protobuf.BoolValue value) { - if (enforceRuntimeVisibilityBuilder_ == null) { - if (enforceRuntimeVisibility_ != null) { - enforceRuntimeVisibility_ = - com.google.protobuf.BoolValue.newBuilder(enforceRuntimeVisibility_).mergeFrom(value).buildPartial(); - } else { - enforceRuntimeVisibility_ = value; - } - onChanged(); - } else { - enforceRuntimeVisibilityBuilder_.mergeFrom(value); - } - - return this; - } - /** - * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; - * - *
-     * Controls whether visibility is enforced at runtime for requests to an API
-     * method. This setting has meaning only when the selector applies to a method
-     * or an API.
-     * If true, requests without method visibility will receive a
-     * NOT_FOUND error, and any non-visible fields will be scrubbed from
-     * the response messages. The default is determined by the value of
-     * [google.api.Visibility.enforce_runtime_visibility][].
-     * 
- */ - public Builder clearEnforceRuntimeVisibility() { - if (enforceRuntimeVisibilityBuilder_ == null) { - enforceRuntimeVisibility_ = null; - onChanged(); - } else { - enforceRuntimeVisibility_ = null; - enforceRuntimeVisibilityBuilder_ = null; - } - - return this; - } - /** - * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; - * - *
-     * Controls whether visibility is enforced at runtime for requests to an API
-     * method. This setting has meaning only when the selector applies to a method
-     * or an API.
-     * If true, requests without method visibility will receive a
-     * NOT_FOUND error, and any non-visible fields will be scrubbed from
-     * the response messages. The default is determined by the value of
-     * [google.api.Visibility.enforce_runtime_visibility][].
-     * 
- */ - public com.google.protobuf.BoolValue.Builder getEnforceRuntimeVisibilityBuilder() { - - onChanged(); - return getEnforceRuntimeVisibilityFieldBuilder().getBuilder(); - } - /** - * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; - * - *
-     * Controls whether visibility is enforced at runtime for requests to an API
-     * method. This setting has meaning only when the selector applies to a method
-     * or an API.
-     * If true, requests without method visibility will receive a
-     * NOT_FOUND error, and any non-visible fields will be scrubbed from
-     * the response messages. The default is determined by the value of
-     * [google.api.Visibility.enforce_runtime_visibility][].
-     * 
- */ - public com.google.protobuf.BoolValueOrBuilder getEnforceRuntimeVisibilityOrBuilder() { - if (enforceRuntimeVisibilityBuilder_ != null) { - return enforceRuntimeVisibilityBuilder_.getMessageOrBuilder(); - } else { - return enforceRuntimeVisibility_ == null ? - com.google.protobuf.BoolValue.getDefaultInstance() : enforceRuntimeVisibility_; - } - } - /** - * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; - * - *
-     * Controls whether visibility is enforced at runtime for requests to an API
-     * method. This setting has meaning only when the selector applies to a method
-     * or an API.
-     * If true, requests without method visibility will receive a
-     * NOT_FOUND error, and any non-visible fields will be scrubbed from
-     * the response messages. The default is determined by the value of
-     * [google.api.Visibility.enforce_runtime_visibility][].
-     * 
- */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> - getEnforceRuntimeVisibilityFieldBuilder() { - if (enforceRuntimeVisibilityBuilder_ == null) { - enforceRuntimeVisibilityBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>( - getEnforceRuntimeVisibility(), - getParentForChildren(), - isClean()); - enforceRuntimeVisibility_ = null; - } - return enforceRuntimeVisibilityBuilder_; - } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - - // @@protoc_insertion_point(builder_scope:google.api.VisibilityRule) - } - - // @@protoc_insertion_point(class_scope:google.api.VisibilityRule) - private static final com.google.api.VisibilityRule DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.api.VisibilityRule(); - } - - public static com.google.api.VisibilityRule getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public VisibilityRule parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new VisibilityRule(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public com.google.api.VisibilityRule getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-gax/generated/src/main/java/com/google/api/VisibilityRuleOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/api/VisibilityRuleOrBuilder.java deleted file mode 100644 index 130f46c58ada..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/api/VisibilityRuleOrBuilder.java +++ /dev/null @@ -1,110 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/api/visibility.proto - -package com.google.api; - -public interface VisibilityRuleOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.api.VisibilityRule) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string selector = 1; - * - *
-   * Selects methods, messages, fields, enums, etc. to which this rule applies.
-   * Refer to [selector][DocumentationRule.selector] for syntax details.
-   * 
- */ - java.lang.String getSelector(); - /** - * optional string selector = 1; - * - *
-   * Selects methods, messages, fields, enums, etc. to which this rule applies.
-   * Refer to [selector][DocumentationRule.selector] for syntax details.
-   * 
- */ - com.google.protobuf.ByteString - getSelectorBytes(); - - /** - * optional string restriction = 2; - * - *
-   * Lists the visibility labels for this rule. Any of the listed labels grants
-   * visibility to the element.
-   * If a rule has multiple labels, removing one of the labels but not all of
-   * them can break clients.
-   * Example:
-   *     visibility:
-   *       rules:
-   *       - selector: google.calendar.Calendar.EnhancedSearch
-   *         restriction: GOOGLE_INTERNAL, TRUSTED_TESTER
-   * Removing GOOGLE_INTERNAL from this restriction will break clients that
-   * rely on this method and only had access to it through GOOGLE_INTERNAL.
-   * 
- */ - java.lang.String getRestriction(); - /** - * optional string restriction = 2; - * - *
-   * Lists the visibility labels for this rule. Any of the listed labels grants
-   * visibility to the element.
-   * If a rule has multiple labels, removing one of the labels but not all of
-   * them can break clients.
-   * Example:
-   *     visibility:
-   *       rules:
-   *       - selector: google.calendar.Calendar.EnhancedSearch
-   *         restriction: GOOGLE_INTERNAL, TRUSTED_TESTER
-   * Removing GOOGLE_INTERNAL from this restriction will break clients that
-   * rely on this method and only had access to it through GOOGLE_INTERNAL.
-   * 
- */ - com.google.protobuf.ByteString - getRestrictionBytes(); - - /** - * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; - * - *
-   * Controls whether visibility is enforced at runtime for requests to an API
-   * method. This setting has meaning only when the selector applies to a method
-   * or an API.
-   * If true, requests without method visibility will receive a
-   * NOT_FOUND error, and any non-visible fields will be scrubbed from
-   * the response messages. The default is determined by the value of
-   * [google.api.Visibility.enforce_runtime_visibility][].
-   * 
- */ - boolean hasEnforceRuntimeVisibility(); - /** - * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; - * - *
-   * Controls whether visibility is enforced at runtime for requests to an API
-   * method. This setting has meaning only when the selector applies to a method
-   * or an API.
-   * If true, requests without method visibility will receive a
-   * NOT_FOUND error, and any non-visible fields will be scrubbed from
-   * the response messages. The default is determined by the value of
-   * [google.api.Visibility.enforce_runtime_visibility][].
-   * 
- */ - com.google.protobuf.BoolValue getEnforceRuntimeVisibility(); - /** - * optional .google.protobuf.BoolValue enforce_runtime_visibility = 3; - * - *
-   * Controls whether visibility is enforced at runtime for requests to an API
-   * method. This setting has meaning only when the selector applies to a method
-   * or an API.
-   * If true, requests without method visibility will receive a
-   * NOT_FOUND error, and any non-visible fields will be scrubbed from
-   * the response messages. The default is determined by the value of
-   * [google.api.Visibility.enforce_runtime_visibility][].
-   * 
- */ - com.google.protobuf.BoolValueOrBuilder getEnforceRuntimeVisibilityOrBuilder(); -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/longrunning/CancelOperationRequest.java b/gcloud-java-gax/generated/src/main/java/com/google/longrunning/CancelOperationRequest.java deleted file mode 100644 index fe7f54b5b58f..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/longrunning/CancelOperationRequest.java +++ /dev/null @@ -1,476 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/longrunning/operations.proto - -package com.google.longrunning; - -/** - * Protobuf type {@code google.longrunning.CancelOperationRequest} - * - *
- * The request message for [Operations.CancelOperation][google.longrunning.Operations.CancelOperation].
- * 
- */ -public final class CancelOperationRequest extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.longrunning.CancelOperationRequest) - CancelOperationRequestOrBuilder { - // Use CancelOperationRequest.newBuilder() to construct. - private CancelOperationRequest(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private CancelOperationRequest() { - name_ = ""; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private CancelOperationRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - int mutable_bitField0_ = 0; - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!input.skipField(tag)) { - done = true; - } - break; - } - case 10: { - String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.longrunning.OperationsProto.internal_static_google_longrunning_CancelOperationRequest_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.longrunning.OperationsProto.internal_static_google_longrunning_CancelOperationRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.longrunning.CancelOperationRequest.class, com.google.longrunning.CancelOperationRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * optional string name = 1; - * - *
-   * The name of the operation resource to be cancelled.
-   * 
- */ - 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; - } - } - /** - * optional string name = 1; - * - *
-   * The name of the operation resource to be cancelled.
-   * 
- */ - 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; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static com.google.longrunning.CancelOperationRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.longrunning.CancelOperationRequest 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.longrunning.CancelOperationRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.longrunning.CancelOperationRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.longrunning.CancelOperationRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.longrunning.CancelOperationRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.longrunning.CancelOperationRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.longrunning.CancelOperationRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.longrunning.CancelOperationRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.longrunning.CancelOperationRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.longrunning.CancelOperationRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - 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; - } - /** - * Protobuf type {@code google.longrunning.CancelOperationRequest} - * - *
-   * The request message for [Operations.CancelOperation][google.longrunning.Operations.CancelOperation].
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.longrunning.CancelOperationRequest) - com.google.longrunning.CancelOperationRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.longrunning.OperationsProto.internal_static_google_longrunning_CancelOperationRequest_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.longrunning.OperationsProto.internal_static_google_longrunning_CancelOperationRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.longrunning.CancelOperationRequest.class, com.google.longrunning.CancelOperationRequest.Builder.class); - } - - // Construct using com.google.longrunning.CancelOperationRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - name_ = ""; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.longrunning.OperationsProto.internal_static_google_longrunning_CancelOperationRequest_descriptor; - } - - public com.google.longrunning.CancelOperationRequest getDefaultInstanceForType() { - return com.google.longrunning.CancelOperationRequest.getDefaultInstance(); - } - - public com.google.longrunning.CancelOperationRequest build() { - com.google.longrunning.CancelOperationRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.longrunning.CancelOperationRequest buildPartial() { - com.google.longrunning.CancelOperationRequest result = new com.google.longrunning.CancelOperationRequest(this); - result.name_ = name_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.longrunning.CancelOperationRequest) { - return mergeFrom((com.google.longrunning.CancelOperationRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.longrunning.CancelOperationRequest other) { - if (other == com.google.longrunning.CancelOperationRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.longrunning.CancelOperationRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.longrunning.CancelOperationRequest) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - * optional string name = 1; - * - *
-     * The name of the operation resource to be cancelled.
-     * 
- */ - 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; - } - } - /** - * optional string name = 1; - * - *
-     * The name of the operation resource to be cancelled.
-     * 
- */ - 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; - } - } - /** - * optional string name = 1; - * - *
-     * The name of the operation resource to be cancelled.
-     * 
- */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * optional string name = 1; - * - *
-     * The name of the operation resource to be cancelled.
-     * 
- */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * optional string name = 1; - * - *
-     * The name of the operation resource to be cancelled.
-     * 
- */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - - // @@protoc_insertion_point(builder_scope:google.longrunning.CancelOperationRequest) - } - - // @@protoc_insertion_point(class_scope:google.longrunning.CancelOperationRequest) - private static final com.google.longrunning.CancelOperationRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.longrunning.CancelOperationRequest(); - } - - public static com.google.longrunning.CancelOperationRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public CancelOperationRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new CancelOperationRequest(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public com.google.longrunning.CancelOperationRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-gax/generated/src/main/java/com/google/longrunning/CancelOperationRequestOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/longrunning/CancelOperationRequestOrBuilder.java deleted file mode 100644 index 86004606c35d..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/longrunning/CancelOperationRequestOrBuilder.java +++ /dev/null @@ -1,27 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/longrunning/operations.proto - -package com.google.longrunning; - -public interface CancelOperationRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.longrunning.CancelOperationRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string name = 1; - * - *
-   * The name of the operation resource to be cancelled.
-   * 
- */ - java.lang.String getName(); - /** - * optional string name = 1; - * - *
-   * The name of the operation resource to be cancelled.
-   * 
- */ - com.google.protobuf.ByteString - getNameBytes(); -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/longrunning/DeleteOperationRequest.java b/gcloud-java-gax/generated/src/main/java/com/google/longrunning/DeleteOperationRequest.java deleted file mode 100644 index d10d1e3300aa..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/longrunning/DeleteOperationRequest.java +++ /dev/null @@ -1,476 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/longrunning/operations.proto - -package com.google.longrunning; - -/** - * Protobuf type {@code google.longrunning.DeleteOperationRequest} - * - *
- * The request message for [Operations.DeleteOperation][google.longrunning.Operations.DeleteOperation].
- * 
- */ -public final class DeleteOperationRequest extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.longrunning.DeleteOperationRequest) - DeleteOperationRequestOrBuilder { - // Use DeleteOperationRequest.newBuilder() to construct. - private DeleteOperationRequest(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private DeleteOperationRequest() { - name_ = ""; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private DeleteOperationRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - int mutable_bitField0_ = 0; - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!input.skipField(tag)) { - done = true; - } - break; - } - case 10: { - String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.longrunning.OperationsProto.internal_static_google_longrunning_DeleteOperationRequest_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.longrunning.OperationsProto.internal_static_google_longrunning_DeleteOperationRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.longrunning.DeleteOperationRequest.class, com.google.longrunning.DeleteOperationRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * optional string name = 1; - * - *
-   * The name of the operation resource to be deleted.
-   * 
- */ - 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; - } - } - /** - * optional string name = 1; - * - *
-   * The name of the operation resource to be deleted.
-   * 
- */ - 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; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static com.google.longrunning.DeleteOperationRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.longrunning.DeleteOperationRequest 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.longrunning.DeleteOperationRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.longrunning.DeleteOperationRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.longrunning.DeleteOperationRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.longrunning.DeleteOperationRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.longrunning.DeleteOperationRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.longrunning.DeleteOperationRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.longrunning.DeleteOperationRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.longrunning.DeleteOperationRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.longrunning.DeleteOperationRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - 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; - } - /** - * Protobuf type {@code google.longrunning.DeleteOperationRequest} - * - *
-   * The request message for [Operations.DeleteOperation][google.longrunning.Operations.DeleteOperation].
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.longrunning.DeleteOperationRequest) - com.google.longrunning.DeleteOperationRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.longrunning.OperationsProto.internal_static_google_longrunning_DeleteOperationRequest_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.longrunning.OperationsProto.internal_static_google_longrunning_DeleteOperationRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.longrunning.DeleteOperationRequest.class, com.google.longrunning.DeleteOperationRequest.Builder.class); - } - - // Construct using com.google.longrunning.DeleteOperationRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - name_ = ""; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.longrunning.OperationsProto.internal_static_google_longrunning_DeleteOperationRequest_descriptor; - } - - public com.google.longrunning.DeleteOperationRequest getDefaultInstanceForType() { - return com.google.longrunning.DeleteOperationRequest.getDefaultInstance(); - } - - public com.google.longrunning.DeleteOperationRequest build() { - com.google.longrunning.DeleteOperationRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.longrunning.DeleteOperationRequest buildPartial() { - com.google.longrunning.DeleteOperationRequest result = new com.google.longrunning.DeleteOperationRequest(this); - result.name_ = name_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.longrunning.DeleteOperationRequest) { - return mergeFrom((com.google.longrunning.DeleteOperationRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.longrunning.DeleteOperationRequest other) { - if (other == com.google.longrunning.DeleteOperationRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.longrunning.DeleteOperationRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.longrunning.DeleteOperationRequest) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - * optional string name = 1; - * - *
-     * The name of the operation resource to be deleted.
-     * 
- */ - 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; - } - } - /** - * optional string name = 1; - * - *
-     * The name of the operation resource to be deleted.
-     * 
- */ - 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; - } - } - /** - * optional string name = 1; - * - *
-     * The name of the operation resource to be deleted.
-     * 
- */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * optional string name = 1; - * - *
-     * The name of the operation resource to be deleted.
-     * 
- */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * optional string name = 1; - * - *
-     * The name of the operation resource to be deleted.
-     * 
- */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - - // @@protoc_insertion_point(builder_scope:google.longrunning.DeleteOperationRequest) - } - - // @@protoc_insertion_point(class_scope:google.longrunning.DeleteOperationRequest) - private static final com.google.longrunning.DeleteOperationRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.longrunning.DeleteOperationRequest(); - } - - public static com.google.longrunning.DeleteOperationRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public DeleteOperationRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new DeleteOperationRequest(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public com.google.longrunning.DeleteOperationRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-gax/generated/src/main/java/com/google/longrunning/DeleteOperationRequestOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/longrunning/DeleteOperationRequestOrBuilder.java deleted file mode 100644 index 16f7c82c171a..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/longrunning/DeleteOperationRequestOrBuilder.java +++ /dev/null @@ -1,27 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/longrunning/operations.proto - -package com.google.longrunning; - -public interface DeleteOperationRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.longrunning.DeleteOperationRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string name = 1; - * - *
-   * The name of the operation resource to be deleted.
-   * 
- */ - java.lang.String getName(); - /** - * optional string name = 1; - * - *
-   * The name of the operation resource to be deleted.
-   * 
- */ - com.google.protobuf.ByteString - getNameBytes(); -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/longrunning/GetOperationRequest.java b/gcloud-java-gax/generated/src/main/java/com/google/longrunning/GetOperationRequest.java deleted file mode 100644 index 111563850c1a..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/longrunning/GetOperationRequest.java +++ /dev/null @@ -1,476 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/longrunning/operations.proto - -package com.google.longrunning; - -/** - * Protobuf type {@code google.longrunning.GetOperationRequest} - * - *
- * The request message for [Operations.GetOperation][google.longrunning.Operations.GetOperation].
- * 
- */ -public final class GetOperationRequest extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.longrunning.GetOperationRequest) - GetOperationRequestOrBuilder { - // Use GetOperationRequest.newBuilder() to construct. - private GetOperationRequest(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private GetOperationRequest() { - name_ = ""; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private GetOperationRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - int mutable_bitField0_ = 0; - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!input.skipField(tag)) { - done = true; - } - break; - } - case 10: { - String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.longrunning.OperationsProto.internal_static_google_longrunning_GetOperationRequest_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.longrunning.OperationsProto.internal_static_google_longrunning_GetOperationRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.longrunning.GetOperationRequest.class, com.google.longrunning.GetOperationRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * optional string name = 1; - * - *
-   * The name of the operation resource.
-   * 
- */ - 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; - } - } - /** - * optional string name = 1; - * - *
-   * The name of the operation resource.
-   * 
- */ - 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; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static com.google.longrunning.GetOperationRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.longrunning.GetOperationRequest 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.longrunning.GetOperationRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.longrunning.GetOperationRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.longrunning.GetOperationRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.longrunning.GetOperationRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.longrunning.GetOperationRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.longrunning.GetOperationRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.longrunning.GetOperationRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.longrunning.GetOperationRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.longrunning.GetOperationRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - 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; - } - /** - * Protobuf type {@code google.longrunning.GetOperationRequest} - * - *
-   * The request message for [Operations.GetOperation][google.longrunning.Operations.GetOperation].
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.longrunning.GetOperationRequest) - com.google.longrunning.GetOperationRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.longrunning.OperationsProto.internal_static_google_longrunning_GetOperationRequest_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.longrunning.OperationsProto.internal_static_google_longrunning_GetOperationRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.longrunning.GetOperationRequest.class, com.google.longrunning.GetOperationRequest.Builder.class); - } - - // Construct using com.google.longrunning.GetOperationRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - name_ = ""; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.longrunning.OperationsProto.internal_static_google_longrunning_GetOperationRequest_descriptor; - } - - public com.google.longrunning.GetOperationRequest getDefaultInstanceForType() { - return com.google.longrunning.GetOperationRequest.getDefaultInstance(); - } - - public com.google.longrunning.GetOperationRequest build() { - com.google.longrunning.GetOperationRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.longrunning.GetOperationRequest buildPartial() { - com.google.longrunning.GetOperationRequest result = new com.google.longrunning.GetOperationRequest(this); - result.name_ = name_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.longrunning.GetOperationRequest) { - return mergeFrom((com.google.longrunning.GetOperationRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.longrunning.GetOperationRequest other) { - if (other == com.google.longrunning.GetOperationRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.longrunning.GetOperationRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.longrunning.GetOperationRequest) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - * optional string name = 1; - * - *
-     * The name of the operation resource.
-     * 
- */ - 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; - } - } - /** - * optional string name = 1; - * - *
-     * The name of the operation resource.
-     * 
- */ - 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; - } - } - /** - * optional string name = 1; - * - *
-     * The name of the operation resource.
-     * 
- */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * optional string name = 1; - * - *
-     * The name of the operation resource.
-     * 
- */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * optional string name = 1; - * - *
-     * The name of the operation resource.
-     * 
- */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - - // @@protoc_insertion_point(builder_scope:google.longrunning.GetOperationRequest) - } - - // @@protoc_insertion_point(class_scope:google.longrunning.GetOperationRequest) - private static final com.google.longrunning.GetOperationRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.longrunning.GetOperationRequest(); - } - - public static com.google.longrunning.GetOperationRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public GetOperationRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new GetOperationRequest(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public com.google.longrunning.GetOperationRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-gax/generated/src/main/java/com/google/longrunning/GetOperationRequestOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/longrunning/GetOperationRequestOrBuilder.java deleted file mode 100644 index 099a7072cd23..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/longrunning/GetOperationRequestOrBuilder.java +++ /dev/null @@ -1,27 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/longrunning/operations.proto - -package com.google.longrunning; - -public interface GetOperationRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.longrunning.GetOperationRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string name = 1; - * - *
-   * The name of the operation resource.
-   * 
- */ - java.lang.String getName(); - /** - * optional string name = 1; - * - *
-   * The name of the operation resource.
-   * 
- */ - com.google.protobuf.ByteString - getNameBytes(); -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/longrunning/ListOperationsRequest.java b/gcloud-java-gax/generated/src/main/java/com/google/longrunning/ListOperationsRequest.java deleted file mode 100644 index 12a996ead622..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/longrunning/ListOperationsRequest.java +++ /dev/null @@ -1,848 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/longrunning/operations.proto - -package com.google.longrunning; - -/** - * Protobuf type {@code google.longrunning.ListOperationsRequest} - * - *
- * The request message for [Operations.ListOperations][google.longrunning.Operations.ListOperations].
- * 
- */ -public final class ListOperationsRequest extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.longrunning.ListOperationsRequest) - ListOperationsRequestOrBuilder { - // Use ListOperationsRequest.newBuilder() to construct. - private ListOperationsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private ListOperationsRequest() { - name_ = ""; - filter_ = ""; - pageSize_ = 0; - pageToken_ = ""; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private ListOperationsRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - int mutable_bitField0_ = 0; - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!input.skipField(tag)) { - done = true; - } - break; - } - case 10: { - String s = input.readStringRequireUtf8(); - - filter_ = s; - break; - } - case 16: { - - pageSize_ = input.readInt32(); - break; - } - case 26: { - String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - case 34: { - String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.longrunning.OperationsProto.internal_static_google_longrunning_ListOperationsRequest_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.longrunning.OperationsProto.internal_static_google_longrunning_ListOperationsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.longrunning.ListOperationsRequest.class, com.google.longrunning.ListOperationsRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 4; - private volatile java.lang.Object name_; - /** - * optional string name = 4; - * - *
-   * The name of the operation collection.
-   * 
- */ - 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; - } - } - /** - * optional string name = 4; - * - *
-   * The name of the operation collection.
-   * 
- */ - 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 FILTER_FIELD_NUMBER = 1; - private volatile java.lang.Object filter_; - /** - * optional string filter = 1; - * - *
-   * The standard List filter.
-   * 
- */ - 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 string filter = 1; - * - *
-   * The standard List filter.
-   * 
- */ - 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 PAGE_SIZE_FIELD_NUMBER = 2; - private int pageSize_; - /** - * optional int32 page_size = 2; - * - *
-   * The standard List page size.
-   * 
- */ - public int getPageSize() { - return pageSize_; - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 3; - private volatile java.lang.Object pageToken_; - /** - * optional string page_token = 3; - * - *
-   * The standard List page token.
-   * 
- */ - 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 string page_token = 3; - * - *
-   * The standard List page token.
-   * 
- */ - 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; - } - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!getFilterBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, filter_); - } - if (pageSize_ != 0) { - output.writeInt32(2, pageSize_); - } - if (!getPageTokenBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); - } - if (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 4, name_); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getFilterBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, filter_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, pageSize_); - } - if (!getPageTokenBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); - } - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(4, name_); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static com.google.longrunning.ListOperationsRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.longrunning.ListOperationsRequest 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.longrunning.ListOperationsRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.longrunning.ListOperationsRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.longrunning.ListOperationsRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.longrunning.ListOperationsRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.longrunning.ListOperationsRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.longrunning.ListOperationsRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.longrunning.ListOperationsRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.longrunning.ListOperationsRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.longrunning.ListOperationsRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - 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; - } - /** - * Protobuf type {@code google.longrunning.ListOperationsRequest} - * - *
-   * The request message for [Operations.ListOperations][google.longrunning.Operations.ListOperations].
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.longrunning.ListOperationsRequest) - com.google.longrunning.ListOperationsRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.longrunning.OperationsProto.internal_static_google_longrunning_ListOperationsRequest_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.longrunning.OperationsProto.internal_static_google_longrunning_ListOperationsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.longrunning.ListOperationsRequest.class, com.google.longrunning.ListOperationsRequest.Builder.class); - } - - // Construct using com.google.longrunning.ListOperationsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - name_ = ""; - - filter_ = ""; - - pageSize_ = 0; - - pageToken_ = ""; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.longrunning.OperationsProto.internal_static_google_longrunning_ListOperationsRequest_descriptor; - } - - public com.google.longrunning.ListOperationsRequest getDefaultInstanceForType() { - return com.google.longrunning.ListOperationsRequest.getDefaultInstance(); - } - - public com.google.longrunning.ListOperationsRequest build() { - com.google.longrunning.ListOperationsRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.longrunning.ListOperationsRequest buildPartial() { - com.google.longrunning.ListOperationsRequest result = new com.google.longrunning.ListOperationsRequest(this); - result.name_ = name_; - result.filter_ = filter_; - result.pageSize_ = pageSize_; - result.pageToken_ = pageToken_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.longrunning.ListOperationsRequest) { - return mergeFrom((com.google.longrunning.ListOperationsRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.longrunning.ListOperationsRequest other) { - if (other == com.google.longrunning.ListOperationsRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getFilter().isEmpty()) { - filter_ = other.filter_; - onChanged(); - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - onChanged(); - } - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.longrunning.ListOperationsRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.longrunning.ListOperationsRequest) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - * optional string name = 4; - * - *
-     * The name of the operation collection.
-     * 
- */ - 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; - } - } - /** - * optional string name = 4; - * - *
-     * The name of the operation collection.
-     * 
- */ - 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; - } - } - /** - * optional string name = 4; - * - *
-     * The name of the operation collection.
-     * 
- */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * optional string name = 4; - * - *
-     * The name of the operation collection.
-     * 
- */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * optional string name = 4; - * - *
-     * The name of the operation collection.
-     * 
- */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.lang.Object filter_ = ""; - /** - * optional string filter = 1; - * - *
-     * The standard List 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 string filter = 1; - * - *
-     * The standard List 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 string filter = 1; - * - *
-     * The standard List filter.
-     * 
- */ - public Builder setFilter( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - filter_ = value; - onChanged(); - return this; - } - /** - * optional string filter = 1; - * - *
-     * The standard List filter.
-     * 
- */ - public Builder clearFilter() { - - filter_ = getDefaultInstance().getFilter(); - onChanged(); - return this; - } - /** - * optional string filter = 1; - * - *
-     * The standard List filter.
-     * 
- */ - public Builder setFilterBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - filter_ = value; - onChanged(); - return this; - } - - private int pageSize_ ; - /** - * optional int32 page_size = 2; - * - *
-     * The standard List page size.
-     * 
- */ - public int getPageSize() { - return pageSize_; - } - /** - * optional int32 page_size = 2; - * - *
-     * The standard List page size.
-     * 
- */ - public Builder setPageSize(int value) { - - pageSize_ = value; - onChanged(); - return this; - } - /** - * optional int32 page_size = 2; - * - *
-     * The standard List page size.
-     * 
- */ - public Builder clearPageSize() { - - pageSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object pageToken_ = ""; - /** - * optional string page_token = 3; - * - *
-     * The standard List page token.
-     * 
- */ - 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 string page_token = 3; - * - *
-     * The standard List page token.
-     * 
- */ - 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 string page_token = 3; - * - *
-     * The standard List page token.
-     * 
- */ - public Builder setPageToken( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - pageToken_ = value; - onChanged(); - return this; - } - /** - * optional string page_token = 3; - * - *
-     * The standard List page token.
-     * 
- */ - public Builder clearPageToken() { - - pageToken_ = getDefaultInstance().getPageToken(); - onChanged(); - return this; - } - /** - * optional string page_token = 3; - * - *
-     * The standard List page token.
-     * 
- */ - public Builder setPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - pageToken_ = value; - onChanged(); - return this; - } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - - // @@protoc_insertion_point(builder_scope:google.longrunning.ListOperationsRequest) - } - - // @@protoc_insertion_point(class_scope:google.longrunning.ListOperationsRequest) - private static final com.google.longrunning.ListOperationsRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.longrunning.ListOperationsRequest(); - } - - public static com.google.longrunning.ListOperationsRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public ListOperationsRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new ListOperationsRequest(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public com.google.longrunning.ListOperationsRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-gax/generated/src/main/java/com/google/longrunning/ListOperationsRequestOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/longrunning/ListOperationsRequestOrBuilder.java deleted file mode 100644 index 4d16f4b037d3..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/longrunning/ListOperationsRequestOrBuilder.java +++ /dev/null @@ -1,72 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/longrunning/operations.proto - -package com.google.longrunning; - -public interface ListOperationsRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.longrunning.ListOperationsRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string name = 4; - * - *
-   * The name of the operation collection.
-   * 
- */ - java.lang.String getName(); - /** - * optional string name = 4; - * - *
-   * The name of the operation collection.
-   * 
- */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - * optional string filter = 1; - * - *
-   * The standard List filter.
-   * 
- */ - java.lang.String getFilter(); - /** - * optional string filter = 1; - * - *
-   * The standard List filter.
-   * 
- */ - com.google.protobuf.ByteString - getFilterBytes(); - - /** - * optional int32 page_size = 2; - * - *
-   * The standard List page size.
-   * 
- */ - int getPageSize(); - - /** - * optional string page_token = 3; - * - *
-   * The standard List page token.
-   * 
- */ - java.lang.String getPageToken(); - /** - * optional string page_token = 3; - * - *
-   * The standard List page token.
-   * 
- */ - com.google.protobuf.ByteString - getPageTokenBytes(); -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/longrunning/ListOperationsResponse.java b/gcloud-java-gax/generated/src/main/java/com/google/longrunning/ListOperationsResponse.java deleted file mode 100644 index 7d329933d9e6..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/longrunning/ListOperationsResponse.java +++ /dev/null @@ -1,909 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/longrunning/operations.proto - -package com.google.longrunning; - -/** - * Protobuf type {@code google.longrunning.ListOperationsResponse} - * - *
- * The response message for [Operations.ListOperations][google.longrunning.Operations.ListOperations].
- * 
- */ -public final class ListOperationsResponse extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.longrunning.ListOperationsResponse) - ListOperationsResponseOrBuilder { - // Use ListOperationsResponse.newBuilder() to construct. - private ListOperationsResponse(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private ListOperationsResponse() { - operations_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private ListOperationsResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - int mutable_bitField0_ = 0; - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!input.skipField(tag)) { - done = true; - } - break; - } - case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - operations_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - operations_.add(input.readMessage(com.google.longrunning.Operation.parser(), extensionRegistry)); - break; - } - case 18: { - String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - operations_ = java.util.Collections.unmodifiableList(operations_); - } - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.longrunning.OperationsProto.internal_static_google_longrunning_ListOperationsResponse_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.longrunning.OperationsProto.internal_static_google_longrunning_ListOperationsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.longrunning.ListOperationsResponse.class, com.google.longrunning.ListOperationsResponse.Builder.class); - } - - private int bitField0_; - public static final int OPERATIONS_FIELD_NUMBER = 1; - private java.util.List operations_; - /** - * repeated .google.longrunning.Operation operations = 1; - * - *
-   * A list of operations that match the specified filter in the request.
-   * 
- */ - public java.util.List getOperationsList() { - return operations_; - } - /** - * repeated .google.longrunning.Operation operations = 1; - * - *
-   * A list of operations that match the specified filter in the request.
-   * 
- */ - public java.util.List - getOperationsOrBuilderList() { - return operations_; - } - /** - * repeated .google.longrunning.Operation operations = 1; - * - *
-   * A list of operations that match the specified filter in the request.
-   * 
- */ - public int getOperationsCount() { - return operations_.size(); - } - /** - * repeated .google.longrunning.Operation operations = 1; - * - *
-   * A list of operations that match the specified filter in the request.
-   * 
- */ - public com.google.longrunning.Operation getOperations(int index) { - return operations_.get(index); - } - /** - * repeated .google.longrunning.Operation operations = 1; - * - *
-   * A list of operations that match the specified filter in the request.
-   * 
- */ - public com.google.longrunning.OperationOrBuilder getOperationsOrBuilder( - int index) { - return operations_.get(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; - private volatile java.lang.Object nextPageToken_; - /** - * optional string next_page_token = 2; - * - *
-   * The standard List next-page token.
-   * 
- */ - 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; - } - } - /** - * optional string next_page_token = 2; - * - *
-   * The standard List next-page token.
-   * 
- */ - 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; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < operations_.size(); i++) { - output.writeMessage(1, operations_.get(i)); - } - if (!getNextPageTokenBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < operations_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, operations_.get(i)); - } - if (!getNextPageTokenBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static com.google.longrunning.ListOperationsResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.longrunning.ListOperationsResponse 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.longrunning.ListOperationsResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.longrunning.ListOperationsResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.longrunning.ListOperationsResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.longrunning.ListOperationsResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.longrunning.ListOperationsResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.longrunning.ListOperationsResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.longrunning.ListOperationsResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.longrunning.ListOperationsResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.longrunning.ListOperationsResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - 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; - } - /** - * Protobuf type {@code google.longrunning.ListOperationsResponse} - * - *
-   * The response message for [Operations.ListOperations][google.longrunning.Operations.ListOperations].
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.longrunning.ListOperationsResponse) - com.google.longrunning.ListOperationsResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.longrunning.OperationsProto.internal_static_google_longrunning_ListOperationsResponse_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.longrunning.OperationsProto.internal_static_google_longrunning_ListOperationsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.longrunning.ListOperationsResponse.class, com.google.longrunning.ListOperationsResponse.Builder.class); - } - - // Construct using com.google.longrunning.ListOperationsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getOperationsFieldBuilder(); - } - } - public Builder clear() { - super.clear(); - if (operationsBuilder_ == null) { - operations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - operationsBuilder_.clear(); - } - nextPageToken_ = ""; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.longrunning.OperationsProto.internal_static_google_longrunning_ListOperationsResponse_descriptor; - } - - public com.google.longrunning.ListOperationsResponse getDefaultInstanceForType() { - return com.google.longrunning.ListOperationsResponse.getDefaultInstance(); - } - - public com.google.longrunning.ListOperationsResponse build() { - com.google.longrunning.ListOperationsResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.longrunning.ListOperationsResponse buildPartial() { - com.google.longrunning.ListOperationsResponse result = new com.google.longrunning.ListOperationsResponse(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (operationsBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - operations_ = java.util.Collections.unmodifiableList(operations_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.operations_ = operations_; - } else { - result.operations_ = operationsBuilder_.build(); - } - result.nextPageToken_ = nextPageToken_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.longrunning.ListOperationsResponse) { - return mergeFrom((com.google.longrunning.ListOperationsResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.longrunning.ListOperationsResponse other) { - if (other == com.google.longrunning.ListOperationsResponse.getDefaultInstance()) return this; - if (operationsBuilder_ == null) { - if (!other.operations_.isEmpty()) { - if (operations_.isEmpty()) { - operations_ = other.operations_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureOperationsIsMutable(); - operations_.addAll(other.operations_); - } - onChanged(); - } - } else { - if (!other.operations_.isEmpty()) { - if (operationsBuilder_.isEmpty()) { - operationsBuilder_.dispose(); - operationsBuilder_ = null; - operations_ = other.operations_; - bitField0_ = (bitField0_ & ~0x00000001); - operationsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getOperationsFieldBuilder() : null; - } else { - operationsBuilder_.addAllMessages(other.operations_); - } - } - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - onChanged(); - } - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.longrunning.ListOperationsResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.longrunning.ListOperationsResponse) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List operations_ = - java.util.Collections.emptyList(); - private void ensureOperationsIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { - operations_ = new java.util.ArrayList(operations_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.longrunning.Operation, com.google.longrunning.Operation.Builder, com.google.longrunning.OperationOrBuilder> operationsBuilder_; - - /** - * repeated .google.longrunning.Operation operations = 1; - * - *
-     * A list of operations that match the specified filter in the request.
-     * 
- */ - public java.util.List getOperationsList() { - if (operationsBuilder_ == null) { - return java.util.Collections.unmodifiableList(operations_); - } else { - return operationsBuilder_.getMessageList(); - } - } - /** - * repeated .google.longrunning.Operation operations = 1; - * - *
-     * A list of operations that match the specified filter in the request.
-     * 
- */ - public int getOperationsCount() { - if (operationsBuilder_ == null) { - return operations_.size(); - } else { - return operationsBuilder_.getCount(); - } - } - /** - * repeated .google.longrunning.Operation operations = 1; - * - *
-     * A list of operations that match the specified filter in the request.
-     * 
- */ - public com.google.longrunning.Operation getOperations(int index) { - if (operationsBuilder_ == null) { - return operations_.get(index); - } else { - return operationsBuilder_.getMessage(index); - } - } - /** - * repeated .google.longrunning.Operation operations = 1; - * - *
-     * A list of operations that match the specified filter in the request.
-     * 
- */ - public Builder setOperations( - int index, com.google.longrunning.Operation value) { - if (operationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureOperationsIsMutable(); - operations_.set(index, value); - onChanged(); - } else { - operationsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .google.longrunning.Operation operations = 1; - * - *
-     * A list of operations that match the specified filter in the request.
-     * 
- */ - public Builder setOperations( - int index, com.google.longrunning.Operation.Builder builderForValue) { - if (operationsBuilder_ == null) { - ensureOperationsIsMutable(); - operations_.set(index, builderForValue.build()); - onChanged(); - } else { - operationsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.longrunning.Operation operations = 1; - * - *
-     * A list of operations that match the specified filter in the request.
-     * 
- */ - public Builder addOperations(com.google.longrunning.Operation value) { - if (operationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureOperationsIsMutable(); - operations_.add(value); - onChanged(); - } else { - operationsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .google.longrunning.Operation operations = 1; - * - *
-     * A list of operations that match the specified filter in the request.
-     * 
- */ - public Builder addOperations( - int index, com.google.longrunning.Operation value) { - if (operationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureOperationsIsMutable(); - operations_.add(index, value); - onChanged(); - } else { - operationsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .google.longrunning.Operation operations = 1; - * - *
-     * A list of operations that match the specified filter in the request.
-     * 
- */ - public Builder addOperations( - com.google.longrunning.Operation.Builder builderForValue) { - if (operationsBuilder_ == null) { - ensureOperationsIsMutable(); - operations_.add(builderForValue.build()); - onChanged(); - } else { - operationsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .google.longrunning.Operation operations = 1; - * - *
-     * A list of operations that match the specified filter in the request.
-     * 
- */ - public Builder addOperations( - int index, com.google.longrunning.Operation.Builder builderForValue) { - if (operationsBuilder_ == null) { - ensureOperationsIsMutable(); - operations_.add(index, builderForValue.build()); - onChanged(); - } else { - operationsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.longrunning.Operation operations = 1; - * - *
-     * A list of operations that match the specified filter in the request.
-     * 
- */ - public Builder addAllOperations( - java.lang.Iterable values) { - if (operationsBuilder_ == null) { - ensureOperationsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, operations_); - onChanged(); - } else { - operationsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .google.longrunning.Operation operations = 1; - * - *
-     * A list of operations that match the specified filter in the request.
-     * 
- */ - public Builder clearOperations() { - if (operationsBuilder_ == null) { - operations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - operationsBuilder_.clear(); - } - return this; - } - /** - * repeated .google.longrunning.Operation operations = 1; - * - *
-     * A list of operations that match the specified filter in the request.
-     * 
- */ - public Builder removeOperations(int index) { - if (operationsBuilder_ == null) { - ensureOperationsIsMutable(); - operations_.remove(index); - onChanged(); - } else { - operationsBuilder_.remove(index); - } - return this; - } - /** - * repeated .google.longrunning.Operation operations = 1; - * - *
-     * A list of operations that match the specified filter in the request.
-     * 
- */ - public com.google.longrunning.Operation.Builder getOperationsBuilder( - int index) { - return getOperationsFieldBuilder().getBuilder(index); - } - /** - * repeated .google.longrunning.Operation operations = 1; - * - *
-     * A list of operations that match the specified filter in the request.
-     * 
- */ - public com.google.longrunning.OperationOrBuilder getOperationsOrBuilder( - int index) { - if (operationsBuilder_ == null) { - return operations_.get(index); } else { - return operationsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .google.longrunning.Operation operations = 1; - * - *
-     * A list of operations that match the specified filter in the request.
-     * 
- */ - public java.util.List - getOperationsOrBuilderList() { - if (operationsBuilder_ != null) { - return operationsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(operations_); - } - } - /** - * repeated .google.longrunning.Operation operations = 1; - * - *
-     * A list of operations that match the specified filter in the request.
-     * 
- */ - public com.google.longrunning.Operation.Builder addOperationsBuilder() { - return getOperationsFieldBuilder().addBuilder( - com.google.longrunning.Operation.getDefaultInstance()); - } - /** - * repeated .google.longrunning.Operation operations = 1; - * - *
-     * A list of operations that match the specified filter in the request.
-     * 
- */ - public com.google.longrunning.Operation.Builder addOperationsBuilder( - int index) { - return getOperationsFieldBuilder().addBuilder( - index, com.google.longrunning.Operation.getDefaultInstance()); - } - /** - * repeated .google.longrunning.Operation operations = 1; - * - *
-     * A list of operations that match the specified filter in the request.
-     * 
- */ - public java.util.List - getOperationsBuilderList() { - return getOperationsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - com.google.longrunning.Operation, com.google.longrunning.Operation.Builder, com.google.longrunning.OperationOrBuilder> - getOperationsFieldBuilder() { - if (operationsBuilder_ == null) { - operationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - com.google.longrunning.Operation, com.google.longrunning.Operation.Builder, com.google.longrunning.OperationOrBuilder>( - operations_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); - operations_ = null; - } - return operationsBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - * optional string next_page_token = 2; - * - *
-     * The standard List next-page token.
-     * 
- */ - 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; - } - } - /** - * optional string next_page_token = 2; - * - *
-     * The standard List next-page token.
-     * 
- */ - 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; - } - } - /** - * optional string next_page_token = 2; - * - *
-     * The standard List next-page token.
-     * 
- */ - public Builder setNextPageToken( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - nextPageToken_ = value; - onChanged(); - return this; - } - /** - * optional string next_page_token = 2; - * - *
-     * The standard List next-page token.
-     * 
- */ - public Builder clearNextPageToken() { - - nextPageToken_ = getDefaultInstance().getNextPageToken(); - onChanged(); - return this; - } - /** - * optional string next_page_token = 2; - * - *
-     * The standard List next-page token.
-     * 
- */ - public Builder setNextPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - nextPageToken_ = value; - onChanged(); - return this; - } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - - // @@protoc_insertion_point(builder_scope:google.longrunning.ListOperationsResponse) - } - - // @@protoc_insertion_point(class_scope:google.longrunning.ListOperationsResponse) - private static final com.google.longrunning.ListOperationsResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.longrunning.ListOperationsResponse(); - } - - public static com.google.longrunning.ListOperationsResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public ListOperationsResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new ListOperationsResponse(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public com.google.longrunning.ListOperationsResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-gax/generated/src/main/java/com/google/longrunning/ListOperationsResponseOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/longrunning/ListOperationsResponseOrBuilder.java deleted file mode 100644 index 8e2c047294a5..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/longrunning/ListOperationsResponseOrBuilder.java +++ /dev/null @@ -1,71 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/longrunning/operations.proto - -package com.google.longrunning; - -public interface ListOperationsResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.longrunning.ListOperationsResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated .google.longrunning.Operation operations = 1; - * - *
-   * A list of operations that match the specified filter in the request.
-   * 
- */ - java.util.List - getOperationsList(); - /** - * repeated .google.longrunning.Operation operations = 1; - * - *
-   * A list of operations that match the specified filter in the request.
-   * 
- */ - com.google.longrunning.Operation getOperations(int index); - /** - * repeated .google.longrunning.Operation operations = 1; - * - *
-   * A list of operations that match the specified filter in the request.
-   * 
- */ - int getOperationsCount(); - /** - * repeated .google.longrunning.Operation operations = 1; - * - *
-   * A list of operations that match the specified filter in the request.
-   * 
- */ - java.util.List - getOperationsOrBuilderList(); - /** - * repeated .google.longrunning.Operation operations = 1; - * - *
-   * A list of operations that match the specified filter in the request.
-   * 
- */ - com.google.longrunning.OperationOrBuilder getOperationsOrBuilder( - int index); - - /** - * optional string next_page_token = 2; - * - *
-   * The standard List next-page token.
-   * 
- */ - java.lang.String getNextPageToken(); - /** - * optional string next_page_token = 2; - * - *
-   * The standard List next-page token.
-   * 
- */ - com.google.protobuf.ByteString - getNextPageTokenBytes(); -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/longrunning/Operation.java b/gcloud-java-gax/generated/src/main/java/com/google/longrunning/Operation.java deleted file mode 100644 index 750f3a657b25..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/longrunning/Operation.java +++ /dev/null @@ -1,1383 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/longrunning/operations.proto - -package com.google.longrunning; - -/** - * Protobuf type {@code google.longrunning.Operation} - * - *
- * This resource represents a long-running operation that is the result of a
- * network API call.
- * 
- */ -public final class Operation extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.longrunning.Operation) - OperationOrBuilder { - // Use Operation.newBuilder() to construct. - private Operation(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Operation() { - name_ = ""; - done_ = false; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private Operation( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - int mutable_bitField0_ = 0; - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!input.skipField(tag)) { - done = true; - } - break; - } - case 10: { - String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: { - com.google.protobuf.Any.Builder subBuilder = null; - if (metadata_ != null) { - subBuilder = metadata_.toBuilder(); - } - metadata_ = input.readMessage(com.google.protobuf.Any.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(metadata_); - metadata_ = subBuilder.buildPartial(); - } - - break; - } - case 24: { - - done_ = input.readBool(); - break; - } - case 34: { - com.google.rpc.Status.Builder subBuilder = null; - if (resultCase_ == 4) { - subBuilder = ((com.google.rpc.Status) result_).toBuilder(); - } - result_ = - input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.rpc.Status) result_); - result_ = subBuilder.buildPartial(); - } - resultCase_ = 4; - break; - } - case 42: { - com.google.protobuf.Any.Builder subBuilder = null; - if (resultCase_ == 5) { - subBuilder = ((com.google.protobuf.Any) result_).toBuilder(); - } - result_ = - input.readMessage(com.google.protobuf.Any.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.protobuf.Any) result_); - result_ = subBuilder.buildPartial(); - } - resultCase_ = 5; - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.longrunning.OperationsProto.internal_static_google_longrunning_Operation_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.longrunning.OperationsProto.internal_static_google_longrunning_Operation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.longrunning.Operation.class, com.google.longrunning.Operation.Builder.class); - } - - private int resultCase_ = 0; - private java.lang.Object result_; - public enum ResultCase - implements com.google.protobuf.Internal.EnumLite { - ERROR(4), - RESPONSE(5), - RESULT_NOT_SET(0); - private int value = 0; - private ResultCase(int value) { - this.value = value; - } - public static ResultCase valueOf(int value) { - switch (value) { - case 4: return ERROR; - case 5: return RESPONSE; - case 0: return RESULT_NOT_SET; - default: throw new java.lang.IllegalArgumentException( - "Value is undefined for this oneof enum."); - } - } - public int getNumber() { - return this.value; - } - }; - - public ResultCase - getResultCase() { - return ResultCase.valueOf( - resultCase_); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * optional string name = 1; - * - *
-   * The name of the operation resource, which is only unique within the same
-   * service that originally returns it.
-   * 
- */ - 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; - } - } - /** - * optional string name = 1; - * - *
-   * The name of the operation resource, which is only unique within the same
-   * service that originally returns it.
-   * 
- */ - 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 METADATA_FIELD_NUMBER = 2; - private com.google.protobuf.Any metadata_; - /** - * optional .google.protobuf.Any metadata = 2; - * - *
-   * Some service-specific metadata associated with the operation.  It typically
-   * contains progress information and common metadata such as create time.
-   * Some services may not provide such metadata.  Any method that returns a
-   * long-running operation should document the metadata type, if any.
-   * 
- */ - public boolean hasMetadata() { - return metadata_ != null; - } - /** - * optional .google.protobuf.Any metadata = 2; - * - *
-   * Some service-specific metadata associated with the operation.  It typically
-   * contains progress information and common metadata such as create time.
-   * Some services may not provide such metadata.  Any method that returns a
-   * long-running operation should document the metadata type, if any.
-   * 
- */ - public com.google.protobuf.Any getMetadata() { - return metadata_ == null ? com.google.protobuf.Any.getDefaultInstance() : metadata_; - } - /** - * optional .google.protobuf.Any metadata = 2; - * - *
-   * Some service-specific metadata associated with the operation.  It typically
-   * contains progress information and common metadata such as create time.
-   * Some services may not provide such metadata.  Any method that returns a
-   * long-running operation should document the metadata type, if any.
-   * 
- */ - public com.google.protobuf.AnyOrBuilder getMetadataOrBuilder() { - return getMetadata(); - } - - public static final int DONE_FIELD_NUMBER = 3; - private boolean done_; - /** - * optional bool done = 3; - * - *
-   * If the value is false, it means the operation is still in progress.
-   * If true, the operation is completed and the `result` is available.
-   * 
- */ - public boolean getDone() { - return done_; - } - - public static final int ERROR_FIELD_NUMBER = 4; - /** - * optional .google.rpc.Status error = 4; - * - *
-   * The error result of the operation in case of failure.
-   * 
- */ - public com.google.rpc.Status getError() { - if (resultCase_ == 4) { - return (com.google.rpc.Status) result_; - } - return com.google.rpc.Status.getDefaultInstance(); - } - /** - * optional .google.rpc.Status error = 4; - * - *
-   * The error result of the operation in case of failure.
-   * 
- */ - public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { - if (resultCase_ == 4) { - return (com.google.rpc.Status) result_; - } - return com.google.rpc.Status.getDefaultInstance(); - } - - public static final int RESPONSE_FIELD_NUMBER = 5; - /** - * optional .google.protobuf.Any response = 5; - * - *
-   * The normal response of the operation in case of success.  If the original
-   * method returns no data on success, such as `Delete`, the response will be
-   * `google.protobuf.Empty`.  If the original method is standard
-   * `Get`/`Create`/`Update`, the response should be the resource.  For other
-   * methods, the response should have the type `XxxResponse`, where `Xxx`
-   * is the original method name.  For example, if the original method name
-   * is `TakeSnapshot()`, the inferred response type will be
-   * `TakeSnapshotResponse`.
-   * 
- */ - public com.google.protobuf.Any getResponse() { - if (resultCase_ == 5) { - return (com.google.protobuf.Any) result_; - } - return com.google.protobuf.Any.getDefaultInstance(); - } - /** - * optional .google.protobuf.Any response = 5; - * - *
-   * The normal response of the operation in case of success.  If the original
-   * method returns no data on success, such as `Delete`, the response will be
-   * `google.protobuf.Empty`.  If the original method is standard
-   * `Get`/`Create`/`Update`, the response should be the resource.  For other
-   * methods, the response should have the type `XxxResponse`, where `Xxx`
-   * is the original method name.  For example, if the original method name
-   * is `TakeSnapshot()`, the inferred response type will be
-   * `TakeSnapshotResponse`.
-   * 
- */ - public com.google.protobuf.AnyOrBuilder getResponseOrBuilder() { - if (resultCase_ == 5) { - return (com.google.protobuf.Any) result_; - } - return com.google.protobuf.Any.getDefaultInstance(); - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); - } - if (metadata_ != null) { - output.writeMessage(2, getMetadata()); - } - if (done_ != false) { - output.writeBool(3, done_); - } - if (resultCase_ == 4) { - output.writeMessage(4, (com.google.rpc.Status) result_); - } - if (resultCase_ == 5) { - output.writeMessage(5, (com.google.protobuf.Any) result_); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); - } - if (metadata_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getMetadata()); - } - if (done_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(3, done_); - } - if (resultCase_ == 4) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, (com.google.rpc.Status) result_); - } - if (resultCase_ == 5) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, (com.google.protobuf.Any) result_); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static com.google.longrunning.Operation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.longrunning.Operation 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.longrunning.Operation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.longrunning.Operation parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.longrunning.Operation parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.longrunning.Operation parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.longrunning.Operation parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.longrunning.Operation parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.longrunning.Operation parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.longrunning.Operation parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.longrunning.Operation prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - 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; - } - /** - * Protobuf type {@code google.longrunning.Operation} - * - *
-   * This resource represents a long-running operation that is the result of a
-   * network API call.
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.longrunning.Operation) - com.google.longrunning.OperationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.longrunning.OperationsProto.internal_static_google_longrunning_Operation_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.longrunning.OperationsProto.internal_static_google_longrunning_Operation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.longrunning.Operation.class, com.google.longrunning.Operation.Builder.class); - } - - // Construct using com.google.longrunning.Operation.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - name_ = ""; - - if (metadataBuilder_ == null) { - metadata_ = null; - } else { - metadata_ = null; - metadataBuilder_ = null; - } - done_ = false; - - resultCase_ = 0; - result_ = null; - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.longrunning.OperationsProto.internal_static_google_longrunning_Operation_descriptor; - } - - public com.google.longrunning.Operation getDefaultInstanceForType() { - return com.google.longrunning.Operation.getDefaultInstance(); - } - - public com.google.longrunning.Operation build() { - com.google.longrunning.Operation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.longrunning.Operation buildPartial() { - com.google.longrunning.Operation result = new com.google.longrunning.Operation(this); - result.name_ = name_; - if (metadataBuilder_ == null) { - result.metadata_ = metadata_; - } else { - result.metadata_ = metadataBuilder_.build(); - } - result.done_ = done_; - if (resultCase_ == 4) { - if (errorBuilder_ == null) { - result.result_ = result_; - } else { - result.result_ = errorBuilder_.build(); - } - } - if (resultCase_ == 5) { - if (responseBuilder_ == null) { - result.result_ = result_; - } else { - result.result_ = responseBuilder_.build(); - } - } - result.resultCase_ = resultCase_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.longrunning.Operation) { - return mergeFrom((com.google.longrunning.Operation)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.longrunning.Operation other) { - if (other == com.google.longrunning.Operation.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (other.hasMetadata()) { - mergeMetadata(other.getMetadata()); - } - if (other.getDone() != false) { - setDone(other.getDone()); - } - switch (other.getResultCase()) { - case ERROR: { - mergeError(other.getError()); - break; - } - case RESPONSE: { - mergeResponse(other.getResponse()); - break; - } - case RESULT_NOT_SET: { - break; - } - } - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.longrunning.Operation parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.longrunning.Operation) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int resultCase_ = 0; - private java.lang.Object result_; - public ResultCase - getResultCase() { - return ResultCase.valueOf( - resultCase_); - } - - public Builder clearResult() { - resultCase_ = 0; - result_ = null; - onChanged(); - return this; - } - - - private java.lang.Object name_ = ""; - /** - * optional string name = 1; - * - *
-     * The name of the operation resource, which is only unique within the same
-     * service that originally returns it.
-     * 
- */ - 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; - } - } - /** - * optional string name = 1; - * - *
-     * The name of the operation resource, which is only unique within the same
-     * service that originally returns it.
-     * 
- */ - 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; - } - } - /** - * optional string name = 1; - * - *
-     * The name of the operation resource, which is only unique within the same
-     * service that originally returns it.
-     * 
- */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * optional string name = 1; - * - *
-     * The name of the operation resource, which is only unique within the same
-     * service that originally returns it.
-     * 
- */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * optional string name = 1; - * - *
-     * The name of the operation resource, which is only unique within the same
-     * service that originally returns it.
-     * 
- */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.Any metadata_ = null; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> metadataBuilder_; - /** - * optional .google.protobuf.Any metadata = 2; - * - *
-     * Some service-specific metadata associated with the operation.  It typically
-     * contains progress information and common metadata such as create time.
-     * Some services may not provide such metadata.  Any method that returns a
-     * long-running operation should document the metadata type, if any.
-     * 
- */ - public boolean hasMetadata() { - return metadataBuilder_ != null || metadata_ != null; - } - /** - * optional .google.protobuf.Any metadata = 2; - * - *
-     * Some service-specific metadata associated with the operation.  It typically
-     * contains progress information and common metadata such as create time.
-     * Some services may not provide such metadata.  Any method that returns a
-     * long-running operation should document the metadata type, if any.
-     * 
- */ - public com.google.protobuf.Any getMetadata() { - if (metadataBuilder_ == null) { - return metadata_ == null ? com.google.protobuf.Any.getDefaultInstance() : metadata_; - } else { - return metadataBuilder_.getMessage(); - } - } - /** - * optional .google.protobuf.Any metadata = 2; - * - *
-     * Some service-specific metadata associated with the operation.  It typically
-     * contains progress information and common metadata such as create time.
-     * Some services may not provide such metadata.  Any method that returns a
-     * long-running operation should document the metadata type, if any.
-     * 
- */ - public Builder setMetadata(com.google.protobuf.Any value) { - if (metadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - metadata_ = value; - onChanged(); - } else { - metadataBuilder_.setMessage(value); - } - - return this; - } - /** - * optional .google.protobuf.Any metadata = 2; - * - *
-     * Some service-specific metadata associated with the operation.  It typically
-     * contains progress information and common metadata such as create time.
-     * Some services may not provide such metadata.  Any method that returns a
-     * long-running operation should document the metadata type, if any.
-     * 
- */ - public Builder setMetadata( - com.google.protobuf.Any.Builder builderForValue) { - if (metadataBuilder_ == null) { - metadata_ = builderForValue.build(); - onChanged(); - } else { - metadataBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * optional .google.protobuf.Any metadata = 2; - * - *
-     * Some service-specific metadata associated with the operation.  It typically
-     * contains progress information and common metadata such as create time.
-     * Some services may not provide such metadata.  Any method that returns a
-     * long-running operation should document the metadata type, if any.
-     * 
- */ - public Builder mergeMetadata(com.google.protobuf.Any value) { - if (metadataBuilder_ == null) { - if (metadata_ != null) { - metadata_ = - com.google.protobuf.Any.newBuilder(metadata_).mergeFrom(value).buildPartial(); - } else { - metadata_ = value; - } - onChanged(); - } else { - metadataBuilder_.mergeFrom(value); - } - - return this; - } - /** - * optional .google.protobuf.Any metadata = 2; - * - *
-     * Some service-specific metadata associated with the operation.  It typically
-     * contains progress information and common metadata such as create time.
-     * Some services may not provide such metadata.  Any method that returns a
-     * long-running operation should document the metadata type, if any.
-     * 
- */ - public Builder clearMetadata() { - if (metadataBuilder_ == null) { - metadata_ = null; - onChanged(); - } else { - metadata_ = null; - metadataBuilder_ = null; - } - - return this; - } - /** - * optional .google.protobuf.Any metadata = 2; - * - *
-     * Some service-specific metadata associated with the operation.  It typically
-     * contains progress information and common metadata such as create time.
-     * Some services may not provide such metadata.  Any method that returns a
-     * long-running operation should document the metadata type, if any.
-     * 
- */ - public com.google.protobuf.Any.Builder getMetadataBuilder() { - - onChanged(); - return getMetadataFieldBuilder().getBuilder(); - } - /** - * optional .google.protobuf.Any metadata = 2; - * - *
-     * Some service-specific metadata associated with the operation.  It typically
-     * contains progress information and common metadata such as create time.
-     * Some services may not provide such metadata.  Any method that returns a
-     * long-running operation should document the metadata type, if any.
-     * 
- */ - public com.google.protobuf.AnyOrBuilder getMetadataOrBuilder() { - if (metadataBuilder_ != null) { - return metadataBuilder_.getMessageOrBuilder(); - } else { - return metadata_ == null ? - com.google.protobuf.Any.getDefaultInstance() : metadata_; - } - } - /** - * optional .google.protobuf.Any metadata = 2; - * - *
-     * Some service-specific metadata associated with the operation.  It typically
-     * contains progress information and common metadata such as create time.
-     * Some services may not provide such metadata.  Any method that returns a
-     * long-running operation should document the metadata type, if any.
-     * 
- */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> - getMetadataFieldBuilder() { - if (metadataBuilder_ == null) { - metadataBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>( - getMetadata(), - getParentForChildren(), - isClean()); - metadata_ = null; - } - return metadataBuilder_; - } - - private boolean done_ ; - /** - * optional bool done = 3; - * - *
-     * If the value is false, it means the operation is still in progress.
-     * If true, the operation is completed and the `result` is available.
-     * 
- */ - public boolean getDone() { - return done_; - } - /** - * optional bool done = 3; - * - *
-     * If the value is false, it means the operation is still in progress.
-     * If true, the operation is completed and the `result` is available.
-     * 
- */ - public Builder setDone(boolean value) { - - done_ = value; - onChanged(); - return this; - } - /** - * optional bool done = 3; - * - *
-     * If the value is false, it means the operation is still in progress.
-     * If true, the operation is completed and the `result` is available.
-     * 
- */ - public Builder clearDone() { - - done_ = false; - onChanged(); - return this; - } - - private com.google.protobuf.SingleFieldBuilder< - com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> errorBuilder_; - /** - * optional .google.rpc.Status error = 4; - * - *
-     * The error result of the operation in case of failure.
-     * 
- */ - public com.google.rpc.Status getError() { - if (errorBuilder_ == null) { - if (resultCase_ == 4) { - return (com.google.rpc.Status) result_; - } - return com.google.rpc.Status.getDefaultInstance(); - } else { - if (resultCase_ == 4) { - return errorBuilder_.getMessage(); - } - return com.google.rpc.Status.getDefaultInstance(); - } - } - /** - * optional .google.rpc.Status error = 4; - * - *
-     * The error result of the operation in case of failure.
-     * 
- */ - public Builder setError(com.google.rpc.Status value) { - if (errorBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - result_ = value; - onChanged(); - } else { - errorBuilder_.setMessage(value); - } - resultCase_ = 4; - return this; - } - /** - * optional .google.rpc.Status error = 4; - * - *
-     * The error result of the operation in case of failure.
-     * 
- */ - public Builder setError( - com.google.rpc.Status.Builder builderForValue) { - if (errorBuilder_ == null) { - result_ = builderForValue.build(); - onChanged(); - } else { - errorBuilder_.setMessage(builderForValue.build()); - } - resultCase_ = 4; - return this; - } - /** - * optional .google.rpc.Status error = 4; - * - *
-     * The error result of the operation in case of failure.
-     * 
- */ - public Builder mergeError(com.google.rpc.Status value) { - if (errorBuilder_ == null) { - if (resultCase_ == 4 && - result_ != com.google.rpc.Status.getDefaultInstance()) { - result_ = com.google.rpc.Status.newBuilder((com.google.rpc.Status) result_) - .mergeFrom(value).buildPartial(); - } else { - result_ = value; - } - onChanged(); - } else { - if (resultCase_ == 4) { - errorBuilder_.mergeFrom(value); - } - errorBuilder_.setMessage(value); - } - resultCase_ = 4; - return this; - } - /** - * optional .google.rpc.Status error = 4; - * - *
-     * The error result of the operation in case of failure.
-     * 
- */ - public Builder clearError() { - if (errorBuilder_ == null) { - if (resultCase_ == 4) { - resultCase_ = 0; - result_ = null; - onChanged(); - } - } else { - if (resultCase_ == 4) { - resultCase_ = 0; - result_ = null; - } - errorBuilder_.clear(); - } - return this; - } - /** - * optional .google.rpc.Status error = 4; - * - *
-     * The error result of the operation in case of failure.
-     * 
- */ - public com.google.rpc.Status.Builder getErrorBuilder() { - return getErrorFieldBuilder().getBuilder(); - } - /** - * optional .google.rpc.Status error = 4; - * - *
-     * The error result of the operation in case of failure.
-     * 
- */ - public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { - if ((resultCase_ == 4) && (errorBuilder_ != null)) { - return errorBuilder_.getMessageOrBuilder(); - } else { - if (resultCase_ == 4) { - return (com.google.rpc.Status) result_; - } - return com.google.rpc.Status.getDefaultInstance(); - } - } - /** - * optional .google.rpc.Status error = 4; - * - *
-     * The error result of the operation in case of failure.
-     * 
- */ - private com.google.protobuf.SingleFieldBuilder< - com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> - getErrorFieldBuilder() { - if (errorBuilder_ == null) { - if (!(resultCase_ == 4)) { - result_ = com.google.rpc.Status.getDefaultInstance(); - } - errorBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>( - (com.google.rpc.Status) result_, - getParentForChildren(), - isClean()); - result_ = null; - } - resultCase_ = 4; - onChanged();; - return errorBuilder_; - } - - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> responseBuilder_; - /** - * optional .google.protobuf.Any response = 5; - * - *
-     * The normal response of the operation in case of success.  If the original
-     * method returns no data on success, such as `Delete`, the response will be
-     * `google.protobuf.Empty`.  If the original method is standard
-     * `Get`/`Create`/`Update`, the response should be the resource.  For other
-     * methods, the response should have the type `XxxResponse`, where `Xxx`
-     * is the original method name.  For example, if the original method name
-     * is `TakeSnapshot()`, the inferred response type will be
-     * `TakeSnapshotResponse`.
-     * 
- */ - public com.google.protobuf.Any getResponse() { - if (responseBuilder_ == null) { - if (resultCase_ == 5) { - return (com.google.protobuf.Any) result_; - } - return com.google.protobuf.Any.getDefaultInstance(); - } else { - if (resultCase_ == 5) { - return responseBuilder_.getMessage(); - } - return com.google.protobuf.Any.getDefaultInstance(); - } - } - /** - * optional .google.protobuf.Any response = 5; - * - *
-     * The normal response of the operation in case of success.  If the original
-     * method returns no data on success, such as `Delete`, the response will be
-     * `google.protobuf.Empty`.  If the original method is standard
-     * `Get`/`Create`/`Update`, the response should be the resource.  For other
-     * methods, the response should have the type `XxxResponse`, where `Xxx`
-     * is the original method name.  For example, if the original method name
-     * is `TakeSnapshot()`, the inferred response type will be
-     * `TakeSnapshotResponse`.
-     * 
- */ - public Builder setResponse(com.google.protobuf.Any value) { - if (responseBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - result_ = value; - onChanged(); - } else { - responseBuilder_.setMessage(value); - } - resultCase_ = 5; - return this; - } - /** - * optional .google.protobuf.Any response = 5; - * - *
-     * The normal response of the operation in case of success.  If the original
-     * method returns no data on success, such as `Delete`, the response will be
-     * `google.protobuf.Empty`.  If the original method is standard
-     * `Get`/`Create`/`Update`, the response should be the resource.  For other
-     * methods, the response should have the type `XxxResponse`, where `Xxx`
-     * is the original method name.  For example, if the original method name
-     * is `TakeSnapshot()`, the inferred response type will be
-     * `TakeSnapshotResponse`.
-     * 
- */ - public Builder setResponse( - com.google.protobuf.Any.Builder builderForValue) { - if (responseBuilder_ == null) { - result_ = builderForValue.build(); - onChanged(); - } else { - responseBuilder_.setMessage(builderForValue.build()); - } - resultCase_ = 5; - return this; - } - /** - * optional .google.protobuf.Any response = 5; - * - *
-     * The normal response of the operation in case of success.  If the original
-     * method returns no data on success, such as `Delete`, the response will be
-     * `google.protobuf.Empty`.  If the original method is standard
-     * `Get`/`Create`/`Update`, the response should be the resource.  For other
-     * methods, the response should have the type `XxxResponse`, where `Xxx`
-     * is the original method name.  For example, if the original method name
-     * is `TakeSnapshot()`, the inferred response type will be
-     * `TakeSnapshotResponse`.
-     * 
- */ - public Builder mergeResponse(com.google.protobuf.Any value) { - if (responseBuilder_ == null) { - if (resultCase_ == 5 && - result_ != com.google.protobuf.Any.getDefaultInstance()) { - result_ = com.google.protobuf.Any.newBuilder((com.google.protobuf.Any) result_) - .mergeFrom(value).buildPartial(); - } else { - result_ = value; - } - onChanged(); - } else { - if (resultCase_ == 5) { - responseBuilder_.mergeFrom(value); - } - responseBuilder_.setMessage(value); - } - resultCase_ = 5; - return this; - } - /** - * optional .google.protobuf.Any response = 5; - * - *
-     * The normal response of the operation in case of success.  If the original
-     * method returns no data on success, such as `Delete`, the response will be
-     * `google.protobuf.Empty`.  If the original method is standard
-     * `Get`/`Create`/`Update`, the response should be the resource.  For other
-     * methods, the response should have the type `XxxResponse`, where `Xxx`
-     * is the original method name.  For example, if the original method name
-     * is `TakeSnapshot()`, the inferred response type will be
-     * `TakeSnapshotResponse`.
-     * 
- */ - public Builder clearResponse() { - if (responseBuilder_ == null) { - if (resultCase_ == 5) { - resultCase_ = 0; - result_ = null; - onChanged(); - } - } else { - if (resultCase_ == 5) { - resultCase_ = 0; - result_ = null; - } - responseBuilder_.clear(); - } - return this; - } - /** - * optional .google.protobuf.Any response = 5; - * - *
-     * The normal response of the operation in case of success.  If the original
-     * method returns no data on success, such as `Delete`, the response will be
-     * `google.protobuf.Empty`.  If the original method is standard
-     * `Get`/`Create`/`Update`, the response should be the resource.  For other
-     * methods, the response should have the type `XxxResponse`, where `Xxx`
-     * is the original method name.  For example, if the original method name
-     * is `TakeSnapshot()`, the inferred response type will be
-     * `TakeSnapshotResponse`.
-     * 
- */ - public com.google.protobuf.Any.Builder getResponseBuilder() { - return getResponseFieldBuilder().getBuilder(); - } - /** - * optional .google.protobuf.Any response = 5; - * - *
-     * The normal response of the operation in case of success.  If the original
-     * method returns no data on success, such as `Delete`, the response will be
-     * `google.protobuf.Empty`.  If the original method is standard
-     * `Get`/`Create`/`Update`, the response should be the resource.  For other
-     * methods, the response should have the type `XxxResponse`, where `Xxx`
-     * is the original method name.  For example, if the original method name
-     * is `TakeSnapshot()`, the inferred response type will be
-     * `TakeSnapshotResponse`.
-     * 
- */ - public com.google.protobuf.AnyOrBuilder getResponseOrBuilder() { - if ((resultCase_ == 5) && (responseBuilder_ != null)) { - return responseBuilder_.getMessageOrBuilder(); - } else { - if (resultCase_ == 5) { - return (com.google.protobuf.Any) result_; - } - return com.google.protobuf.Any.getDefaultInstance(); - } - } - /** - * optional .google.protobuf.Any response = 5; - * - *
-     * The normal response of the operation in case of success.  If the original
-     * method returns no data on success, such as `Delete`, the response will be
-     * `google.protobuf.Empty`.  If the original method is standard
-     * `Get`/`Create`/`Update`, the response should be the resource.  For other
-     * methods, the response should have the type `XxxResponse`, where `Xxx`
-     * is the original method name.  For example, if the original method name
-     * is `TakeSnapshot()`, the inferred response type will be
-     * `TakeSnapshotResponse`.
-     * 
- */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> - getResponseFieldBuilder() { - if (responseBuilder_ == null) { - if (!(resultCase_ == 5)) { - result_ = com.google.protobuf.Any.getDefaultInstance(); - } - responseBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>( - (com.google.protobuf.Any) result_, - getParentForChildren(), - isClean()); - result_ = null; - } - resultCase_ = 5; - onChanged();; - return responseBuilder_; - } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - - // @@protoc_insertion_point(builder_scope:google.longrunning.Operation) - } - - // @@protoc_insertion_point(class_scope:google.longrunning.Operation) - private static final com.google.longrunning.Operation DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.longrunning.Operation(); - } - - public static com.google.longrunning.Operation getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public Operation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new Operation(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public com.google.longrunning.Operation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-gax/generated/src/main/java/com/google/longrunning/OperationOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/longrunning/OperationOrBuilder.java deleted file mode 100644 index 8366f5d21f3e..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/longrunning/OperationOrBuilder.java +++ /dev/null @@ -1,123 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/longrunning/operations.proto - -package com.google.longrunning; - -public interface OperationOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.longrunning.Operation) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string name = 1; - * - *
-   * The name of the operation resource, which is only unique within the same
-   * service that originally returns it.
-   * 
- */ - java.lang.String getName(); - /** - * optional string name = 1; - * - *
-   * The name of the operation resource, which is only unique within the same
-   * service that originally returns it.
-   * 
- */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - * optional .google.protobuf.Any metadata = 2; - * - *
-   * Some service-specific metadata associated with the operation.  It typically
-   * contains progress information and common metadata such as create time.
-   * Some services may not provide such metadata.  Any method that returns a
-   * long-running operation should document the metadata type, if any.
-   * 
- */ - boolean hasMetadata(); - /** - * optional .google.protobuf.Any metadata = 2; - * - *
-   * Some service-specific metadata associated with the operation.  It typically
-   * contains progress information and common metadata such as create time.
-   * Some services may not provide such metadata.  Any method that returns a
-   * long-running operation should document the metadata type, if any.
-   * 
- */ - com.google.protobuf.Any getMetadata(); - /** - * optional .google.protobuf.Any metadata = 2; - * - *
-   * Some service-specific metadata associated with the operation.  It typically
-   * contains progress information and common metadata such as create time.
-   * Some services may not provide such metadata.  Any method that returns a
-   * long-running operation should document the metadata type, if any.
-   * 
- */ - com.google.protobuf.AnyOrBuilder getMetadataOrBuilder(); - - /** - * optional bool done = 3; - * - *
-   * If the value is false, it means the operation is still in progress.
-   * If true, the operation is completed and the `result` is available.
-   * 
- */ - boolean getDone(); - - /** - * optional .google.rpc.Status error = 4; - * - *
-   * The error result of the operation in case of failure.
-   * 
- */ - com.google.rpc.Status getError(); - /** - * optional .google.rpc.Status error = 4; - * - *
-   * The error result of the operation in case of failure.
-   * 
- */ - com.google.rpc.StatusOrBuilder getErrorOrBuilder(); - - /** - * optional .google.protobuf.Any response = 5; - * - *
-   * The normal response of the operation in case of success.  If the original
-   * method returns no data on success, such as `Delete`, the response will be
-   * `google.protobuf.Empty`.  If the original method is standard
-   * `Get`/`Create`/`Update`, the response should be the resource.  For other
-   * methods, the response should have the type `XxxResponse`, where `Xxx`
-   * is the original method name.  For example, if the original method name
-   * is `TakeSnapshot()`, the inferred response type will be
-   * `TakeSnapshotResponse`.
-   * 
- */ - com.google.protobuf.Any getResponse(); - /** - * optional .google.protobuf.Any response = 5; - * - *
-   * The normal response of the operation in case of success.  If the original
-   * method returns no data on success, such as `Delete`, the response will be
-   * `google.protobuf.Empty`.  If the original method is standard
-   * `Get`/`Create`/`Update`, the response should be the resource.  For other
-   * methods, the response should have the type `XxxResponse`, where `Xxx`
-   * is the original method name.  For example, if the original method name
-   * is `TakeSnapshot()`, the inferred response type will be
-   * `TakeSnapshotResponse`.
-   * 
- */ - com.google.protobuf.AnyOrBuilder getResponseOrBuilder(); - - public com.google.longrunning.Operation.ResultCase getResultCase(); -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/longrunning/OperationsGrpc.java b/gcloud-java-gax/generated/src/main/java/com/google/longrunning/OperationsGrpc.java deleted file mode 100644 index 0c1c82a52874..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/longrunning/OperationsGrpc.java +++ /dev/null @@ -1,306 +0,0 @@ -package com.google.longrunning; - -import static io.grpc.stub.ClientCalls.asyncUnaryCall; -import static io.grpc.stub.ClientCalls.asyncServerStreamingCall; -import static io.grpc.stub.ClientCalls.asyncClientStreamingCall; -import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall; -import static io.grpc.stub.ClientCalls.blockingUnaryCall; -import static io.grpc.stub.ClientCalls.blockingServerStreamingCall; -import static io.grpc.stub.ClientCalls.futureUnaryCall; -import static io.grpc.MethodDescriptor.generateFullMethodName; -import static io.grpc.stub.ServerCalls.asyncUnaryCall; -import static io.grpc.stub.ServerCalls.asyncServerStreamingCall; -import static io.grpc.stub.ServerCalls.asyncClientStreamingCall; -import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall; - -@javax.annotation.Generated("by gRPC proto compiler") -public class OperationsGrpc { - - private OperationsGrpc() {} - - public static final String SERVICE_NAME = "google.longrunning.Operations"; - - // Static method descriptors that strictly reflect the proto. - @io.grpc.ExperimentalApi - public static final io.grpc.MethodDescriptor METHOD_GET_OPERATION = - io.grpc.MethodDescriptor.create( - io.grpc.MethodDescriptor.MethodType.UNARY, - generateFullMethodName( - "google.longrunning.Operations", "GetOperation"), - io.grpc.protobuf.ProtoUtils.marshaller(com.google.longrunning.GetOperationRequest.getDefaultInstance()), - io.grpc.protobuf.ProtoUtils.marshaller(com.google.longrunning.Operation.getDefaultInstance())); - @io.grpc.ExperimentalApi - public static final io.grpc.MethodDescriptor METHOD_LIST_OPERATIONS = - io.grpc.MethodDescriptor.create( - io.grpc.MethodDescriptor.MethodType.UNARY, - generateFullMethodName( - "google.longrunning.Operations", "ListOperations"), - io.grpc.protobuf.ProtoUtils.marshaller(com.google.longrunning.ListOperationsRequest.getDefaultInstance()), - io.grpc.protobuf.ProtoUtils.marshaller(com.google.longrunning.ListOperationsResponse.getDefaultInstance())); - @io.grpc.ExperimentalApi - public static final io.grpc.MethodDescriptor METHOD_CANCEL_OPERATION = - io.grpc.MethodDescriptor.create( - io.grpc.MethodDescriptor.MethodType.UNARY, - generateFullMethodName( - "google.longrunning.Operations", "CancelOperation"), - io.grpc.protobuf.ProtoUtils.marshaller(com.google.longrunning.CancelOperationRequest.getDefaultInstance()), - io.grpc.protobuf.ProtoUtils.marshaller(com.google.protobuf.Empty.getDefaultInstance())); - @io.grpc.ExperimentalApi - public static final io.grpc.MethodDescriptor METHOD_DELETE_OPERATION = - io.grpc.MethodDescriptor.create( - io.grpc.MethodDescriptor.MethodType.UNARY, - generateFullMethodName( - "google.longrunning.Operations", "DeleteOperation"), - io.grpc.protobuf.ProtoUtils.marshaller(com.google.longrunning.DeleteOperationRequest.getDefaultInstance()), - io.grpc.protobuf.ProtoUtils.marshaller(com.google.protobuf.Empty.getDefaultInstance())); - - public static OperationsStub newStub(io.grpc.Channel channel) { - return new OperationsStub(channel); - } - - public static OperationsBlockingStub newBlockingStub( - io.grpc.Channel channel) { - return new OperationsBlockingStub(channel); - } - - public static OperationsFutureStub newFutureStub( - io.grpc.Channel channel) { - return new OperationsFutureStub(channel); - } - - public static interface Operations { - - public void getOperation(com.google.longrunning.GetOperationRequest request, - io.grpc.stub.StreamObserver responseObserver); - - public void listOperations(com.google.longrunning.ListOperationsRequest request, - io.grpc.stub.StreamObserver responseObserver); - - public void cancelOperation(com.google.longrunning.CancelOperationRequest request, - io.grpc.stub.StreamObserver responseObserver); - - public void deleteOperation(com.google.longrunning.DeleteOperationRequest request, - io.grpc.stub.StreamObserver responseObserver); - } - - public static interface OperationsBlockingClient { - - public com.google.longrunning.Operation getOperation(com.google.longrunning.GetOperationRequest request); - - public com.google.longrunning.ListOperationsResponse listOperations(com.google.longrunning.ListOperationsRequest request); - - public com.google.protobuf.Empty cancelOperation(com.google.longrunning.CancelOperationRequest request); - - public com.google.protobuf.Empty deleteOperation(com.google.longrunning.DeleteOperationRequest request); - } - - public static interface OperationsFutureClient { - - public com.google.common.util.concurrent.ListenableFuture getOperation( - com.google.longrunning.GetOperationRequest request); - - public com.google.common.util.concurrent.ListenableFuture listOperations( - com.google.longrunning.ListOperationsRequest request); - - public com.google.common.util.concurrent.ListenableFuture cancelOperation( - com.google.longrunning.CancelOperationRequest request); - - public com.google.common.util.concurrent.ListenableFuture deleteOperation( - com.google.longrunning.DeleteOperationRequest request); - } - - public static class OperationsStub extends io.grpc.stub.AbstractStub - implements Operations { - private OperationsStub(io.grpc.Channel channel) { - super(channel); - } - - private OperationsStub(io.grpc.Channel channel, - io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected OperationsStub build(io.grpc.Channel channel, - io.grpc.CallOptions callOptions) { - return new OperationsStub(channel, callOptions); - } - - @java.lang.Override - public void getOperation(com.google.longrunning.GetOperationRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnaryCall( - getChannel().newCall(METHOD_GET_OPERATION, getCallOptions()), request, responseObserver); - } - - @java.lang.Override - public void listOperations(com.google.longrunning.ListOperationsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnaryCall( - getChannel().newCall(METHOD_LIST_OPERATIONS, getCallOptions()), request, responseObserver); - } - - @java.lang.Override - public void cancelOperation(com.google.longrunning.CancelOperationRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnaryCall( - getChannel().newCall(METHOD_CANCEL_OPERATION, getCallOptions()), request, responseObserver); - } - - @java.lang.Override - public void deleteOperation(com.google.longrunning.DeleteOperationRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnaryCall( - getChannel().newCall(METHOD_DELETE_OPERATION, getCallOptions()), request, responseObserver); - } - } - - public static class OperationsBlockingStub extends io.grpc.stub.AbstractStub - implements OperationsBlockingClient { - private OperationsBlockingStub(io.grpc.Channel channel) { - super(channel); - } - - private OperationsBlockingStub(io.grpc.Channel channel, - io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected OperationsBlockingStub build(io.grpc.Channel channel, - io.grpc.CallOptions callOptions) { - return new OperationsBlockingStub(channel, callOptions); - } - - @java.lang.Override - public com.google.longrunning.Operation getOperation(com.google.longrunning.GetOperationRequest request) { - return blockingUnaryCall( - getChannel().newCall(METHOD_GET_OPERATION, getCallOptions()), request); - } - - @java.lang.Override - public com.google.longrunning.ListOperationsResponse listOperations(com.google.longrunning.ListOperationsRequest request) { - return blockingUnaryCall( - getChannel().newCall(METHOD_LIST_OPERATIONS, getCallOptions()), request); - } - - @java.lang.Override - public com.google.protobuf.Empty cancelOperation(com.google.longrunning.CancelOperationRequest request) { - return blockingUnaryCall( - getChannel().newCall(METHOD_CANCEL_OPERATION, getCallOptions()), request); - } - - @java.lang.Override - public com.google.protobuf.Empty deleteOperation(com.google.longrunning.DeleteOperationRequest request) { - return blockingUnaryCall( - getChannel().newCall(METHOD_DELETE_OPERATION, getCallOptions()), request); - } - } - - public static class OperationsFutureStub extends io.grpc.stub.AbstractStub - implements OperationsFutureClient { - private OperationsFutureStub(io.grpc.Channel channel) { - super(channel); - } - - private OperationsFutureStub(io.grpc.Channel channel, - io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected OperationsFutureStub build(io.grpc.Channel channel, - io.grpc.CallOptions callOptions) { - return new OperationsFutureStub(channel, callOptions); - } - - @java.lang.Override - public com.google.common.util.concurrent.ListenableFuture getOperation( - com.google.longrunning.GetOperationRequest request) { - return futureUnaryCall( - getChannel().newCall(METHOD_GET_OPERATION, getCallOptions()), request); - } - - @java.lang.Override - public com.google.common.util.concurrent.ListenableFuture listOperations( - com.google.longrunning.ListOperationsRequest request) { - return futureUnaryCall( - getChannel().newCall(METHOD_LIST_OPERATIONS, getCallOptions()), request); - } - - @java.lang.Override - public com.google.common.util.concurrent.ListenableFuture cancelOperation( - com.google.longrunning.CancelOperationRequest request) { - return futureUnaryCall( - getChannel().newCall(METHOD_CANCEL_OPERATION, getCallOptions()), request); - } - - @java.lang.Override - public com.google.common.util.concurrent.ListenableFuture deleteOperation( - com.google.longrunning.DeleteOperationRequest request) { - return futureUnaryCall( - getChannel().newCall(METHOD_DELETE_OPERATION, getCallOptions()), request); - } - } - - public static io.grpc.ServerServiceDefinition bindService( - final Operations serviceImpl) { - return io.grpc.ServerServiceDefinition.builder(SERVICE_NAME) - .addMethod( - METHOD_GET_OPERATION, - asyncUnaryCall( - new io.grpc.stub.ServerCalls.UnaryMethod< - com.google.longrunning.GetOperationRequest, - com.google.longrunning.Operation>() { - @java.lang.Override - public void invoke( - com.google.longrunning.GetOperationRequest request, - io.grpc.stub.StreamObserver responseObserver) { - serviceImpl.getOperation(request, responseObserver); - } - })) - .addMethod( - METHOD_LIST_OPERATIONS, - asyncUnaryCall( - new io.grpc.stub.ServerCalls.UnaryMethod< - com.google.longrunning.ListOperationsRequest, - com.google.longrunning.ListOperationsResponse>() { - @java.lang.Override - public void invoke( - com.google.longrunning.ListOperationsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - serviceImpl.listOperations(request, responseObserver); - } - })) - .addMethod( - METHOD_CANCEL_OPERATION, - asyncUnaryCall( - new io.grpc.stub.ServerCalls.UnaryMethod< - com.google.longrunning.CancelOperationRequest, - com.google.protobuf.Empty>() { - @java.lang.Override - public void invoke( - com.google.longrunning.CancelOperationRequest request, - io.grpc.stub.StreamObserver responseObserver) { - serviceImpl.cancelOperation(request, responseObserver); - } - })) - .addMethod( - METHOD_DELETE_OPERATION, - asyncUnaryCall( - new io.grpc.stub.ServerCalls.UnaryMethod< - com.google.longrunning.DeleteOperationRequest, - com.google.protobuf.Empty>() { - @java.lang.Override - public void invoke( - com.google.longrunning.DeleteOperationRequest request, - io.grpc.stub.StreamObserver responseObserver) { - serviceImpl.deleteOperation(request, responseObserver); - } - })).build(); - } -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/longrunning/OperationsProto.java b/gcloud-java-gax/generated/src/main/java/com/google/longrunning/OperationsProto.java deleted file mode 100644 index 462e611fba19..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/longrunning/OperationsProto.java +++ /dev/null @@ -1,146 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/longrunning/operations.proto - -package com.google.longrunning; - -public final class OperationsProto { - private OperationsProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - } - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_longrunning_Operation_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_longrunning_Operation_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_longrunning_GetOperationRequest_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_longrunning_GetOperationRequest_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_longrunning_ListOperationsRequest_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_longrunning_ListOperationsRequest_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_longrunning_ListOperationsResponse_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_longrunning_ListOperationsResponse_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_longrunning_CancelOperationRequest_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_longrunning_CancelOperationRequest_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_longrunning_DeleteOperationRequest_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_longrunning_DeleteOperationRequest_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/longrunning/operations.proto\022\022g" + - "oogle.longrunning\032\034google/api/annotation" + - "s.proto\032\031google/protobuf/any.proto\032\033goog" + - "le/protobuf/empty.proto\032\027google/rpc/stat" + - "us.proto\"\250\001\n\tOperation\022\014\n\004name\030\001 \001(\t\022&\n\010" + - "metadata\030\002 \001(\0132\024.google.protobuf.Any\022\014\n\004" + - "done\030\003 \001(\010\022#\n\005error\030\004 \001(\0132\022.google.rpc.S" + - "tatusH\000\022(\n\010response\030\005 \001(\0132\024.google.proto" + - "buf.AnyH\000B\010\n\006result\"#\n\023GetOperationReque" + - "st\022\014\n\004name\030\001 \001(\t\"\\\n\025ListOperationsReques", - "t\022\014\n\004name\030\004 \001(\t\022\016\n\006filter\030\001 \001(\t\022\021\n\tpage_" + - "size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"d\n\026ListOp" + - "erationsResponse\0221\n\noperations\030\001 \003(\0132\035.g" + - "oogle.longrunning.Operation\022\027\n\017next_page" + - "_token\030\002 \001(\t\"&\n\026CancelOperationRequest\022\014" + - "\n\004name\030\001 \001(\t\"&\n\026DeleteOperationRequest\022\014" + - "\n\004name\030\001 \001(\t2\214\004\n\nOperations\022x\n\014GetOperat" + - "ion\022\'.google.longrunning.GetOperationReq" + - "uest\032\035.google.longrunning.Operation\" \202\323\344" + - "\223\002\032\022\030/v1/{name=operations/**}\022\206\001\n\016ListOp", - "erations\022).google.longrunning.ListOperat" + - "ionsRequest\032*.google.longrunning.ListOpe" + - "rationsResponse\"\035\202\323\344\223\002\027\022\025/v1/{name=opera" + - "tions}\022\201\001\n\017CancelOperation\022*.google.long" + - "running.CancelOperationRequest\032\026.google." + - "protobuf.Empty\"*\202\323\344\223\002$\"\037/v1/{name=operat" + - "ions/**}:cancel:\001*\022w\n\017DeleteOperation\022*." + - "google.longrunning.DeleteOperationReques" + - "t\032\026.google.protobuf.Empty\" \202\323\344\223\002\032*\030/v1/{" + - "name=operations/**}B+\n\026com.google.longru", - "nningB\017OperationsProtoP\001b\006proto3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.AnnotationsProto.getDescriptor(), - com.google.protobuf.AnyProto.getDescriptor(), - com.google.protobuf.EmptyProto.getDescriptor(), - com.google.rpc.StatusProto.getDescriptor(), - }, assigner); - internal_static_google_longrunning_Operation_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_longrunning_Operation_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_longrunning_Operation_descriptor, - new java.lang.String[] { "Name", "Metadata", "Done", "Error", "Response", "Result", }); - internal_static_google_longrunning_GetOperationRequest_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_longrunning_GetOperationRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_longrunning_GetOperationRequest_descriptor, - new java.lang.String[] { "Name", }); - internal_static_google_longrunning_ListOperationsRequest_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_google_longrunning_ListOperationsRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_longrunning_ListOperationsRequest_descriptor, - new java.lang.String[] { "Name", "Filter", "PageSize", "PageToken", }); - internal_static_google_longrunning_ListOperationsResponse_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_google_longrunning_ListOperationsResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_longrunning_ListOperationsResponse_descriptor, - new java.lang.String[] { "Operations", "NextPageToken", }); - internal_static_google_longrunning_CancelOperationRequest_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_google_longrunning_CancelOperationRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_longrunning_CancelOperationRequest_descriptor, - new java.lang.String[] { "Name", }); - internal_static_google_longrunning_DeleteOperationRequest_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_google_longrunning_DeleteOperationRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_longrunning_DeleteOperationRequest_descriptor, - new java.lang.String[] { "Name", }); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(com.google.api.AnnotationsProto.http); - com.google.protobuf.Descriptors.FileDescriptor - .internalUpdateFileDescriptor(descriptor, registry); - com.google.api.AnnotationsProto.getDescriptor(); - com.google.protobuf.AnyProto.getDescriptor(); - com.google.protobuf.EmptyProto.getDescriptor(); - com.google.rpc.StatusProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/rpc/BadRequest.java b/gcloud-java-gax/generated/src/main/java/com/google/rpc/BadRequest.java deleted file mode 100644 index acb0dc65019d..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/rpc/BadRequest.java +++ /dev/null @@ -1,1437 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/rpc/error_details.proto - -package com.google.rpc; - -/** - * Protobuf type {@code google.rpc.BadRequest} - * - *
- * Describes violations in a client request. This error type focuses on the
- * syntactic aspects of the request.
- * 
- */ -public final class BadRequest extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.rpc.BadRequest) - BadRequestOrBuilder { - // Use BadRequest.newBuilder() to construct. - private BadRequest(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private BadRequest() { - fieldViolations_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private BadRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - int mutable_bitField0_ = 0; - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!input.skipField(tag)) { - done = true; - } - break; - } - case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - fieldViolations_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - fieldViolations_.add(input.readMessage(com.google.rpc.BadRequest.FieldViolation.parser(), extensionRegistry)); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - fieldViolations_ = java.util.Collections.unmodifiableList(fieldViolations_); - } - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_BadRequest_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_BadRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.rpc.BadRequest.class, com.google.rpc.BadRequest.Builder.class); - } - - public interface FieldViolationOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.rpc.BadRequest.FieldViolation) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string field = 1; - * - *
-     * A path leading to a field in the request body. The value will be a
-     * sequence of dot-separated identifiers that identify a protocol buffer
-     * field. E.g., "violations.field" would identify this field.
-     * 
- */ - java.lang.String getField(); - /** - * optional string field = 1; - * - *
-     * A path leading to a field in the request body. The value will be a
-     * sequence of dot-separated identifiers that identify a protocol buffer
-     * field. E.g., "violations.field" would identify this field.
-     * 
- */ - com.google.protobuf.ByteString - getFieldBytes(); - - /** - * optional string description = 2; - * - *
-     * A description of why the request element is bad.
-     * 
- */ - java.lang.String getDescription(); - /** - * optional string description = 2; - * - *
-     * A description of why the request element is bad.
-     * 
- */ - com.google.protobuf.ByteString - getDescriptionBytes(); - } - /** - * Protobuf type {@code google.rpc.BadRequest.FieldViolation} - * - *
-   * A message type used to describe a single bad request field.
-   * 
- */ - public static final class FieldViolation extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.rpc.BadRequest.FieldViolation) - FieldViolationOrBuilder { - // Use FieldViolation.newBuilder() to construct. - private FieldViolation(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private FieldViolation() { - field_ = ""; - description_ = ""; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private FieldViolation( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - int mutable_bitField0_ = 0; - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!input.skipField(tag)) { - done = true; - } - break; - } - case 10: { - String s = input.readStringRequireUtf8(); - - field_ = s; - break; - } - case 18: { - String s = input.readStringRequireUtf8(); - - description_ = s; - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_BadRequest_FieldViolation_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_BadRequest_FieldViolation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.rpc.BadRequest.FieldViolation.class, com.google.rpc.BadRequest.FieldViolation.Builder.class); - } - - public static final int FIELD_FIELD_NUMBER = 1; - private volatile java.lang.Object field_; - /** - * optional string field = 1; - * - *
-     * A path leading to a field in the request body. The value will be a
-     * sequence of dot-separated identifiers that identify a protocol buffer
-     * field. E.g., "violations.field" would identify this field.
-     * 
- */ - public java.lang.String getField() { - java.lang.Object ref = field_; - 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(); - field_ = s; - return s; - } - } - /** - * optional string field = 1; - * - *
-     * A path leading to a field in the request body. The value will be a
-     * sequence of dot-separated identifiers that identify a protocol buffer
-     * field. E.g., "violations.field" would identify this field.
-     * 
- */ - public com.google.protobuf.ByteString - getFieldBytes() { - java.lang.Object ref = field_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - field_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DESCRIPTION_FIELD_NUMBER = 2; - private volatile java.lang.Object description_; - /** - * optional string description = 2; - * - *
-     * A description of why the request element is bad.
-     * 
- */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - 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(); - description_ = s; - return s; - } - } - /** - * optional string description = 2; - * - *
-     * A description of why the request element is bad.
-     * 
- */ - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!getFieldBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, field_); - } - if (!getDescriptionBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, description_); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getFieldBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, field_); - } - if (!getDescriptionBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, description_); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static com.google.rpc.BadRequest.FieldViolation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.rpc.BadRequest.FieldViolation 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.rpc.BadRequest.FieldViolation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.rpc.BadRequest.FieldViolation parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.rpc.BadRequest.FieldViolation parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.rpc.BadRequest.FieldViolation parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.rpc.BadRequest.FieldViolation parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.rpc.BadRequest.FieldViolation parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.rpc.BadRequest.FieldViolation parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.rpc.BadRequest.FieldViolation parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.rpc.BadRequest.FieldViolation prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - 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; - } - /** - * Protobuf type {@code google.rpc.BadRequest.FieldViolation} - * - *
-     * A message type used to describe a single bad request field.
-     * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.rpc.BadRequest.FieldViolation) - com.google.rpc.BadRequest.FieldViolationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_BadRequest_FieldViolation_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_BadRequest_FieldViolation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.rpc.BadRequest.FieldViolation.class, com.google.rpc.BadRequest.FieldViolation.Builder.class); - } - - // Construct using com.google.rpc.BadRequest.FieldViolation.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - field_ = ""; - - description_ = ""; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_BadRequest_FieldViolation_descriptor; - } - - public com.google.rpc.BadRequest.FieldViolation getDefaultInstanceForType() { - return com.google.rpc.BadRequest.FieldViolation.getDefaultInstance(); - } - - public com.google.rpc.BadRequest.FieldViolation build() { - com.google.rpc.BadRequest.FieldViolation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.rpc.BadRequest.FieldViolation buildPartial() { - com.google.rpc.BadRequest.FieldViolation result = new com.google.rpc.BadRequest.FieldViolation(this); - result.field_ = field_; - result.description_ = description_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.rpc.BadRequest.FieldViolation) { - return mergeFrom((com.google.rpc.BadRequest.FieldViolation)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.rpc.BadRequest.FieldViolation other) { - if (other == com.google.rpc.BadRequest.FieldViolation.getDefaultInstance()) return this; - if (!other.getField().isEmpty()) { - field_ = other.field_; - onChanged(); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - onChanged(); - } - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.rpc.BadRequest.FieldViolation parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.rpc.BadRequest.FieldViolation) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object field_ = ""; - /** - * optional string field = 1; - * - *
-       * A path leading to a field in the request body. The value will be a
-       * sequence of dot-separated identifiers that identify a protocol buffer
-       * field. E.g., "violations.field" would identify this field.
-       * 
- */ - public java.lang.String getField() { - java.lang.Object ref = field_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - field_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string field = 1; - * - *
-       * A path leading to a field in the request body. The value will be a
-       * sequence of dot-separated identifiers that identify a protocol buffer
-       * field. E.g., "violations.field" would identify this field.
-       * 
- */ - public com.google.protobuf.ByteString - getFieldBytes() { - java.lang.Object ref = field_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - field_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string field = 1; - * - *
-       * A path leading to a field in the request body. The value will be a
-       * sequence of dot-separated identifiers that identify a protocol buffer
-       * field. E.g., "violations.field" would identify this field.
-       * 
- */ - public Builder setField( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - field_ = value; - onChanged(); - return this; - } - /** - * optional string field = 1; - * - *
-       * A path leading to a field in the request body. The value will be a
-       * sequence of dot-separated identifiers that identify a protocol buffer
-       * field. E.g., "violations.field" would identify this field.
-       * 
- */ - public Builder clearField() { - - field_ = getDefaultInstance().getField(); - onChanged(); - return this; - } - /** - * optional string field = 1; - * - *
-       * A path leading to a field in the request body. The value will be a
-       * sequence of dot-separated identifiers that identify a protocol buffer
-       * field. E.g., "violations.field" would identify this field.
-       * 
- */ - public Builder setFieldBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - field_ = value; - onChanged(); - return this; - } - - private java.lang.Object description_ = ""; - /** - * optional string description = 2; - * - *
-       * A description of why the request element is bad.
-       * 
- */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string description = 2; - * - *
-       * A description of why the request element is bad.
-       * 
- */ - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string description = 2; - * - *
-       * A description of why the request element is bad.
-       * 
- */ - public Builder setDescription( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - description_ = value; - onChanged(); - return this; - } - /** - * optional string description = 2; - * - *
-       * A description of why the request element is bad.
-       * 
- */ - public Builder clearDescription() { - - description_ = getDefaultInstance().getDescription(); - onChanged(); - return this; - } - /** - * optional string description = 2; - * - *
-       * A description of why the request element is bad.
-       * 
- */ - public Builder setDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - description_ = value; - onChanged(); - return this; - } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - - // @@protoc_insertion_point(builder_scope:google.rpc.BadRequest.FieldViolation) - } - - // @@protoc_insertion_point(class_scope:google.rpc.BadRequest.FieldViolation) - private static final com.google.rpc.BadRequest.FieldViolation DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.rpc.BadRequest.FieldViolation(); - } - - public static com.google.rpc.BadRequest.FieldViolation getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public FieldViolation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new FieldViolation(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public com.google.rpc.BadRequest.FieldViolation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int FIELD_VIOLATIONS_FIELD_NUMBER = 1; - private java.util.List fieldViolations_; - /** - * repeated .google.rpc.BadRequest.FieldViolation field_violations = 1; - * - *
-   * Describes all violations in a client request.
-   * 
- */ - public java.util.List getFieldViolationsList() { - return fieldViolations_; - } - /** - * repeated .google.rpc.BadRequest.FieldViolation field_violations = 1; - * - *
-   * Describes all violations in a client request.
-   * 
- */ - public java.util.List - getFieldViolationsOrBuilderList() { - return fieldViolations_; - } - /** - * repeated .google.rpc.BadRequest.FieldViolation field_violations = 1; - * - *
-   * Describes all violations in a client request.
-   * 
- */ - public int getFieldViolationsCount() { - return fieldViolations_.size(); - } - /** - * repeated .google.rpc.BadRequest.FieldViolation field_violations = 1; - * - *
-   * Describes all violations in a client request.
-   * 
- */ - public com.google.rpc.BadRequest.FieldViolation getFieldViolations(int index) { - return fieldViolations_.get(index); - } - /** - * repeated .google.rpc.BadRequest.FieldViolation field_violations = 1; - * - *
-   * Describes all violations in a client request.
-   * 
- */ - public com.google.rpc.BadRequest.FieldViolationOrBuilder getFieldViolationsOrBuilder( - int index) { - return fieldViolations_.get(index); - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < fieldViolations_.size(); i++) { - output.writeMessage(1, fieldViolations_.get(i)); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < fieldViolations_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, fieldViolations_.get(i)); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static com.google.rpc.BadRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.rpc.BadRequest 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.rpc.BadRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.rpc.BadRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.rpc.BadRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.rpc.BadRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.rpc.BadRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.rpc.BadRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.rpc.BadRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.rpc.BadRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.rpc.BadRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - 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; - } - /** - * Protobuf type {@code google.rpc.BadRequest} - * - *
-   * Describes violations in a client request. This error type focuses on the
-   * syntactic aspects of the request.
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.rpc.BadRequest) - com.google.rpc.BadRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_BadRequest_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_BadRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.rpc.BadRequest.class, com.google.rpc.BadRequest.Builder.class); - } - - // Construct using com.google.rpc.BadRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getFieldViolationsFieldBuilder(); - } - } - public Builder clear() { - super.clear(); - if (fieldViolationsBuilder_ == null) { - fieldViolations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - fieldViolationsBuilder_.clear(); - } - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_BadRequest_descriptor; - } - - public com.google.rpc.BadRequest getDefaultInstanceForType() { - return com.google.rpc.BadRequest.getDefaultInstance(); - } - - public com.google.rpc.BadRequest build() { - com.google.rpc.BadRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.rpc.BadRequest buildPartial() { - com.google.rpc.BadRequest result = new com.google.rpc.BadRequest(this); - int from_bitField0_ = bitField0_; - if (fieldViolationsBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - fieldViolations_ = java.util.Collections.unmodifiableList(fieldViolations_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.fieldViolations_ = fieldViolations_; - } else { - result.fieldViolations_ = fieldViolationsBuilder_.build(); - } - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.rpc.BadRequest) { - return mergeFrom((com.google.rpc.BadRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.rpc.BadRequest other) { - if (other == com.google.rpc.BadRequest.getDefaultInstance()) return this; - if (fieldViolationsBuilder_ == null) { - if (!other.fieldViolations_.isEmpty()) { - if (fieldViolations_.isEmpty()) { - fieldViolations_ = other.fieldViolations_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureFieldViolationsIsMutable(); - fieldViolations_.addAll(other.fieldViolations_); - } - onChanged(); - } - } else { - if (!other.fieldViolations_.isEmpty()) { - if (fieldViolationsBuilder_.isEmpty()) { - fieldViolationsBuilder_.dispose(); - fieldViolationsBuilder_ = null; - fieldViolations_ = other.fieldViolations_; - bitField0_ = (bitField0_ & ~0x00000001); - fieldViolationsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getFieldViolationsFieldBuilder() : null; - } else { - fieldViolationsBuilder_.addAllMessages(other.fieldViolations_); - } - } - } - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.rpc.BadRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.rpc.BadRequest) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List fieldViolations_ = - java.util.Collections.emptyList(); - private void ensureFieldViolationsIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { - fieldViolations_ = new java.util.ArrayList(fieldViolations_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.rpc.BadRequest.FieldViolation, com.google.rpc.BadRequest.FieldViolation.Builder, com.google.rpc.BadRequest.FieldViolationOrBuilder> fieldViolationsBuilder_; - - /** - * repeated .google.rpc.BadRequest.FieldViolation field_violations = 1; - * - *
-     * Describes all violations in a client request.
-     * 
- */ - public java.util.List getFieldViolationsList() { - if (fieldViolationsBuilder_ == null) { - return java.util.Collections.unmodifiableList(fieldViolations_); - } else { - return fieldViolationsBuilder_.getMessageList(); - } - } - /** - * repeated .google.rpc.BadRequest.FieldViolation field_violations = 1; - * - *
-     * Describes all violations in a client request.
-     * 
- */ - public int getFieldViolationsCount() { - if (fieldViolationsBuilder_ == null) { - return fieldViolations_.size(); - } else { - return fieldViolationsBuilder_.getCount(); - } - } - /** - * repeated .google.rpc.BadRequest.FieldViolation field_violations = 1; - * - *
-     * Describes all violations in a client request.
-     * 
- */ - public com.google.rpc.BadRequest.FieldViolation getFieldViolations(int index) { - if (fieldViolationsBuilder_ == null) { - return fieldViolations_.get(index); - } else { - return fieldViolationsBuilder_.getMessage(index); - } - } - /** - * repeated .google.rpc.BadRequest.FieldViolation field_violations = 1; - * - *
-     * Describes all violations in a client request.
-     * 
- */ - public Builder setFieldViolations( - int index, com.google.rpc.BadRequest.FieldViolation value) { - if (fieldViolationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFieldViolationsIsMutable(); - fieldViolations_.set(index, value); - onChanged(); - } else { - fieldViolationsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .google.rpc.BadRequest.FieldViolation field_violations = 1; - * - *
-     * Describes all violations in a client request.
-     * 
- */ - public Builder setFieldViolations( - int index, com.google.rpc.BadRequest.FieldViolation.Builder builderForValue) { - if (fieldViolationsBuilder_ == null) { - ensureFieldViolationsIsMutable(); - fieldViolations_.set(index, builderForValue.build()); - onChanged(); - } else { - fieldViolationsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.rpc.BadRequest.FieldViolation field_violations = 1; - * - *
-     * Describes all violations in a client request.
-     * 
- */ - public Builder addFieldViolations(com.google.rpc.BadRequest.FieldViolation value) { - if (fieldViolationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFieldViolationsIsMutable(); - fieldViolations_.add(value); - onChanged(); - } else { - fieldViolationsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .google.rpc.BadRequest.FieldViolation field_violations = 1; - * - *
-     * Describes all violations in a client request.
-     * 
- */ - public Builder addFieldViolations( - int index, com.google.rpc.BadRequest.FieldViolation value) { - if (fieldViolationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFieldViolationsIsMutable(); - fieldViolations_.add(index, value); - onChanged(); - } else { - fieldViolationsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .google.rpc.BadRequest.FieldViolation field_violations = 1; - * - *
-     * Describes all violations in a client request.
-     * 
- */ - public Builder addFieldViolations( - com.google.rpc.BadRequest.FieldViolation.Builder builderForValue) { - if (fieldViolationsBuilder_ == null) { - ensureFieldViolationsIsMutable(); - fieldViolations_.add(builderForValue.build()); - onChanged(); - } else { - fieldViolationsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .google.rpc.BadRequest.FieldViolation field_violations = 1; - * - *
-     * Describes all violations in a client request.
-     * 
- */ - public Builder addFieldViolations( - int index, com.google.rpc.BadRequest.FieldViolation.Builder builderForValue) { - if (fieldViolationsBuilder_ == null) { - ensureFieldViolationsIsMutable(); - fieldViolations_.add(index, builderForValue.build()); - onChanged(); - } else { - fieldViolationsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.rpc.BadRequest.FieldViolation field_violations = 1; - * - *
-     * Describes all violations in a client request.
-     * 
- */ - public Builder addAllFieldViolations( - java.lang.Iterable values) { - if (fieldViolationsBuilder_ == null) { - ensureFieldViolationsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, fieldViolations_); - onChanged(); - } else { - fieldViolationsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .google.rpc.BadRequest.FieldViolation field_violations = 1; - * - *
-     * Describes all violations in a client request.
-     * 
- */ - public Builder clearFieldViolations() { - if (fieldViolationsBuilder_ == null) { - fieldViolations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - fieldViolationsBuilder_.clear(); - } - return this; - } - /** - * repeated .google.rpc.BadRequest.FieldViolation field_violations = 1; - * - *
-     * Describes all violations in a client request.
-     * 
- */ - public Builder removeFieldViolations(int index) { - if (fieldViolationsBuilder_ == null) { - ensureFieldViolationsIsMutable(); - fieldViolations_.remove(index); - onChanged(); - } else { - fieldViolationsBuilder_.remove(index); - } - return this; - } - /** - * repeated .google.rpc.BadRequest.FieldViolation field_violations = 1; - * - *
-     * Describes all violations in a client request.
-     * 
- */ - public com.google.rpc.BadRequest.FieldViolation.Builder getFieldViolationsBuilder( - int index) { - return getFieldViolationsFieldBuilder().getBuilder(index); - } - /** - * repeated .google.rpc.BadRequest.FieldViolation field_violations = 1; - * - *
-     * Describes all violations in a client request.
-     * 
- */ - public com.google.rpc.BadRequest.FieldViolationOrBuilder getFieldViolationsOrBuilder( - int index) { - if (fieldViolationsBuilder_ == null) { - return fieldViolations_.get(index); } else { - return fieldViolationsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .google.rpc.BadRequest.FieldViolation field_violations = 1; - * - *
-     * Describes all violations in a client request.
-     * 
- */ - public java.util.List - getFieldViolationsOrBuilderList() { - if (fieldViolationsBuilder_ != null) { - return fieldViolationsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(fieldViolations_); - } - } - /** - * repeated .google.rpc.BadRequest.FieldViolation field_violations = 1; - * - *
-     * Describes all violations in a client request.
-     * 
- */ - public com.google.rpc.BadRequest.FieldViolation.Builder addFieldViolationsBuilder() { - return getFieldViolationsFieldBuilder().addBuilder( - com.google.rpc.BadRequest.FieldViolation.getDefaultInstance()); - } - /** - * repeated .google.rpc.BadRequest.FieldViolation field_violations = 1; - * - *
-     * Describes all violations in a client request.
-     * 
- */ - public com.google.rpc.BadRequest.FieldViolation.Builder addFieldViolationsBuilder( - int index) { - return getFieldViolationsFieldBuilder().addBuilder( - index, com.google.rpc.BadRequest.FieldViolation.getDefaultInstance()); - } - /** - * repeated .google.rpc.BadRequest.FieldViolation field_violations = 1; - * - *
-     * Describes all violations in a client request.
-     * 
- */ - public java.util.List - getFieldViolationsBuilderList() { - return getFieldViolationsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - com.google.rpc.BadRequest.FieldViolation, com.google.rpc.BadRequest.FieldViolation.Builder, com.google.rpc.BadRequest.FieldViolationOrBuilder> - getFieldViolationsFieldBuilder() { - if (fieldViolationsBuilder_ == null) { - fieldViolationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - com.google.rpc.BadRequest.FieldViolation, com.google.rpc.BadRequest.FieldViolation.Builder, com.google.rpc.BadRequest.FieldViolationOrBuilder>( - fieldViolations_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); - fieldViolations_ = null; - } - return fieldViolationsBuilder_; - } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - - // @@protoc_insertion_point(builder_scope:google.rpc.BadRequest) - } - - // @@protoc_insertion_point(class_scope:google.rpc.BadRequest) - private static final com.google.rpc.BadRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.rpc.BadRequest(); - } - - public static com.google.rpc.BadRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public BadRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new BadRequest(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public com.google.rpc.BadRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-gax/generated/src/main/java/com/google/rpc/BadRequestOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/rpc/BadRequestOrBuilder.java deleted file mode 100644 index 6363fe8b9a0e..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/rpc/BadRequestOrBuilder.java +++ /dev/null @@ -1,53 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/rpc/error_details.proto - -package com.google.rpc; - -public interface BadRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.rpc.BadRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated .google.rpc.BadRequest.FieldViolation field_violations = 1; - * - *
-   * Describes all violations in a client request.
-   * 
- */ - java.util.List - getFieldViolationsList(); - /** - * repeated .google.rpc.BadRequest.FieldViolation field_violations = 1; - * - *
-   * Describes all violations in a client request.
-   * 
- */ - com.google.rpc.BadRequest.FieldViolation getFieldViolations(int index); - /** - * repeated .google.rpc.BadRequest.FieldViolation field_violations = 1; - * - *
-   * Describes all violations in a client request.
-   * 
- */ - int getFieldViolationsCount(); - /** - * repeated .google.rpc.BadRequest.FieldViolation field_violations = 1; - * - *
-   * Describes all violations in a client request.
-   * 
- */ - java.util.List - getFieldViolationsOrBuilderList(); - /** - * repeated .google.rpc.BadRequest.FieldViolation field_violations = 1; - * - *
-   * Describes all violations in a client request.
-   * 
- */ - com.google.rpc.BadRequest.FieldViolationOrBuilder getFieldViolationsOrBuilder( - int index); -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/rpc/Code.java b/gcloud-java-gax/generated/src/main/java/com/google/rpc/Code.java deleted file mode 100644 index 3fcbad557708..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/rpc/Code.java +++ /dev/null @@ -1,543 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/rpc/code.proto - -package com.google.rpc; - -/** - * Protobuf enum {@code google.rpc.Code} - * - *
- * The canonical error codes for Google APIs.
- * Warnings:
- * -   Do not change any numeric assignments.
- * -   Changes to this list should be made only if there is a compelling
- *     need that can't be satisfied in another way.
- * Sometimes multiple error codes may apply.  Services should return
- * the most specific error code that applies.  For example, prefer
- * `OUT_OF_RANGE` over `FAILED_PRECONDITION` if both codes apply.
- * Similarly prefer `NOT_FOUND` or `ALREADY_EXISTS` over `FAILED_PRECONDITION`.
- * 
- */ -public enum Code - implements com.google.protobuf.ProtocolMessageEnum { - /** - * OK = 0; - * - *
-   * Not an error; returned on success
-   * HTTP Mapping: 200 OK
-   * 
- */ - OK(0, 0), - /** - * CANCELLED = 1; - * - *
-   * The operation was cancelled, typically by the caller.
-   * HTTP Mapping: 499 Client Closed Request
-   * 
- */ - CANCELLED(1, 1), - /** - * UNKNOWN = 2; - * - *
-   * Unknown error.  For example, this error may be returned when
-   * a `Status` value received from another address space belongs to
-   * an error space that is not known in this address space.  Also
-   * errors raised by APIs that do not return enough error information
-   * may be converted to this error.
-   * HTTP Mapping: 500 Internal Server Error
-   * 
- */ - UNKNOWN(2, 2), - /** - * INVALID_ARGUMENT = 3; - * - *
-   * The client specified an invalid argument.  Note that this differs
-   * from `FAILED_PRECONDITION`.  `INVALID_ARGUMENT` indicates arguments
-   * that are problematic regardless of the state of the system
-   * (e.g., a malformed file name).
-   * HTTP Mapping: 400 Bad Request
-   * 
- */ - INVALID_ARGUMENT(3, 3), - /** - * DEADLINE_EXCEEDED = 4; - * - *
-   * The deadline expired before the operation could complete. For operations
-   * that change the state of the system, this error may be returned
-   * even if the operation has completed successfully.  For example, a
-   * successful response from a server could have been delayed long
-   * enough for the deadline to expire.
-   * HTTP Mapping: 504 Gateway Timeout
-   * 
- */ - DEADLINE_EXCEEDED(4, 4), - /** - * NOT_FOUND = 5; - * - *
-   * Some requested entity (e.g., file or directory) was not found.
-   * For privacy reasons, this code *might* be returned when the client
-   * does not have the access rights to the entity.
-   * HTTP Mapping: 404 Not Found
-   * 
- */ - NOT_FOUND(5, 5), - /** - * ALREADY_EXISTS = 6; - * - *
-   * The entity that a client attempted to create (e.g., file or directory)
-   * already exists.
-   * HTTP Mapping: 409 Conflict
-   * 
- */ - ALREADY_EXISTS(6, 6), - /** - * PERMISSION_DENIED = 7; - * - *
-   * The caller does not have permission to execute the specified
-   * operation. `PERMISSION_DENIED` must not be used for rejections
-   * caused by exhausting some resource (use `RESOURCE_EXHAUSTED`
-   * instead for those errors). `PERMISSION_DENIED` must not be
-   * used if the caller can not be identified (use `UNAUTHENTICATED`
-   * instead for those errors).
-   * HTTP Mapping: 403 Forbidden
-   * 
- */ - PERMISSION_DENIED(7, 7), - /** - * UNAUTHENTICATED = 16; - * - *
-   * The request does not have valid authentication credentials for the
-   * operation.
-   * HTTP Mapping: 401 Unauthorized
-   * 
- */ - UNAUTHENTICATED(8, 16), - /** - * RESOURCE_EXHAUSTED = 8; - * - *
-   * Some resource has been exhausted, perhaps a per-user quota, or
-   * perhaps the entire file system is out of space.
-   * HTTP Mapping: 429 Too Many Requests
-   * 
- */ - RESOURCE_EXHAUSTED(9, 8), - /** - * FAILED_PRECONDITION = 9; - * - *
-   * The operation was rejected because the system is not in a state
-   * required for the operation's execution.  For example, the directory
-   * to be deleted is non-empty, an rmdir operation is applied to
-   * a non-directory, etc.
-   * Service implementors can use the following guidelines to decide
-   * between `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`:
-   *  (a) Use `UNAVAILABLE` if the client can retry just the failing call.
-   *  (b) Use `ABORTED` if the client should retry at a higher level
-   *      (e.g., restarting a read-modify-write sequence).
-   *  (c) Use `FAILED_PRECONDITION` if the client should not retry until
-   *      the system state has been explicitly fixed.  E.g., if an "rmdir"
-   *      fails because the directory is non-empty, `FAILED_PRECONDITION`
-   *      should be returned since the client should not retry unless
-   *      the files are deleted from the directory.
-   *  (d) Use `FAILED_PRECONDITION` if the client performs conditional
-   *      REST Get/Update/Delete on a resource and the resource on the
-   *      server does not match the condition. E.g., conflicting
-   *      read-modify-write on the same resource.
-   * HTTP Mapping: 400 Bad Request
-   * NOTE: HTTP spec says `412 Precondition Failed` should be used only if
-   * the request contains Etag-related headers. So if the server does see
-   * Etag-related headers in the request, it may choose to return 412
-   * instead of 400 for this error code.
-   * 
- */ - FAILED_PRECONDITION(10, 9), - /** - * ABORTED = 10; - * - *
-   * The operation was aborted, typically due to a concurrency issue such as
-   * a sequencer check failure or transaction abort.
-   * See the guidelines above for deciding between `FAILED_PRECONDITION`,
-   * `ABORTED`, and `UNAVAILABLE`.
-   * HTTP Mapping: 409 Conflict
-   * 
- */ - ABORTED(11, 10), - /** - * OUT_OF_RANGE = 11; - * - *
-   * The operation was attempted past the valid range.  E.g., seeking or
-   * reading past end-of-file.
-   * Unlike `INVALID_ARGUMENT`, this error indicates a problem that may
-   * be fixed if the system state changes. For example, a 32-bit file
-   * system will generate `INVALID_ARGUMENT` if asked to read at an
-   * offset that is not in the range [0,2^32-1], but it will generate
-   * `OUT_OF_RANGE` if asked to read from an offset past the current
-   * file size.
-   * There is a fair bit of overlap between `FAILED_PRECONDITION` and
-   * `OUT_OF_RANGE`.  We recommend using `OUT_OF_RANGE` (the more specific
-   * error) when it applies so that callers who are iterating through
-   * a space can easily look for an `OUT_OF_RANGE` error to detect when
-   * they are done.
-   * HTTP Mapping: 400 Bad Request
-   * 
- */ - OUT_OF_RANGE(12, 11), - /** - * UNIMPLEMENTED = 12; - * - *
-   * The operation is not implemented or is not supported/enabled in this
-   * service.
-   * HTTP Mapping: 501 Not Implemented
-   * 
- */ - UNIMPLEMENTED(13, 12), - /** - * INTERNAL = 13; - * - *
-   * Internal errors.  This means that some invariants expected by the
-   * underlying system have been broken.  This error code is reserved
-   * for serious errors.
-   * HTTP Mapping: 500 Internal Server Error
-   * 
- */ - INTERNAL(14, 13), - /** - * UNAVAILABLE = 14; - * - *
-   * The service is currently unavailable.  This is most likely a
-   * transient condition, which can be corrected by retrying with
-   * a backoff.
-   * See the guidelines above for deciding between `FAILED_PRECONDITION`,
-   * `ABORTED`, and `UNAVAILABLE`.
-   * HTTP Mapping: 503 Service Unavailable
-   * 
- */ - UNAVAILABLE(15, 14), - /** - * DATA_LOSS = 15; - * - *
-   * Unrecoverable data loss or corruption.
-   * HTTP Mapping: 500 Internal Server Error
-   * 
- */ - DATA_LOSS(16, 15), - UNRECOGNIZED(-1, -1), - ; - - /** - * OK = 0; - * - *
-   * Not an error; returned on success
-   * HTTP Mapping: 200 OK
-   * 
- */ - public static final int OK_VALUE = 0; - /** - * CANCELLED = 1; - * - *
-   * The operation was cancelled, typically by the caller.
-   * HTTP Mapping: 499 Client Closed Request
-   * 
- */ - public static final int CANCELLED_VALUE = 1; - /** - * UNKNOWN = 2; - * - *
-   * Unknown error.  For example, this error may be returned when
-   * a `Status` value received from another address space belongs to
-   * an error space that is not known in this address space.  Also
-   * errors raised by APIs that do not return enough error information
-   * may be converted to this error.
-   * HTTP Mapping: 500 Internal Server Error
-   * 
- */ - public static final int UNKNOWN_VALUE = 2; - /** - * INVALID_ARGUMENT = 3; - * - *
-   * The client specified an invalid argument.  Note that this differs
-   * from `FAILED_PRECONDITION`.  `INVALID_ARGUMENT` indicates arguments
-   * that are problematic regardless of the state of the system
-   * (e.g., a malformed file name).
-   * HTTP Mapping: 400 Bad Request
-   * 
- */ - public static final int INVALID_ARGUMENT_VALUE = 3; - /** - * DEADLINE_EXCEEDED = 4; - * - *
-   * The deadline expired before the operation could complete. For operations
-   * that change the state of the system, this error may be returned
-   * even if the operation has completed successfully.  For example, a
-   * successful response from a server could have been delayed long
-   * enough for the deadline to expire.
-   * HTTP Mapping: 504 Gateway Timeout
-   * 
- */ - public static final int DEADLINE_EXCEEDED_VALUE = 4; - /** - * NOT_FOUND = 5; - * - *
-   * Some requested entity (e.g., file or directory) was not found.
-   * For privacy reasons, this code *might* be returned when the client
-   * does not have the access rights to the entity.
-   * HTTP Mapping: 404 Not Found
-   * 
- */ - public static final int NOT_FOUND_VALUE = 5; - /** - * ALREADY_EXISTS = 6; - * - *
-   * The entity that a client attempted to create (e.g., file or directory)
-   * already exists.
-   * HTTP Mapping: 409 Conflict
-   * 
- */ - public static final int ALREADY_EXISTS_VALUE = 6; - /** - * PERMISSION_DENIED = 7; - * - *
-   * The caller does not have permission to execute the specified
-   * operation. `PERMISSION_DENIED` must not be used for rejections
-   * caused by exhausting some resource (use `RESOURCE_EXHAUSTED`
-   * instead for those errors). `PERMISSION_DENIED` must not be
-   * used if the caller can not be identified (use `UNAUTHENTICATED`
-   * instead for those errors).
-   * HTTP Mapping: 403 Forbidden
-   * 
- */ - public static final int PERMISSION_DENIED_VALUE = 7; - /** - * UNAUTHENTICATED = 16; - * - *
-   * The request does not have valid authentication credentials for the
-   * operation.
-   * HTTP Mapping: 401 Unauthorized
-   * 
- */ - public static final int UNAUTHENTICATED_VALUE = 16; - /** - * RESOURCE_EXHAUSTED = 8; - * - *
-   * Some resource has been exhausted, perhaps a per-user quota, or
-   * perhaps the entire file system is out of space.
-   * HTTP Mapping: 429 Too Many Requests
-   * 
- */ - public static final int RESOURCE_EXHAUSTED_VALUE = 8; - /** - * FAILED_PRECONDITION = 9; - * - *
-   * The operation was rejected because the system is not in a state
-   * required for the operation's execution.  For example, the directory
-   * to be deleted is non-empty, an rmdir operation is applied to
-   * a non-directory, etc.
-   * Service implementors can use the following guidelines to decide
-   * between `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`:
-   *  (a) Use `UNAVAILABLE` if the client can retry just the failing call.
-   *  (b) Use `ABORTED` if the client should retry at a higher level
-   *      (e.g., restarting a read-modify-write sequence).
-   *  (c) Use `FAILED_PRECONDITION` if the client should not retry until
-   *      the system state has been explicitly fixed.  E.g., if an "rmdir"
-   *      fails because the directory is non-empty, `FAILED_PRECONDITION`
-   *      should be returned since the client should not retry unless
-   *      the files are deleted from the directory.
-   *  (d) Use `FAILED_PRECONDITION` if the client performs conditional
-   *      REST Get/Update/Delete on a resource and the resource on the
-   *      server does not match the condition. E.g., conflicting
-   *      read-modify-write on the same resource.
-   * HTTP Mapping: 400 Bad Request
-   * NOTE: HTTP spec says `412 Precondition Failed` should be used only if
-   * the request contains Etag-related headers. So if the server does see
-   * Etag-related headers in the request, it may choose to return 412
-   * instead of 400 for this error code.
-   * 
- */ - public static final int FAILED_PRECONDITION_VALUE = 9; - /** - * ABORTED = 10; - * - *
-   * The operation was aborted, typically due to a concurrency issue such as
-   * a sequencer check failure or transaction abort.
-   * See the guidelines above for deciding between `FAILED_PRECONDITION`,
-   * `ABORTED`, and `UNAVAILABLE`.
-   * HTTP Mapping: 409 Conflict
-   * 
- */ - public static final int ABORTED_VALUE = 10; - /** - * OUT_OF_RANGE = 11; - * - *
-   * The operation was attempted past the valid range.  E.g., seeking or
-   * reading past end-of-file.
-   * Unlike `INVALID_ARGUMENT`, this error indicates a problem that may
-   * be fixed if the system state changes. For example, a 32-bit file
-   * system will generate `INVALID_ARGUMENT` if asked to read at an
-   * offset that is not in the range [0,2^32-1], but it will generate
-   * `OUT_OF_RANGE` if asked to read from an offset past the current
-   * file size.
-   * There is a fair bit of overlap between `FAILED_PRECONDITION` and
-   * `OUT_OF_RANGE`.  We recommend using `OUT_OF_RANGE` (the more specific
-   * error) when it applies so that callers who are iterating through
-   * a space can easily look for an `OUT_OF_RANGE` error to detect when
-   * they are done.
-   * HTTP Mapping: 400 Bad Request
-   * 
- */ - public static final int OUT_OF_RANGE_VALUE = 11; - /** - * UNIMPLEMENTED = 12; - * - *
-   * The operation is not implemented or is not supported/enabled in this
-   * service.
-   * HTTP Mapping: 501 Not Implemented
-   * 
- */ - public static final int UNIMPLEMENTED_VALUE = 12; - /** - * INTERNAL = 13; - * - *
-   * Internal errors.  This means that some invariants expected by the
-   * underlying system have been broken.  This error code is reserved
-   * for serious errors.
-   * HTTP Mapping: 500 Internal Server Error
-   * 
- */ - public static final int INTERNAL_VALUE = 13; - /** - * UNAVAILABLE = 14; - * - *
-   * The service is currently unavailable.  This is most likely a
-   * transient condition, which can be corrected by retrying with
-   * a backoff.
-   * See the guidelines above for deciding between `FAILED_PRECONDITION`,
-   * `ABORTED`, and `UNAVAILABLE`.
-   * HTTP Mapping: 503 Service Unavailable
-   * 
- */ - public static final int UNAVAILABLE_VALUE = 14; - /** - * DATA_LOSS = 15; - * - *
-   * Unrecoverable data loss or corruption.
-   * HTTP Mapping: 500 Internal Server Error
-   * 
- */ - public static final int DATA_LOSS_VALUE = 15; - - - public final int getNumber() { - if (index == -1) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - public static Code valueOf(int value) { - switch (value) { - case 0: return OK; - case 1: return CANCELLED; - case 2: return UNKNOWN; - case 3: return INVALID_ARGUMENT; - case 4: return DEADLINE_EXCEEDED; - case 5: return NOT_FOUND; - case 6: return ALREADY_EXISTS; - case 7: return PERMISSION_DENIED; - case 16: return UNAUTHENTICATED; - case 8: return RESOURCE_EXHAUSTED; - case 9: return FAILED_PRECONDITION; - case 10: return ABORTED; - case 11: return OUT_OF_RANGE; - case 12: return UNIMPLEMENTED; - case 13: return INTERNAL; - case 14: return UNAVAILABLE; - case 15: return DATA_LOSS; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - Code> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Code findValueByNumber(int number) { - return Code.valueOf(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - return getDescriptor().getValues().get(index); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.rpc.CodeProto.getDescriptor() - .getEnumTypes().get(0); - } - - private static final Code[] VALUES = values(); - - public static Code 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 index; - private final int value; - - private Code(int index, int value) { - this.index = index; - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.rpc.Code) -} - diff --git a/gcloud-java-gax/generated/src/main/java/com/google/rpc/CodeProto.java b/gcloud-java-gax/generated/src/main/java/com/google/rpc/CodeProto.java deleted file mode 100644 index 95dc036ed327..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/rpc/CodeProto.java +++ /dev/null @@ -1,46 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/rpc/code.proto - -package com.google.rpc; - -public final class CodeProto { - private CodeProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - } - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n\025google/rpc/code.proto\022\ngoogle.rpc*\267\002\n\004" + - "Code\022\006\n\002OK\020\000\022\r\n\tCANCELLED\020\001\022\013\n\007UNKNOWN\020\002" + - "\022\024\n\020INVALID_ARGUMENT\020\003\022\025\n\021DEADLINE_EXCEE" + - "DED\020\004\022\r\n\tNOT_FOUND\020\005\022\022\n\016ALREADY_EXISTS\020\006" + - "\022\025\n\021PERMISSION_DENIED\020\007\022\023\n\017UNAUTHENTICAT" + - "ED\020\020\022\026\n\022RESOURCE_EXHAUSTED\020\010\022\027\n\023FAILED_P" + - "RECONDITION\020\t\022\013\n\007ABORTED\020\n\022\020\n\014OUT_OF_RAN" + - "GE\020\013\022\021\n\rUNIMPLEMENTED\020\014\022\014\n\010INTERNAL\020\r\022\017\n" + - "\013UNAVAILABLE\020\016\022\r\n\tDATA_LOSS\020\017B\035\n\016com.goo" + - "gle.rpcB\tCodeProtoP\001b\006proto3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }, assigner); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/rpc/DebugInfo.java b/gcloud-java-gax/generated/src/main/java/com/google/rpc/DebugInfo.java deleted file mode 100644 index 74550a10502d..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/rpc/DebugInfo.java +++ /dev/null @@ -1,697 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/rpc/error_details.proto - -package com.google.rpc; - -/** - * Protobuf type {@code google.rpc.DebugInfo} - * - *
- * Describes additional debugging info.
- * 
- */ -public final class DebugInfo extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.rpc.DebugInfo) - DebugInfoOrBuilder { - // Use DebugInfo.newBuilder() to construct. - private DebugInfo(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private DebugInfo() { - stackEntries_ = com.google.protobuf.LazyStringArrayList.EMPTY; - detail_ = ""; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private DebugInfo( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - int mutable_bitField0_ = 0; - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!input.skipField(tag)) { - done = true; - } - break; - } - case 10: { - String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - stackEntries_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - stackEntries_.add(s); - break; - } - case 18: { - String s = input.readStringRequireUtf8(); - - detail_ = s; - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - stackEntries_ = stackEntries_.getUnmodifiableView(); - } - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_DebugInfo_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_DebugInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.rpc.DebugInfo.class, com.google.rpc.DebugInfo.Builder.class); - } - - private int bitField0_; - public static final int STACK_ENTRIES_FIELD_NUMBER = 1; - private com.google.protobuf.LazyStringList stackEntries_; - /** - * repeated string stack_entries = 1; - * - *
-   * The stack trace entries indicating where the error occurred.
-   * 
- */ - public com.google.protobuf.ProtocolStringList - getStackEntriesList() { - return stackEntries_; - } - /** - * repeated string stack_entries = 1; - * - *
-   * The stack trace entries indicating where the error occurred.
-   * 
- */ - public int getStackEntriesCount() { - return stackEntries_.size(); - } - /** - * repeated string stack_entries = 1; - * - *
-   * The stack trace entries indicating where the error occurred.
-   * 
- */ - public java.lang.String getStackEntries(int index) { - return stackEntries_.get(index); - } - /** - * repeated string stack_entries = 1; - * - *
-   * The stack trace entries indicating where the error occurred.
-   * 
- */ - public com.google.protobuf.ByteString - getStackEntriesBytes(int index) { - return stackEntries_.getByteString(index); - } - - public static final int DETAIL_FIELD_NUMBER = 2; - private volatile java.lang.Object detail_; - /** - * optional string detail = 2; - * - *
-   * Additional debugging information provided by the server.
-   * 
- */ - public java.lang.String getDetail() { - java.lang.Object ref = detail_; - 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(); - detail_ = s; - return s; - } - } - /** - * optional string detail = 2; - * - *
-   * Additional debugging information provided by the server.
-   * 
- */ - public com.google.protobuf.ByteString - getDetailBytes() { - java.lang.Object ref = detail_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - detail_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < stackEntries_.size(); i++) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, stackEntries_.getRaw(i)); - } - if (!getDetailBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, detail_); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < stackEntries_.size(); i++) { - dataSize += computeStringSizeNoTag(stackEntries_.getRaw(i)); - } - size += dataSize; - size += 1 * getStackEntriesList().size(); - } - if (!getDetailBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, detail_); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static com.google.rpc.DebugInfo parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.rpc.DebugInfo 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.rpc.DebugInfo parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.rpc.DebugInfo parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.rpc.DebugInfo parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.rpc.DebugInfo parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.rpc.DebugInfo parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.rpc.DebugInfo parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.rpc.DebugInfo parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.rpc.DebugInfo parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.rpc.DebugInfo prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - 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; - } - /** - * Protobuf type {@code google.rpc.DebugInfo} - * - *
-   * Describes additional debugging info.
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.rpc.DebugInfo) - com.google.rpc.DebugInfoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_DebugInfo_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_DebugInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.rpc.DebugInfo.class, com.google.rpc.DebugInfo.Builder.class); - } - - // Construct using com.google.rpc.DebugInfo.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - stackEntries_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - detail_ = ""; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_DebugInfo_descriptor; - } - - public com.google.rpc.DebugInfo getDefaultInstanceForType() { - return com.google.rpc.DebugInfo.getDefaultInstance(); - } - - public com.google.rpc.DebugInfo build() { - com.google.rpc.DebugInfo result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.rpc.DebugInfo buildPartial() { - com.google.rpc.DebugInfo result = new com.google.rpc.DebugInfo(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - stackEntries_ = stackEntries_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.stackEntries_ = stackEntries_; - result.detail_ = detail_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.rpc.DebugInfo) { - return mergeFrom((com.google.rpc.DebugInfo)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.rpc.DebugInfo other) { - if (other == com.google.rpc.DebugInfo.getDefaultInstance()) return this; - if (!other.stackEntries_.isEmpty()) { - if (stackEntries_.isEmpty()) { - stackEntries_ = other.stackEntries_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureStackEntriesIsMutable(); - stackEntries_.addAll(other.stackEntries_); - } - onChanged(); - } - if (!other.getDetail().isEmpty()) { - detail_ = other.detail_; - onChanged(); - } - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.rpc.DebugInfo parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.rpc.DebugInfo) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.protobuf.LazyStringList stackEntries_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureStackEntriesIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { - stackEntries_ = new com.google.protobuf.LazyStringArrayList(stackEntries_); - bitField0_ |= 0x00000001; - } - } - /** - * repeated string stack_entries = 1; - * - *
-     * The stack trace entries indicating where the error occurred.
-     * 
- */ - public com.google.protobuf.ProtocolStringList - getStackEntriesList() { - return stackEntries_.getUnmodifiableView(); - } - /** - * repeated string stack_entries = 1; - * - *
-     * The stack trace entries indicating where the error occurred.
-     * 
- */ - public int getStackEntriesCount() { - return stackEntries_.size(); - } - /** - * repeated string stack_entries = 1; - * - *
-     * The stack trace entries indicating where the error occurred.
-     * 
- */ - public java.lang.String getStackEntries(int index) { - return stackEntries_.get(index); - } - /** - * repeated string stack_entries = 1; - * - *
-     * The stack trace entries indicating where the error occurred.
-     * 
- */ - public com.google.protobuf.ByteString - getStackEntriesBytes(int index) { - return stackEntries_.getByteString(index); - } - /** - * repeated string stack_entries = 1; - * - *
-     * The stack trace entries indicating where the error occurred.
-     * 
- */ - public Builder setStackEntries( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureStackEntriesIsMutable(); - stackEntries_.set(index, value); - onChanged(); - return this; - } - /** - * repeated string stack_entries = 1; - * - *
-     * The stack trace entries indicating where the error occurred.
-     * 
- */ - public Builder addStackEntries( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureStackEntriesIsMutable(); - stackEntries_.add(value); - onChanged(); - return this; - } - /** - * repeated string stack_entries = 1; - * - *
-     * The stack trace entries indicating where the error occurred.
-     * 
- */ - public Builder addAllStackEntries( - java.lang.Iterable values) { - ensureStackEntriesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, stackEntries_); - onChanged(); - return this; - } - /** - * repeated string stack_entries = 1; - * - *
-     * The stack trace entries indicating where the error occurred.
-     * 
- */ - public Builder clearStackEntries() { - stackEntries_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * repeated string stack_entries = 1; - * - *
-     * The stack trace entries indicating where the error occurred.
-     * 
- */ - public Builder addStackEntriesBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureStackEntriesIsMutable(); - stackEntries_.add(value); - onChanged(); - return this; - } - - private java.lang.Object detail_ = ""; - /** - * optional string detail = 2; - * - *
-     * Additional debugging information provided by the server.
-     * 
- */ - public java.lang.String getDetail() { - java.lang.Object ref = detail_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - detail_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string detail = 2; - * - *
-     * Additional debugging information provided by the server.
-     * 
- */ - public com.google.protobuf.ByteString - getDetailBytes() { - java.lang.Object ref = detail_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - detail_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string detail = 2; - * - *
-     * Additional debugging information provided by the server.
-     * 
- */ - public Builder setDetail( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - detail_ = value; - onChanged(); - return this; - } - /** - * optional string detail = 2; - * - *
-     * Additional debugging information provided by the server.
-     * 
- */ - public Builder clearDetail() { - - detail_ = getDefaultInstance().getDetail(); - onChanged(); - return this; - } - /** - * optional string detail = 2; - * - *
-     * Additional debugging information provided by the server.
-     * 
- */ - public Builder setDetailBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - detail_ = value; - onChanged(); - return this; - } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - - // @@protoc_insertion_point(builder_scope:google.rpc.DebugInfo) - } - - // @@protoc_insertion_point(class_scope:google.rpc.DebugInfo) - private static final com.google.rpc.DebugInfo DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.rpc.DebugInfo(); - } - - public static com.google.rpc.DebugInfo getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public DebugInfo parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new DebugInfo(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public com.google.rpc.DebugInfo getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-gax/generated/src/main/java/com/google/rpc/DebugInfoOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/rpc/DebugInfoOrBuilder.java deleted file mode 100644 index 25d0e498747a..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/rpc/DebugInfoOrBuilder.java +++ /dev/null @@ -1,62 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/rpc/error_details.proto - -package com.google.rpc; - -public interface DebugInfoOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.rpc.DebugInfo) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated string stack_entries = 1; - * - *
-   * The stack trace entries indicating where the error occurred.
-   * 
- */ - com.google.protobuf.ProtocolStringList - getStackEntriesList(); - /** - * repeated string stack_entries = 1; - * - *
-   * The stack trace entries indicating where the error occurred.
-   * 
- */ - int getStackEntriesCount(); - /** - * repeated string stack_entries = 1; - * - *
-   * The stack trace entries indicating where the error occurred.
-   * 
- */ - java.lang.String getStackEntries(int index); - /** - * repeated string stack_entries = 1; - * - *
-   * The stack trace entries indicating where the error occurred.
-   * 
- */ - com.google.protobuf.ByteString - getStackEntriesBytes(int index); - - /** - * optional string detail = 2; - * - *
-   * Additional debugging information provided by the server.
-   * 
- */ - java.lang.String getDetail(); - /** - * optional string detail = 2; - * - *
-   * Additional debugging information provided by the server.
-   * 
- */ - com.google.protobuf.ByteString - getDetailBytes(); -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/rpc/ErrorDetailsProto.java b/gcloud-java-gax/generated/src/main/java/com/google/rpc/ErrorDetailsProto.java deleted file mode 100644 index 1760e0a1d4bf..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/rpc/ErrorDetailsProto.java +++ /dev/null @@ -1,167 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/rpc/error_details.proto - -package com.google.rpc; - -public final class ErrorDetailsProto { - private ErrorDetailsProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - } - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_rpc_RetryInfo_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_rpc_RetryInfo_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_rpc_DebugInfo_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_rpc_DebugInfo_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_rpc_QuotaFailure_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_rpc_QuotaFailure_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_rpc_QuotaFailure_Violation_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_rpc_QuotaFailure_Violation_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_rpc_BadRequest_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_rpc_BadRequest_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_rpc_BadRequest_FieldViolation_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_rpc_BadRequest_FieldViolation_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_rpc_RequestInfo_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_rpc_RequestInfo_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_rpc_ResourceInfo_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_rpc_ResourceInfo_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_rpc_Help_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_rpc_Help_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_rpc_Help_Link_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_rpc_Help_Link_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\036google/rpc/error_details.proto\022\ngoogle" + - ".rpc\032\036google/protobuf/duration.proto\";\n\t" + - "RetryInfo\022.\n\013retry_delay\030\001 \001(\0132\031.google." + - "protobuf.Duration\"2\n\tDebugInfo\022\025\n\rstack_" + - "entries\030\001 \003(\t\022\016\n\006detail\030\002 \001(\t\"y\n\014QuotaFa" + - "ilure\0226\n\nviolations\030\001 \003(\0132\".google.rpc.Q" + - "uotaFailure.Violation\0321\n\tViolation\022\017\n\007su" + - "bject\030\001 \001(\t\022\023\n\013description\030\002 \001(\t\"\203\001\n\nBad" + - "Request\022?\n\020field_violations\030\001 \003(\0132%.goog" + - "le.rpc.BadRequest.FieldViolation\0324\n\016Fiel", - "dViolation\022\r\n\005field\030\001 \001(\t\022\023\n\013description" + - "\030\002 \001(\t\"7\n\013RequestInfo\022\022\n\nrequest_id\030\001 \001(" + - "\t\022\024\n\014serving_data\030\002 \001(\t\"`\n\014ResourceInfo\022" + - "\025\n\rresource_type\030\001 \001(\t\022\025\n\rresource_name\030" + - "\002 \001(\t\022\r\n\005owner\030\003 \001(\t\022\023\n\013description\030\004 \001(" + - "\t\"V\n\004Help\022$\n\005links\030\001 \003(\0132\025.google.rpc.He" + - "lp.Link\032(\n\004Link\022\023\n\013description\030\001 \001(\t\022\013\n\003" + - "url\030\002 \001(\tB%\n\016com.google.rpcB\021ErrorDetail" + - "sProtoP\001b\006proto3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.protobuf.DurationProto.getDescriptor(), - }, assigner); - internal_static_google_rpc_RetryInfo_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_rpc_RetryInfo_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_rpc_RetryInfo_descriptor, - new java.lang.String[] { "RetryDelay", }); - internal_static_google_rpc_DebugInfo_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_rpc_DebugInfo_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_rpc_DebugInfo_descriptor, - new java.lang.String[] { "StackEntries", "Detail", }); - internal_static_google_rpc_QuotaFailure_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_google_rpc_QuotaFailure_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_rpc_QuotaFailure_descriptor, - new java.lang.String[] { "Violations", }); - internal_static_google_rpc_QuotaFailure_Violation_descriptor = - internal_static_google_rpc_QuotaFailure_descriptor.getNestedTypes().get(0); - internal_static_google_rpc_QuotaFailure_Violation_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_rpc_QuotaFailure_Violation_descriptor, - new java.lang.String[] { "Subject", "Description", }); - internal_static_google_rpc_BadRequest_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_google_rpc_BadRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_rpc_BadRequest_descriptor, - new java.lang.String[] { "FieldViolations", }); - internal_static_google_rpc_BadRequest_FieldViolation_descriptor = - internal_static_google_rpc_BadRequest_descriptor.getNestedTypes().get(0); - internal_static_google_rpc_BadRequest_FieldViolation_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_rpc_BadRequest_FieldViolation_descriptor, - new java.lang.String[] { "Field", "Description", }); - internal_static_google_rpc_RequestInfo_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_google_rpc_RequestInfo_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_rpc_RequestInfo_descriptor, - new java.lang.String[] { "RequestId", "ServingData", }); - internal_static_google_rpc_ResourceInfo_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_google_rpc_ResourceInfo_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_rpc_ResourceInfo_descriptor, - new java.lang.String[] { "ResourceType", "ResourceName", "Owner", "Description", }); - internal_static_google_rpc_Help_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_google_rpc_Help_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_rpc_Help_descriptor, - new java.lang.String[] { "Links", }); - internal_static_google_rpc_Help_Link_descriptor = - internal_static_google_rpc_Help_descriptor.getNestedTypes().get(0); - internal_static_google_rpc_Help_Link_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_rpc_Help_Link_descriptor, - new java.lang.String[] { "Description", "Url", }); - com.google.protobuf.DurationProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/rpc/Help.java b/gcloud-java-gax/generated/src/main/java/com/google/rpc/Help.java deleted file mode 100644 index 92fe066f6f78..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/rpc/Help.java +++ /dev/null @@ -1,1423 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/rpc/error_details.proto - -package com.google.rpc; - -/** - * Protobuf type {@code google.rpc.Help} - * - *
- * Provides links to documentation or for performing an out of band action.
- * For example, if a quota check failed with an error indicating the calling
- * project hasn't enabled the accessed service, this can contain a URL pointing
- * directly to the right place in the developer console to flip the bit.
- * 
- */ -public final class Help extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.rpc.Help) - HelpOrBuilder { - // Use Help.newBuilder() to construct. - private Help(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Help() { - links_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private Help( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - int mutable_bitField0_ = 0; - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!input.skipField(tag)) { - done = true; - } - break; - } - case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - links_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - links_.add(input.readMessage(com.google.rpc.Help.Link.parser(), extensionRegistry)); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - links_ = java.util.Collections.unmodifiableList(links_); - } - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_Help_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_Help_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.rpc.Help.class, com.google.rpc.Help.Builder.class); - } - - public interface LinkOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.rpc.Help.Link) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string description = 1; - * - *
-     * Describes what the link offers.
-     * 
- */ - java.lang.String getDescription(); - /** - * optional string description = 1; - * - *
-     * Describes what the link offers.
-     * 
- */ - com.google.protobuf.ByteString - getDescriptionBytes(); - - /** - * optional string url = 2; - * - *
-     * The URL of the link.
-     * 
- */ - java.lang.String getUrl(); - /** - * optional string url = 2; - * - *
-     * The URL of the link.
-     * 
- */ - com.google.protobuf.ByteString - getUrlBytes(); - } - /** - * Protobuf type {@code google.rpc.Help.Link} - * - *
-   * Describes a URL link.
-   * 
- */ - public static final class Link extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.rpc.Help.Link) - LinkOrBuilder { - // Use Link.newBuilder() to construct. - private Link(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Link() { - description_ = ""; - url_ = ""; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private Link( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - int mutable_bitField0_ = 0; - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!input.skipField(tag)) { - done = true; - } - break; - } - case 10: { - String s = input.readStringRequireUtf8(); - - description_ = s; - break; - } - case 18: { - String s = input.readStringRequireUtf8(); - - url_ = s; - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_Help_Link_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_Help_Link_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.rpc.Help.Link.class, com.google.rpc.Help.Link.Builder.class); - } - - public static final int DESCRIPTION_FIELD_NUMBER = 1; - private volatile java.lang.Object description_; - /** - * optional string description = 1; - * - *
-     * Describes what the link offers.
-     * 
- */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - 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(); - description_ = s; - return s; - } - } - /** - * optional string description = 1; - * - *
-     * Describes what the link offers.
-     * 
- */ - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int URL_FIELD_NUMBER = 2; - private volatile java.lang.Object url_; - /** - * optional string url = 2; - * - *
-     * The URL of the link.
-     * 
- */ - public java.lang.String getUrl() { - java.lang.Object ref = url_; - 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(); - url_ = s; - return s; - } - } - /** - * optional string url = 2; - * - *
-     * The URL of the link.
-     * 
- */ - public com.google.protobuf.ByteString - getUrlBytes() { - java.lang.Object ref = url_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - url_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!getDescriptionBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, description_); - } - if (!getUrlBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, url_); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getDescriptionBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, description_); - } - if (!getUrlBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, url_); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static com.google.rpc.Help.Link parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.rpc.Help.Link 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.rpc.Help.Link parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.rpc.Help.Link parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.rpc.Help.Link parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.rpc.Help.Link parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.rpc.Help.Link parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.rpc.Help.Link parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.rpc.Help.Link parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.rpc.Help.Link parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.rpc.Help.Link prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - 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; - } - /** - * Protobuf type {@code google.rpc.Help.Link} - * - *
-     * Describes a URL link.
-     * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.rpc.Help.Link) - com.google.rpc.Help.LinkOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_Help_Link_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_Help_Link_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.rpc.Help.Link.class, com.google.rpc.Help.Link.Builder.class); - } - - // Construct using com.google.rpc.Help.Link.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - description_ = ""; - - url_ = ""; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_Help_Link_descriptor; - } - - public com.google.rpc.Help.Link getDefaultInstanceForType() { - return com.google.rpc.Help.Link.getDefaultInstance(); - } - - public com.google.rpc.Help.Link build() { - com.google.rpc.Help.Link result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.rpc.Help.Link buildPartial() { - com.google.rpc.Help.Link result = new com.google.rpc.Help.Link(this); - result.description_ = description_; - result.url_ = url_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.rpc.Help.Link) { - return mergeFrom((com.google.rpc.Help.Link)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.rpc.Help.Link other) { - if (other == com.google.rpc.Help.Link.getDefaultInstance()) return this; - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - onChanged(); - } - if (!other.getUrl().isEmpty()) { - url_ = other.url_; - onChanged(); - } - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.rpc.Help.Link parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.rpc.Help.Link) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object description_ = ""; - /** - * optional string description = 1; - * - *
-       * Describes what the link offers.
-       * 
- */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string description = 1; - * - *
-       * Describes what the link offers.
-       * 
- */ - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string description = 1; - * - *
-       * Describes what the link offers.
-       * 
- */ - public Builder setDescription( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - description_ = value; - onChanged(); - return this; - } - /** - * optional string description = 1; - * - *
-       * Describes what the link offers.
-       * 
- */ - public Builder clearDescription() { - - description_ = getDefaultInstance().getDescription(); - onChanged(); - return this; - } - /** - * optional string description = 1; - * - *
-       * Describes what the link offers.
-       * 
- */ - public Builder setDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - description_ = value; - onChanged(); - return this; - } - - private java.lang.Object url_ = ""; - /** - * optional string url = 2; - * - *
-       * The URL of the link.
-       * 
- */ - public java.lang.String getUrl() { - java.lang.Object ref = url_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - url_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string url = 2; - * - *
-       * The URL of the link.
-       * 
- */ - public com.google.protobuf.ByteString - getUrlBytes() { - java.lang.Object ref = url_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - url_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string url = 2; - * - *
-       * The URL of the link.
-       * 
- */ - public Builder setUrl( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - url_ = value; - onChanged(); - return this; - } - /** - * optional string url = 2; - * - *
-       * The URL of the link.
-       * 
- */ - public Builder clearUrl() { - - url_ = getDefaultInstance().getUrl(); - onChanged(); - return this; - } - /** - * optional string url = 2; - * - *
-       * The URL of the link.
-       * 
- */ - public Builder setUrlBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - url_ = value; - onChanged(); - return this; - } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - - // @@protoc_insertion_point(builder_scope:google.rpc.Help.Link) - } - - // @@protoc_insertion_point(class_scope:google.rpc.Help.Link) - private static final com.google.rpc.Help.Link DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.rpc.Help.Link(); - } - - public static com.google.rpc.Help.Link getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public Link parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new Link(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public com.google.rpc.Help.Link getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int LINKS_FIELD_NUMBER = 1; - private java.util.List links_; - /** - * repeated .google.rpc.Help.Link links = 1; - * - *
-   * URL(s) pointing to additional information on handling the current error.
-   * 
- */ - public java.util.List getLinksList() { - return links_; - } - /** - * repeated .google.rpc.Help.Link links = 1; - * - *
-   * URL(s) pointing to additional information on handling the current error.
-   * 
- */ - public java.util.List - getLinksOrBuilderList() { - return links_; - } - /** - * repeated .google.rpc.Help.Link links = 1; - * - *
-   * URL(s) pointing to additional information on handling the current error.
-   * 
- */ - public int getLinksCount() { - return links_.size(); - } - /** - * repeated .google.rpc.Help.Link links = 1; - * - *
-   * URL(s) pointing to additional information on handling the current error.
-   * 
- */ - public com.google.rpc.Help.Link getLinks(int index) { - return links_.get(index); - } - /** - * repeated .google.rpc.Help.Link links = 1; - * - *
-   * URL(s) pointing to additional information on handling the current error.
-   * 
- */ - public com.google.rpc.Help.LinkOrBuilder getLinksOrBuilder( - int index) { - return links_.get(index); - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < links_.size(); i++) { - output.writeMessage(1, links_.get(i)); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < links_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, links_.get(i)); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static com.google.rpc.Help parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.rpc.Help 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.rpc.Help parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.rpc.Help parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.rpc.Help parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.rpc.Help parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.rpc.Help parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.rpc.Help parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.rpc.Help parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.rpc.Help parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.rpc.Help prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - 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; - } - /** - * Protobuf type {@code google.rpc.Help} - * - *
-   * Provides links to documentation or for performing an out of band action.
-   * For example, if a quota check failed with an error indicating the calling
-   * project hasn't enabled the accessed service, this can contain a URL pointing
-   * directly to the right place in the developer console to flip the bit.
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.rpc.Help) - com.google.rpc.HelpOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_Help_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_Help_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.rpc.Help.class, com.google.rpc.Help.Builder.class); - } - - // Construct using com.google.rpc.Help.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getLinksFieldBuilder(); - } - } - public Builder clear() { - super.clear(); - if (linksBuilder_ == null) { - links_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - linksBuilder_.clear(); - } - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_Help_descriptor; - } - - public com.google.rpc.Help getDefaultInstanceForType() { - return com.google.rpc.Help.getDefaultInstance(); - } - - public com.google.rpc.Help build() { - com.google.rpc.Help result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.rpc.Help buildPartial() { - com.google.rpc.Help result = new com.google.rpc.Help(this); - int from_bitField0_ = bitField0_; - if (linksBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - links_ = java.util.Collections.unmodifiableList(links_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.links_ = links_; - } else { - result.links_ = linksBuilder_.build(); - } - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.rpc.Help) { - return mergeFrom((com.google.rpc.Help)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.rpc.Help other) { - if (other == com.google.rpc.Help.getDefaultInstance()) return this; - if (linksBuilder_ == null) { - if (!other.links_.isEmpty()) { - if (links_.isEmpty()) { - links_ = other.links_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureLinksIsMutable(); - links_.addAll(other.links_); - } - onChanged(); - } - } else { - if (!other.links_.isEmpty()) { - if (linksBuilder_.isEmpty()) { - linksBuilder_.dispose(); - linksBuilder_ = null; - links_ = other.links_; - bitField0_ = (bitField0_ & ~0x00000001); - linksBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getLinksFieldBuilder() : null; - } else { - linksBuilder_.addAllMessages(other.links_); - } - } - } - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.rpc.Help parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.rpc.Help) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List links_ = - java.util.Collections.emptyList(); - private void ensureLinksIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { - links_ = new java.util.ArrayList(links_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.rpc.Help.Link, com.google.rpc.Help.Link.Builder, com.google.rpc.Help.LinkOrBuilder> linksBuilder_; - - /** - * repeated .google.rpc.Help.Link links = 1; - * - *
-     * URL(s) pointing to additional information on handling the current error.
-     * 
- */ - public java.util.List getLinksList() { - if (linksBuilder_ == null) { - return java.util.Collections.unmodifiableList(links_); - } else { - return linksBuilder_.getMessageList(); - } - } - /** - * repeated .google.rpc.Help.Link links = 1; - * - *
-     * URL(s) pointing to additional information on handling the current error.
-     * 
- */ - public int getLinksCount() { - if (linksBuilder_ == null) { - return links_.size(); - } else { - return linksBuilder_.getCount(); - } - } - /** - * repeated .google.rpc.Help.Link links = 1; - * - *
-     * URL(s) pointing to additional information on handling the current error.
-     * 
- */ - public com.google.rpc.Help.Link getLinks(int index) { - if (linksBuilder_ == null) { - return links_.get(index); - } else { - return linksBuilder_.getMessage(index); - } - } - /** - * repeated .google.rpc.Help.Link links = 1; - * - *
-     * URL(s) pointing to additional information on handling the current error.
-     * 
- */ - public Builder setLinks( - int index, com.google.rpc.Help.Link value) { - if (linksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLinksIsMutable(); - links_.set(index, value); - onChanged(); - } else { - linksBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .google.rpc.Help.Link links = 1; - * - *
-     * URL(s) pointing to additional information on handling the current error.
-     * 
- */ - public Builder setLinks( - int index, com.google.rpc.Help.Link.Builder builderForValue) { - if (linksBuilder_ == null) { - ensureLinksIsMutable(); - links_.set(index, builderForValue.build()); - onChanged(); - } else { - linksBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.rpc.Help.Link links = 1; - * - *
-     * URL(s) pointing to additional information on handling the current error.
-     * 
- */ - public Builder addLinks(com.google.rpc.Help.Link value) { - if (linksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLinksIsMutable(); - links_.add(value); - onChanged(); - } else { - linksBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .google.rpc.Help.Link links = 1; - * - *
-     * URL(s) pointing to additional information on handling the current error.
-     * 
- */ - public Builder addLinks( - int index, com.google.rpc.Help.Link value) { - if (linksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLinksIsMutable(); - links_.add(index, value); - onChanged(); - } else { - linksBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .google.rpc.Help.Link links = 1; - * - *
-     * URL(s) pointing to additional information on handling the current error.
-     * 
- */ - public Builder addLinks( - com.google.rpc.Help.Link.Builder builderForValue) { - if (linksBuilder_ == null) { - ensureLinksIsMutable(); - links_.add(builderForValue.build()); - onChanged(); - } else { - linksBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .google.rpc.Help.Link links = 1; - * - *
-     * URL(s) pointing to additional information on handling the current error.
-     * 
- */ - public Builder addLinks( - int index, com.google.rpc.Help.Link.Builder builderForValue) { - if (linksBuilder_ == null) { - ensureLinksIsMutable(); - links_.add(index, builderForValue.build()); - onChanged(); - } else { - linksBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.rpc.Help.Link links = 1; - * - *
-     * URL(s) pointing to additional information on handling the current error.
-     * 
- */ - public Builder addAllLinks( - java.lang.Iterable values) { - if (linksBuilder_ == null) { - ensureLinksIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, links_); - onChanged(); - } else { - linksBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .google.rpc.Help.Link links = 1; - * - *
-     * URL(s) pointing to additional information on handling the current error.
-     * 
- */ - public Builder clearLinks() { - if (linksBuilder_ == null) { - links_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - linksBuilder_.clear(); - } - return this; - } - /** - * repeated .google.rpc.Help.Link links = 1; - * - *
-     * URL(s) pointing to additional information on handling the current error.
-     * 
- */ - public Builder removeLinks(int index) { - if (linksBuilder_ == null) { - ensureLinksIsMutable(); - links_.remove(index); - onChanged(); - } else { - linksBuilder_.remove(index); - } - return this; - } - /** - * repeated .google.rpc.Help.Link links = 1; - * - *
-     * URL(s) pointing to additional information on handling the current error.
-     * 
- */ - public com.google.rpc.Help.Link.Builder getLinksBuilder( - int index) { - return getLinksFieldBuilder().getBuilder(index); - } - /** - * repeated .google.rpc.Help.Link links = 1; - * - *
-     * URL(s) pointing to additional information on handling the current error.
-     * 
- */ - public com.google.rpc.Help.LinkOrBuilder getLinksOrBuilder( - int index) { - if (linksBuilder_ == null) { - return links_.get(index); } else { - return linksBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .google.rpc.Help.Link links = 1; - * - *
-     * URL(s) pointing to additional information on handling the current error.
-     * 
- */ - public java.util.List - getLinksOrBuilderList() { - if (linksBuilder_ != null) { - return linksBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(links_); - } - } - /** - * repeated .google.rpc.Help.Link links = 1; - * - *
-     * URL(s) pointing to additional information on handling the current error.
-     * 
- */ - public com.google.rpc.Help.Link.Builder addLinksBuilder() { - return getLinksFieldBuilder().addBuilder( - com.google.rpc.Help.Link.getDefaultInstance()); - } - /** - * repeated .google.rpc.Help.Link links = 1; - * - *
-     * URL(s) pointing to additional information on handling the current error.
-     * 
- */ - public com.google.rpc.Help.Link.Builder addLinksBuilder( - int index) { - return getLinksFieldBuilder().addBuilder( - index, com.google.rpc.Help.Link.getDefaultInstance()); - } - /** - * repeated .google.rpc.Help.Link links = 1; - * - *
-     * URL(s) pointing to additional information on handling the current error.
-     * 
- */ - public java.util.List - getLinksBuilderList() { - return getLinksFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - com.google.rpc.Help.Link, com.google.rpc.Help.Link.Builder, com.google.rpc.Help.LinkOrBuilder> - getLinksFieldBuilder() { - if (linksBuilder_ == null) { - linksBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - com.google.rpc.Help.Link, com.google.rpc.Help.Link.Builder, com.google.rpc.Help.LinkOrBuilder>( - links_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); - links_ = null; - } - return linksBuilder_; - } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - - // @@protoc_insertion_point(builder_scope:google.rpc.Help) - } - - // @@protoc_insertion_point(class_scope:google.rpc.Help) - private static final com.google.rpc.Help DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.rpc.Help(); - } - - public static com.google.rpc.Help getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public Help parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new Help(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public com.google.rpc.Help getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-gax/generated/src/main/java/com/google/rpc/HelpOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/rpc/HelpOrBuilder.java deleted file mode 100644 index ffaca8109020..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/rpc/HelpOrBuilder.java +++ /dev/null @@ -1,53 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/rpc/error_details.proto - -package com.google.rpc; - -public interface HelpOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.rpc.Help) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated .google.rpc.Help.Link links = 1; - * - *
-   * URL(s) pointing to additional information on handling the current error.
-   * 
- */ - java.util.List - getLinksList(); - /** - * repeated .google.rpc.Help.Link links = 1; - * - *
-   * URL(s) pointing to additional information on handling the current error.
-   * 
- */ - com.google.rpc.Help.Link getLinks(int index); - /** - * repeated .google.rpc.Help.Link links = 1; - * - *
-   * URL(s) pointing to additional information on handling the current error.
-   * 
- */ - int getLinksCount(); - /** - * repeated .google.rpc.Help.Link links = 1; - * - *
-   * URL(s) pointing to additional information on handling the current error.
-   * 
- */ - java.util.List - getLinksOrBuilderList(); - /** - * repeated .google.rpc.Help.Link links = 1; - * - *
-   * URL(s) pointing to additional information on handling the current error.
-   * 
- */ - com.google.rpc.Help.LinkOrBuilder getLinksOrBuilder( - int index); -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/rpc/QuotaFailure.java b/gcloud-java-gax/generated/src/main/java/com/google/rpc/QuotaFailure.java deleted file mode 100644 index 3051a2773fbb..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/rpc/QuotaFailure.java +++ /dev/null @@ -1,1498 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/rpc/error_details.proto - -package com.google.rpc; - -/** - * Protobuf type {@code google.rpc.QuotaFailure} - * - *
- * Describes how a quota check failed.
- * For example if a daily limit was exceeded for the calling project,
- * a service could respond with a QuotaFailure detail containing the project
- * id and the description of the quota limit that was exceeded.  If the
- * calling project hasn't enabled the service in the developer console, then
- * a service could respond with the project id and set `service_disabled`
- * to true.
- * Also see RetryDetail and Help types for other details about handling a
- * quota failure.
- * 
- */ -public final class QuotaFailure extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.rpc.QuotaFailure) - QuotaFailureOrBuilder { - // Use QuotaFailure.newBuilder() to construct. - private QuotaFailure(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private QuotaFailure() { - violations_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private QuotaFailure( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - int mutable_bitField0_ = 0; - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!input.skipField(tag)) { - done = true; - } - break; - } - case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - violations_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - violations_.add(input.readMessage(com.google.rpc.QuotaFailure.Violation.parser(), extensionRegistry)); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - violations_ = java.util.Collections.unmodifiableList(violations_); - } - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_QuotaFailure_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_QuotaFailure_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.rpc.QuotaFailure.class, com.google.rpc.QuotaFailure.Builder.class); - } - - public interface ViolationOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.rpc.QuotaFailure.Violation) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string subject = 1; - * - *
-     * The subject on which the quota check failed.
-     * For example, "clientip:<ip address of client>" or "project:<Google
-     * developer project id>".
-     * 
- */ - java.lang.String getSubject(); - /** - * optional string subject = 1; - * - *
-     * The subject on which the quota check failed.
-     * For example, "clientip:<ip address of client>" or "project:<Google
-     * developer project id>".
-     * 
- */ - com.google.protobuf.ByteString - getSubjectBytes(); - - /** - * optional string description = 2; - * - *
-     * A description of how the quota check failed. Clients can use this
-     * description to find more about the quota configuration in the service's
-     * public documentation, or find the relevant quota limit to adjust through
-     * developer console.
-     * For example: "Service disabled" or "Daily Limit for read operations
-     * exceeded".
-     * 
- */ - java.lang.String getDescription(); - /** - * optional string description = 2; - * - *
-     * A description of how the quota check failed. Clients can use this
-     * description to find more about the quota configuration in the service's
-     * public documentation, or find the relevant quota limit to adjust through
-     * developer console.
-     * For example: "Service disabled" or "Daily Limit for read operations
-     * exceeded".
-     * 
- */ - com.google.protobuf.ByteString - getDescriptionBytes(); - } - /** - * Protobuf type {@code google.rpc.QuotaFailure.Violation} - * - *
-   * A message type used to describe a single quota violation.  For example, a
-   * daily quota or a custom quota that was exceeded.
-   * 
- */ - public static final class Violation extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.rpc.QuotaFailure.Violation) - ViolationOrBuilder { - // Use Violation.newBuilder() to construct. - private Violation(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Violation() { - subject_ = ""; - description_ = ""; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private Violation( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - int mutable_bitField0_ = 0; - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!input.skipField(tag)) { - done = true; - } - break; - } - case 10: { - String s = input.readStringRequireUtf8(); - - subject_ = s; - break; - } - case 18: { - String s = input.readStringRequireUtf8(); - - description_ = s; - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_QuotaFailure_Violation_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_QuotaFailure_Violation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.rpc.QuotaFailure.Violation.class, com.google.rpc.QuotaFailure.Violation.Builder.class); - } - - public static final int SUBJECT_FIELD_NUMBER = 1; - private volatile java.lang.Object subject_; - /** - * optional string subject = 1; - * - *
-     * The subject on which the quota check failed.
-     * For example, "clientip:<ip address of client>" or "project:<Google
-     * developer project id>".
-     * 
- */ - public java.lang.String getSubject() { - java.lang.Object ref = subject_; - 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(); - subject_ = s; - return s; - } - } - /** - * optional string subject = 1; - * - *
-     * The subject on which the quota check failed.
-     * For example, "clientip:<ip address of client>" or "project:<Google
-     * developer project id>".
-     * 
- */ - public com.google.protobuf.ByteString - getSubjectBytes() { - java.lang.Object ref = subject_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - subject_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DESCRIPTION_FIELD_NUMBER = 2; - private volatile java.lang.Object description_; - /** - * optional string description = 2; - * - *
-     * A description of how the quota check failed. Clients can use this
-     * description to find more about the quota configuration in the service's
-     * public documentation, or find the relevant quota limit to adjust through
-     * developer console.
-     * For example: "Service disabled" or "Daily Limit for read operations
-     * exceeded".
-     * 
- */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - 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(); - description_ = s; - return s; - } - } - /** - * optional string description = 2; - * - *
-     * A description of how the quota check failed. Clients can use this
-     * description to find more about the quota configuration in the service's
-     * public documentation, or find the relevant quota limit to adjust through
-     * developer console.
-     * For example: "Service disabled" or "Daily Limit for read operations
-     * exceeded".
-     * 
- */ - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!getSubjectBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, subject_); - } - if (!getDescriptionBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, description_); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getSubjectBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, subject_); - } - if (!getDescriptionBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, description_); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static com.google.rpc.QuotaFailure.Violation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.rpc.QuotaFailure.Violation 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.rpc.QuotaFailure.Violation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.rpc.QuotaFailure.Violation parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.rpc.QuotaFailure.Violation parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.rpc.QuotaFailure.Violation parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.rpc.QuotaFailure.Violation parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.rpc.QuotaFailure.Violation parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.rpc.QuotaFailure.Violation parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.rpc.QuotaFailure.Violation parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.rpc.QuotaFailure.Violation prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - 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; - } - /** - * Protobuf type {@code google.rpc.QuotaFailure.Violation} - * - *
-     * A message type used to describe a single quota violation.  For example, a
-     * daily quota or a custom quota that was exceeded.
-     * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.rpc.QuotaFailure.Violation) - com.google.rpc.QuotaFailure.ViolationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_QuotaFailure_Violation_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_QuotaFailure_Violation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.rpc.QuotaFailure.Violation.class, com.google.rpc.QuotaFailure.Violation.Builder.class); - } - - // Construct using com.google.rpc.QuotaFailure.Violation.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - subject_ = ""; - - description_ = ""; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_QuotaFailure_Violation_descriptor; - } - - public com.google.rpc.QuotaFailure.Violation getDefaultInstanceForType() { - return com.google.rpc.QuotaFailure.Violation.getDefaultInstance(); - } - - public com.google.rpc.QuotaFailure.Violation build() { - com.google.rpc.QuotaFailure.Violation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.rpc.QuotaFailure.Violation buildPartial() { - com.google.rpc.QuotaFailure.Violation result = new com.google.rpc.QuotaFailure.Violation(this); - result.subject_ = subject_; - result.description_ = description_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.rpc.QuotaFailure.Violation) { - return mergeFrom((com.google.rpc.QuotaFailure.Violation)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.rpc.QuotaFailure.Violation other) { - if (other == com.google.rpc.QuotaFailure.Violation.getDefaultInstance()) return this; - if (!other.getSubject().isEmpty()) { - subject_ = other.subject_; - onChanged(); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - onChanged(); - } - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.rpc.QuotaFailure.Violation parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.rpc.QuotaFailure.Violation) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object subject_ = ""; - /** - * optional string subject = 1; - * - *
-       * The subject on which the quota check failed.
-       * For example, "clientip:<ip address of client>" or "project:<Google
-       * developer project id>".
-       * 
- */ - public java.lang.String getSubject() { - java.lang.Object ref = subject_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - subject_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string subject = 1; - * - *
-       * The subject on which the quota check failed.
-       * For example, "clientip:<ip address of client>" or "project:<Google
-       * developer project id>".
-       * 
- */ - public com.google.protobuf.ByteString - getSubjectBytes() { - java.lang.Object ref = subject_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - subject_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string subject = 1; - * - *
-       * The subject on which the quota check failed.
-       * For example, "clientip:<ip address of client>" or "project:<Google
-       * developer project id>".
-       * 
- */ - public Builder setSubject( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - subject_ = value; - onChanged(); - return this; - } - /** - * optional string subject = 1; - * - *
-       * The subject on which the quota check failed.
-       * For example, "clientip:<ip address of client>" or "project:<Google
-       * developer project id>".
-       * 
- */ - public Builder clearSubject() { - - subject_ = getDefaultInstance().getSubject(); - onChanged(); - return this; - } - /** - * optional string subject = 1; - * - *
-       * The subject on which the quota check failed.
-       * For example, "clientip:<ip address of client>" or "project:<Google
-       * developer project id>".
-       * 
- */ - public Builder setSubjectBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - subject_ = value; - onChanged(); - return this; - } - - private java.lang.Object description_ = ""; - /** - * optional string description = 2; - * - *
-       * A description of how the quota check failed. Clients can use this
-       * description to find more about the quota configuration in the service's
-       * public documentation, or find the relevant quota limit to adjust through
-       * developer console.
-       * For example: "Service disabled" or "Daily Limit for read operations
-       * exceeded".
-       * 
- */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string description = 2; - * - *
-       * A description of how the quota check failed. Clients can use this
-       * description to find more about the quota configuration in the service's
-       * public documentation, or find the relevant quota limit to adjust through
-       * developer console.
-       * For example: "Service disabled" or "Daily Limit for read operations
-       * exceeded".
-       * 
- */ - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string description = 2; - * - *
-       * A description of how the quota check failed. Clients can use this
-       * description to find more about the quota configuration in the service's
-       * public documentation, or find the relevant quota limit to adjust through
-       * developer console.
-       * For example: "Service disabled" or "Daily Limit for read operations
-       * exceeded".
-       * 
- */ - public Builder setDescription( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - description_ = value; - onChanged(); - return this; - } - /** - * optional string description = 2; - * - *
-       * A description of how the quota check failed. Clients can use this
-       * description to find more about the quota configuration in the service's
-       * public documentation, or find the relevant quota limit to adjust through
-       * developer console.
-       * For example: "Service disabled" or "Daily Limit for read operations
-       * exceeded".
-       * 
- */ - public Builder clearDescription() { - - description_ = getDefaultInstance().getDescription(); - onChanged(); - return this; - } - /** - * optional string description = 2; - * - *
-       * A description of how the quota check failed. Clients can use this
-       * description to find more about the quota configuration in the service's
-       * public documentation, or find the relevant quota limit to adjust through
-       * developer console.
-       * For example: "Service disabled" or "Daily Limit for read operations
-       * exceeded".
-       * 
- */ - public Builder setDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - description_ = value; - onChanged(); - return this; - } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - - // @@protoc_insertion_point(builder_scope:google.rpc.QuotaFailure.Violation) - } - - // @@protoc_insertion_point(class_scope:google.rpc.QuotaFailure.Violation) - private static final com.google.rpc.QuotaFailure.Violation DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.rpc.QuotaFailure.Violation(); - } - - public static com.google.rpc.QuotaFailure.Violation getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public Violation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new Violation(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public com.google.rpc.QuotaFailure.Violation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int VIOLATIONS_FIELD_NUMBER = 1; - private java.util.List violations_; - /** - * repeated .google.rpc.QuotaFailure.Violation violations = 1; - * - *
-   * Describes all quota violations.
-   * 
- */ - public java.util.List getViolationsList() { - return violations_; - } - /** - * repeated .google.rpc.QuotaFailure.Violation violations = 1; - * - *
-   * Describes all quota violations.
-   * 
- */ - public java.util.List - getViolationsOrBuilderList() { - return violations_; - } - /** - * repeated .google.rpc.QuotaFailure.Violation violations = 1; - * - *
-   * Describes all quota violations.
-   * 
- */ - public int getViolationsCount() { - return violations_.size(); - } - /** - * repeated .google.rpc.QuotaFailure.Violation violations = 1; - * - *
-   * Describes all quota violations.
-   * 
- */ - public com.google.rpc.QuotaFailure.Violation getViolations(int index) { - return violations_.get(index); - } - /** - * repeated .google.rpc.QuotaFailure.Violation violations = 1; - * - *
-   * Describes all quota violations.
-   * 
- */ - public com.google.rpc.QuotaFailure.ViolationOrBuilder getViolationsOrBuilder( - int index) { - return violations_.get(index); - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < violations_.size(); i++) { - output.writeMessage(1, violations_.get(i)); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < violations_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, violations_.get(i)); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static com.google.rpc.QuotaFailure parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.rpc.QuotaFailure 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.rpc.QuotaFailure parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.rpc.QuotaFailure parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.rpc.QuotaFailure parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.rpc.QuotaFailure parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.rpc.QuotaFailure parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.rpc.QuotaFailure parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.rpc.QuotaFailure parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.rpc.QuotaFailure parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.rpc.QuotaFailure prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - 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; - } - /** - * Protobuf type {@code google.rpc.QuotaFailure} - * - *
-   * Describes how a quota check failed.
-   * For example if a daily limit was exceeded for the calling project,
-   * a service could respond with a QuotaFailure detail containing the project
-   * id and the description of the quota limit that was exceeded.  If the
-   * calling project hasn't enabled the service in the developer console, then
-   * a service could respond with the project id and set `service_disabled`
-   * to true.
-   * Also see RetryDetail and Help types for other details about handling a
-   * quota failure.
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.rpc.QuotaFailure) - com.google.rpc.QuotaFailureOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_QuotaFailure_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_QuotaFailure_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.rpc.QuotaFailure.class, com.google.rpc.QuotaFailure.Builder.class); - } - - // Construct using com.google.rpc.QuotaFailure.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getViolationsFieldBuilder(); - } - } - public Builder clear() { - super.clear(); - if (violationsBuilder_ == null) { - violations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - violationsBuilder_.clear(); - } - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_QuotaFailure_descriptor; - } - - public com.google.rpc.QuotaFailure getDefaultInstanceForType() { - return com.google.rpc.QuotaFailure.getDefaultInstance(); - } - - public com.google.rpc.QuotaFailure build() { - com.google.rpc.QuotaFailure result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.rpc.QuotaFailure buildPartial() { - com.google.rpc.QuotaFailure result = new com.google.rpc.QuotaFailure(this); - int from_bitField0_ = bitField0_; - if (violationsBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - violations_ = java.util.Collections.unmodifiableList(violations_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.violations_ = violations_; - } else { - result.violations_ = violationsBuilder_.build(); - } - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.rpc.QuotaFailure) { - return mergeFrom((com.google.rpc.QuotaFailure)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.rpc.QuotaFailure other) { - if (other == com.google.rpc.QuotaFailure.getDefaultInstance()) return this; - if (violationsBuilder_ == null) { - if (!other.violations_.isEmpty()) { - if (violations_.isEmpty()) { - violations_ = other.violations_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureViolationsIsMutable(); - violations_.addAll(other.violations_); - } - onChanged(); - } - } else { - if (!other.violations_.isEmpty()) { - if (violationsBuilder_.isEmpty()) { - violationsBuilder_.dispose(); - violationsBuilder_ = null; - violations_ = other.violations_; - bitField0_ = (bitField0_ & ~0x00000001); - violationsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getViolationsFieldBuilder() : null; - } else { - violationsBuilder_.addAllMessages(other.violations_); - } - } - } - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.rpc.QuotaFailure parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.rpc.QuotaFailure) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List violations_ = - java.util.Collections.emptyList(); - private void ensureViolationsIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { - violations_ = new java.util.ArrayList(violations_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.rpc.QuotaFailure.Violation, com.google.rpc.QuotaFailure.Violation.Builder, com.google.rpc.QuotaFailure.ViolationOrBuilder> violationsBuilder_; - - /** - * repeated .google.rpc.QuotaFailure.Violation violations = 1; - * - *
-     * Describes all quota violations.
-     * 
- */ - public java.util.List getViolationsList() { - if (violationsBuilder_ == null) { - return java.util.Collections.unmodifiableList(violations_); - } else { - return violationsBuilder_.getMessageList(); - } - } - /** - * repeated .google.rpc.QuotaFailure.Violation violations = 1; - * - *
-     * Describes all quota violations.
-     * 
- */ - public int getViolationsCount() { - if (violationsBuilder_ == null) { - return violations_.size(); - } else { - return violationsBuilder_.getCount(); - } - } - /** - * repeated .google.rpc.QuotaFailure.Violation violations = 1; - * - *
-     * Describes all quota violations.
-     * 
- */ - public com.google.rpc.QuotaFailure.Violation getViolations(int index) { - if (violationsBuilder_ == null) { - return violations_.get(index); - } else { - return violationsBuilder_.getMessage(index); - } - } - /** - * repeated .google.rpc.QuotaFailure.Violation violations = 1; - * - *
-     * Describes all quota violations.
-     * 
- */ - public Builder setViolations( - int index, com.google.rpc.QuotaFailure.Violation value) { - if (violationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureViolationsIsMutable(); - violations_.set(index, value); - onChanged(); - } else { - violationsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .google.rpc.QuotaFailure.Violation violations = 1; - * - *
-     * Describes all quota violations.
-     * 
- */ - public Builder setViolations( - int index, com.google.rpc.QuotaFailure.Violation.Builder builderForValue) { - if (violationsBuilder_ == null) { - ensureViolationsIsMutable(); - violations_.set(index, builderForValue.build()); - onChanged(); - } else { - violationsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.rpc.QuotaFailure.Violation violations = 1; - * - *
-     * Describes all quota violations.
-     * 
- */ - public Builder addViolations(com.google.rpc.QuotaFailure.Violation value) { - if (violationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureViolationsIsMutable(); - violations_.add(value); - onChanged(); - } else { - violationsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .google.rpc.QuotaFailure.Violation violations = 1; - * - *
-     * Describes all quota violations.
-     * 
- */ - public Builder addViolations( - int index, com.google.rpc.QuotaFailure.Violation value) { - if (violationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureViolationsIsMutable(); - violations_.add(index, value); - onChanged(); - } else { - violationsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .google.rpc.QuotaFailure.Violation violations = 1; - * - *
-     * Describes all quota violations.
-     * 
- */ - public Builder addViolations( - com.google.rpc.QuotaFailure.Violation.Builder builderForValue) { - if (violationsBuilder_ == null) { - ensureViolationsIsMutable(); - violations_.add(builderForValue.build()); - onChanged(); - } else { - violationsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .google.rpc.QuotaFailure.Violation violations = 1; - * - *
-     * Describes all quota violations.
-     * 
- */ - public Builder addViolations( - int index, com.google.rpc.QuotaFailure.Violation.Builder builderForValue) { - if (violationsBuilder_ == null) { - ensureViolationsIsMutable(); - violations_.add(index, builderForValue.build()); - onChanged(); - } else { - violationsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.rpc.QuotaFailure.Violation violations = 1; - * - *
-     * Describes all quota violations.
-     * 
- */ - public Builder addAllViolations( - java.lang.Iterable values) { - if (violationsBuilder_ == null) { - ensureViolationsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, violations_); - onChanged(); - } else { - violationsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .google.rpc.QuotaFailure.Violation violations = 1; - * - *
-     * Describes all quota violations.
-     * 
- */ - public Builder clearViolations() { - if (violationsBuilder_ == null) { - violations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - violationsBuilder_.clear(); - } - return this; - } - /** - * repeated .google.rpc.QuotaFailure.Violation violations = 1; - * - *
-     * Describes all quota violations.
-     * 
- */ - public Builder removeViolations(int index) { - if (violationsBuilder_ == null) { - ensureViolationsIsMutable(); - violations_.remove(index); - onChanged(); - } else { - violationsBuilder_.remove(index); - } - return this; - } - /** - * repeated .google.rpc.QuotaFailure.Violation violations = 1; - * - *
-     * Describes all quota violations.
-     * 
- */ - public com.google.rpc.QuotaFailure.Violation.Builder getViolationsBuilder( - int index) { - return getViolationsFieldBuilder().getBuilder(index); - } - /** - * repeated .google.rpc.QuotaFailure.Violation violations = 1; - * - *
-     * Describes all quota violations.
-     * 
- */ - public com.google.rpc.QuotaFailure.ViolationOrBuilder getViolationsOrBuilder( - int index) { - if (violationsBuilder_ == null) { - return violations_.get(index); } else { - return violationsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .google.rpc.QuotaFailure.Violation violations = 1; - * - *
-     * Describes all quota violations.
-     * 
- */ - public java.util.List - getViolationsOrBuilderList() { - if (violationsBuilder_ != null) { - return violationsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(violations_); - } - } - /** - * repeated .google.rpc.QuotaFailure.Violation violations = 1; - * - *
-     * Describes all quota violations.
-     * 
- */ - public com.google.rpc.QuotaFailure.Violation.Builder addViolationsBuilder() { - return getViolationsFieldBuilder().addBuilder( - com.google.rpc.QuotaFailure.Violation.getDefaultInstance()); - } - /** - * repeated .google.rpc.QuotaFailure.Violation violations = 1; - * - *
-     * Describes all quota violations.
-     * 
- */ - public com.google.rpc.QuotaFailure.Violation.Builder addViolationsBuilder( - int index) { - return getViolationsFieldBuilder().addBuilder( - index, com.google.rpc.QuotaFailure.Violation.getDefaultInstance()); - } - /** - * repeated .google.rpc.QuotaFailure.Violation violations = 1; - * - *
-     * Describes all quota violations.
-     * 
- */ - public java.util.List - getViolationsBuilderList() { - return getViolationsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - com.google.rpc.QuotaFailure.Violation, com.google.rpc.QuotaFailure.Violation.Builder, com.google.rpc.QuotaFailure.ViolationOrBuilder> - getViolationsFieldBuilder() { - if (violationsBuilder_ == null) { - violationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - com.google.rpc.QuotaFailure.Violation, com.google.rpc.QuotaFailure.Violation.Builder, com.google.rpc.QuotaFailure.ViolationOrBuilder>( - violations_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); - violations_ = null; - } - return violationsBuilder_; - } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - - // @@protoc_insertion_point(builder_scope:google.rpc.QuotaFailure) - } - - // @@protoc_insertion_point(class_scope:google.rpc.QuotaFailure) - private static final com.google.rpc.QuotaFailure DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.rpc.QuotaFailure(); - } - - public static com.google.rpc.QuotaFailure getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public QuotaFailure parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new QuotaFailure(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public com.google.rpc.QuotaFailure getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-gax/generated/src/main/java/com/google/rpc/QuotaFailureOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/rpc/QuotaFailureOrBuilder.java deleted file mode 100644 index e586659760de..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/rpc/QuotaFailureOrBuilder.java +++ /dev/null @@ -1,53 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/rpc/error_details.proto - -package com.google.rpc; - -public interface QuotaFailureOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.rpc.QuotaFailure) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated .google.rpc.QuotaFailure.Violation violations = 1; - * - *
-   * Describes all quota violations.
-   * 
- */ - java.util.List - getViolationsList(); - /** - * repeated .google.rpc.QuotaFailure.Violation violations = 1; - * - *
-   * Describes all quota violations.
-   * 
- */ - com.google.rpc.QuotaFailure.Violation getViolations(int index); - /** - * repeated .google.rpc.QuotaFailure.Violation violations = 1; - * - *
-   * Describes all quota violations.
-   * 
- */ - int getViolationsCount(); - /** - * repeated .google.rpc.QuotaFailure.Violation violations = 1; - * - *
-   * Describes all quota violations.
-   * 
- */ - java.util.List - getViolationsOrBuilderList(); - /** - * repeated .google.rpc.QuotaFailure.Violation violations = 1; - * - *
-   * Describes all quota violations.
-   * 
- */ - com.google.rpc.QuotaFailure.ViolationOrBuilder getViolationsOrBuilder( - int index); -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/rpc/RequestInfo.java b/gcloud-java-gax/generated/src/main/java/com/google/rpc/RequestInfo.java deleted file mode 100644 index 1654fd4aaab8..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/rpc/RequestInfo.java +++ /dev/null @@ -1,643 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/rpc/error_details.proto - -package com.google.rpc; - -/** - * Protobuf type {@code google.rpc.RequestInfo} - * - *
- * Contains metadata about the request that clients can attach when filing a bug
- * or providing other forms of feedback.
- * 
- */ -public final class RequestInfo extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.rpc.RequestInfo) - RequestInfoOrBuilder { - // Use RequestInfo.newBuilder() to construct. - private RequestInfo(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private RequestInfo() { - requestId_ = ""; - servingData_ = ""; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private RequestInfo( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - int mutable_bitField0_ = 0; - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!input.skipField(tag)) { - done = true; - } - break; - } - case 10: { - String s = input.readStringRequireUtf8(); - - requestId_ = s; - break; - } - case 18: { - String s = input.readStringRequireUtf8(); - - servingData_ = s; - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_RequestInfo_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_RequestInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.rpc.RequestInfo.class, com.google.rpc.RequestInfo.Builder.class); - } - - public static final int REQUEST_ID_FIELD_NUMBER = 1; - private volatile java.lang.Object requestId_; - /** - * optional string request_id = 1; - * - *
-   * An opaque string that should only be interpreted by the service generating
-   * it. For example, it can be used to identify requests in the service's logs.
-   * 
- */ - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - 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(); - requestId_ = s; - return s; - } - } - /** - * optional string request_id = 1; - * - *
-   * An opaque string that should only be interpreted by the service generating
-   * it. For example, it can be used to identify requests in the service's logs.
-   * 
- */ - public com.google.protobuf.ByteString - getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SERVING_DATA_FIELD_NUMBER = 2; - private volatile java.lang.Object servingData_; - /** - * optional string serving_data = 2; - * - *
-   * Any data that was used to serve this request. For example, an encrypted
-   * stack trace that can be sent back to the service provider for debugging.
-   * 
- */ - public java.lang.String getServingData() { - java.lang.Object ref = servingData_; - 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(); - servingData_ = s; - return s; - } - } - /** - * optional string serving_data = 2; - * - *
-   * Any data that was used to serve this request. For example, an encrypted
-   * stack trace that can be sent back to the service provider for debugging.
-   * 
- */ - public com.google.protobuf.ByteString - getServingDataBytes() { - java.lang.Object ref = servingData_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - servingData_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!getRequestIdBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, requestId_); - } - if (!getServingDataBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, servingData_); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getRequestIdBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, requestId_); - } - if (!getServingDataBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, servingData_); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static com.google.rpc.RequestInfo parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.rpc.RequestInfo 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.rpc.RequestInfo parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.rpc.RequestInfo parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.rpc.RequestInfo parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.rpc.RequestInfo parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.rpc.RequestInfo parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.rpc.RequestInfo parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.rpc.RequestInfo parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.rpc.RequestInfo parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.rpc.RequestInfo prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - 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; - } - /** - * Protobuf type {@code google.rpc.RequestInfo} - * - *
-   * Contains metadata about the request that clients can attach when filing a bug
-   * or providing other forms of feedback.
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.rpc.RequestInfo) - com.google.rpc.RequestInfoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_RequestInfo_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_RequestInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.rpc.RequestInfo.class, com.google.rpc.RequestInfo.Builder.class); - } - - // Construct using com.google.rpc.RequestInfo.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - requestId_ = ""; - - servingData_ = ""; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_RequestInfo_descriptor; - } - - public com.google.rpc.RequestInfo getDefaultInstanceForType() { - return com.google.rpc.RequestInfo.getDefaultInstance(); - } - - public com.google.rpc.RequestInfo build() { - com.google.rpc.RequestInfo result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.rpc.RequestInfo buildPartial() { - com.google.rpc.RequestInfo result = new com.google.rpc.RequestInfo(this); - result.requestId_ = requestId_; - result.servingData_ = servingData_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.rpc.RequestInfo) { - return mergeFrom((com.google.rpc.RequestInfo)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.rpc.RequestInfo other) { - if (other == com.google.rpc.RequestInfo.getDefaultInstance()) return this; - if (!other.getRequestId().isEmpty()) { - requestId_ = other.requestId_; - onChanged(); - } - if (!other.getServingData().isEmpty()) { - servingData_ = other.servingData_; - onChanged(); - } - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.rpc.RequestInfo parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.rpc.RequestInfo) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object requestId_ = ""; - /** - * optional string request_id = 1; - * - *
-     * An opaque string that should only be interpreted by the service generating
-     * it. For example, it can be used to identify requests in the service's logs.
-     * 
- */ - public java.lang.String getRequestId() { - java.lang.Object ref = requestId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - requestId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string request_id = 1; - * - *
-     * An opaque string that should only be interpreted by the service generating
-     * it. For example, it can be used to identify requests in the service's logs.
-     * 
- */ - public com.google.protobuf.ByteString - getRequestIdBytes() { - java.lang.Object ref = requestId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - requestId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string request_id = 1; - * - *
-     * An opaque string that should only be interpreted by the service generating
-     * it. For example, it can be used to identify requests in the service's logs.
-     * 
- */ - public Builder setRequestId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - requestId_ = value; - onChanged(); - return this; - } - /** - * optional string request_id = 1; - * - *
-     * An opaque string that should only be interpreted by the service generating
-     * it. For example, it can be used to identify requests in the service's logs.
-     * 
- */ - public Builder clearRequestId() { - - requestId_ = getDefaultInstance().getRequestId(); - onChanged(); - return this; - } - /** - * optional string request_id = 1; - * - *
-     * An opaque string that should only be interpreted by the service generating
-     * it. For example, it can be used to identify requests in the service's logs.
-     * 
- */ - public Builder setRequestIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - requestId_ = value; - onChanged(); - return this; - } - - private java.lang.Object servingData_ = ""; - /** - * optional string serving_data = 2; - * - *
-     * Any data that was used to serve this request. For example, an encrypted
-     * stack trace that can be sent back to the service provider for debugging.
-     * 
- */ - public java.lang.String getServingData() { - java.lang.Object ref = servingData_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - servingData_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string serving_data = 2; - * - *
-     * Any data that was used to serve this request. For example, an encrypted
-     * stack trace that can be sent back to the service provider for debugging.
-     * 
- */ - public com.google.protobuf.ByteString - getServingDataBytes() { - java.lang.Object ref = servingData_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - servingData_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string serving_data = 2; - * - *
-     * Any data that was used to serve this request. For example, an encrypted
-     * stack trace that can be sent back to the service provider for debugging.
-     * 
- */ - public Builder setServingData( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - servingData_ = value; - onChanged(); - return this; - } - /** - * optional string serving_data = 2; - * - *
-     * Any data that was used to serve this request. For example, an encrypted
-     * stack trace that can be sent back to the service provider for debugging.
-     * 
- */ - public Builder clearServingData() { - - servingData_ = getDefaultInstance().getServingData(); - onChanged(); - return this; - } - /** - * optional string serving_data = 2; - * - *
-     * Any data that was used to serve this request. For example, an encrypted
-     * stack trace that can be sent back to the service provider for debugging.
-     * 
- */ - public Builder setServingDataBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - servingData_ = value; - onChanged(); - return this; - } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - - // @@protoc_insertion_point(builder_scope:google.rpc.RequestInfo) - } - - // @@protoc_insertion_point(class_scope:google.rpc.RequestInfo) - private static final com.google.rpc.RequestInfo DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.rpc.RequestInfo(); - } - - public static com.google.rpc.RequestInfo getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public RequestInfo parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new RequestInfo(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public com.google.rpc.RequestInfo getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-gax/generated/src/main/java/com/google/rpc/RequestInfoOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/rpc/RequestInfoOrBuilder.java deleted file mode 100644 index 94ad03b0f1c9..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/rpc/RequestInfoOrBuilder.java +++ /dev/null @@ -1,49 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/rpc/error_details.proto - -package com.google.rpc; - -public interface RequestInfoOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.rpc.RequestInfo) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string request_id = 1; - * - *
-   * An opaque string that should only be interpreted by the service generating
-   * it. For example, it can be used to identify requests in the service's logs.
-   * 
- */ - java.lang.String getRequestId(); - /** - * optional string request_id = 1; - * - *
-   * An opaque string that should only be interpreted by the service generating
-   * it. For example, it can be used to identify requests in the service's logs.
-   * 
- */ - com.google.protobuf.ByteString - getRequestIdBytes(); - - /** - * optional string serving_data = 2; - * - *
-   * Any data that was used to serve this request. For example, an encrypted
-   * stack trace that can be sent back to the service provider for debugging.
-   * 
- */ - java.lang.String getServingData(); - /** - * optional string serving_data = 2; - * - *
-   * Any data that was used to serve this request. For example, an encrypted
-   * stack trace that can be sent back to the service provider for debugging.
-   * 
- */ - com.google.protobuf.ByteString - getServingDataBytes(); -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/rpc/ResourceInfo.java b/gcloud-java-gax/generated/src/main/java/com/google/rpc/ResourceInfo.java deleted file mode 100644 index 9e69a569483e..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/rpc/ResourceInfo.java +++ /dev/null @@ -1,985 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/rpc/error_details.proto - -package com.google.rpc; - -/** - * Protobuf type {@code google.rpc.ResourceInfo} - * - *
- * Describes the resource that is being accessed.
- * 
- */ -public final class ResourceInfo extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.rpc.ResourceInfo) - ResourceInfoOrBuilder { - // Use ResourceInfo.newBuilder() to construct. - private ResourceInfo(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private ResourceInfo() { - resourceType_ = ""; - resourceName_ = ""; - owner_ = ""; - description_ = ""; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private ResourceInfo( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - int mutable_bitField0_ = 0; - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!input.skipField(tag)) { - done = true; - } - break; - } - case 10: { - String s = input.readStringRequireUtf8(); - - resourceType_ = s; - break; - } - case 18: { - String s = input.readStringRequireUtf8(); - - resourceName_ = s; - break; - } - case 26: { - String s = input.readStringRequireUtf8(); - - owner_ = s; - break; - } - case 34: { - String s = input.readStringRequireUtf8(); - - description_ = s; - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_ResourceInfo_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_ResourceInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.rpc.ResourceInfo.class, com.google.rpc.ResourceInfo.Builder.class); - } - - public static final int RESOURCE_TYPE_FIELD_NUMBER = 1; - private volatile java.lang.Object resourceType_; - /** - * optional string resource_type = 1; - * - *
-   * A name for the type of resource being accessed, e.g. "sql table",
-   * "cloud storage bucket", "file", "Google calendar"; or the type URL
-   * of the resource: e.g. "type.googleapis.com/google.pubsub.v1.Topic".
-   * 
- */ - public java.lang.String getResourceType() { - java.lang.Object ref = resourceType_; - 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(); - resourceType_ = s; - return s; - } - } - /** - * optional string resource_type = 1; - * - *
-   * A name for the type of resource being accessed, e.g. "sql table",
-   * "cloud storage bucket", "file", "Google calendar"; or the type URL
-   * of the resource: e.g. "type.googleapis.com/google.pubsub.v1.Topic".
-   * 
- */ - public com.google.protobuf.ByteString - getResourceTypeBytes() { - java.lang.Object ref = resourceType_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - resourceType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int RESOURCE_NAME_FIELD_NUMBER = 2; - private volatile java.lang.Object resourceName_; - /** - * optional string resource_name = 2; - * - *
-   * The name of the resource being accessed.  For example, a shared calendar
-   * name: "example.com_4fghdhgsrgh@group.calendar.google.com", if the current
-   * error is [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED].
-   * 
- */ - public java.lang.String getResourceName() { - java.lang.Object ref = resourceName_; - 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(); - resourceName_ = s; - return s; - } - } - /** - * optional string resource_name = 2; - * - *
-   * The name of the resource being accessed.  For example, a shared calendar
-   * name: "example.com_4fghdhgsrgh@group.calendar.google.com", if the current
-   * error is [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED].
-   * 
- */ - public com.google.protobuf.ByteString - getResourceNameBytes() { - java.lang.Object ref = resourceName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - resourceName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int OWNER_FIELD_NUMBER = 3; - private volatile java.lang.Object owner_; - /** - * optional string owner = 3; - * - *
-   * The owner of the resource (optional).
-   * For example, "user:<owner email>" or "project:<Google developer project
-   * id>".
-   * 
- */ - public java.lang.String getOwner() { - java.lang.Object ref = owner_; - 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(); - owner_ = s; - return s; - } - } - /** - * optional string owner = 3; - * - *
-   * The owner of the resource (optional).
-   * For example, "user:<owner email>" or "project:<Google developer project
-   * id>".
-   * 
- */ - public com.google.protobuf.ByteString - getOwnerBytes() { - java.lang.Object ref = owner_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - owner_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DESCRIPTION_FIELD_NUMBER = 4; - private volatile java.lang.Object description_; - /** - * optional string description = 4; - * - *
-   * Describes what error is encountered when accessing this resource.
-   * For example, updating a cloud project may require the `writer` permission
-   * on the developer console project.
-   * 
- */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - 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(); - description_ = s; - return s; - } - } - /** - * optional string description = 4; - * - *
-   * Describes what error is encountered when accessing this resource.
-   * For example, updating a cloud project may require the `writer` permission
-   * on the developer console project.
-   * 
- */ - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!getResourceTypeBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, resourceType_); - } - if (!getResourceNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, resourceName_); - } - if (!getOwnerBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 3, owner_); - } - if (!getDescriptionBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 4, description_); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getResourceTypeBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, resourceType_); - } - if (!getResourceNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, resourceName_); - } - if (!getOwnerBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(3, owner_); - } - if (!getDescriptionBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(4, description_); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static com.google.rpc.ResourceInfo parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.rpc.ResourceInfo 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.rpc.ResourceInfo parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.rpc.ResourceInfo parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.rpc.ResourceInfo parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.rpc.ResourceInfo parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.rpc.ResourceInfo parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.rpc.ResourceInfo parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.rpc.ResourceInfo parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.rpc.ResourceInfo parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.rpc.ResourceInfo prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - 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; - } - /** - * Protobuf type {@code google.rpc.ResourceInfo} - * - *
-   * Describes the resource that is being accessed.
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.rpc.ResourceInfo) - com.google.rpc.ResourceInfoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_ResourceInfo_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_ResourceInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.rpc.ResourceInfo.class, com.google.rpc.ResourceInfo.Builder.class); - } - - // Construct using com.google.rpc.ResourceInfo.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - resourceType_ = ""; - - resourceName_ = ""; - - owner_ = ""; - - description_ = ""; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_ResourceInfo_descriptor; - } - - public com.google.rpc.ResourceInfo getDefaultInstanceForType() { - return com.google.rpc.ResourceInfo.getDefaultInstance(); - } - - public com.google.rpc.ResourceInfo build() { - com.google.rpc.ResourceInfo result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.rpc.ResourceInfo buildPartial() { - com.google.rpc.ResourceInfo result = new com.google.rpc.ResourceInfo(this); - result.resourceType_ = resourceType_; - result.resourceName_ = resourceName_; - result.owner_ = owner_; - result.description_ = description_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.rpc.ResourceInfo) { - return mergeFrom((com.google.rpc.ResourceInfo)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.rpc.ResourceInfo other) { - if (other == com.google.rpc.ResourceInfo.getDefaultInstance()) return this; - if (!other.getResourceType().isEmpty()) { - resourceType_ = other.resourceType_; - onChanged(); - } - if (!other.getResourceName().isEmpty()) { - resourceName_ = other.resourceName_; - onChanged(); - } - if (!other.getOwner().isEmpty()) { - owner_ = other.owner_; - onChanged(); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - onChanged(); - } - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.rpc.ResourceInfo parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.rpc.ResourceInfo) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object resourceType_ = ""; - /** - * optional string resource_type = 1; - * - *
-     * A name for the type of resource being accessed, e.g. "sql table",
-     * "cloud storage bucket", "file", "Google calendar"; or the type URL
-     * of the resource: e.g. "type.googleapis.com/google.pubsub.v1.Topic".
-     * 
- */ - public java.lang.String getResourceType() { - java.lang.Object ref = resourceType_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resourceType_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string resource_type = 1; - * - *
-     * A name for the type of resource being accessed, e.g. "sql table",
-     * "cloud storage bucket", "file", "Google calendar"; or the type URL
-     * of the resource: e.g. "type.googleapis.com/google.pubsub.v1.Topic".
-     * 
- */ - public com.google.protobuf.ByteString - getResourceTypeBytes() { - java.lang.Object ref = resourceType_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - resourceType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string resource_type = 1; - * - *
-     * A name for the type of resource being accessed, e.g. "sql table",
-     * "cloud storage bucket", "file", "Google calendar"; or the type URL
-     * of the resource: e.g. "type.googleapis.com/google.pubsub.v1.Topic".
-     * 
- */ - public Builder setResourceType( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - resourceType_ = value; - onChanged(); - return this; - } - /** - * optional string resource_type = 1; - * - *
-     * A name for the type of resource being accessed, e.g. "sql table",
-     * "cloud storage bucket", "file", "Google calendar"; or the type URL
-     * of the resource: e.g. "type.googleapis.com/google.pubsub.v1.Topic".
-     * 
- */ - public Builder clearResourceType() { - - resourceType_ = getDefaultInstance().getResourceType(); - onChanged(); - return this; - } - /** - * optional string resource_type = 1; - * - *
-     * A name for the type of resource being accessed, e.g. "sql table",
-     * "cloud storage bucket", "file", "Google calendar"; or the type URL
-     * of the resource: e.g. "type.googleapis.com/google.pubsub.v1.Topic".
-     * 
- */ - public Builder setResourceTypeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - resourceType_ = value; - onChanged(); - return this; - } - - private java.lang.Object resourceName_ = ""; - /** - * optional string resource_name = 2; - * - *
-     * The name of the resource being accessed.  For example, a shared calendar
-     * name: "example.com_4fghdhgsrgh@group.calendar.google.com", if the current
-     * error is [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED].
-     * 
- */ - public java.lang.String getResourceName() { - java.lang.Object ref = resourceName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - resourceName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string resource_name = 2; - * - *
-     * The name of the resource being accessed.  For example, a shared calendar
-     * name: "example.com_4fghdhgsrgh@group.calendar.google.com", if the current
-     * error is [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED].
-     * 
- */ - public com.google.protobuf.ByteString - getResourceNameBytes() { - java.lang.Object ref = resourceName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - resourceName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string resource_name = 2; - * - *
-     * The name of the resource being accessed.  For example, a shared calendar
-     * name: "example.com_4fghdhgsrgh@group.calendar.google.com", if the current
-     * error is [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED].
-     * 
- */ - public Builder setResourceName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - resourceName_ = value; - onChanged(); - return this; - } - /** - * optional string resource_name = 2; - * - *
-     * The name of the resource being accessed.  For example, a shared calendar
-     * name: "example.com_4fghdhgsrgh@group.calendar.google.com", if the current
-     * error is [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED].
-     * 
- */ - public Builder clearResourceName() { - - resourceName_ = getDefaultInstance().getResourceName(); - onChanged(); - return this; - } - /** - * optional string resource_name = 2; - * - *
-     * The name of the resource being accessed.  For example, a shared calendar
-     * name: "example.com_4fghdhgsrgh@group.calendar.google.com", if the current
-     * error is [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED].
-     * 
- */ - public Builder setResourceNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - resourceName_ = value; - onChanged(); - return this; - } - - private java.lang.Object owner_ = ""; - /** - * optional string owner = 3; - * - *
-     * The owner of the resource (optional).
-     * For example, "user:<owner email>" or "project:<Google developer project
-     * id>".
-     * 
- */ - public java.lang.String getOwner() { - java.lang.Object ref = owner_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - owner_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string owner = 3; - * - *
-     * The owner of the resource (optional).
-     * For example, "user:<owner email>" or "project:<Google developer project
-     * id>".
-     * 
- */ - public com.google.protobuf.ByteString - getOwnerBytes() { - java.lang.Object ref = owner_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - owner_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string owner = 3; - * - *
-     * The owner of the resource (optional).
-     * For example, "user:<owner email>" or "project:<Google developer project
-     * id>".
-     * 
- */ - public Builder setOwner( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - owner_ = value; - onChanged(); - return this; - } - /** - * optional string owner = 3; - * - *
-     * The owner of the resource (optional).
-     * For example, "user:<owner email>" or "project:<Google developer project
-     * id>".
-     * 
- */ - public Builder clearOwner() { - - owner_ = getDefaultInstance().getOwner(); - onChanged(); - return this; - } - /** - * optional string owner = 3; - * - *
-     * The owner of the resource (optional).
-     * For example, "user:<owner email>" or "project:<Google developer project
-     * id>".
-     * 
- */ - public Builder setOwnerBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - owner_ = value; - onChanged(); - return this; - } - - private java.lang.Object description_ = ""; - /** - * optional string description = 4; - * - *
-     * Describes what error is encountered when accessing this resource.
-     * For example, updating a cloud project may require the `writer` permission
-     * on the developer console project.
-     * 
- */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string description = 4; - * - *
-     * Describes what error is encountered when accessing this resource.
-     * For example, updating a cloud project may require the `writer` permission
-     * on the developer console project.
-     * 
- */ - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string description = 4; - * - *
-     * Describes what error is encountered when accessing this resource.
-     * For example, updating a cloud project may require the `writer` permission
-     * on the developer console project.
-     * 
- */ - public Builder setDescription( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - description_ = value; - onChanged(); - return this; - } - /** - * optional string description = 4; - * - *
-     * Describes what error is encountered when accessing this resource.
-     * For example, updating a cloud project may require the `writer` permission
-     * on the developer console project.
-     * 
- */ - public Builder clearDescription() { - - description_ = getDefaultInstance().getDescription(); - onChanged(); - return this; - } - /** - * optional string description = 4; - * - *
-     * Describes what error is encountered when accessing this resource.
-     * For example, updating a cloud project may require the `writer` permission
-     * on the developer console project.
-     * 
- */ - public Builder setDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - description_ = value; - onChanged(); - return this; - } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - - // @@protoc_insertion_point(builder_scope:google.rpc.ResourceInfo) - } - - // @@protoc_insertion_point(class_scope:google.rpc.ResourceInfo) - private static final com.google.rpc.ResourceInfo DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.rpc.ResourceInfo(); - } - - public static com.google.rpc.ResourceInfo getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public ResourceInfo parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new ResourceInfo(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public com.google.rpc.ResourceInfo getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-gax/generated/src/main/java/com/google/rpc/ResourceInfoOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/rpc/ResourceInfoOrBuilder.java deleted file mode 100644 index 5c48486c13a8..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/rpc/ResourceInfoOrBuilder.java +++ /dev/null @@ -1,97 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/rpc/error_details.proto - -package com.google.rpc; - -public interface ResourceInfoOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.rpc.ResourceInfo) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string resource_type = 1; - * - *
-   * A name for the type of resource being accessed, e.g. "sql table",
-   * "cloud storage bucket", "file", "Google calendar"; or the type URL
-   * of the resource: e.g. "type.googleapis.com/google.pubsub.v1.Topic".
-   * 
- */ - java.lang.String getResourceType(); - /** - * optional string resource_type = 1; - * - *
-   * A name for the type of resource being accessed, e.g. "sql table",
-   * "cloud storage bucket", "file", "Google calendar"; or the type URL
-   * of the resource: e.g. "type.googleapis.com/google.pubsub.v1.Topic".
-   * 
- */ - com.google.protobuf.ByteString - getResourceTypeBytes(); - - /** - * optional string resource_name = 2; - * - *
-   * The name of the resource being accessed.  For example, a shared calendar
-   * name: "example.com_4fghdhgsrgh@group.calendar.google.com", if the current
-   * error is [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED].
-   * 
- */ - java.lang.String getResourceName(); - /** - * optional string resource_name = 2; - * - *
-   * The name of the resource being accessed.  For example, a shared calendar
-   * name: "example.com_4fghdhgsrgh@group.calendar.google.com", if the current
-   * error is [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED].
-   * 
- */ - com.google.protobuf.ByteString - getResourceNameBytes(); - - /** - * optional string owner = 3; - * - *
-   * The owner of the resource (optional).
-   * For example, "user:<owner email>" or "project:<Google developer project
-   * id>".
-   * 
- */ - java.lang.String getOwner(); - /** - * optional string owner = 3; - * - *
-   * The owner of the resource (optional).
-   * For example, "user:<owner email>" or "project:<Google developer project
-   * id>".
-   * 
- */ - com.google.protobuf.ByteString - getOwnerBytes(); - - /** - * optional string description = 4; - * - *
-   * Describes what error is encountered when accessing this resource.
-   * For example, updating a cloud project may require the `writer` permission
-   * on the developer console project.
-   * 
- */ - java.lang.String getDescription(); - /** - * optional string description = 4; - * - *
-   * Describes what error is encountered when accessing this resource.
-   * For example, updating a cloud project may require the `writer` permission
-   * on the developer console project.
-   * 
- */ - com.google.protobuf.ByteString - getDescriptionBytes(); -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/rpc/RetryInfo.java b/gcloud-java-gax/generated/src/main/java/com/google/rpc/RetryInfo.java deleted file mode 100644 index 8da5185492bd..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/rpc/RetryInfo.java +++ /dev/null @@ -1,565 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/rpc/error_details.proto - -package com.google.rpc; - -/** - * Protobuf type {@code google.rpc.RetryInfo} - * - *
- * Describes when the clients can retry a failed request. Clients could ignore
- * the recommendation here or retry when this information is missing from error
- * responses.
- * It's always recommended that clients should use exponential backoff when
- * retrying.
- * Clients should wait until `retry_delay` amount of time has passed since
- * receiving the error response before retrying.  If retrying requests also
- * fail, clients should use an exponential backoff scheme to gradually increase
- * the delay between retries based on `retry_delay`, until either a maximum
- * number of retires have been reached or a maximum retry delay cap has been
- * reached.
- * 
- */ -public final class RetryInfo extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.rpc.RetryInfo) - RetryInfoOrBuilder { - // Use RetryInfo.newBuilder() to construct. - private RetryInfo(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private RetryInfo() { - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private RetryInfo( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - int mutable_bitField0_ = 0; - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!input.skipField(tag)) { - done = true; - } - break; - } - case 10: { - com.google.protobuf.Duration.Builder subBuilder = null; - if (retryDelay_ != null) { - subBuilder = retryDelay_.toBuilder(); - } - retryDelay_ = input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(retryDelay_); - retryDelay_ = subBuilder.buildPartial(); - } - - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_RetryInfo_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_RetryInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.rpc.RetryInfo.class, com.google.rpc.RetryInfo.Builder.class); - } - - public static final int RETRY_DELAY_FIELD_NUMBER = 1; - private com.google.protobuf.Duration retryDelay_; - /** - * optional .google.protobuf.Duration retry_delay = 1; - * - *
-   * Clients should wait at least this long between retrying the same request.
-   * 
- */ - public boolean hasRetryDelay() { - return retryDelay_ != null; - } - /** - * optional .google.protobuf.Duration retry_delay = 1; - * - *
-   * Clients should wait at least this long between retrying the same request.
-   * 
- */ - public com.google.protobuf.Duration getRetryDelay() { - return retryDelay_ == null ? com.google.protobuf.Duration.getDefaultInstance() : retryDelay_; - } - /** - * optional .google.protobuf.Duration retry_delay = 1; - * - *
-   * Clients should wait at least this long between retrying the same request.
-   * 
- */ - public com.google.protobuf.DurationOrBuilder getRetryDelayOrBuilder() { - return getRetryDelay(); - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (retryDelay_ != null) { - output.writeMessage(1, getRetryDelay()); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (retryDelay_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getRetryDelay()); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static com.google.rpc.RetryInfo parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.rpc.RetryInfo 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.rpc.RetryInfo parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.rpc.RetryInfo parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.rpc.RetryInfo parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.rpc.RetryInfo parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.rpc.RetryInfo parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.rpc.RetryInfo parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.rpc.RetryInfo parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.rpc.RetryInfo parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.rpc.RetryInfo prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - 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; - } - /** - * Protobuf type {@code google.rpc.RetryInfo} - * - *
-   * Describes when the clients can retry a failed request. Clients could ignore
-   * the recommendation here or retry when this information is missing from error
-   * responses.
-   * It's always recommended that clients should use exponential backoff when
-   * retrying.
-   * Clients should wait until `retry_delay` amount of time has passed since
-   * receiving the error response before retrying.  If retrying requests also
-   * fail, clients should use an exponential backoff scheme to gradually increase
-   * the delay between retries based on `retry_delay`, until either a maximum
-   * number of retires have been reached or a maximum retry delay cap has been
-   * reached.
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.rpc.RetryInfo) - com.google.rpc.RetryInfoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_RetryInfo_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_RetryInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.rpc.RetryInfo.class, com.google.rpc.RetryInfo.Builder.class); - } - - // Construct using com.google.rpc.RetryInfo.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - if (retryDelayBuilder_ == null) { - retryDelay_ = null; - } else { - retryDelay_ = null; - retryDelayBuilder_ = null; - } - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_RetryInfo_descriptor; - } - - public com.google.rpc.RetryInfo getDefaultInstanceForType() { - return com.google.rpc.RetryInfo.getDefaultInstance(); - } - - public com.google.rpc.RetryInfo build() { - com.google.rpc.RetryInfo result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.rpc.RetryInfo buildPartial() { - com.google.rpc.RetryInfo result = new com.google.rpc.RetryInfo(this); - if (retryDelayBuilder_ == null) { - result.retryDelay_ = retryDelay_; - } else { - result.retryDelay_ = retryDelayBuilder_.build(); - } - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.rpc.RetryInfo) { - return mergeFrom((com.google.rpc.RetryInfo)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.rpc.RetryInfo other) { - if (other == com.google.rpc.RetryInfo.getDefaultInstance()) return this; - if (other.hasRetryDelay()) { - mergeRetryDelay(other.getRetryDelay()); - } - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.rpc.RetryInfo parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.rpc.RetryInfo) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.protobuf.Duration retryDelay_ = null; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> retryDelayBuilder_; - /** - * optional .google.protobuf.Duration retry_delay = 1; - * - *
-     * Clients should wait at least this long between retrying the same request.
-     * 
- */ - public boolean hasRetryDelay() { - return retryDelayBuilder_ != null || retryDelay_ != null; - } - /** - * optional .google.protobuf.Duration retry_delay = 1; - * - *
-     * Clients should wait at least this long between retrying the same request.
-     * 
- */ - public com.google.protobuf.Duration getRetryDelay() { - if (retryDelayBuilder_ == null) { - return retryDelay_ == null ? com.google.protobuf.Duration.getDefaultInstance() : retryDelay_; - } else { - return retryDelayBuilder_.getMessage(); - } - } - /** - * optional .google.protobuf.Duration retry_delay = 1; - * - *
-     * Clients should wait at least this long between retrying the same request.
-     * 
- */ - public Builder setRetryDelay(com.google.protobuf.Duration value) { - if (retryDelayBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - retryDelay_ = value; - onChanged(); - } else { - retryDelayBuilder_.setMessage(value); - } - - return this; - } - /** - * optional .google.protobuf.Duration retry_delay = 1; - * - *
-     * Clients should wait at least this long between retrying the same request.
-     * 
- */ - public Builder setRetryDelay( - com.google.protobuf.Duration.Builder builderForValue) { - if (retryDelayBuilder_ == null) { - retryDelay_ = builderForValue.build(); - onChanged(); - } else { - retryDelayBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * optional .google.protobuf.Duration retry_delay = 1; - * - *
-     * Clients should wait at least this long between retrying the same request.
-     * 
- */ - public Builder mergeRetryDelay(com.google.protobuf.Duration value) { - if (retryDelayBuilder_ == null) { - if (retryDelay_ != null) { - retryDelay_ = - com.google.protobuf.Duration.newBuilder(retryDelay_).mergeFrom(value).buildPartial(); - } else { - retryDelay_ = value; - } - onChanged(); - } else { - retryDelayBuilder_.mergeFrom(value); - } - - return this; - } - /** - * optional .google.protobuf.Duration retry_delay = 1; - * - *
-     * Clients should wait at least this long between retrying the same request.
-     * 
- */ - public Builder clearRetryDelay() { - if (retryDelayBuilder_ == null) { - retryDelay_ = null; - onChanged(); - } else { - retryDelay_ = null; - retryDelayBuilder_ = null; - } - - return this; - } - /** - * optional .google.protobuf.Duration retry_delay = 1; - * - *
-     * Clients should wait at least this long between retrying the same request.
-     * 
- */ - public com.google.protobuf.Duration.Builder getRetryDelayBuilder() { - - onChanged(); - return getRetryDelayFieldBuilder().getBuilder(); - } - /** - * optional .google.protobuf.Duration retry_delay = 1; - * - *
-     * Clients should wait at least this long between retrying the same request.
-     * 
- */ - public com.google.protobuf.DurationOrBuilder getRetryDelayOrBuilder() { - if (retryDelayBuilder_ != null) { - return retryDelayBuilder_.getMessageOrBuilder(); - } else { - return retryDelay_ == null ? - com.google.protobuf.Duration.getDefaultInstance() : retryDelay_; - } - } - /** - * optional .google.protobuf.Duration retry_delay = 1; - * - *
-     * Clients should wait at least this long between retrying the same request.
-     * 
- */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> - getRetryDelayFieldBuilder() { - if (retryDelayBuilder_ == null) { - retryDelayBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( - getRetryDelay(), - getParentForChildren(), - isClean()); - retryDelay_ = null; - } - return retryDelayBuilder_; - } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - - // @@protoc_insertion_point(builder_scope:google.rpc.RetryInfo) - } - - // @@protoc_insertion_point(class_scope:google.rpc.RetryInfo) - private static final com.google.rpc.RetryInfo DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.rpc.RetryInfo(); - } - - public static com.google.rpc.RetryInfo getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public RetryInfo parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new RetryInfo(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public com.google.rpc.RetryInfo getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-gax/generated/src/main/java/com/google/rpc/RetryInfoOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/rpc/RetryInfoOrBuilder.java deleted file mode 100644 index f4b347a1d04e..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/rpc/RetryInfoOrBuilder.java +++ /dev/null @@ -1,34 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/rpc/error_details.proto - -package com.google.rpc; - -public interface RetryInfoOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.rpc.RetryInfo) - com.google.protobuf.MessageOrBuilder { - - /** - * optional .google.protobuf.Duration retry_delay = 1; - * - *
-   * Clients should wait at least this long between retrying the same request.
-   * 
- */ - boolean hasRetryDelay(); - /** - * optional .google.protobuf.Duration retry_delay = 1; - * - *
-   * Clients should wait at least this long between retrying the same request.
-   * 
- */ - com.google.protobuf.Duration getRetryDelay(); - /** - * optional .google.protobuf.Duration retry_delay = 1; - * - *
-   * Clients should wait at least this long between retrying the same request.
-   * 
- */ - com.google.protobuf.DurationOrBuilder getRetryDelayOrBuilder(); -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/rpc/Status.java b/gcloud-java-gax/generated/src/main/java/com/google/rpc/Status.java deleted file mode 100644 index be0c3a54ec64..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/rpc/Status.java +++ /dev/null @@ -1,1092 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/rpc/status.proto - -package com.google.rpc; - -/** - * Protobuf type {@code google.rpc.Status} - * - *
- * The `Status` type defines a logical error model that is suitable for different
- * programming environments, including REST APIs and RPC APIs. It is used by
- * [gRPC](https://github.com/grpc). The error model is designed to be:
- * - Simple to use and understand for most users
- * - Flexible enough to meet unexpected needs
- * # Overview
- * The `Status` message contains three pieces of data: error code, error message,
- * and error details. The error code should be an enum value of
- * [google.rpc.Code][google.rpc.Code], but it may accept additional error codes if needed.  The
- * error message should be a developer-facing English message that helps
- * developers *understand* and *resolve* the error. If a localized user-facing
- * error message is needed, put the localized message in the error details or
- * localize it in the client. The optional error details may contain arbitrary
- * information about the error. There is a predefined set of error detail types
- * in the package `google.rpc` which can be used for common error conditions.
- * # Language mapping
- * The `Status` message is the logical representation of the error model, but it
- * is not necessarily the actual wire format. When the `Status` message is
- * exposed in different client libraries and different wire protocols, it can be
- * mapped differently. For example, it will likely be mapped to some exceptions
- * in Java, but more likely mapped to some error codes in C.
- * # Other uses
- * The error model and the `Status` message can be used in a variety of
- * environments, either with or without APIs, to provide a
- * consistent developer experience across different environments.
- * Example uses of this error model include:
- * - Partial errors. If a service needs to return partial errors to the client,
- *     it may embed the `Status` in the normal response to indicate the partial
- *     errors.
- * - Workflow errors. A typical workflow has multiple steps. Each step may
- *     have a `Status` message for error reporting purpose.
- * - Batch operations. If a client uses batch request and batch response, the
- *     `Status` message should be used directly inside batch response, one for
- *     each error sub-response.
- * - Asynchronous operations. If an API call embeds asynchronous operation
- *     results in its response, the status of those operations should be
- *     represented directly using the `Status` message.
- * - Logging. If some API errors are stored in logs, the message `Status` could
- *     be used directly after any stripping needed for security/privacy reasons.
- * 
- */ -public final class Status extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.rpc.Status) - StatusOrBuilder { - // Use Status.newBuilder() to construct. - private Status(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Status() { - code_ = 0; - message_ = ""; - details_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private Status( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - int mutable_bitField0_ = 0; - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!input.skipField(tag)) { - done = true; - } - break; - } - case 8: { - - code_ = input.readInt32(); - break; - } - case 18: { - String s = input.readStringRequireUtf8(); - - message_ = s; - break; - } - case 26: { - if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { - details_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - details_.add(input.readMessage(com.google.protobuf.Any.parser(), extensionRegistry)); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { - details_ = java.util.Collections.unmodifiableList(details_); - } - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.rpc.StatusProto.internal_static_google_rpc_Status_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.rpc.StatusProto.internal_static_google_rpc_Status_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.rpc.Status.class, com.google.rpc.Status.Builder.class); - } - - private int bitField0_; - public static final int CODE_FIELD_NUMBER = 1; - private int code_; - /** - * optional int32 code = 1; - * - *
-   * The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
-   * 
- */ - public int getCode() { - return code_; - } - - public static final int MESSAGE_FIELD_NUMBER = 2; - private volatile java.lang.Object message_; - /** - * optional string message = 2; - * - *
-   * A developer-facing error message, which should be in English. Any
-   * user-facing error message should be localized and sent in the
-   * [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
-   * 
- */ - public java.lang.String getMessage() { - java.lang.Object ref = message_; - 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(); - message_ = s; - return s; - } - } - /** - * optional string message = 2; - * - *
-   * A developer-facing error message, which should be in English. Any
-   * user-facing error message should be localized and sent in the
-   * [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
-   * 
- */ - public com.google.protobuf.ByteString - getMessageBytes() { - java.lang.Object ref = message_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - message_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DETAILS_FIELD_NUMBER = 3; - private java.util.List details_; - /** - * repeated .google.protobuf.Any details = 3; - * - *
-   * A list of messages that carry the error details.  There will be a
-   * common set of message types for APIs to use.
-   * 
- */ - public java.util.List getDetailsList() { - return details_; - } - /** - * repeated .google.protobuf.Any details = 3; - * - *
-   * A list of messages that carry the error details.  There will be a
-   * common set of message types for APIs to use.
-   * 
- */ - public java.util.List - getDetailsOrBuilderList() { - return details_; - } - /** - * repeated .google.protobuf.Any details = 3; - * - *
-   * A list of messages that carry the error details.  There will be a
-   * common set of message types for APIs to use.
-   * 
- */ - public int getDetailsCount() { - return details_.size(); - } - /** - * repeated .google.protobuf.Any details = 3; - * - *
-   * A list of messages that carry the error details.  There will be a
-   * common set of message types for APIs to use.
-   * 
- */ - public com.google.protobuf.Any getDetails(int index) { - return details_.get(index); - } - /** - * repeated .google.protobuf.Any details = 3; - * - *
-   * A list of messages that carry the error details.  There will be a
-   * common set of message types for APIs to use.
-   * 
- */ - public com.google.protobuf.AnyOrBuilder getDetailsOrBuilder( - int index) { - return details_.get(index); - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (code_ != 0) { - output.writeInt32(1, code_); - } - if (!getMessageBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, message_); - } - for (int i = 0; i < details_.size(); i++) { - output.writeMessage(3, details_.get(i)); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (code_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, code_); - } - if (!getMessageBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, message_); - } - for (int i = 0; i < details_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, details_.get(i)); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static com.google.rpc.Status parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.rpc.Status 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.rpc.Status parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.rpc.Status parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.rpc.Status parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.rpc.Status parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.rpc.Status parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.rpc.Status parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.rpc.Status parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.rpc.Status parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.rpc.Status prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - 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; - } - /** - * Protobuf type {@code google.rpc.Status} - * - *
-   * The `Status` type defines a logical error model that is suitable for different
-   * programming environments, including REST APIs and RPC APIs. It is used by
-   * [gRPC](https://github.com/grpc). The error model is designed to be:
-   * - Simple to use and understand for most users
-   * - Flexible enough to meet unexpected needs
-   * # Overview
-   * The `Status` message contains three pieces of data: error code, error message,
-   * and error details. The error code should be an enum value of
-   * [google.rpc.Code][google.rpc.Code], but it may accept additional error codes if needed.  The
-   * error message should be a developer-facing English message that helps
-   * developers *understand* and *resolve* the error. If a localized user-facing
-   * error message is needed, put the localized message in the error details or
-   * localize it in the client. The optional error details may contain arbitrary
-   * information about the error. There is a predefined set of error detail types
-   * in the package `google.rpc` which can be used for common error conditions.
-   * # Language mapping
-   * The `Status` message is the logical representation of the error model, but it
-   * is not necessarily the actual wire format. When the `Status` message is
-   * exposed in different client libraries and different wire protocols, it can be
-   * mapped differently. For example, it will likely be mapped to some exceptions
-   * in Java, but more likely mapped to some error codes in C.
-   * # Other uses
-   * The error model and the `Status` message can be used in a variety of
-   * environments, either with or without APIs, to provide a
-   * consistent developer experience across different environments.
-   * Example uses of this error model include:
-   * - Partial errors. If a service needs to return partial errors to the client,
-   *     it may embed the `Status` in the normal response to indicate the partial
-   *     errors.
-   * - Workflow errors. A typical workflow has multiple steps. Each step may
-   *     have a `Status` message for error reporting purpose.
-   * - Batch operations. If a client uses batch request and batch response, the
-   *     `Status` message should be used directly inside batch response, one for
-   *     each error sub-response.
-   * - Asynchronous operations. If an API call embeds asynchronous operation
-   *     results in its response, the status of those operations should be
-   *     represented directly using the `Status` message.
-   * - Logging. If some API errors are stored in logs, the message `Status` could
-   *     be used directly after any stripping needed for security/privacy reasons.
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.rpc.Status) - com.google.rpc.StatusOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.rpc.StatusProto.internal_static_google_rpc_Status_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.rpc.StatusProto.internal_static_google_rpc_Status_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.rpc.Status.class, com.google.rpc.Status.Builder.class); - } - - // Construct using com.google.rpc.Status.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getDetailsFieldBuilder(); - } - } - public Builder clear() { - super.clear(); - code_ = 0; - - message_ = ""; - - if (detailsBuilder_ == null) { - details_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - } else { - detailsBuilder_.clear(); - } - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.rpc.StatusProto.internal_static_google_rpc_Status_descriptor; - } - - public com.google.rpc.Status getDefaultInstanceForType() { - return com.google.rpc.Status.getDefaultInstance(); - } - - public com.google.rpc.Status build() { - com.google.rpc.Status result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.rpc.Status buildPartial() { - com.google.rpc.Status result = new com.google.rpc.Status(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - result.code_ = code_; - result.message_ = message_; - if (detailsBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004)) { - details_ = java.util.Collections.unmodifiableList(details_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.details_ = details_; - } else { - result.details_ = detailsBuilder_.build(); - } - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.rpc.Status) { - return mergeFrom((com.google.rpc.Status)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.rpc.Status other) { - if (other == com.google.rpc.Status.getDefaultInstance()) return this; - if (other.getCode() != 0) { - setCode(other.getCode()); - } - if (!other.getMessage().isEmpty()) { - message_ = other.message_; - onChanged(); - } - if (detailsBuilder_ == null) { - if (!other.details_.isEmpty()) { - if (details_.isEmpty()) { - details_ = other.details_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureDetailsIsMutable(); - details_.addAll(other.details_); - } - onChanged(); - } - } else { - if (!other.details_.isEmpty()) { - if (detailsBuilder_.isEmpty()) { - detailsBuilder_.dispose(); - detailsBuilder_ = null; - details_ = other.details_; - bitField0_ = (bitField0_ & ~0x00000004); - detailsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getDetailsFieldBuilder() : null; - } else { - detailsBuilder_.addAllMessages(other.details_); - } - } - } - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.rpc.Status parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.rpc.Status) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private int code_ ; - /** - * optional int32 code = 1; - * - *
-     * The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
-     * 
- */ - public int getCode() { - return code_; - } - /** - * optional int32 code = 1; - * - *
-     * The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
-     * 
- */ - public Builder setCode(int value) { - - code_ = value; - onChanged(); - return this; - } - /** - * optional int32 code = 1; - * - *
-     * The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
-     * 
- */ - public Builder clearCode() { - - code_ = 0; - onChanged(); - return this; - } - - private java.lang.Object message_ = ""; - /** - * optional string message = 2; - * - *
-     * A developer-facing error message, which should be in English. Any
-     * user-facing error message should be localized and sent in the
-     * [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
-     * 
- */ - public java.lang.String getMessage() { - java.lang.Object ref = message_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - message_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string message = 2; - * - *
-     * A developer-facing error message, which should be in English. Any
-     * user-facing error message should be localized and sent in the
-     * [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
-     * 
- */ - public com.google.protobuf.ByteString - getMessageBytes() { - java.lang.Object ref = message_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - message_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string message = 2; - * - *
-     * A developer-facing error message, which should be in English. Any
-     * user-facing error message should be localized and sent in the
-     * [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
-     * 
- */ - public Builder setMessage( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - message_ = value; - onChanged(); - return this; - } - /** - * optional string message = 2; - * - *
-     * A developer-facing error message, which should be in English. Any
-     * user-facing error message should be localized and sent in the
-     * [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
-     * 
- */ - public Builder clearMessage() { - - message_ = getDefaultInstance().getMessage(); - onChanged(); - return this; - } - /** - * optional string message = 2; - * - *
-     * A developer-facing error message, which should be in English. Any
-     * user-facing error message should be localized and sent in the
-     * [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
-     * 
- */ - public Builder setMessageBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - message_ = value; - onChanged(); - return this; - } - - private java.util.List details_ = - java.util.Collections.emptyList(); - private void ensureDetailsIsMutable() { - if (!((bitField0_ & 0x00000004) == 0x00000004)) { - details_ = new java.util.ArrayList(details_); - bitField0_ |= 0x00000004; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> detailsBuilder_; - - /** - * repeated .google.protobuf.Any details = 3; - * - *
-     * A list of messages that carry the error details.  There will be a
-     * common set of message types for APIs to use.
-     * 
- */ - public java.util.List getDetailsList() { - if (detailsBuilder_ == null) { - return java.util.Collections.unmodifiableList(details_); - } else { - return detailsBuilder_.getMessageList(); - } - } - /** - * repeated .google.protobuf.Any details = 3; - * - *
-     * A list of messages that carry the error details.  There will be a
-     * common set of message types for APIs to use.
-     * 
- */ - public int getDetailsCount() { - if (detailsBuilder_ == null) { - return details_.size(); - } else { - return detailsBuilder_.getCount(); - } - } - /** - * repeated .google.protobuf.Any details = 3; - * - *
-     * A list of messages that carry the error details.  There will be a
-     * common set of message types for APIs to use.
-     * 
- */ - public com.google.protobuf.Any getDetails(int index) { - if (detailsBuilder_ == null) { - return details_.get(index); - } else { - return detailsBuilder_.getMessage(index); - } - } - /** - * repeated .google.protobuf.Any details = 3; - * - *
-     * A list of messages that carry the error details.  There will be a
-     * common set of message types for APIs to use.
-     * 
- */ - public Builder setDetails( - int index, com.google.protobuf.Any value) { - if (detailsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDetailsIsMutable(); - details_.set(index, value); - onChanged(); - } else { - detailsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .google.protobuf.Any details = 3; - * - *
-     * A list of messages that carry the error details.  There will be a
-     * common set of message types for APIs to use.
-     * 
- */ - public Builder setDetails( - int index, com.google.protobuf.Any.Builder builderForValue) { - if (detailsBuilder_ == null) { - ensureDetailsIsMutable(); - details_.set(index, builderForValue.build()); - onChanged(); - } else { - detailsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.protobuf.Any details = 3; - * - *
-     * A list of messages that carry the error details.  There will be a
-     * common set of message types for APIs to use.
-     * 
- */ - public Builder addDetails(com.google.protobuf.Any value) { - if (detailsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDetailsIsMutable(); - details_.add(value); - onChanged(); - } else { - detailsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .google.protobuf.Any details = 3; - * - *
-     * A list of messages that carry the error details.  There will be a
-     * common set of message types for APIs to use.
-     * 
- */ - public Builder addDetails( - int index, com.google.protobuf.Any value) { - if (detailsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDetailsIsMutable(); - details_.add(index, value); - onChanged(); - } else { - detailsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .google.protobuf.Any details = 3; - * - *
-     * A list of messages that carry the error details.  There will be a
-     * common set of message types for APIs to use.
-     * 
- */ - public Builder addDetails( - com.google.protobuf.Any.Builder builderForValue) { - if (detailsBuilder_ == null) { - ensureDetailsIsMutable(); - details_.add(builderForValue.build()); - onChanged(); - } else { - detailsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .google.protobuf.Any details = 3; - * - *
-     * A list of messages that carry the error details.  There will be a
-     * common set of message types for APIs to use.
-     * 
- */ - public Builder addDetails( - int index, com.google.protobuf.Any.Builder builderForValue) { - if (detailsBuilder_ == null) { - ensureDetailsIsMutable(); - details_.add(index, builderForValue.build()); - onChanged(); - } else { - detailsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.protobuf.Any details = 3; - * - *
-     * A list of messages that carry the error details.  There will be a
-     * common set of message types for APIs to use.
-     * 
- */ - public Builder addAllDetails( - java.lang.Iterable values) { - if (detailsBuilder_ == null) { - ensureDetailsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, details_); - onChanged(); - } else { - detailsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .google.protobuf.Any details = 3; - * - *
-     * A list of messages that carry the error details.  There will be a
-     * common set of message types for APIs to use.
-     * 
- */ - public Builder clearDetails() { - if (detailsBuilder_ == null) { - details_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - } else { - detailsBuilder_.clear(); - } - return this; - } - /** - * repeated .google.protobuf.Any details = 3; - * - *
-     * A list of messages that carry the error details.  There will be a
-     * common set of message types for APIs to use.
-     * 
- */ - public Builder removeDetails(int index) { - if (detailsBuilder_ == null) { - ensureDetailsIsMutable(); - details_.remove(index); - onChanged(); - } else { - detailsBuilder_.remove(index); - } - return this; - } - /** - * repeated .google.protobuf.Any details = 3; - * - *
-     * A list of messages that carry the error details.  There will be a
-     * common set of message types for APIs to use.
-     * 
- */ - public com.google.protobuf.Any.Builder getDetailsBuilder( - int index) { - return getDetailsFieldBuilder().getBuilder(index); - } - /** - * repeated .google.protobuf.Any details = 3; - * - *
-     * A list of messages that carry the error details.  There will be a
-     * common set of message types for APIs to use.
-     * 
- */ - public com.google.protobuf.AnyOrBuilder getDetailsOrBuilder( - int index) { - if (detailsBuilder_ == null) { - return details_.get(index); } else { - return detailsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .google.protobuf.Any details = 3; - * - *
-     * A list of messages that carry the error details.  There will be a
-     * common set of message types for APIs to use.
-     * 
- */ - public java.util.List - getDetailsOrBuilderList() { - if (detailsBuilder_ != null) { - return detailsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(details_); - } - } - /** - * repeated .google.protobuf.Any details = 3; - * - *
-     * A list of messages that carry the error details.  There will be a
-     * common set of message types for APIs to use.
-     * 
- */ - public com.google.protobuf.Any.Builder addDetailsBuilder() { - return getDetailsFieldBuilder().addBuilder( - com.google.protobuf.Any.getDefaultInstance()); - } - /** - * repeated .google.protobuf.Any details = 3; - * - *
-     * A list of messages that carry the error details.  There will be a
-     * common set of message types for APIs to use.
-     * 
- */ - public com.google.protobuf.Any.Builder addDetailsBuilder( - int index) { - return getDetailsFieldBuilder().addBuilder( - index, com.google.protobuf.Any.getDefaultInstance()); - } - /** - * repeated .google.protobuf.Any details = 3; - * - *
-     * A list of messages that carry the error details.  There will be a
-     * common set of message types for APIs to use.
-     * 
- */ - public java.util.List - getDetailsBuilderList() { - return getDetailsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> - getDetailsFieldBuilder() { - if (detailsBuilder_ == null) { - detailsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>( - details_, - ((bitField0_ & 0x00000004) == 0x00000004), - getParentForChildren(), - isClean()); - details_ = null; - } - return detailsBuilder_; - } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - - // @@protoc_insertion_point(builder_scope:google.rpc.Status) - } - - // @@protoc_insertion_point(class_scope:google.rpc.Status) - private static final com.google.rpc.Status DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.rpc.Status(); - } - - public static com.google.rpc.Status getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public Status parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new Status(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public com.google.rpc.Status getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-gax/generated/src/main/java/com/google/rpc/StatusOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/rpc/StatusOrBuilder.java deleted file mode 100644 index d34e7133da6a..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/rpc/StatusOrBuilder.java +++ /dev/null @@ -1,89 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/rpc/status.proto - -package com.google.rpc; - -public interface StatusOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.rpc.Status) - com.google.protobuf.MessageOrBuilder { - - /** - * optional int32 code = 1; - * - *
-   * The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
-   * 
- */ - int getCode(); - - /** - * optional string message = 2; - * - *
-   * A developer-facing error message, which should be in English. Any
-   * user-facing error message should be localized and sent in the
-   * [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
-   * 
- */ - java.lang.String getMessage(); - /** - * optional string message = 2; - * - *
-   * A developer-facing error message, which should be in English. Any
-   * user-facing error message should be localized and sent in the
-   * [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
-   * 
- */ - com.google.protobuf.ByteString - getMessageBytes(); - - /** - * repeated .google.protobuf.Any details = 3; - * - *
-   * A list of messages that carry the error details.  There will be a
-   * common set of message types for APIs to use.
-   * 
- */ - java.util.List - getDetailsList(); - /** - * repeated .google.protobuf.Any details = 3; - * - *
-   * A list of messages that carry the error details.  There will be a
-   * common set of message types for APIs to use.
-   * 
- */ - com.google.protobuf.Any getDetails(int index); - /** - * repeated .google.protobuf.Any details = 3; - * - *
-   * A list of messages that carry the error details.  There will be a
-   * common set of message types for APIs to use.
-   * 
- */ - int getDetailsCount(); - /** - * repeated .google.protobuf.Any details = 3; - * - *
-   * A list of messages that carry the error details.  There will be a
-   * common set of message types for APIs to use.
-   * 
- */ - java.util.List - getDetailsOrBuilderList(); - /** - * repeated .google.protobuf.Any details = 3; - * - *
-   * A list of messages that carry the error details.  There will be a
-   * common set of message types for APIs to use.
-   * 
- */ - com.google.protobuf.AnyOrBuilder getDetailsOrBuilder( - int index); -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/rpc/StatusProto.java b/gcloud-java-gax/generated/src/main/java/com/google/rpc/StatusProto.java deleted file mode 100644 index 46c87a712b3f..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/rpc/StatusProto.java +++ /dev/null @@ -1,54 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/rpc/status.proto - -package com.google.rpc; - -public final class StatusProto { - private StatusProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - } - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_rpc_Status_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_rpc_Status_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\027google/rpc/status.proto\022\ngoogle.rpc\032\031g" + - "oogle/protobuf/any.proto\"N\n\006Status\022\014\n\004co" + - "de\030\001 \001(\005\022\017\n\007message\030\002 \001(\t\022%\n\007details\030\003 \003" + - "(\0132\024.google.protobuf.AnyB\037\n\016com.google.r" + - "pcB\013StatusProtoP\001b\006proto3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.protobuf.AnyProto.getDescriptor(), - }, assigner); - internal_static_google_rpc_Status_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_rpc_Status_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_rpc_Status_descriptor, - new java.lang.String[] { "Code", "Message", "Details", }); - com.google.protobuf.AnyProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/type/Color.java b/gcloud-java-gax/generated/src/main/java/com/google/type/Color.java deleted file mode 100644 index a4d6c9f79529..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/type/Color.java +++ /dev/null @@ -1,1047 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/type/color.proto - -package com.google.type; - -/** - * Protobuf type {@code google.type.Color} - * - *
- * Represents a color in the RGBA color space. This representation is designed
- * for simplicity of conversion to/from color representations in various
- * languages over compactness; for example, the fields of this representation
- * can be trivially provided to the constructor of "java.awt.Color" in Java; it
- * can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
- * method in iOS; and, with just a little work, it can be easily formatted into
- * a CSS "rgba()" string in JavaScript, as well. Here are some examples:
- * Example (Java):
- *      import com.google.type.Color;
- *      // ...
- *      public static java.awt.Color fromProto(Color protocolor) {
- *        float alpha = protocolor.hasAlpha()
- *            ? protocolor.getAlpha().getValue()
- *            : 1.0;
- *        return new java.awt.Color(
- *            protocolor.getRed(),
- *            protocolor.getGreen(),
- *            protocolor.getBlue(),
- *            alpha);
- *      }
- *      public static Color toProto(java.awt.Color color) {
- *        float red = (float) color.getRed();
- *        float green = (float) color.getGreen();
- *        float blue = (float) color.getBlue();
- *        float denominator = 255.0;
- *        Color.Builder resultBuilder =
- *            Color
- *                .newBuilder()
- *                .setRed(red / denominator)
- *                .setGreen(green / denominator)
- *                .setBlue(blue / denominator);
- *        int alpha = color.getAlpha();
- *        if (alpha != 255) {
- *          result.setAlpha(
- *              FloatValue
- *                  .newBuilder()
- *                  .setValue(((float) alpha) / denominator)
- *                  .build());
- *        }
- *        return resultBuilder.build();
- *      }
- *      // ...
- * Example (iOS / Obj-C):
- *      // ...
- *      static UIColor* fromProto(Color* protocolor) {
- *         float red = [protocolor red];
- *         float green = [protocolor green];
- *         float blue = [protocolor blue];
- *         FloatValue* alpha_wrapper = [protocolor alpha];
- *         float alpha = 1.0;
- *         if (alpha_wrapper != nil) {
- *           alpha = [alpha_wrapper value];
- *         }
- *         return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
- *      }
- *      static Color* toProto(UIColor* color) {
- *          CGFloat red, green, blue, alpha;
- *          if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
- *            return nil;
- *          }
- *          Color* result = [Color alloc] init];
- *          [result setRed:red];
- *          [result setGreen:green];
- *          [result setBlue:blue];
- *          if (alpha <= 0.9999) {
- *            [result setAlpha:floatWrapperWithValue(alpha)];
- *          }
- *          [result autorelease];
- *          return result;
- *     }
- *     // ...
- *  Example (JavaScript):
- *     // ...
- *     var protoToCssColor = function(rgb_color) {
- *        var redFrac = rgb_color.red || 0.0;
- *        var greenFrac = rgb_color.green || 0.0;
- *        var blueFrac = rgb_color.blue || 0.0;
- *        var red = Math.floor(redFrac * 255);
- *        var green = Math.floor(greenFrac * 255);
- *        var blue = Math.floor(blueFrac * 255);
- *        if (!('alpha' in rgb_color)) {
- *           return rgbToCssColor_(red, green, blue);
- *        }
- *        var alphaFrac = rgb_color.alpha.value || 0.0;
- *        var rgbParams = [red, green, blue].join(',');
- *        return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
- *     };
- *     var rgbToCssColor_ = function(red, green, blue) {
- *       var rgbNumber = new Number((red << 16) | (green << 8) | blue);
- *       var hexString = rgbNumber.toString(16);
- *       var missingZeros = 6 - hexString.length;
- *       var resultBuilder = ['#'];
- *       for (var i = 0; i < missingZeros; i++) {
- *          resultBuilder.push('0');
- *       }
- *       resultBuilder.push(hexString);
- *       return resultBuilder.join('');
- *     };
- *     // ...
- * 
- */ -public final class Color extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.type.Color) - ColorOrBuilder { - // Use Color.newBuilder() to construct. - private Color(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Color() { - red_ = 0F; - green_ = 0F; - blue_ = 0F; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private Color( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - int mutable_bitField0_ = 0; - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!input.skipField(tag)) { - done = true; - } - break; - } - case 13: { - - red_ = input.readFloat(); - break; - } - case 21: { - - green_ = input.readFloat(); - break; - } - case 29: { - - blue_ = input.readFloat(); - break; - } - case 34: { - com.google.protobuf.FloatValue.Builder subBuilder = null; - if (alpha_ != null) { - subBuilder = alpha_.toBuilder(); - } - alpha_ = input.readMessage(com.google.protobuf.FloatValue.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(alpha_); - alpha_ = subBuilder.buildPartial(); - } - - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.type.ColorProto.internal_static_google_type_Color_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.type.ColorProto.internal_static_google_type_Color_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.type.Color.class, com.google.type.Color.Builder.class); - } - - public static final int RED_FIELD_NUMBER = 1; - private float red_; - /** - * optional float red = 1; - * - *
-   * The amount of red in the color as a value in the interval [0, 1].
-   * 
- */ - public float getRed() { - return red_; - } - - public static final int GREEN_FIELD_NUMBER = 2; - private float green_; - /** - * optional float green = 2; - * - *
-   * The amount of green in the color as a value in the interval [0, 1].
-   * 
- */ - public float getGreen() { - return green_; - } - - public static final int BLUE_FIELD_NUMBER = 3; - private float blue_; - /** - * optional float blue = 3; - * - *
-   * The amount of blue in the color as a value in the interval [0, 1].
-   * 
- */ - public float getBlue() { - return blue_; - } - - public static final int ALPHA_FIELD_NUMBER = 4; - private com.google.protobuf.FloatValue alpha_; - /** - * optional .google.protobuf.FloatValue alpha = 4; - * - *
-   * The fraction of this color that should be applied to the pixel. That is,
-   * the final pixel color is defined by the equation:
-   *   pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
-   * This means that a value of 1.0 corresponds to a solid color, whereas
-   * a value of 0.0 corresponds to a completely transparent color. This
-   * uses a wrapper message rather than a simple float scalar so that it is
-   * possible to distinguish between a default value and the value being unset.
-   * If omitted, this color object is to be rendered as a solid color
-   * (as if the alpha value had been explicitly given with a value of 1.0).
-   * 
- */ - public boolean hasAlpha() { - return alpha_ != null; - } - /** - * optional .google.protobuf.FloatValue alpha = 4; - * - *
-   * The fraction of this color that should be applied to the pixel. That is,
-   * the final pixel color is defined by the equation:
-   *   pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
-   * This means that a value of 1.0 corresponds to a solid color, whereas
-   * a value of 0.0 corresponds to a completely transparent color. This
-   * uses a wrapper message rather than a simple float scalar so that it is
-   * possible to distinguish between a default value and the value being unset.
-   * If omitted, this color object is to be rendered as a solid color
-   * (as if the alpha value had been explicitly given with a value of 1.0).
-   * 
- */ - public com.google.protobuf.FloatValue getAlpha() { - return alpha_ == null ? com.google.protobuf.FloatValue.getDefaultInstance() : alpha_; - } - /** - * optional .google.protobuf.FloatValue alpha = 4; - * - *
-   * The fraction of this color that should be applied to the pixel. That is,
-   * the final pixel color is defined by the equation:
-   *   pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
-   * This means that a value of 1.0 corresponds to a solid color, whereas
-   * a value of 0.0 corresponds to a completely transparent color. This
-   * uses a wrapper message rather than a simple float scalar so that it is
-   * possible to distinguish between a default value and the value being unset.
-   * If omitted, this color object is to be rendered as a solid color
-   * (as if the alpha value had been explicitly given with a value of 1.0).
-   * 
- */ - public com.google.protobuf.FloatValueOrBuilder getAlphaOrBuilder() { - return getAlpha(); - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (red_ != 0F) { - output.writeFloat(1, red_); - } - if (green_ != 0F) { - output.writeFloat(2, green_); - } - if (blue_ != 0F) { - output.writeFloat(3, blue_); - } - if (alpha_ != null) { - output.writeMessage(4, getAlpha()); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (red_ != 0F) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(1, red_); - } - if (green_ != 0F) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(2, green_); - } - if (blue_ != 0F) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(3, blue_); - } - if (alpha_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getAlpha()); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static com.google.type.Color parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.type.Color 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.type.Color parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.type.Color parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.type.Color parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.type.Color parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.type.Color parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.type.Color parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.type.Color parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.type.Color parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.type.Color prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - 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; - } - /** - * Protobuf type {@code google.type.Color} - * - *
-   * Represents a color in the RGBA color space. This representation is designed
-   * for simplicity of conversion to/from color representations in various
-   * languages over compactness; for example, the fields of this representation
-   * can be trivially provided to the constructor of "java.awt.Color" in Java; it
-   * can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
-   * method in iOS; and, with just a little work, it can be easily formatted into
-   * a CSS "rgba()" string in JavaScript, as well. Here are some examples:
-   * Example (Java):
-   *      import com.google.type.Color;
-   *      // ...
-   *      public static java.awt.Color fromProto(Color protocolor) {
-   *        float alpha = protocolor.hasAlpha()
-   *            ? protocolor.getAlpha().getValue()
-   *            : 1.0;
-   *        return new java.awt.Color(
-   *            protocolor.getRed(),
-   *            protocolor.getGreen(),
-   *            protocolor.getBlue(),
-   *            alpha);
-   *      }
-   *      public static Color toProto(java.awt.Color color) {
-   *        float red = (float) color.getRed();
-   *        float green = (float) color.getGreen();
-   *        float blue = (float) color.getBlue();
-   *        float denominator = 255.0;
-   *        Color.Builder resultBuilder =
-   *            Color
-   *                .newBuilder()
-   *                .setRed(red / denominator)
-   *                .setGreen(green / denominator)
-   *                .setBlue(blue / denominator);
-   *        int alpha = color.getAlpha();
-   *        if (alpha != 255) {
-   *          result.setAlpha(
-   *              FloatValue
-   *                  .newBuilder()
-   *                  .setValue(((float) alpha) / denominator)
-   *                  .build());
-   *        }
-   *        return resultBuilder.build();
-   *      }
-   *      // ...
-   * Example (iOS / Obj-C):
-   *      // ...
-   *      static UIColor* fromProto(Color* protocolor) {
-   *         float red = [protocolor red];
-   *         float green = [protocolor green];
-   *         float blue = [protocolor blue];
-   *         FloatValue* alpha_wrapper = [protocolor alpha];
-   *         float alpha = 1.0;
-   *         if (alpha_wrapper != nil) {
-   *           alpha = [alpha_wrapper value];
-   *         }
-   *         return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
-   *      }
-   *      static Color* toProto(UIColor* color) {
-   *          CGFloat red, green, blue, alpha;
-   *          if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {
-   *            return nil;
-   *          }
-   *          Color* result = [Color alloc] init];
-   *          [result setRed:red];
-   *          [result setGreen:green];
-   *          [result setBlue:blue];
-   *          if (alpha <= 0.9999) {
-   *            [result setAlpha:floatWrapperWithValue(alpha)];
-   *          }
-   *          [result autorelease];
-   *          return result;
-   *     }
-   *     // ...
-   *  Example (JavaScript):
-   *     // ...
-   *     var protoToCssColor = function(rgb_color) {
-   *        var redFrac = rgb_color.red || 0.0;
-   *        var greenFrac = rgb_color.green || 0.0;
-   *        var blueFrac = rgb_color.blue || 0.0;
-   *        var red = Math.floor(redFrac * 255);
-   *        var green = Math.floor(greenFrac * 255);
-   *        var blue = Math.floor(blueFrac * 255);
-   *        if (!('alpha' in rgb_color)) {
-   *           return rgbToCssColor_(red, green, blue);
-   *        }
-   *        var alphaFrac = rgb_color.alpha.value || 0.0;
-   *        var rgbParams = [red, green, blue].join(',');
-   *        return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
-   *     };
-   *     var rgbToCssColor_ = function(red, green, blue) {
-   *       var rgbNumber = new Number((red << 16) | (green << 8) | blue);
-   *       var hexString = rgbNumber.toString(16);
-   *       var missingZeros = 6 - hexString.length;
-   *       var resultBuilder = ['#'];
-   *       for (var i = 0; i < missingZeros; i++) {
-   *          resultBuilder.push('0');
-   *       }
-   *       resultBuilder.push(hexString);
-   *       return resultBuilder.join('');
-   *     };
-   *     // ...
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.type.Color) - com.google.type.ColorOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.type.ColorProto.internal_static_google_type_Color_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.type.ColorProto.internal_static_google_type_Color_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.type.Color.class, com.google.type.Color.Builder.class); - } - - // Construct using com.google.type.Color.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - red_ = 0F; - - green_ = 0F; - - blue_ = 0F; - - if (alphaBuilder_ == null) { - alpha_ = null; - } else { - alpha_ = null; - alphaBuilder_ = null; - } - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.type.ColorProto.internal_static_google_type_Color_descriptor; - } - - public com.google.type.Color getDefaultInstanceForType() { - return com.google.type.Color.getDefaultInstance(); - } - - public com.google.type.Color build() { - com.google.type.Color result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.type.Color buildPartial() { - com.google.type.Color result = new com.google.type.Color(this); - result.red_ = red_; - result.green_ = green_; - result.blue_ = blue_; - if (alphaBuilder_ == null) { - result.alpha_ = alpha_; - } else { - result.alpha_ = alphaBuilder_.build(); - } - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.type.Color) { - return mergeFrom((com.google.type.Color)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.type.Color other) { - if (other == com.google.type.Color.getDefaultInstance()) return this; - if (other.getRed() != 0F) { - setRed(other.getRed()); - } - if (other.getGreen() != 0F) { - setGreen(other.getGreen()); - } - if (other.getBlue() != 0F) { - setBlue(other.getBlue()); - } - if (other.hasAlpha()) { - mergeAlpha(other.getAlpha()); - } - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.type.Color parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.type.Color) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private float red_ ; - /** - * optional float red = 1; - * - *
-     * The amount of red in the color as a value in the interval [0, 1].
-     * 
- */ - public float getRed() { - return red_; - } - /** - * optional float red = 1; - * - *
-     * The amount of red in the color as a value in the interval [0, 1].
-     * 
- */ - public Builder setRed(float value) { - - red_ = value; - onChanged(); - return this; - } - /** - * optional float red = 1; - * - *
-     * The amount of red in the color as a value in the interval [0, 1].
-     * 
- */ - public Builder clearRed() { - - red_ = 0F; - onChanged(); - return this; - } - - private float green_ ; - /** - * optional float green = 2; - * - *
-     * The amount of green in the color as a value in the interval [0, 1].
-     * 
- */ - public float getGreen() { - return green_; - } - /** - * optional float green = 2; - * - *
-     * The amount of green in the color as a value in the interval [0, 1].
-     * 
- */ - public Builder setGreen(float value) { - - green_ = value; - onChanged(); - return this; - } - /** - * optional float green = 2; - * - *
-     * The amount of green in the color as a value in the interval [0, 1].
-     * 
- */ - public Builder clearGreen() { - - green_ = 0F; - onChanged(); - return this; - } - - private float blue_ ; - /** - * optional float blue = 3; - * - *
-     * The amount of blue in the color as a value in the interval [0, 1].
-     * 
- */ - public float getBlue() { - return blue_; - } - /** - * optional float blue = 3; - * - *
-     * The amount of blue in the color as a value in the interval [0, 1].
-     * 
- */ - public Builder setBlue(float value) { - - blue_ = value; - onChanged(); - return this; - } - /** - * optional float blue = 3; - * - *
-     * The amount of blue in the color as a value in the interval [0, 1].
-     * 
- */ - public Builder clearBlue() { - - blue_ = 0F; - onChanged(); - return this; - } - - private com.google.protobuf.FloatValue alpha_ = null; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.FloatValue, com.google.protobuf.FloatValue.Builder, com.google.protobuf.FloatValueOrBuilder> alphaBuilder_; - /** - * optional .google.protobuf.FloatValue alpha = 4; - * - *
-     * The fraction of this color that should be applied to the pixel. That is,
-     * the final pixel color is defined by the equation:
-     *   pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
-     * This means that a value of 1.0 corresponds to a solid color, whereas
-     * a value of 0.0 corresponds to a completely transparent color. This
-     * uses a wrapper message rather than a simple float scalar so that it is
-     * possible to distinguish between a default value and the value being unset.
-     * If omitted, this color object is to be rendered as a solid color
-     * (as if the alpha value had been explicitly given with a value of 1.0).
-     * 
- */ - public boolean hasAlpha() { - return alphaBuilder_ != null || alpha_ != null; - } - /** - * optional .google.protobuf.FloatValue alpha = 4; - * - *
-     * The fraction of this color that should be applied to the pixel. That is,
-     * the final pixel color is defined by the equation:
-     *   pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
-     * This means that a value of 1.0 corresponds to a solid color, whereas
-     * a value of 0.0 corresponds to a completely transparent color. This
-     * uses a wrapper message rather than a simple float scalar so that it is
-     * possible to distinguish between a default value and the value being unset.
-     * If omitted, this color object is to be rendered as a solid color
-     * (as if the alpha value had been explicitly given with a value of 1.0).
-     * 
- */ - public com.google.protobuf.FloatValue getAlpha() { - if (alphaBuilder_ == null) { - return alpha_ == null ? com.google.protobuf.FloatValue.getDefaultInstance() : alpha_; - } else { - return alphaBuilder_.getMessage(); - } - } - /** - * optional .google.protobuf.FloatValue alpha = 4; - * - *
-     * The fraction of this color that should be applied to the pixel. That is,
-     * the final pixel color is defined by the equation:
-     *   pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
-     * This means that a value of 1.0 corresponds to a solid color, whereas
-     * a value of 0.0 corresponds to a completely transparent color. This
-     * uses a wrapper message rather than a simple float scalar so that it is
-     * possible to distinguish between a default value and the value being unset.
-     * If omitted, this color object is to be rendered as a solid color
-     * (as if the alpha value had been explicitly given with a value of 1.0).
-     * 
- */ - public Builder setAlpha(com.google.protobuf.FloatValue value) { - if (alphaBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - alpha_ = value; - onChanged(); - } else { - alphaBuilder_.setMessage(value); - } - - return this; - } - /** - * optional .google.protobuf.FloatValue alpha = 4; - * - *
-     * The fraction of this color that should be applied to the pixel. That is,
-     * the final pixel color is defined by the equation:
-     *   pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
-     * This means that a value of 1.0 corresponds to a solid color, whereas
-     * a value of 0.0 corresponds to a completely transparent color. This
-     * uses a wrapper message rather than a simple float scalar so that it is
-     * possible to distinguish between a default value and the value being unset.
-     * If omitted, this color object is to be rendered as a solid color
-     * (as if the alpha value had been explicitly given with a value of 1.0).
-     * 
- */ - public Builder setAlpha( - com.google.protobuf.FloatValue.Builder builderForValue) { - if (alphaBuilder_ == null) { - alpha_ = builderForValue.build(); - onChanged(); - } else { - alphaBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * optional .google.protobuf.FloatValue alpha = 4; - * - *
-     * The fraction of this color that should be applied to the pixel. That is,
-     * the final pixel color is defined by the equation:
-     *   pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
-     * This means that a value of 1.0 corresponds to a solid color, whereas
-     * a value of 0.0 corresponds to a completely transparent color. This
-     * uses a wrapper message rather than a simple float scalar so that it is
-     * possible to distinguish between a default value and the value being unset.
-     * If omitted, this color object is to be rendered as a solid color
-     * (as if the alpha value had been explicitly given with a value of 1.0).
-     * 
- */ - public Builder mergeAlpha(com.google.protobuf.FloatValue value) { - if (alphaBuilder_ == null) { - if (alpha_ != null) { - alpha_ = - com.google.protobuf.FloatValue.newBuilder(alpha_).mergeFrom(value).buildPartial(); - } else { - alpha_ = value; - } - onChanged(); - } else { - alphaBuilder_.mergeFrom(value); - } - - return this; - } - /** - * optional .google.protobuf.FloatValue alpha = 4; - * - *
-     * The fraction of this color that should be applied to the pixel. That is,
-     * the final pixel color is defined by the equation:
-     *   pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
-     * This means that a value of 1.0 corresponds to a solid color, whereas
-     * a value of 0.0 corresponds to a completely transparent color. This
-     * uses a wrapper message rather than a simple float scalar so that it is
-     * possible to distinguish between a default value and the value being unset.
-     * If omitted, this color object is to be rendered as a solid color
-     * (as if the alpha value had been explicitly given with a value of 1.0).
-     * 
- */ - public Builder clearAlpha() { - if (alphaBuilder_ == null) { - alpha_ = null; - onChanged(); - } else { - alpha_ = null; - alphaBuilder_ = null; - } - - return this; - } - /** - * optional .google.protobuf.FloatValue alpha = 4; - * - *
-     * The fraction of this color that should be applied to the pixel. That is,
-     * the final pixel color is defined by the equation:
-     *   pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
-     * This means that a value of 1.0 corresponds to a solid color, whereas
-     * a value of 0.0 corresponds to a completely transparent color. This
-     * uses a wrapper message rather than a simple float scalar so that it is
-     * possible to distinguish between a default value and the value being unset.
-     * If omitted, this color object is to be rendered as a solid color
-     * (as if the alpha value had been explicitly given with a value of 1.0).
-     * 
- */ - public com.google.protobuf.FloatValue.Builder getAlphaBuilder() { - - onChanged(); - return getAlphaFieldBuilder().getBuilder(); - } - /** - * optional .google.protobuf.FloatValue alpha = 4; - * - *
-     * The fraction of this color that should be applied to the pixel. That is,
-     * the final pixel color is defined by the equation:
-     *   pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
-     * This means that a value of 1.0 corresponds to a solid color, whereas
-     * a value of 0.0 corresponds to a completely transparent color. This
-     * uses a wrapper message rather than a simple float scalar so that it is
-     * possible to distinguish between a default value and the value being unset.
-     * If omitted, this color object is to be rendered as a solid color
-     * (as if the alpha value had been explicitly given with a value of 1.0).
-     * 
- */ - public com.google.protobuf.FloatValueOrBuilder getAlphaOrBuilder() { - if (alphaBuilder_ != null) { - return alphaBuilder_.getMessageOrBuilder(); - } else { - return alpha_ == null ? - com.google.protobuf.FloatValue.getDefaultInstance() : alpha_; - } - } - /** - * optional .google.protobuf.FloatValue alpha = 4; - * - *
-     * The fraction of this color that should be applied to the pixel. That is,
-     * the final pixel color is defined by the equation:
-     *   pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
-     * This means that a value of 1.0 corresponds to a solid color, whereas
-     * a value of 0.0 corresponds to a completely transparent color. This
-     * uses a wrapper message rather than a simple float scalar so that it is
-     * possible to distinguish between a default value and the value being unset.
-     * If omitted, this color object is to be rendered as a solid color
-     * (as if the alpha value had been explicitly given with a value of 1.0).
-     * 
- */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.FloatValue, com.google.protobuf.FloatValue.Builder, com.google.protobuf.FloatValueOrBuilder> - getAlphaFieldBuilder() { - if (alphaBuilder_ == null) { - alphaBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.FloatValue, com.google.protobuf.FloatValue.Builder, com.google.protobuf.FloatValueOrBuilder>( - getAlpha(), - getParentForChildren(), - isClean()); - alpha_ = null; - } - return alphaBuilder_; - } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - - // @@protoc_insertion_point(builder_scope:google.type.Color) - } - - // @@protoc_insertion_point(class_scope:google.type.Color) - private static final com.google.type.Color DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.type.Color(); - } - - public static com.google.type.Color getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public Color parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new Color(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public com.google.type.Color getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-gax/generated/src/main/java/com/google/type/ColorOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/type/ColorOrBuilder.java deleted file mode 100644 index d6c1ea1ed3fd..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/type/ColorOrBuilder.java +++ /dev/null @@ -1,85 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/type/color.proto - -package com.google.type; - -public interface ColorOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.type.Color) - com.google.protobuf.MessageOrBuilder { - - /** - * optional float red = 1; - * - *
-   * The amount of red in the color as a value in the interval [0, 1].
-   * 
- */ - float getRed(); - - /** - * optional float green = 2; - * - *
-   * The amount of green in the color as a value in the interval [0, 1].
-   * 
- */ - float getGreen(); - - /** - * optional float blue = 3; - * - *
-   * The amount of blue in the color as a value in the interval [0, 1].
-   * 
- */ - float getBlue(); - - /** - * optional .google.protobuf.FloatValue alpha = 4; - * - *
-   * The fraction of this color that should be applied to the pixel. That is,
-   * the final pixel color is defined by the equation:
-   *   pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
-   * This means that a value of 1.0 corresponds to a solid color, whereas
-   * a value of 0.0 corresponds to a completely transparent color. This
-   * uses a wrapper message rather than a simple float scalar so that it is
-   * possible to distinguish between a default value and the value being unset.
-   * If omitted, this color object is to be rendered as a solid color
-   * (as if the alpha value had been explicitly given with a value of 1.0).
-   * 
- */ - boolean hasAlpha(); - /** - * optional .google.protobuf.FloatValue alpha = 4; - * - *
-   * The fraction of this color that should be applied to the pixel. That is,
-   * the final pixel color is defined by the equation:
-   *   pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
-   * This means that a value of 1.0 corresponds to a solid color, whereas
-   * a value of 0.0 corresponds to a completely transparent color. This
-   * uses a wrapper message rather than a simple float scalar so that it is
-   * possible to distinguish between a default value and the value being unset.
-   * If omitted, this color object is to be rendered as a solid color
-   * (as if the alpha value had been explicitly given with a value of 1.0).
-   * 
- */ - com.google.protobuf.FloatValue getAlpha(); - /** - * optional .google.protobuf.FloatValue alpha = 4; - * - *
-   * The fraction of this color that should be applied to the pixel. That is,
-   * the final pixel color is defined by the equation:
-   *   pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
-   * This means that a value of 1.0 corresponds to a solid color, whereas
-   * a value of 0.0 corresponds to a completely transparent color. This
-   * uses a wrapper message rather than a simple float scalar so that it is
-   * possible to distinguish between a default value and the value being unset.
-   * If omitted, this color object is to be rendered as a solid color
-   * (as if the alpha value had been explicitly given with a value of 1.0).
-   * 
- */ - com.google.protobuf.FloatValueOrBuilder getAlphaOrBuilder(); -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/type/ColorProto.java b/gcloud-java-gax/generated/src/main/java/com/google/type/ColorProto.java deleted file mode 100644 index 7706183802ed..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/type/ColorProto.java +++ /dev/null @@ -1,55 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/type/color.proto - -package com.google.type; - -public final class ColorProto { - private ColorProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - } - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_type_Color_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_type_Color_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\027google/type/color.proto\022\013google.type\032\036" + - "google/protobuf/wrappers.proto\"]\n\005Color\022" + - "\013\n\003red\030\001 \001(\002\022\r\n\005green\030\002 \001(\002\022\014\n\004blue\030\003 \001(" + - "\002\022*\n\005alpha\030\004 \001(\0132\033.google.protobuf.Float" + - "ValueB\037\n\017com.google.typeB\nColorProtoP\001b\006" + - "proto3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.protobuf.WrappersProto.getDescriptor(), - }, assigner); - internal_static_google_type_Color_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_type_Color_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_type_Color_descriptor, - new java.lang.String[] { "Red", "Green", "Blue", "Alpha", }); - com.google.protobuf.WrappersProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/type/Date.java b/gcloud-java-gax/generated/src/main/java/com/google/type/Date.java deleted file mode 100644 index b4a06c47f778..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/type/Date.java +++ /dev/null @@ -1,593 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/type/date.proto - -package com.google.type; - -/** - * Protobuf type {@code google.type.Date} - * - *
- * Represents a whole calendar date, e.g. date of birth. The time of day and
- * time zone are either specified elsewhere or are not significant. The date
- * is relative to the Proleptic Gregorian Calendar. The day may be 0 to
- * represent a year and month where the day is not significant, e.g. credit card
- * expiration date. The year may be 0 to represent a month and day independent
- * of year, e.g. anniversary date. Related types are [google.type.TimeOfDay][google.type.TimeOfDay]
- * and [google.protobuf.Timestamp][google.protobuf.Timestamp].
- * 
- */ -public final class Date extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.type.Date) - DateOrBuilder { - // Use Date.newBuilder() to construct. - private Date(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Date() { - year_ = 0; - month_ = 0; - day_ = 0; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private Date( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - int mutable_bitField0_ = 0; - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!input.skipField(tag)) { - done = true; - } - break; - } - case 8: { - - year_ = input.readInt32(); - break; - } - case 16: { - - month_ = input.readInt32(); - break; - } - case 24: { - - day_ = input.readInt32(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.type.DateProto.internal_static_google_type_Date_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.type.DateProto.internal_static_google_type_Date_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.type.Date.class, com.google.type.Date.Builder.class); - } - - public static final int YEAR_FIELD_NUMBER = 1; - private int year_; - /** - * optional int32 year = 1; - * - *
-   * Year of date. Must be from 1 to 9,999, or 0 if specifying a date without
-   * a year.
-   * 
- */ - public int getYear() { - return year_; - } - - public static final int MONTH_FIELD_NUMBER = 2; - private int month_; - /** - * optional int32 month = 2; - * - *
-   * Month of year of date. Must be from 1 to 12.
-   * 
- */ - public int getMonth() { - return month_; - } - - public static final int DAY_FIELD_NUMBER = 3; - private int day_; - /** - * optional int32 day = 3; - * - *
-   * Day of month. Must be from 1 to 31 and valid for the year and month, or 0
-   * if specifying a year/month where the day is not sigificant.
-   * 
- */ - public int getDay() { - return day_; - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (year_ != 0) { - output.writeInt32(1, year_); - } - if (month_ != 0) { - output.writeInt32(2, month_); - } - if (day_ != 0) { - output.writeInt32(3, day_); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (year_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, year_); - } - if (month_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, month_); - } - if (day_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(3, day_); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.type.Date)) { - return super.equals(obj); - } - com.google.type.Date other = (com.google.type.Date) obj; - - boolean result = true; - result = result && (getYear() - == other.getYear()); - result = result && (getMonth() - == other.getMonth()); - result = result && (getDay() - == other.getDay()); - return result; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptorForType().hashCode(); - hash = (37 * hash) + YEAR_FIELD_NUMBER; - hash = (53 * hash) + getYear(); - hash = (37 * hash) + MONTH_FIELD_NUMBER; - hash = (53 * hash) + getMonth(); - hash = (37 * hash) + DAY_FIELD_NUMBER; - hash = (53 * hash) + getDay(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.type.Date parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.type.Date 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.type.Date parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.type.Date parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.type.Date parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.type.Date parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.type.Date parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.type.Date parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.type.Date parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.type.Date parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.type.Date prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - 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; - } - /** - * Protobuf type {@code google.type.Date} - * - *
-   * Represents a whole calendar date, e.g. date of birth. The time of day and
-   * time zone are either specified elsewhere or are not significant. The date
-   * is relative to the Proleptic Gregorian Calendar. The day may be 0 to
-   * represent a year and month where the day is not significant, e.g. credit card
-   * expiration date. The year may be 0 to represent a month and day independent
-   * of year, e.g. anniversary date. Related types are [google.type.TimeOfDay][google.type.TimeOfDay]
-   * and [google.protobuf.Timestamp][google.protobuf.Timestamp].
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.type.Date) - com.google.type.DateOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.type.DateProto.internal_static_google_type_Date_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.type.DateProto.internal_static_google_type_Date_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.type.Date.class, com.google.type.Date.Builder.class); - } - - // Construct using com.google.type.Date.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - year_ = 0; - - month_ = 0; - - day_ = 0; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.type.DateProto.internal_static_google_type_Date_descriptor; - } - - public com.google.type.Date getDefaultInstanceForType() { - return com.google.type.Date.getDefaultInstance(); - } - - public com.google.type.Date build() { - com.google.type.Date result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.type.Date buildPartial() { - com.google.type.Date result = new com.google.type.Date(this); - result.year_ = year_; - result.month_ = month_; - result.day_ = day_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.type.Date) { - return mergeFrom((com.google.type.Date)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.type.Date other) { - if (other == com.google.type.Date.getDefaultInstance()) return this; - if (other.getYear() != 0) { - setYear(other.getYear()); - } - if (other.getMonth() != 0) { - setMonth(other.getMonth()); - } - if (other.getDay() != 0) { - setDay(other.getDay()); - } - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.type.Date parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.type.Date) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int year_ ; - /** - * optional int32 year = 1; - * - *
-     * Year of date. Must be from 1 to 9,999, or 0 if specifying a date without
-     * a year.
-     * 
- */ - public int getYear() { - return year_; - } - /** - * optional int32 year = 1; - * - *
-     * Year of date. Must be from 1 to 9,999, or 0 if specifying a date without
-     * a year.
-     * 
- */ - public Builder setYear(int value) { - - year_ = value; - onChanged(); - return this; - } - /** - * optional int32 year = 1; - * - *
-     * Year of date. Must be from 1 to 9,999, or 0 if specifying a date without
-     * a year.
-     * 
- */ - public Builder clearYear() { - - year_ = 0; - onChanged(); - return this; - } - - private int month_ ; - /** - * optional int32 month = 2; - * - *
-     * Month of year of date. Must be from 1 to 12.
-     * 
- */ - public int getMonth() { - return month_; - } - /** - * optional int32 month = 2; - * - *
-     * Month of year of date. Must be from 1 to 12.
-     * 
- */ - public Builder setMonth(int value) { - - month_ = value; - onChanged(); - return this; - } - /** - * optional int32 month = 2; - * - *
-     * Month of year of date. Must be from 1 to 12.
-     * 
- */ - public Builder clearMonth() { - - month_ = 0; - onChanged(); - return this; - } - - private int day_ ; - /** - * optional int32 day = 3; - * - *
-     * Day of month. Must be from 1 to 31 and valid for the year and month, or 0
-     * if specifying a year/month where the day is not sigificant.
-     * 
- */ - public int getDay() { - return day_; - } - /** - * optional int32 day = 3; - * - *
-     * Day of month. Must be from 1 to 31 and valid for the year and month, or 0
-     * if specifying a year/month where the day is not sigificant.
-     * 
- */ - public Builder setDay(int value) { - - day_ = value; - onChanged(); - return this; - } - /** - * optional int32 day = 3; - * - *
-     * Day of month. Must be from 1 to 31 and valid for the year and month, or 0
-     * if specifying a year/month where the day is not sigificant.
-     * 
- */ - public Builder clearDay() { - - day_ = 0; - onChanged(); - return this; - } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - - // @@protoc_insertion_point(builder_scope:google.type.Date) - } - - // @@protoc_insertion_point(class_scope:google.type.Date) - private static final com.google.type.Date DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.type.Date(); - } - - public static com.google.type.Date getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public Date parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new Date(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public com.google.type.Date getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-gax/generated/src/main/java/com/google/type/DateOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/type/DateOrBuilder.java deleted file mode 100644 index adf3a03af627..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/type/DateOrBuilder.java +++ /dev/null @@ -1,38 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/type/date.proto - -package com.google.type; - -public interface DateOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.type.Date) - com.google.protobuf.MessageOrBuilder { - - /** - * optional int32 year = 1; - * - *
-   * Year of date. Must be from 1 to 9,999, or 0 if specifying a date without
-   * a year.
-   * 
- */ - int getYear(); - - /** - * optional int32 month = 2; - * - *
-   * Month of year of date. Must be from 1 to 12.
-   * 
- */ - int getMonth(); - - /** - * optional int32 day = 3; - * - *
-   * Day of month. Must be from 1 to 31 and valid for the year and month, or 0
-   * if specifying a year/month where the day is not sigificant.
-   * 
- */ - int getDay(); -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/type/DateProto.java b/gcloud-java-gax/generated/src/main/java/com/google/type/DateProto.java deleted file mode 100644 index 2ddd35383cd5..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/type/DateProto.java +++ /dev/null @@ -1,51 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/type/date.proto - -package com.google.type; - -public final class DateProto { - private DateProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - } - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_type_Date_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_type_Date_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\026google/type/date.proto\022\013google.type\"0\n" + - "\004Date\022\014\n\004year\030\001 \001(\005\022\r\n\005month\030\002 \001(\005\022\013\n\003da" + - "y\030\003 \001(\005B!\n\017com.google.typeB\tDateProtoP\001\240" + - "\001\001b\006proto3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }, assigner); - internal_static_google_type_Date_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_type_Date_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_type_Date_descriptor, - new java.lang.String[] { "Year", "Month", "Day", }); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/type/DayOfWeek.java b/gcloud-java-gax/generated/src/main/java/com/google/type/DayOfWeek.java deleted file mode 100644 index 06df59326e8c..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/type/DayOfWeek.java +++ /dev/null @@ -1,220 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/type/dayofweek.proto - -package com.google.type; - -/** - * Protobuf enum {@code google.type.DayOfWeek} - * - *
- * Represents a day of week.
- * 
- */ -public enum DayOfWeek - implements com.google.protobuf.ProtocolMessageEnum { - /** - * DAY_OF_WEEK_UNSPECIFIED = 0; - * - *
-   * The unspecified day-of-week.
-   * 
- */ - DAY_OF_WEEK_UNSPECIFIED(0, 0), - /** - * MONDAY = 1; - * - *
-   * The day-of-week of Monday.
-   * 
- */ - MONDAY(1, 1), - /** - * TUESDAY = 2; - * - *
-   * The day-of-week of Tuesday.
-   * 
- */ - TUESDAY(2, 2), - /** - * WEDNESDAY = 3; - * - *
-   * The day-of-week of Wednesday.
-   * 
- */ - WEDNESDAY(3, 3), - /** - * THURSDAY = 4; - * - *
-   * The day-of-week of Thursday.
-   * 
- */ - THURSDAY(4, 4), - /** - * FRIDAY = 5; - * - *
-   * The day-of-week of Friday.
-   * 
- */ - FRIDAY(5, 5), - /** - * SATURDAY = 6; - * - *
-   * The day-of-week of Saturday.
-   * 
- */ - SATURDAY(6, 6), - /** - * SUNDAY = 7; - * - *
-   * The day-of-week of Sunday.
-   * 
- */ - SUNDAY(7, 7), - UNRECOGNIZED(-1, -1), - ; - - /** - * DAY_OF_WEEK_UNSPECIFIED = 0; - * - *
-   * The unspecified day-of-week.
-   * 
- */ - public static final int DAY_OF_WEEK_UNSPECIFIED_VALUE = 0; - /** - * MONDAY = 1; - * - *
-   * The day-of-week of Monday.
-   * 
- */ - public static final int MONDAY_VALUE = 1; - /** - * TUESDAY = 2; - * - *
-   * The day-of-week of Tuesday.
-   * 
- */ - public static final int TUESDAY_VALUE = 2; - /** - * WEDNESDAY = 3; - * - *
-   * The day-of-week of Wednesday.
-   * 
- */ - public static final int WEDNESDAY_VALUE = 3; - /** - * THURSDAY = 4; - * - *
-   * The day-of-week of Thursday.
-   * 
- */ - public static final int THURSDAY_VALUE = 4; - /** - * FRIDAY = 5; - * - *
-   * The day-of-week of Friday.
-   * 
- */ - public static final int FRIDAY_VALUE = 5; - /** - * SATURDAY = 6; - * - *
-   * The day-of-week of Saturday.
-   * 
- */ - public static final int SATURDAY_VALUE = 6; - /** - * SUNDAY = 7; - * - *
-   * The day-of-week of Sunday.
-   * 
- */ - public static final int SUNDAY_VALUE = 7; - - - public final int getNumber() { - if (index == -1) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - public static DayOfWeek valueOf(int value) { - switch (value) { - case 0: return DAY_OF_WEEK_UNSPECIFIED; - case 1: return MONDAY; - case 2: return TUESDAY; - case 3: return WEDNESDAY; - case 4: return THURSDAY; - case 5: return FRIDAY; - case 6: return SATURDAY; - case 7: return SUNDAY; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - DayOfWeek> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public DayOfWeek findValueByNumber(int number) { - return DayOfWeek.valueOf(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - return getDescriptor().getValues().get(index); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.type.DayOfWeekProto.getDescriptor() - .getEnumTypes().get(0); - } - - private static final DayOfWeek[] VALUES = values(); - - public static DayOfWeek 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 index; - private final int value; - - private DayOfWeek(int index, int value) { - this.index = index; - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.type.DayOfWeek) -} - diff --git a/gcloud-java-gax/generated/src/main/java/com/google/type/DayOfWeekProto.java b/gcloud-java-gax/generated/src/main/java/com/google/type/DayOfWeekProto.java deleted file mode 100644 index 8fc4a373d4c7..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/type/DayOfWeekProto.java +++ /dev/null @@ -1,42 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/type/dayofweek.proto - -package com.google.type; - -public final class DayOfWeekProto { - private DayOfWeekProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - } - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n\033google/type/dayofweek.proto\022\013google.ty" + - "pe*\204\001\n\tDayOfWeek\022\033\n\027DAY_OF_WEEK_UNSPECIF" + - "IED\020\000\022\n\n\006MONDAY\020\001\022\013\n\007TUESDAY\020\002\022\r\n\tWEDNES" + - "DAY\020\003\022\014\n\010THURSDAY\020\004\022\n\n\006FRIDAY\020\005\022\014\n\010SATUR" + - "DAY\020\006\022\n\n\006SUNDAY\020\007B&\n\017com.google.typeB\016Da" + - "yOfWeekProtoP\001\240\001\001b\006proto3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }, assigner); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/type/LatLng.java b/gcloud-java-gax/generated/src/main/java/com/google/type/LatLng.java deleted file mode 100644 index a01d4f50b3db..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/type/LatLng.java +++ /dev/null @@ -1,513 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/type/latlng.proto - -package com.google.type; - -/** - * Protobuf type {@code google.type.LatLng} - * - *
- * An object representing a latitude/longitude pair. This is expressed as a pair
- * of doubles representing degrees latitude and degrees longitude. Unless
- * specified otherwise, this must conform to the
- * <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
- * standard</a>. Values must be within normalized ranges.
- * 
- */ -public final class LatLng extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.type.LatLng) - LatLngOrBuilder { - // Use LatLng.newBuilder() to construct. - private LatLng(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private LatLng() { - latitude_ = 0D; - longitude_ = 0D; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private LatLng( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - int mutable_bitField0_ = 0; - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!input.skipField(tag)) { - done = true; - } - break; - } - case 9: { - - latitude_ = input.readDouble(); - break; - } - case 17: { - - longitude_ = input.readDouble(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.type.LatLngProto.internal_static_google_type_LatLng_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.type.LatLngProto.internal_static_google_type_LatLng_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.type.LatLng.class, com.google.type.LatLng.Builder.class); - } - - public static final int LATITUDE_FIELD_NUMBER = 1; - private double latitude_; - /** - * optional double latitude = 1; - * - *
-   * The latitude in degrees. It must be in the range [-90.0, +90.0].
-   * 
- */ - public double getLatitude() { - return latitude_; - } - - public static final int LONGITUDE_FIELD_NUMBER = 2; - private double longitude_; - /** - * optional double longitude = 2; - * - *
-   * The longitude in degrees. It must be in the range [-180.0, +180.0].
-   * 
- */ - public double getLongitude() { - return longitude_; - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (latitude_ != 0D) { - output.writeDouble(1, latitude_); - } - if (longitude_ != 0D) { - output.writeDouble(2, longitude_); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (latitude_ != 0D) { - size += com.google.protobuf.CodedOutputStream - .computeDoubleSize(1, latitude_); - } - if (longitude_ != 0D) { - size += com.google.protobuf.CodedOutputStream - .computeDoubleSize(2, longitude_); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.type.LatLng)) { - return super.equals(obj); - } - com.google.type.LatLng other = (com.google.type.LatLng) obj; - - boolean result = true; - result = result && ( - java.lang.Double.doubleToLongBits(getLatitude()) - == java.lang.Double.doubleToLongBits( - other.getLatitude())); - result = result && ( - java.lang.Double.doubleToLongBits(getLongitude()) - == java.lang.Double.doubleToLongBits( - other.getLongitude())); - return result; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptorForType().hashCode(); - hash = (37 * hash) + LATITUDE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getLatitude())); - hash = (37 * hash) + LONGITUDE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getLongitude())); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.type.LatLng parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.type.LatLng 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.type.LatLng parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.type.LatLng parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.type.LatLng parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.type.LatLng parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.type.LatLng parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.type.LatLng parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.type.LatLng parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.type.LatLng parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.type.LatLng prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - 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; - } - /** - * Protobuf type {@code google.type.LatLng} - * - *
-   * An object representing a latitude/longitude pair. This is expressed as a pair
-   * of doubles representing degrees latitude and degrees longitude. Unless
-   * specified otherwise, this must conform to the
-   * <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
-   * standard</a>. Values must be within normalized ranges.
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.type.LatLng) - com.google.type.LatLngOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.type.LatLngProto.internal_static_google_type_LatLng_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.type.LatLngProto.internal_static_google_type_LatLng_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.type.LatLng.class, com.google.type.LatLng.Builder.class); - } - - // Construct using com.google.type.LatLng.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - latitude_ = 0D; - - longitude_ = 0D; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.type.LatLngProto.internal_static_google_type_LatLng_descriptor; - } - - public com.google.type.LatLng getDefaultInstanceForType() { - return com.google.type.LatLng.getDefaultInstance(); - } - - public com.google.type.LatLng build() { - com.google.type.LatLng result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.type.LatLng buildPartial() { - com.google.type.LatLng result = new com.google.type.LatLng(this); - result.latitude_ = latitude_; - result.longitude_ = longitude_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.type.LatLng) { - return mergeFrom((com.google.type.LatLng)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.type.LatLng other) { - if (other == com.google.type.LatLng.getDefaultInstance()) return this; - if (other.getLatitude() != 0D) { - setLatitude(other.getLatitude()); - } - if (other.getLongitude() != 0D) { - setLongitude(other.getLongitude()); - } - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.type.LatLng parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.type.LatLng) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private double latitude_ ; - /** - * optional double latitude = 1; - * - *
-     * The latitude in degrees. It must be in the range [-90.0, +90.0].
-     * 
- */ - public double getLatitude() { - return latitude_; - } - /** - * optional double latitude = 1; - * - *
-     * The latitude in degrees. It must be in the range [-90.0, +90.0].
-     * 
- */ - public Builder setLatitude(double value) { - - latitude_ = value; - onChanged(); - return this; - } - /** - * optional double latitude = 1; - * - *
-     * The latitude in degrees. It must be in the range [-90.0, +90.0].
-     * 
- */ - public Builder clearLatitude() { - - latitude_ = 0D; - onChanged(); - return this; - } - - private double longitude_ ; - /** - * optional double longitude = 2; - * - *
-     * The longitude in degrees. It must be in the range [-180.0, +180.0].
-     * 
- */ - public double getLongitude() { - return longitude_; - } - /** - * optional double longitude = 2; - * - *
-     * The longitude in degrees. It must be in the range [-180.0, +180.0].
-     * 
- */ - public Builder setLongitude(double value) { - - longitude_ = value; - onChanged(); - return this; - } - /** - * optional double longitude = 2; - * - *
-     * The longitude in degrees. It must be in the range [-180.0, +180.0].
-     * 
- */ - public Builder clearLongitude() { - - longitude_ = 0D; - onChanged(); - return this; - } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - - // @@protoc_insertion_point(builder_scope:google.type.LatLng) - } - - // @@protoc_insertion_point(class_scope:google.type.LatLng) - private static final com.google.type.LatLng DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.type.LatLng(); - } - - public static com.google.type.LatLng getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public LatLng parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new LatLng(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public com.google.type.LatLng getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-gax/generated/src/main/java/com/google/type/LatLngOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/type/LatLngOrBuilder.java deleted file mode 100644 index a068aedf045d..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/type/LatLngOrBuilder.java +++ /dev/null @@ -1,27 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/type/latlng.proto - -package com.google.type; - -public interface LatLngOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.type.LatLng) - com.google.protobuf.MessageOrBuilder { - - /** - * optional double latitude = 1; - * - *
-   * The latitude in degrees. It must be in the range [-90.0, +90.0].
-   * 
- */ - double getLatitude(); - - /** - * optional double longitude = 2; - * - *
-   * The longitude in degrees. It must be in the range [-180.0, +180.0].
-   * 
- */ - double getLongitude(); -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/type/LatLngProto.java b/gcloud-java-gax/generated/src/main/java/com/google/type/LatLngProto.java deleted file mode 100644 index 35b63fce9cda..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/type/LatLngProto.java +++ /dev/null @@ -1,51 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/type/latlng.proto - -package com.google.type; - -public final class LatLngProto { - private LatLngProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - } - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_type_LatLng_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_type_LatLng_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\030google/type/latlng.proto\022\013google.type\"" + - "-\n\006LatLng\022\020\n\010latitude\030\001 \001(\001\022\021\n\tlongitude" + - "\030\002 \001(\001B#\n\017com.google.typeB\013LatLngProtoP\001" + - "\240\001\001b\006proto3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }, assigner); - internal_static_google_type_LatLng_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_type_LatLng_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_type_LatLng_descriptor, - new java.lang.String[] { "Latitude", "Longitude", }); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/type/Money.java b/gcloud-java-gax/generated/src/main/java/com/google/type/Money.java deleted file mode 100644 index 18025d34fe87..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/type/Money.java +++ /dev/null @@ -1,640 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/type/money.proto - -package com.google.type; - -/** - * Protobuf type {@code google.type.Money} - * - *
- * Represents an amount of money with its currency type.
- * 
- */ -public final class Money extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.type.Money) - MoneyOrBuilder { - // Use Money.newBuilder() to construct. - private Money(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Money() { - currencyCode_ = ""; - units_ = 0L; - nanos_ = 0; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private Money( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - int mutable_bitField0_ = 0; - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!input.skipField(tag)) { - done = true; - } - break; - } - case 10: { - String s = input.readStringRequireUtf8(); - - currencyCode_ = s; - break; - } - case 16: { - - units_ = input.readInt64(); - break; - } - case 24: { - - nanos_ = input.readInt32(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.type.MoneyProto.internal_static_google_type_Money_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.type.MoneyProto.internal_static_google_type_Money_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.type.Money.class, com.google.type.Money.Builder.class); - } - - public static final int CURRENCY_CODE_FIELD_NUMBER = 1; - private volatile java.lang.Object currencyCode_; - /** - * optional string currency_code = 1; - * - *
-   * The 3-letter currency code defined in ISO 4217.
-   * 
- */ - public java.lang.String getCurrencyCode() { - java.lang.Object ref = currencyCode_; - 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(); - currencyCode_ = s; - return s; - } - } - /** - * optional string currency_code = 1; - * - *
-   * The 3-letter currency code defined in ISO 4217.
-   * 
- */ - public com.google.protobuf.ByteString - getCurrencyCodeBytes() { - java.lang.Object ref = currencyCode_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - currencyCode_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int UNITS_FIELD_NUMBER = 2; - private long units_; - /** - * optional int64 units = 2; - * - *
-   * The whole units of the amount.
-   * For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
-   * 
- */ - public long getUnits() { - return units_; - } - - public static final int NANOS_FIELD_NUMBER = 3; - private int nanos_; - /** - * optional int32 nanos = 3; - * - *
-   * Number of nano (10^-9) units of the amount.
-   * The value must be between -999,999,999 and +999,999,999 inclusive.
-   * If `units` is positive, `nanos` must be positive or zero.
-   * If `units` is zero, `nanos` can be positive, zero, or negative.
-   * If `units` is negative, `nanos` must be negative or zero.
-   * For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
-   * 
- */ - public int getNanos() { - return nanos_; - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!getCurrencyCodeBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, currencyCode_); - } - if (units_ != 0L) { - output.writeInt64(2, units_); - } - if (nanos_ != 0) { - output.writeInt32(3, nanos_); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getCurrencyCodeBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, currencyCode_); - } - if (units_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(2, units_); - } - if (nanos_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(3, nanos_); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static com.google.type.Money parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.type.Money 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.type.Money parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.type.Money parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.type.Money parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.type.Money parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.type.Money parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.type.Money parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.type.Money parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.type.Money parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.type.Money prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - 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; - } - /** - * Protobuf type {@code google.type.Money} - * - *
-   * Represents an amount of money with its currency type.
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.type.Money) - com.google.type.MoneyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.type.MoneyProto.internal_static_google_type_Money_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.type.MoneyProto.internal_static_google_type_Money_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.type.Money.class, com.google.type.Money.Builder.class); - } - - // Construct using com.google.type.Money.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - currencyCode_ = ""; - - units_ = 0L; - - nanos_ = 0; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.type.MoneyProto.internal_static_google_type_Money_descriptor; - } - - public com.google.type.Money getDefaultInstanceForType() { - return com.google.type.Money.getDefaultInstance(); - } - - public com.google.type.Money build() { - com.google.type.Money result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.type.Money buildPartial() { - com.google.type.Money result = new com.google.type.Money(this); - result.currencyCode_ = currencyCode_; - result.units_ = units_; - result.nanos_ = nanos_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.type.Money) { - return mergeFrom((com.google.type.Money)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.type.Money other) { - if (other == com.google.type.Money.getDefaultInstance()) return this; - if (!other.getCurrencyCode().isEmpty()) { - currencyCode_ = other.currencyCode_; - onChanged(); - } - if (other.getUnits() != 0L) { - setUnits(other.getUnits()); - } - if (other.getNanos() != 0) { - setNanos(other.getNanos()); - } - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.type.Money parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.type.Money) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object currencyCode_ = ""; - /** - * optional string currency_code = 1; - * - *
-     * The 3-letter currency code defined in ISO 4217.
-     * 
- */ - public java.lang.String getCurrencyCode() { - java.lang.Object ref = currencyCode_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - currencyCode_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string currency_code = 1; - * - *
-     * The 3-letter currency code defined in ISO 4217.
-     * 
- */ - public com.google.protobuf.ByteString - getCurrencyCodeBytes() { - java.lang.Object ref = currencyCode_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - currencyCode_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string currency_code = 1; - * - *
-     * The 3-letter currency code defined in ISO 4217.
-     * 
- */ - public Builder setCurrencyCode( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - currencyCode_ = value; - onChanged(); - return this; - } - /** - * optional string currency_code = 1; - * - *
-     * The 3-letter currency code defined in ISO 4217.
-     * 
- */ - public Builder clearCurrencyCode() { - - currencyCode_ = getDefaultInstance().getCurrencyCode(); - onChanged(); - return this; - } - /** - * optional string currency_code = 1; - * - *
-     * The 3-letter currency code defined in ISO 4217.
-     * 
- */ - public Builder setCurrencyCodeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - currencyCode_ = value; - onChanged(); - return this; - } - - private long units_ ; - /** - * optional int64 units = 2; - * - *
-     * The whole units of the amount.
-     * For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
-     * 
- */ - public long getUnits() { - return units_; - } - /** - * optional int64 units = 2; - * - *
-     * The whole units of the amount.
-     * For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
-     * 
- */ - public Builder setUnits(long value) { - - units_ = value; - onChanged(); - return this; - } - /** - * optional int64 units = 2; - * - *
-     * The whole units of the amount.
-     * For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
-     * 
- */ - public Builder clearUnits() { - - units_ = 0L; - onChanged(); - return this; - } - - private int nanos_ ; - /** - * optional int32 nanos = 3; - * - *
-     * Number of nano (10^-9) units of the amount.
-     * The value must be between -999,999,999 and +999,999,999 inclusive.
-     * If `units` is positive, `nanos` must be positive or zero.
-     * If `units` is zero, `nanos` can be positive, zero, or negative.
-     * If `units` is negative, `nanos` must be negative or zero.
-     * For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
-     * 
- */ - public int getNanos() { - return nanos_; - } - /** - * optional int32 nanos = 3; - * - *
-     * Number of nano (10^-9) units of the amount.
-     * The value must be between -999,999,999 and +999,999,999 inclusive.
-     * If `units` is positive, `nanos` must be positive or zero.
-     * If `units` is zero, `nanos` can be positive, zero, or negative.
-     * If `units` is negative, `nanos` must be negative or zero.
-     * For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
-     * 
- */ - public Builder setNanos(int value) { - - nanos_ = value; - onChanged(); - return this; - } - /** - * optional int32 nanos = 3; - * - *
-     * Number of nano (10^-9) units of the amount.
-     * The value must be between -999,999,999 and +999,999,999 inclusive.
-     * If `units` is positive, `nanos` must be positive or zero.
-     * If `units` is zero, `nanos` can be positive, zero, or negative.
-     * If `units` is negative, `nanos` must be negative or zero.
-     * For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
-     * 
- */ - public Builder clearNanos() { - - nanos_ = 0; - onChanged(); - return this; - } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - - // @@protoc_insertion_point(builder_scope:google.type.Money) - } - - // @@protoc_insertion_point(class_scope:google.type.Money) - private static final com.google.type.Money DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.type.Money(); - } - - public static com.google.type.Money getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public Money parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new Money(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public com.google.type.Money getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-gax/generated/src/main/java/com/google/type/MoneyOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/type/MoneyOrBuilder.java deleted file mode 100644 index 88567eecfba8..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/type/MoneyOrBuilder.java +++ /dev/null @@ -1,51 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/type/money.proto - -package com.google.type; - -public interface MoneyOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.type.Money) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string currency_code = 1; - * - *
-   * The 3-letter currency code defined in ISO 4217.
-   * 
- */ - java.lang.String getCurrencyCode(); - /** - * optional string currency_code = 1; - * - *
-   * The 3-letter currency code defined in ISO 4217.
-   * 
- */ - com.google.protobuf.ByteString - getCurrencyCodeBytes(); - - /** - * optional int64 units = 2; - * - *
-   * The whole units of the amount.
-   * For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
-   * 
- */ - long getUnits(); - - /** - * optional int32 nanos = 3; - * - *
-   * Number of nano (10^-9) units of the amount.
-   * The value must be between -999,999,999 and +999,999,999 inclusive.
-   * If `units` is positive, `nanos` must be positive or zero.
-   * If `units` is zero, `nanos` can be positive, zero, or negative.
-   * If `units` is negative, `nanos` must be negative or zero.
-   * For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
-   * 
- */ - int getNanos(); -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/type/MoneyProto.java b/gcloud-java-gax/generated/src/main/java/com/google/type/MoneyProto.java deleted file mode 100644 index 4c5f0abec619..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/type/MoneyProto.java +++ /dev/null @@ -1,51 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/type/money.proto - -package com.google.type; - -public final class MoneyProto { - private MoneyProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - } - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_type_Money_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_type_Money_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\027google/type/money.proto\022\013google.type\"<" + - "\n\005Money\022\025\n\rcurrency_code\030\001 \001(\t\022\r\n\005units\030" + - "\002 \001(\003\022\r\n\005nanos\030\003 \001(\005B\037\n\017com.google.typeB" + - "\nMoneyProtoP\001b\006proto3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }, assigner); - internal_static_google_type_Money_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_type_Money_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_type_Money_descriptor, - new java.lang.String[] { "CurrencyCode", "Units", "Nanos", }); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/type/TimeOfDay.java b/gcloud-java-gax/generated/src/main/java/com/google/type/TimeOfDay.java deleted file mode 100644 index 494356df0c58..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/type/TimeOfDay.java +++ /dev/null @@ -1,659 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/type/timeofday.proto - -package com.google.type; - -/** - * Protobuf type {@code google.type.TimeOfDay} - * - *
- * Represents a time of day. The date and time zone are either not significant
- * or are specified elsewhere. An API may chose to allow leap seconds. Related
- * types are [google.type.Date][google.type.Date] and [google.protobuf.Timestamp][google.protobuf.Timestamp].
- * 
- */ -public final class TimeOfDay extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.type.TimeOfDay) - TimeOfDayOrBuilder { - // Use TimeOfDay.newBuilder() to construct. - private TimeOfDay(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private TimeOfDay() { - hours_ = 0; - minutes_ = 0; - seconds_ = 0; - nanos_ = 0; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private TimeOfDay( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - int mutable_bitField0_ = 0; - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!input.skipField(tag)) { - done = true; - } - break; - } - case 8: { - - hours_ = input.readInt32(); - break; - } - case 16: { - - minutes_ = input.readInt32(); - break; - } - case 24: { - - seconds_ = input.readInt32(); - break; - } - case 32: { - - nanos_ = input.readInt32(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.type.TimeOfDayProto.internal_static_google_type_TimeOfDay_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.type.TimeOfDayProto.internal_static_google_type_TimeOfDay_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.type.TimeOfDay.class, com.google.type.TimeOfDay.Builder.class); - } - - public static final int HOURS_FIELD_NUMBER = 1; - private int hours_; - /** - * optional int32 hours = 1; - * - *
-   * Hours of day in 24 hour format. Should be from 0 to 23. An API may choose
-   * to allow the value "24:00:00" for scenarios like business closing time.
-   * 
- */ - public int getHours() { - return hours_; - } - - public static final int MINUTES_FIELD_NUMBER = 2; - private int minutes_; - /** - * optional int32 minutes = 2; - * - *
-   * Minutes of hour of day. Must be from 0 to 59.
-   * 
- */ - public int getMinutes() { - return minutes_; - } - - public static final int SECONDS_FIELD_NUMBER = 3; - private int seconds_; - /** - * optional int32 seconds = 3; - * - *
-   * Seconds of minutes of the time. Must normally be from 0 to 59. An API may
-   * allow the value 60 if it allows leap-seconds.
-   * 
- */ - public int getSeconds() { - return seconds_; - } - - public static final int NANOS_FIELD_NUMBER = 4; - private int nanos_; - /** - * optional int32 nanos = 4; - * - *
-   * Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.
-   * 
- */ - public int getNanos() { - return nanos_; - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (hours_ != 0) { - output.writeInt32(1, hours_); - } - if (minutes_ != 0) { - output.writeInt32(2, minutes_); - } - if (seconds_ != 0) { - output.writeInt32(3, seconds_); - } - if (nanos_ != 0) { - output.writeInt32(4, nanos_); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (hours_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, hours_); - } - if (minutes_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, minutes_); - } - if (seconds_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(3, seconds_); - } - if (nanos_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(4, nanos_); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.type.TimeOfDay)) { - return super.equals(obj); - } - com.google.type.TimeOfDay other = (com.google.type.TimeOfDay) obj; - - boolean result = true; - result = result && (getHours() - == other.getHours()); - result = result && (getMinutes() - == other.getMinutes()); - result = result && (getSeconds() - == other.getSeconds()); - result = result && (getNanos() - == other.getNanos()); - return result; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptorForType().hashCode(); - hash = (37 * hash) + HOURS_FIELD_NUMBER; - hash = (53 * hash) + getHours(); - hash = (37 * hash) + MINUTES_FIELD_NUMBER; - hash = (53 * hash) + getMinutes(); - hash = (37 * hash) + SECONDS_FIELD_NUMBER; - hash = (53 * hash) + getSeconds(); - hash = (37 * hash) + NANOS_FIELD_NUMBER; - hash = (53 * hash) + getNanos(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.type.TimeOfDay parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.type.TimeOfDay 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.type.TimeOfDay parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.type.TimeOfDay parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.type.TimeOfDay parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.type.TimeOfDay parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.type.TimeOfDay parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.type.TimeOfDay parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.type.TimeOfDay parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.type.TimeOfDay parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.type.TimeOfDay prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - 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; - } - /** - * Protobuf type {@code google.type.TimeOfDay} - * - *
-   * Represents a time of day. The date and time zone are either not significant
-   * or are specified elsewhere. An API may chose to allow leap seconds. Related
-   * types are [google.type.Date][google.type.Date] and [google.protobuf.Timestamp][google.protobuf.Timestamp].
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.type.TimeOfDay) - com.google.type.TimeOfDayOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.type.TimeOfDayProto.internal_static_google_type_TimeOfDay_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.type.TimeOfDayProto.internal_static_google_type_TimeOfDay_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.type.TimeOfDay.class, com.google.type.TimeOfDay.Builder.class); - } - - // Construct using com.google.type.TimeOfDay.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - hours_ = 0; - - minutes_ = 0; - - seconds_ = 0; - - nanos_ = 0; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.type.TimeOfDayProto.internal_static_google_type_TimeOfDay_descriptor; - } - - public com.google.type.TimeOfDay getDefaultInstanceForType() { - return com.google.type.TimeOfDay.getDefaultInstance(); - } - - public com.google.type.TimeOfDay build() { - com.google.type.TimeOfDay result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.type.TimeOfDay buildPartial() { - com.google.type.TimeOfDay result = new com.google.type.TimeOfDay(this); - result.hours_ = hours_; - result.minutes_ = minutes_; - result.seconds_ = seconds_; - result.nanos_ = nanos_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.type.TimeOfDay) { - return mergeFrom((com.google.type.TimeOfDay)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.type.TimeOfDay other) { - if (other == com.google.type.TimeOfDay.getDefaultInstance()) return this; - if (other.getHours() != 0) { - setHours(other.getHours()); - } - if (other.getMinutes() != 0) { - setMinutes(other.getMinutes()); - } - if (other.getSeconds() != 0) { - setSeconds(other.getSeconds()); - } - if (other.getNanos() != 0) { - setNanos(other.getNanos()); - } - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.type.TimeOfDay parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.type.TimeOfDay) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int hours_ ; - /** - * optional int32 hours = 1; - * - *
-     * Hours of day in 24 hour format. Should be from 0 to 23. An API may choose
-     * to allow the value "24:00:00" for scenarios like business closing time.
-     * 
- */ - public int getHours() { - return hours_; - } - /** - * optional int32 hours = 1; - * - *
-     * Hours of day in 24 hour format. Should be from 0 to 23. An API may choose
-     * to allow the value "24:00:00" for scenarios like business closing time.
-     * 
- */ - public Builder setHours(int value) { - - hours_ = value; - onChanged(); - return this; - } - /** - * optional int32 hours = 1; - * - *
-     * Hours of day in 24 hour format. Should be from 0 to 23. An API may choose
-     * to allow the value "24:00:00" for scenarios like business closing time.
-     * 
- */ - public Builder clearHours() { - - hours_ = 0; - onChanged(); - return this; - } - - private int minutes_ ; - /** - * optional int32 minutes = 2; - * - *
-     * Minutes of hour of day. Must be from 0 to 59.
-     * 
- */ - public int getMinutes() { - return minutes_; - } - /** - * optional int32 minutes = 2; - * - *
-     * Minutes of hour of day. Must be from 0 to 59.
-     * 
- */ - public Builder setMinutes(int value) { - - minutes_ = value; - onChanged(); - return this; - } - /** - * optional int32 minutes = 2; - * - *
-     * Minutes of hour of day. Must be from 0 to 59.
-     * 
- */ - public Builder clearMinutes() { - - minutes_ = 0; - onChanged(); - return this; - } - - private int seconds_ ; - /** - * optional int32 seconds = 3; - * - *
-     * Seconds of minutes of the time. Must normally be from 0 to 59. An API may
-     * allow the value 60 if it allows leap-seconds.
-     * 
- */ - public int getSeconds() { - return seconds_; - } - /** - * optional int32 seconds = 3; - * - *
-     * Seconds of minutes of the time. Must normally be from 0 to 59. An API may
-     * allow the value 60 if it allows leap-seconds.
-     * 
- */ - public Builder setSeconds(int value) { - - seconds_ = value; - onChanged(); - return this; - } - /** - * optional int32 seconds = 3; - * - *
-     * Seconds of minutes of the time. Must normally be from 0 to 59. An API may
-     * allow the value 60 if it allows leap-seconds.
-     * 
- */ - public Builder clearSeconds() { - - seconds_ = 0; - onChanged(); - return this; - } - - private int nanos_ ; - /** - * optional int32 nanos = 4; - * - *
-     * Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.
-     * 
- */ - public int getNanos() { - return nanos_; - } - /** - * optional int32 nanos = 4; - * - *
-     * Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.
-     * 
- */ - public Builder setNanos(int value) { - - nanos_ = value; - onChanged(); - return this; - } - /** - * optional int32 nanos = 4; - * - *
-     * Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.
-     * 
- */ - public Builder clearNanos() { - - nanos_ = 0; - onChanged(); - return this; - } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - - // @@protoc_insertion_point(builder_scope:google.type.TimeOfDay) - } - - // @@protoc_insertion_point(class_scope:google.type.TimeOfDay) - private static final com.google.type.TimeOfDay DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.type.TimeOfDay(); - } - - public static com.google.type.TimeOfDay getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public TimeOfDay parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new TimeOfDay(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public com.google.type.TimeOfDay getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-gax/generated/src/main/java/com/google/type/TimeOfDayOrBuilder.java b/gcloud-java-gax/generated/src/main/java/com/google/type/TimeOfDayOrBuilder.java deleted file mode 100644 index d1eda79b5fb0..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/type/TimeOfDayOrBuilder.java +++ /dev/null @@ -1,47 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/type/timeofday.proto - -package com.google.type; - -public interface TimeOfDayOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.type.TimeOfDay) - com.google.protobuf.MessageOrBuilder { - - /** - * optional int32 hours = 1; - * - *
-   * Hours of day in 24 hour format. Should be from 0 to 23. An API may choose
-   * to allow the value "24:00:00" for scenarios like business closing time.
-   * 
- */ - int getHours(); - - /** - * optional int32 minutes = 2; - * - *
-   * Minutes of hour of day. Must be from 0 to 59.
-   * 
- */ - int getMinutes(); - - /** - * optional int32 seconds = 3; - * - *
-   * Seconds of minutes of the time. Must normally be from 0 to 59. An API may
-   * allow the value 60 if it allows leap-seconds.
-   * 
- */ - int getSeconds(); - - /** - * optional int32 nanos = 4; - * - *
-   * Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.
-   * 
- */ - int getNanos(); -} diff --git a/gcloud-java-gax/generated/src/main/java/com/google/type/TimeOfDayProto.java b/gcloud-java-gax/generated/src/main/java/com/google/type/TimeOfDayProto.java deleted file mode 100644 index e995fee5b778..000000000000 --- a/gcloud-java-gax/generated/src/main/java/com/google/type/TimeOfDayProto.java +++ /dev/null @@ -1,52 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/type/timeofday.proto - -package com.google.type; - -public final class TimeOfDayProto { - private TimeOfDayProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - } - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_type_TimeOfDay_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_type_TimeOfDay_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\033google/type/timeofday.proto\022\013google.ty" + - "pe\"K\n\tTimeOfDay\022\r\n\005hours\030\001 \001(\005\022\017\n\007minute" + - "s\030\002 \001(\005\022\017\n\007seconds\030\003 \001(\005\022\r\n\005nanos\030\004 \001(\005B" + - "&\n\017com.google.typeB\016TimeOfDayProtoP\001\240\001\001b" + - "\006proto3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }, assigner); - internal_static_google_type_TimeOfDay_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_type_TimeOfDay_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_type_TimeOfDay_descriptor, - new java.lang.String[] { "Hours", "Minutes", "Seconds", "Nanos", }); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/gcloud-java-gax/pom.xml b/gcloud-java-gax/pom.xml deleted file mode 100644 index 1cbddbab9722..000000000000 --- a/gcloud-java-gax/pom.xml +++ /dev/null @@ -1,101 +0,0 @@ - - - 4.0.0 - gcloud-java-gax - jar - GCloud Api Extensions - - GCloud Api Extensions - - - com.google.gcloud - gcloud-java-pom - 0.1.4-SNAPSHOT - - - gcloud-java-gax - - - - io.grpc - grpc-all - 0.9.0 - - - com.google.auto.value - auto-value - 1.1 - - - com.google.code.findbugs - jsr305 - 3.0.1 - - - junit - junit - 4.12 - test - - - org.mockito - mockito-core - 1.10.19 - test - - - com.google.truth - truth - 0.27 - test - - - - - doclint-java8-disable - - [1.8,) - - - - -Xdoclint:none - - - - - - - org.codehaus.mojo - build-helper-maven-plugin - 1.9.1 - - - generate-sources - add-source - - - generated/src/main/java - - - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 2.10.3 - - - attach-javadocs - - jar - - - ${javadoc.opts} - - - - - - - diff --git a/gcloud-java-gax/src/main/java/io/gapi/gax/grpc/ApiCallable.java b/gcloud-java-gax/src/main/java/io/gapi/gax/grpc/ApiCallable.java deleted file mode 100644 index 2e563a4413d0..000000000000 --- a/gcloud-java-gax/src/main/java/io/gapi/gax/grpc/ApiCallable.java +++ /dev/null @@ -1,391 +0,0 @@ -/* - * Copyright 2015, Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -package io.gapi.gax.grpc; - -import com.google.common.util.concurrent.ListenableFuture; - -import io.grpc.CallOptions; -import io.grpc.Channel; -import io.grpc.ClientCall; -import io.grpc.ExperimentalApi; -import io.grpc.MethodDescriptor; -import io.grpc.MethodDescriptor.MethodType; -import io.grpc.StatusException; -import io.grpc.stub.ClientCalls; -import io.grpc.stub.StreamObserver; - -import java.util.Iterator; -import java.util.concurrent.Executor; - -import javax.annotation.Nullable; - -/** - * A callable is an object which represents one or more rpc calls. Various operators on callables - * produce new callables, representing common API programming patterns. Callables can be used to - * directly operate against an api, or to efficiently implement wrappers for apis which add - * additional functionality and processing. - * - *

Technically, callables are a factory for grpc {@link ClientCall} objects, and can be executed - * by methods of the {@link ClientCalls} class. They also provide shortcuts for direct execution of - * the callable instance. - */ -@ExperimentalApi -public abstract class ApiCallable { - - // TODO(wrwg): Support interceptors and method/call option configurations. - - // Subclass Contract - // ================= - - /** - * Creates a new GRPC call from this callable. A channel may or may not be provided. - * If a channel is not provided, the callable must be bound to a channel. - */ - public abstract ClientCall newCall(@Nullable Channel channel); - - /** - * Return a descriptor for this callable, or null if none available. - */ - @Nullable public CallableDescriptor getDescriptor() { - return null; - } - - /** - * Gets the channel bound to this callable, or null, if none is bound to it. - */ - @Nullable public Channel getBoundChannel() { - return null; - } - - // Binding Callables - // ================= - - /** - * Returns a callable which is bound to the given channel. Operations on the result can - * omit the channel. If a channel is provided anyway, it overrides the bound channel. - */ - public ApiCallable bind(final Channel boundChannel) { - return new ApiCallable() { - @Override - public ClientCall newCall(@Nullable Channel channel) { - if (channel == null) { - // If the caller does not provide a channel, we use the bound one. - channel = boundChannel; - } - return ApiCallable.this.newCall(channel); - } - - @Override - @Nullable - public CallableDescriptor getDescriptor() { - return ApiCallable.this.getDescriptor(); - } - - @Override - @Nullable - public Channel getBoundChannel() { - return boundChannel; - } - }; - } - - // Running Callables - // ================= - - private void requireMethodType(MethodType type) { - MethodType actualType = getDescriptor() != null - ? getDescriptor().getMethodDescriptor().getType() : null; - if (actualType == null || actualType == MethodType.UNKNOWN || actualType.equals(type)) { - return; - } - throw new IllegalArgumentException(String.format( - "Requested method type '%s' differs from actual type '%s'", type, actualType)); - } - - /** - * Convenience method to run a unary callable synchronously. If no channel is provided, - * the callable must be bound to one. - */ - public ResponseT call(@Nullable Channel channel, RequestT request) { - requireMethodType(MethodType.UNARY); - return ClientCalls.blockingUnaryCall(newCall(channel), request); - } - - /** - * Convenience method to run a unary callable synchronously, without channel. Requires a callable - * which is bound to a channel. - */ - public ResponseT call(RequestT request) { - return call(null, request); - } - - /** - * Convenience method to run a unary callable asynchronously. If no channel is provided, - * the callable must be bound to one. - */ - public void asyncCall(@Nullable Channel channel, RequestT request, - StreamObserver responseObserver) { - requireMethodType(MethodType.UNARY); - ClientCalls.asyncUnaryCall(newCall(channel), request, responseObserver); - } - - /** - * Convenience method to run a unary callable asynchronously, without channel. Requires a callable - * which is bound to a channel. - */ - public void asyncCall(RequestT request, StreamObserver responseObserver) { - asyncCall(null, request, responseObserver); - } - - /** - * Convenience method to run a unary callable returning a future. If no channel is provided, - * the callable must be bound to one. - */ - public ListenableFuture futureCall(@Nullable Channel channel, RequestT request) { - requireMethodType(MethodType.UNARY); - return ClientCalls.futureUnaryCall(newCall(channel), request); - } - - /** - * Convenience method to run a unary callable returning a future, without a channel. Requires a - * callable which is bound to a channel. - */ - public ListenableFuture futureCall(RequestT request) { - return futureCall(null, request); - } - - /** - * Convenience method for a blocking server streaming call. If no channel is provided, - * the callable must be bound to one. - * - *

Returns an iterable for the responses. Note the returned iterable can be used only once. - * Returning an Iterator would be more precise, but iterators cannot be used in Java for loops. - */ - public Iterable iterableResponseStreamCall(@Nullable Channel channel, - RequestT request) { - requireMethodType(MethodType.SERVER_STREAMING); - final Iterator result = - ClientCalls.blockingServerStreamingCall(newCall(channel), request); - return new Iterable() { - @Override - public Iterator iterator() { - return result; - } - }; - } - - /** - * Convenience method for a blocking server streaming call, without a channel. Requires a - * callable which is bound to a channel. - * - *

Returns an iterable for the responses. Note the returned iterable can be used only once. - * Returning an Iterator would be more precise, but iterators cannot be used in Java for loops. - */ - public Iterable iterableResponseStreamCall(RequestT request) { - return iterableResponseStreamCall(null, request); - } - - // Creation - // ======== - - /** - * Returns a callable which executes the described method. - * - *

-   *  Response response = Callable.create(SerivceGrpc.CONFIG.myMethod).call(channel, request);
-   * 
- */ - public static ApiCallable - create(MethodDescriptor descriptor) { - return create(CallableDescriptor.create(descriptor)); - } - - /** - * Returns a callable which executes the method described by a {@link CallableDescriptor}. - */ - public static ApiCallable - create(final CallableDescriptor descriptor) { - return new ApiCallable() { - @Override public ClientCall newCall(Channel channel) { - if (channel == null) { - throw new IllegalStateException(String.format( - "unbound callable for method '%s' requires a channel for execution", - descriptor.getMethodDescriptor().getFullMethodName())); - } - return channel.newCall(descriptor.getMethodDescriptor(), CallOptions.DEFAULT); - } - - @Override public CallableDescriptor getDescriptor() { - return descriptor; - } - - @Override public String toString() { - return descriptor.getMethodDescriptor().getFullMethodName(); - } - }; - } - - /** - * Returns a callable which executes the given function asynchronously on each provided - * input. The supplied executor is used for creating tasks for each input. Example: - * - *
-   *  Callable.Transformer<RequestT, ResponseT> transformer = ...;
-   *  Response response = Callable.create(transformer, executor).call(channel, request);
-   * 
- */ - public static ApiCallable - create(Transformer transformer, Executor executor) { - return new TransformingCallable(transformer, executor); - } - - - /** - * Returns a callable which executes the given function immediately on each provided input. - * Similar as {@link #create(Transformer, Executor)} but does not operate asynchronously and does - * not require an executor. - * - *

Note that the callable returned by this method does not respect flow control. Some - * operations applied to it may deadlock because of this. However, it is safe to use this - * callable in the context of a {@link #followedBy(ApiCallable)} operation, which is the major - * use cases for transformers. But if you use a transformer to simulate a real rpc - * you should use {@link #create(Transformer, Executor)} instead. - */ - public static ApiCallable - create(Transformer transformer) { - return new TransformingCallable(transformer, null); - } - - /** - * Interface for a transformer. It can throw a {@link StatusException} to indicate an error. - */ - public interface Transformer { - ResponseT apply(RequestT request) throws StatusException; - } - - /** - * Returns a callable which echos its input. - */ - public static ApiCallable - identity() { - return new TransformingCallable(new Transformer() { - @Override public RequestT apply(RequestT request) throws StatusException { - return request; - } - }, null); - } - - /** - * Returns a callable which always returns the given constant. - */ - public static ApiCallable - constant(final ResponseT result) { - return new TransformingCallable(new Transformer() { - @Override public ResponseT apply(RequestT request) throws StatusException { - return result; - } - }, null); - } - - // Followed-By - // =========== - - /** - * Returns a callable which forwards the responses from this callable as requests into the other - * callable. Works both for unary and streaming operands. Example: - * - *

-   * String bookName = ...;
-   * Callable.Transformer<Book, GetAuthorRequest> bookToGetAuthorRequest = ...;
-   * Author response =
-   *     Callable.create(LibraryGrpc.CONFIG.getBook)
-   *             .followedBy(Callable.create(bookToGetAuthorRequest))
-   *             .followedBy(Callable.create(LibraryGrpc.CONFIG.getAuthor))
-   *             .call(channel, new GetBookRequest().setName(bookName).build());
-   * 
- * - *

For streaming calls, each output of the first callable will be forwarded to the second - * one as it arrives, allowing for streaming pipelines. - */ - public ApiCallable - followedBy(ApiCallable callable) { - return new FollowedByCallable(this, callable); - } - - // Retrying - // ======== - - /** - * Returns a callable which retries using exponential back-off on transient errors. Example: - * - *

-   * Response response = Callable.create(METHOD).retrying().call(channel, request);
-   * 
- * - *

The call will be retried if and only if the returned status code is {@code UNAVAILABLE}. - * - *

No output will be produced until the underlying callable has succeeded. Applied to compound - * callables, this can be used to implement simple transactions supposed the underlying callables - * are either side-effect free or idempotent. - * - *

Note that the retry callable requires to buffer all inputs and outputs of the underlying - * callable, and should be used with care when applied to streaming calls. - */ - public ApiCallable retrying() { - return new RetryingCallable(this); - } - - // Page Streaming - // ============== - - /** - * Returns a callable which streams the resources obtained from a series of calls to a method - * implementing the pagination pattern. Example: - * - *

-   *  for (Resource resource :
-   *       Callable.create(listBooksDescriptor)
-   *               .pageStreaming(pageDescriptor)
-   *               .iterableResponseStreamCall(channel, request)) {
-   *    doSomething(resource);
-   *  }
-   *
- * - *

The returned stream does not buffer results; if it is traversed again, the API will be - * called again. - */ - public ApiCallable - pageStreaming(PageDescriptor pageDescriptor) { - return new PageStreamingCallable(this, pageDescriptor); - } - -} diff --git a/gcloud-java-gax/src/main/java/io/gapi/gax/grpc/CallableDescriptor.java b/gcloud-java-gax/src/main/java/io/gapi/gax/grpc/CallableDescriptor.java deleted file mode 100644 index b2c3a6952e32..000000000000 --- a/gcloud-java-gax/src/main/java/io/gapi/gax/grpc/CallableDescriptor.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright 2015, Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -package io.gapi.gax.grpc; - -import com.google.common.base.Preconditions; - -import io.grpc.ExperimentalApi; -import io.grpc.MethodDescriptor; - -import javax.annotation.Nullable; - -/** - * Describes meta data for a {@link ApiCallable}. - */ -@ExperimentalApi -class CallableDescriptor { - - /** - * Constructs a descriptor from grpc descriptor. - */ - public static CallableDescriptor - create(MethodDescriptor grpcDescriptor) { - return new CallableDescriptor(grpcDescriptor); - } - - private final MethodDescriptor descriptor; - - private CallableDescriptor(MethodDescriptor descriptor) { - this.descriptor = Preconditions.checkNotNull(descriptor); - } - - /** - * Returns the grpc method descriptor. - */ - public MethodDescriptor getMethodDescriptor() { - return descriptor; - } - - /** - * Returns a page descriptor if one is derivable from the callable descriptor, null if not. - * By default, this returns null, but sub-classes may override this. - */ - @Nullable public PageDescriptor - getPageDescriptor(@SuppressWarnings("unused") Class resourceType) { - return null; - } -} diff --git a/gcloud-java-gax/src/main/java/io/gapi/gax/grpc/CompoundClientCall.java b/gcloud-java-gax/src/main/java/io/gapi/gax/grpc/CompoundClientCall.java deleted file mode 100644 index 99b8aaa35fbd..000000000000 --- a/gcloud-java-gax/src/main/java/io/gapi/gax/grpc/CompoundClientCall.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright 2015, Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -package io.gapi.gax.grpc; - -import io.grpc.ClientCall; -import io.grpc.Metadata; -import io.grpc.Status; - -/** - * A helper to implement compound calls which is used for the implementation of other callables in - * this package. This allows to have the listener and call types being implemented from one class, - * which is not possible out-of-the-box because {@link ClientCall} is a class, not an interface. - * (Note that in Java8 ClientCall could be an interface, because it does not has instance data.) - */ -abstract class CompoundClientCall - extends ClientCall { - - private final InnerListener listener = new InnerListener(); - - void onHeaders(@SuppressWarnings("unused") Metadata headers) { - // We typically ignore response headers in compound calls. - } - - abstract void onMessage(InnerResT message); - - abstract void onClose(Status status, Metadata trailers); - - final ClientCall.Listener listener() { - return listener; - } - - class InnerListener extends ClientCall.Listener { - - @Override - public void onHeaders(Metadata headers) { - CompoundClientCall.this.onHeaders(headers); - } - - @Override - public void onMessage(InnerResT message) { - CompoundClientCall.this.onMessage(message); - } - - @Override - public void onClose(Status status, Metadata trailers) { - CompoundClientCall.this.onClose(status, trailers); - } - } -} diff --git a/gcloud-java-gax/src/main/java/io/gapi/gax/grpc/FollowedByCallable.java b/gcloud-java-gax/src/main/java/io/gapi/gax/grpc/FollowedByCallable.java deleted file mode 100644 index 3fe019153c15..000000000000 --- a/gcloud-java-gax/src/main/java/io/gapi/gax/grpc/FollowedByCallable.java +++ /dev/null @@ -1,146 +0,0 @@ -/* - * Copyright 2015, Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -package io.gapi.gax.grpc; - -import io.grpc.Channel; -import io.grpc.ClientCall; -import io.grpc.Metadata; -import io.grpc.Status; - -import javax.annotation.Nullable; - -/** - * Helper type for the implementation of {@link ApiCallable} methods. Please see there first for the - * specification of what this is doing. This class is concerned with the how. - * - *

Implements the followedBy callable, which executes two callables in parallel, piping output - * from the first to the second. - */ -class FollowedByCallable extends ApiCallable { - - private final ApiCallable first; - private final ApiCallable second; - - FollowedByCallable(ApiCallable first, ApiCallable second) { - this.first = first; - this.second = second; - } - - @Override - public String toString() { - return String.format("followedBy(%s, %s)", first, second); - } - - @Override - @Nullable - public Channel getBoundChannel() { - // Inherit a bound channel from operands. - Channel channel = first.getBoundChannel(); - if (channel != null) { - return channel; - } - return second.getBoundChannel(); - } - - @Override - public ClientCall newCall(Channel channel) { - return new FollowedByCall(channel); - } - - /** - * Both calls are started in parallel, and the output from the first is immediately piped as input - * into the second. As we don't know the required input for the second call, we request all output - * from the first as soon as some output for the composite is requested. - */ - private class FollowedByCall extends CompoundClientCall { - - private Channel channel; - private ClientCall firstCall; - private ClientCall secondCall; - private ClientCall.Listener listener; - - private FollowedByCall(Channel channel) { - this.channel = channel; - } - - @Override - public void start(ClientCall.Listener listener, Metadata headers) { - this.listener = listener; - this.firstCall = first.newCall(channel); - this.secondCall = second.newCall(channel); - - // This instance's listener will receive output from the first call. - this.firstCall.start(this.listener(), headers); - - // The ForwardingCallable listener will receive output from the second call. - this.secondCall.start(listener, headers); - } - - @Override - public void request(int numMessages) { - // We don't know how much inputs the second call needs, so we request all what is available. - firstCall.request(Integer.MAX_VALUE); - secondCall.request(numMessages); - } - - @Override - public void cancel() { - firstCall.cancel(); - secondCall.cancel(); - } - - @Override - public void sendMessage(RequestT message) { - firstCall.sendMessage(message); - } - - @Override - public void halfClose() { - firstCall.halfClose(); - } - - @Override - public void onMessage(InterT message) { - secondCall.sendMessage(message); - } - - @Override - public void onClose(Status status, Metadata trailers) { - if (status.isOk()) { - secondCall.halfClose(); - return; - } - secondCall.cancel(); - listener.onClose(status, trailers); - } - } -} diff --git a/gcloud-java-gax/src/main/java/io/gapi/gax/grpc/PageDescriptor.java b/gcloud-java-gax/src/main/java/io/gapi/gax/grpc/PageDescriptor.java deleted file mode 100644 index b8f47957e9db..000000000000 --- a/gcloud-java-gax/src/main/java/io/gapi/gax/grpc/PageDescriptor.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright 2015, Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -package io.gapi.gax.grpc; - -import io.grpc.ExperimentalApi; - -/** - * An interface which describes the paging pattern. - */ -@ExperimentalApi -public interface PageDescriptor { - - /** - * Delivers the empty page token. - */ - Object emptyToken(); - - /** - * Injects a page token into the request. - */ - RequestT injectToken(RequestT payload, Object token); - - /** - * Extracts the next token from the response. Returns the empty token if there are - * no more pages. - */ - Object extractNextToken(ResponseT payload); - - /** - * Extracts an iterable of resources from the response. - */ - Iterable extractResources(ResponseT payload); -} \ No newline at end of file diff --git a/gcloud-java-gax/src/main/java/io/gapi/gax/grpc/PageStreamingCallable.java b/gcloud-java-gax/src/main/java/io/gapi/gax/grpc/PageStreamingCallable.java deleted file mode 100644 index d864ec4fc562..000000000000 --- a/gcloud-java-gax/src/main/java/io/gapi/gax/grpc/PageStreamingCallable.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Copyright 2015, Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -package io.gapi.gax.grpc; - -import com.google.common.base.Preconditions; - -import io.grpc.Channel; -import io.grpc.ClientCall; -import io.grpc.Metadata; -import io.grpc.Status; - -import java.util.concurrent.Semaphore; - -import javax.annotation.Nullable; - -/** - * Helper type for the implementation of {@link ApiCallable} methods. Please see there first for the - * specification of what this is doing. This class is concerned with the how. - * - *

Implementation of the pageStreaming callable. - */ -class PageStreamingCallable extends ApiCallable { - - private final ApiCallable callable; - private final PageDescriptor pageDescriptor; - - - PageStreamingCallable(ApiCallable callable, - PageDescriptor pageDescriptor) { - this.callable = Preconditions.checkNotNull(callable); - this.pageDescriptor = Preconditions.checkNotNull(pageDescriptor); - } - - @Override public String toString() { - return String.format("pageStreaming(%s)", callable.toString()); - } - - @Override - @Nullable - public Channel getBoundChannel() { - return callable.getBoundChannel(); - } - - @Override - public ClientCall newCall(Channel channel) { - return new PageStreamingCall(channel); - } - - /** - * Class which handles both the call logic for the callable and listens to page call responses. - * - *

The implementation uses a semaphore to handle flow control, since the callable level flow - * control via request() doesn't map 1:1 to the page call flow control. The semaphore holds at any - * time the number of requested messages on callable level. Blocking on the semaphore happens - * exclusively in onMessage() calls for pages. Apart of the first page call which is scheduled at - * the time the caller half-closes, all future page calls will be triggered from onMessage() as - * well. This avoids thread safety issues, assuming the ClientCall concurrency contract. - */ - private class PageStreamingCall extends CompoundClientCall { - - private final Channel channel; - private ClientCall.Listener outerListener; - private Metadata headers; - private RequestT request; - private Semaphore requestedSemaphore = new Semaphore(0); - private ClientCall currentCall; - private Object nextPageToken = pageDescriptor.emptyToken(); - private boolean sentClose; - - private PageStreamingCall(Channel channel) { - this.channel = channel; - } - - @Override - public void start(ClientCall.Listener responseListener, Metadata headers) { - this.outerListener = responseListener; - this.headers = headers; - currentCall = callable.newCall(channel); - currentCall.start(listener(), headers); - } - - @Override - public void request(int numMessages) { - requestedSemaphore.release(numMessages); - } - - @Override - public void sendMessage(RequestT request) { - Preconditions.checkState(this.request == null); - this.request = request; - } - - @Override - public void halfClose() { - // Trigger the call for the first page. - requestNextPage(); - } - - @Override - public void cancel() { - currentCall.cancel(); - if (!sentClose) { - outerListener.onClose(Status.CANCELLED, new Metadata()); - } - } - - @SuppressWarnings("unchecked") - private void requestNextPage() { - currentCall.request(1); - currentCall.sendMessage(pageDescriptor.injectToken(request, nextPageToken)); - currentCall.halfClose(); - } - - @Override - public void onMessage(ResponseT response) { - // Extract the token for the next page. If empty, there are no more pages, - // and we set the token to null. - Object token = pageDescriptor.extractNextToken(response); - nextPageToken = token.equals(pageDescriptor.emptyToken()) ? null : token; - - // Deliver as much resources as have been requested. This may block via - // our semaphore, and while we are delivering, more requests may come in. - for (ResourceT resource : pageDescriptor.extractResources(response)) { - try { - requestedSemaphore.acquire(); - } catch (InterruptedException e) { - outerListener.onClose(Status.fromThrowable(e), new Metadata()); - sentClose = true; - currentCall.cancel(); - return; - } - outerListener.onMessage(resource); - } - - // If there is a next page, create a new call and request it. - if (nextPageToken != null) { - currentCall = callable.newCall(channel); - currentCall.start(listener(), headers); - requestNextPage(); - } else { - outerListener.onClose(Status.OK, new Metadata()); - sentClose = true; - } - } - - @Override - public void onClose(Status status, Metadata trailers) { - if (!status.isOk()) { - // If there is an error, propagate it. Otherwise let onMessage determine how to continue. - outerListener.onClose(status, trailers); - sentClose = true; - } - } - } -} - diff --git a/gcloud-java-gax/src/main/java/io/gapi/gax/grpc/RetryingCallable.java b/gcloud-java-gax/src/main/java/io/gapi/gax/grpc/RetryingCallable.java deleted file mode 100644 index d476890c85e9..000000000000 --- a/gcloud-java-gax/src/main/java/io/gapi/gax/grpc/RetryingCallable.java +++ /dev/null @@ -1,197 +0,0 @@ -/* - * Copyright 2015, Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -package io.gapi.gax.grpc; - -import com.google.common.base.Throwables; -import com.google.common.collect.Lists; - -import io.grpc.Channel; -import io.grpc.ClientCall; -import io.grpc.Metadata; -import io.grpc.Status; - -import java.util.List; -import java.util.Random; - -import javax.annotation.Nullable; - -/** - * Helper type for the implementation of {@link ApiCallable} methods. Please see there first for the - * specification of what this is doing. This class is concerned with the how. - * - *

Implementation of the retrying callable. - */ -class RetryingCallable extends ApiCallable { - - // TODO(wgg): make the parameters below configurable. They are currently taken from - // http://en.wikipedia.org/wiki/Exponential_backoff. - - private static final int SLOT_TIME_MILLIS = 2; - private static final int TRUNCATE_AFTER = 10; - private static final int MAX_ATTEMPTS = 16; - private static final Random randomGenerator = new Random(0); - - private final ApiCallable callable; - - RetryingCallable(ApiCallable callable) { - this.callable = callable; - } - - @Override public String toString() { - return String.format("retrying(%s)", callable.toString()); - } - - @Override - @Nullable - public CallableDescriptor getDescriptor() { - return callable.getDescriptor(); - } - - @Override - @Nullable - public Channel getBoundChannel() { - return callable.getBoundChannel(); - } - - @Override public ClientCall newCall(Channel channel) { - return new RetryingCall(channel); - } - - private static boolean canRetry(Status status) { - return status.getCode() == Status.Code.UNAVAILABLE; - } - - /** - * Class implementing the call for retry. - * - *

This remembers all actions from the caller in order to replay the call if needed. No output - * will be produced until the call has successfully ended. Thus this call requires full buffering - * of inputs and outputs, - */ - private class RetryingCall extends CompoundClientCall { - - private final Channel channel; - private ClientCall.Listener listener; - private int requested; - private Metadata requestHeaders; - private final List requestPayloads = Lists.newArrayList(); - private final List responsePayloads = Lists.newArrayList(); - private Metadata responseHeaders; - private int attempt; - private ClientCall currentCall; - - private RetryingCall(Channel channel) { - this.channel = channel; - } - - @Override - public void start(ClientCall.Listener listener, Metadata headers) { - this.listener = listener; - requestHeaders = headers; - currentCall = callable.newCall(channel); - currentCall.start(listener(), headers); - } - - @Override - public void request(int numMessages) { - requested += numMessages; - currentCall.request(numMessages); - } - - @Override - public void cancel() { - currentCall.cancel(); - } - - @Override - public void halfClose() { - currentCall.halfClose(); - } - - @Override - public void sendMessage(RequestT message) { - requestPayloads.add(message); - currentCall.sendMessage(message); - } - - @Override - public void onHeaders(Metadata headers) { - responseHeaders = headers; - } - - @Override - void onMessage(ResponseT message) { - responsePayloads.add(message); - } - - @Override - public void onClose(Status status, Metadata trailers) { - if (status.isOk() || !canRetry(status) || attempt >= MAX_ATTEMPTS) { - // Call succeeded or failed non-transiently or failed too often; feed underlying listener - // with the result. - if (status.isOk()) { - if (responseHeaders != null) { - listener.onHeaders(responseHeaders); - } - for (ResponseT response : responsePayloads) { - listener.onMessage(response); - } - } - listener.onClose(status, trailers); - return; - } - - // Sleep using duration calculated by exponential backoff algorithm. - attempt++; - int slots = 1 << (attempt - 1 > TRUNCATE_AFTER ? TRUNCATE_AFTER : attempt - 1); - int slot = randomGenerator.nextInt(slots); - if (slot > 0) { - try { - Thread.sleep(SLOT_TIME_MILLIS * slot); - } catch (InterruptedException e) { - throw Throwables.propagate(e); - } - } - - // Start call again. - responseHeaders = null; - responsePayloads.clear(); - currentCall = callable.newCall(channel); - currentCall.start(listener(), requestHeaders); - currentCall.request(requested); - for (RequestT request : requestPayloads) { - currentCall.sendMessage(request); - } - currentCall.halfClose(); - } - } -} diff --git a/gcloud-java-gax/src/main/java/io/gapi/gax/grpc/ServiceApiSettings.java b/gcloud-java-gax/src/main/java/io/gapi/gax/grpc/ServiceApiSettings.java deleted file mode 100644 index eb3ca2b7a9d9..000000000000 --- a/gcloud-java-gax/src/main/java/io/gapi/gax/grpc/ServiceApiSettings.java +++ /dev/null @@ -1,125 +0,0 @@ -/* - * Copyright 2015, Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -package io.gapi.gax.grpc; - -import com.google.auth.Credentials; - -import io.grpc.ManagedChannel; - -/** - * A settings class to configure a service api class. - */ -public class ServiceApiSettings { - private boolean isIdempotentRetrying; - - private Credentials credentials; - - private String serviceAddress; - private int port; - - private ManagedChannel channel; - - public ServiceApiSettings() { - isIdempotentRetrying = true; - credentials = null; - serviceAddress = null; - port = 0; - } - - /** - * Set to true in order to have the service retry all idempotent methods, - * set to false otherwise. The default is true. This setting generally translates to - * doing retries for calls which perform gets, deletes, and updates, but not calls which - * perform creates. - */ - public ServiceApiSettings setIsIdempotentRetrying(boolean isIdempotentRetrying) { - this.isIdempotentRetrying = isIdempotentRetrying; - return this; - } - - public boolean getIsIdempotentRetrying() { - return isIdempotentRetrying; - } - - /** - * Sets the credentials to use in order to call the service. The default is to acquire - * the credentials using GoogleCredentials.getApplicationDefault(). These credentials - * will not be used if the channel is set. - */ - public ServiceApiSettings setCredentials(Credentials credentials) { - this.credentials = credentials; - return this; - } - - public Credentials getCredentials() { - return credentials; - } - - /** - * The path used to reach the service. This value will not be used if the channel is set. - */ - public ServiceApiSettings setServiceAddress(String serviceAddress) { - this.serviceAddress = serviceAddress; - return this; - } - - public String getServiceAddress() { - return serviceAddress; - } - - /** - * The port used to reach the service. This value will not be used if the channel is set. - */ - public ServiceApiSettings setPort(int port) { - this.port = port; - return this; - } - - public int getPort() { - return port; - } - - /** - * The channel used to send requests to the service. Whichever service api class that - * this instance of ServiceApiSettings is passed to will call shutdown() on this - * channel. This injection mechanism is intended for use by unit tests to override - * the channel that would be created by default for real calls to the service. - */ - public ServiceApiSettings setChannel(ManagedChannel channel) { - this.channel = channel; - return this; - } - - public ManagedChannel getChannel() { - return channel; - } -} diff --git a/gcloud-java-gax/src/main/java/io/gapi/gax/grpc/TransformingCallable.java b/gcloud-java-gax/src/main/java/io/gapi/gax/grpc/TransformingCallable.java deleted file mode 100644 index 507194a50688..000000000000 --- a/gcloud-java-gax/src/main/java/io/gapi/gax/grpc/TransformingCallable.java +++ /dev/null @@ -1,171 +0,0 @@ -/* - * Copyright 2015, Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -package io.gapi.gax.grpc; - -import com.google.common.base.Preconditions; -import com.google.common.base.Throwables; - -import io.grpc.Channel; -import io.grpc.ClientCall; -import io.grpc.Metadata; -import io.grpc.Status; -import io.grpc.StatusException; -import io.grpc.internal.SerializingExecutor; - -import java.util.concurrent.Executor; -import java.util.concurrent.Semaphore; - -import javax.annotation.Nullable; - -/** - * Helper type for the implementation of {@link ApiCallable} methods. Please see there first for the - * specification of what this is doing. This class is concerned with the how. - * - *

Implements the transform callable, which executes a function to produce a stream of responses - * from a stream of requests. - */ -class TransformingCallable extends ApiCallable { - - private final Transformer transformer; - @Nullable private final Executor executor; - - TransformingCallable(Transformer transformer, - Executor executor) { - this.transformer = Preconditions.checkNotNull(transformer); - this.executor = executor; - } - - @Override - public String toString() { - return "transforming(...)"; - } - - @Override - public ClientCall newCall(Channel channel) { - return new TransformCall(); - } - - /** - * Implements the transforming call. If an executor is provided, delivery of results will - * happen asynchronously and flow control is respected. If not, results will be delivered - * to the listener immediately on sendMessage(). This violates the ClientCall contract as - * methods on Call are supposed to be non-blocking, whereas methods on Listener can block. - * In most practical cases, this should not matter (see also high-level documentation in - * Callable). - * - *

Note that this class does not need to be thread-safe since (a) the contract for - * ClientCall does not require thread-safeness (b) we use a SerializingExecutor for - * asynchronous callbacks which is guaranteed to run not more than one thread. - */ - private class TransformCall extends ClientCall { - - private final SerializingExecutor callExecutor = - executor == null ? null : new SerializingExecutor(executor); - private final Semaphore semaphore = new Semaphore(0); - private ClientCall.Listener listener; - private boolean sentClose; - - @Override - public void start(ClientCall.Listener listener, Metadata headers) { - this.listener = listener; - } - - @Override - public void request(int numMessages) { - if (callExecutor != null) { - semaphore.release(numMessages); - } - } - - @Override - public void cancel() { - if (!sentClose) { - listener.onClose(Status.CANCELLED, new Metadata()); - sentClose = true; - } - } - - @Override - public void sendMessage(final RequestT message) { - if (callExecutor == null) { - doSend(message); - return; - } - callExecutor.execute(new Runnable() { - @Override public void run() { - try { - semaphore.acquire(); - doSend(message); - } catch (Throwable t) { - cancel(); - throw Throwables.propagate(t); - } - } - }); - } - - @SuppressWarnings("deprecation") // e.getStatus() - private void doSend(RequestT message) { - try { - listener.onMessage(transformer.apply(message)); - } catch (StatusException e) { - sentClose = true; - listener.onClose(e.getStatus(), new Metadata()); - } catch (Throwable t) { - // TODO(wgg): should we throw anything else here, or catch like below? Catching might - // be an issue for debugging. - sentClose = true; - listener.onClose(Status.fromThrowable(t), new Metadata()); - } - } - - @Override - public void halfClose() { - if (callExecutor == null) { - doClose(); - return; - } - callExecutor.execute(new Runnable() { - @Override public void run() { - doClose(); - } - }); - } - - private void doClose() { - if (!sentClose) { - sentClose = true; - listener.onClose(Status.OK, new Metadata()); - } - } - } -} diff --git a/gcloud-java-gax/src/main/java/io/gapi/gax/internal/ApiUtils.java b/gcloud-java-gax/src/main/java/io/gapi/gax/internal/ApiUtils.java deleted file mode 100644 index 3327db0c0211..000000000000 --- a/gcloud-java-gax/src/main/java/io/gapi/gax/internal/ApiUtils.java +++ /dev/null @@ -1,127 +0,0 @@ -/* - * Copyright 2015, Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -package io.gapi.gax.internal; - -import com.google.auth.Credentials; -import com.google.auth.oauth2.GoogleCredentials; -import com.google.common.collect.Lists; - -import io.gapi.gax.grpc.ApiCallable; -import io.gapi.gax.grpc.ServiceApiSettings; -import io.grpc.ClientInterceptor; -import io.grpc.ManagedChannel; -import io.grpc.auth.ClientAuthInterceptor; -import io.grpc.netty.NegotiationType; -import io.grpc.netty.NettyChannelBuilder; - -import java.io.IOException; -import java.util.Arrays; -import java.util.List; -import java.util.concurrent.Executors; - -public class ApiUtils { - - // TODO(wgg): make this configurable - private static final int AUTH_THREADS = 4; - - public static ApiCallable prepareIdempotentCallable( - ApiCallable callable, ServiceApiSettings settings) { - ApiCallable theCallable = callable; - if (settings.getIsIdempotentRetrying()) { - theCallable = theCallable.retrying(); - } - return theCallable; - } - - /** - * Acquires application-default credentials, applying the given scopes if the - * credentials require scopes. - */ - public static Credentials credentialsWithScopes(String scopes[]) throws IOException { - List scopeList = Arrays.asList(scopes); - GoogleCredentials credentials = GoogleCredentials.getApplicationDefault(); - if (credentials.createScopedRequired()) { - credentials = credentials.createScoped(scopeList); - } - return credentials; - } - - /** - * Creates a channel for the given address, port, and credentials. - */ - public static ManagedChannel createChannel(String address, int port, Credentials credentials) - throws IOException { - List interceptors = Lists.newArrayList(); - //TODO: MIGRATION interceptors.add(ChannelFactory.authorityInterceptor(address)); - - interceptors.add(new ClientAuthInterceptor(credentials, - Executors.newFixedThreadPool(AUTH_THREADS))); - - return NettyChannelBuilder - .forAddress(address, port) - .negotiationType(NegotiationType.TLS) - .intercept(interceptors) - .build(); - } - - /** - * Creates a new instance of ServiceApiSettings with all fields populated, using - * the given defaults if the corresponding values are not set on ServiceApiSettings. - */ - public static ServiceApiSettings populateSettings(ServiceApiSettings settings, - String defaultServiceAddress, int defaultServicePort, String scopes[]) throws IOException { - ManagedChannel channel = settings.getChannel(); - - if (channel == null) { - String servicePath = settings.getServiceAddress(); - if (servicePath == null) { - servicePath = defaultServiceAddress; - } - - int port = settings.getPort(); - if (port == 0) { - port = defaultServicePort; - } - - Credentials credentials = settings.getCredentials(); - if (credentials == null) { - credentials = credentialsWithScopes(scopes); - } - - channel = ApiUtils.createChannel(servicePath, port, credentials); - } - - return new ServiceApiSettings() - .setChannel(channel) - .setIsIdempotentRetrying(settings.getIsIdempotentRetrying()); - } -} diff --git a/gcloud-java-gax/src/main/java/io/gapi/gax/protobuf/PathTemplate.java b/gcloud-java-gax/src/main/java/io/gapi/gax/protobuf/PathTemplate.java deleted file mode 100644 index a20c2b6a1f10..000000000000 --- a/gcloud-java-gax/src/main/java/io/gapi/gax/protobuf/PathTemplate.java +++ /dev/null @@ -1,881 +0,0 @@ -package io.gapi.gax.protobuf; - -import com.google.auto.value.AutoValue; -import com.google.common.annotations.Beta; -import com.google.common.base.Splitter; -import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableMap; -import com.google.common.collect.Lists; -import com.google.common.collect.Maps; - -import java.io.UnsupportedEncodingException; -import java.net.URLDecoder; -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; -import java.util.List; -import java.util.ListIterator; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -import javax.annotation.Nullable; - -/** - * Represents a path template. - * - *

Templates use the syntax of the API platform; see the protobuf of {@link HttpRule} for - * details. A template consists of a sequence of literals, wildcards, and variable bindings, - * where each binding can have a sub-path. A string representation can be parsed into an - * instance of {@link PathTemplate}, which can then be used to perform matching and instantiation. - * - *

Matching and instantiation deals with unescaping and escaping using URL encoding rules. For - * example, if a template variable for a single segment is instantiated with a string like - * {@code "a/b"}, the slash will be escaped to {@code "%2f"}. (Note that slash will not be escaped - * for a multiple-segment variable, but other characters will). The literals in the template - * itself are not escaped automatically, and must be already URL encoded. - * - *

Here is an example for a template using simple variables: - *

- *   PathTemplate template = PathTemplate.create("v1/shelves/{shelf}/books/{book}");
- *   assert template.match("v2/shelves"} == false
- *   Map<String, String> values = template.match("v1/shelves/s1/books/b1");
- *   assert values.equals(ImmutableMap.of("shelf", s1", "book", "b1");
- *   assert template.instantiate(values).equals("v1/shelves/s1/books/b1");
- * 
- * - * Templates can use variables which match sub-paths. Example: - *
- *   PathTemplate template = PathTemplate.create("v1/{name=shelves/*/books/*}"};
- *   assert template.match("v1/shelves/books/b1") == null;
- *   assert template.match("v1/shelves/s1/books/b1")
- *                  .equals(ImmutableMap.of("name", "shelves/s1/books/b1"));
- * 
- * - * Path templates can also be used with only wildcards. Each wildcard is associated - * with an implicit variable {@code $n}, where n is the zero-based position of the - * wildcard. Example: - *
- *   PathTemplate template = PathTemplate.create("shelves/*/books/*"};
- *   assert template.match("shelves/books/b1") == null;
- *   Map<String, String> values = template.match("v1/shelves/s1/books/b1");
- *   assert values.equals(ImmutableMap.of("$0", s1", "$1", "b1");
- * 
- * - * Paths input to matching can use URL relative syntax to indicate a host name by prefixing the - * host name, as in {@code //somewhere.io/some/path}. The host name is matched into the special - * variable {@link #HOSTNAME_VAR}. Patterns are agnostic about host names, and the same pattern - * can be used for URL relative syntax and simple path syntax: - *
- *   PathTemplate template = PathTemplate.create("shelves/*"};
- *   assert template.match("//somewhere.io/shelves/s1")
- *                  .equals(ImmutableMap.of(PathTemplate.HOSTNAME_VAR, "//somewhere.io",
- *                                          "$0", "s1"));
- *   assert template.match("shelves/s1")
- *                  .equals(ImmutableMap.of("$0", "s1"));
- * 
- * - * For the representation of a resource name see {@link ResourceName}, which is based - * on path templates. - */ -@Beta -public class PathTemplate { - - /** - * A constant identifying the special variable used for endpoint bindings in - * the result of {@link #matchFromFullName(String)}. - */ - public static final String HOSTNAME_VAR = "$hostname"; - - // A regexp to match a custom verb at the end of a path. - private static final Pattern CUSTOM_VERB_PATTERN = Pattern.compile(":([^/*}{=]+)$"); - - // A splitter on slash. - private static final Splitter SLASH_SPLITTER = Splitter.on('/').trimResults(); - - // Helper Types - // ============ - - /** - * Specifies a path segment kind. - */ - enum SegmentKind { - /** A literal path segment. */ - LITERAL, - - /** A custom verb. Can only appear at the end of path. */ - CUSTOM_VERB, - - /** A simple wildcard ('*'). */ - WILDCARD, - - /** A path wildcard ('**'). */ - PATH_WILDCARD, - - /** A field binding start. */ - BINDING, - - /** A field binding end. */ - END_BINDING, - } - - /** - * Specifies a path segment. - */ - @AutoValue - abstract static class Segment { - - /** - * A constant for the WILDCARD segment. - */ - private static final Segment WILDCARD = create(SegmentKind.WILDCARD, "*"); - - /** - * A constant for the PATH_WILDCARD segment. - */ - private static final Segment PATH_WILDCARD = create(SegmentKind.PATH_WILDCARD, "**"); - - /** - * A constant for the END_BINDING segment. - */ - private static final Segment END_BINDING = create(SegmentKind.END_BINDING, ""); - - /** - * Creates a segment of given kind and value. - */ - private static Segment create(SegmentKind kind, String value) { - return new AutoValue_PathTemplate_Segment(kind, value); - } - - /** - * The path segment kind. - */ - abstract SegmentKind kind(); - - /** - * The value for the segment. For literals, custom verbs, and wildcards, this reflects the value - * as it appears in the template. For bindings, this represents the variable of the binding. - */ - abstract String value(); - - /** - * Returns true of this segment is one of the wildcards, - */ - boolean isAnyWildcard() { - return kind() == SegmentKind.WILDCARD || kind() == SegmentKind.PATH_WILDCARD; - } - - String separator() { - switch (kind()) { - case CUSTOM_VERB: - return ":"; - case END_BINDING: - return ""; - default: - return "/"; - } - } - } - - /** - * Creates a path template from a string. The string must satisfy the syntax - * of path templates of the API platform; see {@link HttpRule}'s proto source. - * - * @throws ValidationException if there are errors while parsing the template. - */ - public static PathTemplate create(String template) { - return new PathTemplate(parseTemplate(template)); - } - - // Instance State and Methods - // ========================== - - // List of segments of this template. - private final ImmutableList segments; - - // Map from variable names to bindings in the template. - private final ImmutableMap bindings; - - private PathTemplate(Iterable segments) { - this.segments = ImmutableList.copyOf(segments); - if (this.segments.isEmpty()) { - throw new ValidationException("template cannot be empty."); - } - Map bindings = Maps.newLinkedHashMap(); - for (Segment seg : this.segments) { - if (seg.kind() == SegmentKind.BINDING) { - if (bindings.containsKey(seg.value())) { - throw new ValidationException("Duplicate binding '%s'", seg.value()); - } - bindings.put(seg.value(), seg); - } - } - this.bindings = ImmutableMap.copyOf(bindings); - } - - /** - * Returns the set of variable names used in the template. - */ - public Set vars() { - return bindings.keySet(); - } - - /** - * Returns a template for the parent of this template. - * - * @throws ValidationException if the template has no parent. - */ - public PathTemplate parentTemplate() { - int i = segments.size(); - Segment seg = segments.get(--i); - if (seg.kind() == SegmentKind.END_BINDING) { - while (i > 0 && segments.get(--i).kind() != SegmentKind.BINDING) {} - } - if (i == 0) { - throw new ValidationException("template does not have a parent"); - } - return new PathTemplate(segments.subList(0, i)); - } - - /** - * Returns a template where all variable bindings have been replaced by wildcards, but - * which is equivalent regards matching to this one. - */ - public PathTemplate withoutVars() { - StringBuilder result = new StringBuilder(); - ListIterator iterator = segments.listIterator(); - boolean start = true; - while (iterator.hasNext()) { - Segment seg = iterator.next(); - switch (seg.kind()) { - case BINDING: - case END_BINDING: - break; - default: - if (!start) { - result.append(seg.separator()); - } else { - start = false; - } - result.append(seg.value()); - } - } - return create(result.toString()); - } - - /** - * Returns a path template for the sub-path of the given variable. Example: - * - *
-   *   PathTemplate template = PathTemplate.create("v1/{name=shelves/*/books/*}");
-   *   assert template.subTemplate("name").toString().equals("shelves/*/books/*");
-   * 
- * - * The returned template will never have named variables, but only wildcards, which are - * dealt with in matching and instantiation using '$n'-variables. See the documentation of - * {@link #match(String)} and {@link #instantiate(Map)}, respectively. - * - *

For a variable which has no sub-path, this returns a path template with a single wildcard - * ('*'). - * - * @throws ValidationException if the variable does not exist in the template. - */ - public PathTemplate subTemplate(String varName) { - List sub = Lists.newArrayList(); - boolean inBinding = false; - for (Segment seg : segments) { - if (seg.kind() == SegmentKind.BINDING && seg.value().equals(varName)) { - inBinding = true; - } else if (inBinding) { - if (seg.kind() == SegmentKind.END_BINDING) { - return PathTemplate.create(toSyntax(sub, true)); - } else { - sub.add(seg); - } - } - } - throw new ValidationException("Variable '%s' is undefined in template '%s'", - varName, this.toRawString()); - } - - /** - * Returns true of this template ends with a literal. - */ - public boolean endsWithLiteral() { - return segments.get(segments.size() - 1).kind() == SegmentKind.LITERAL; - } - - /** - * Returns true of this template ends with a custom verb. - */ - public boolean endsWithCustomVerb() { - return segments.get(segments.size() - 1).kind() == SegmentKind.CUSTOM_VERB; - } - - /** - * Creates a resource name from this template and a path. - * - * @throws ValidationException if the path does not match the template. - */ - public ResourceName parse(String path) { - return ResourceName.create(this, path); - } - - /** - * Returns the name of a singleton variable used by this template. If the template does not - * contain a single variable, returns null. - */ - @Nullable - public String singleVar() { - if (bindings.size() == 1) { - return bindings.entrySet().iterator().next().getKey(); - } - return null; - } - - // Template Matching - // ================= - - /** - * Returns true if the template matches the path. - */ - public boolean matches(String path) { - return match(path) != null; - } - - /** - * Matches the path, returning a map from variable names to matched values. All matched values - * will be properly unescaped using URL encoding rules. If the path does not match the template, - * null is returned. - * - * If the path starts with '//', the first segment will be interpreted as a host name and stored - * in the variable {@link #HOSTNAME_VAR}. - * - *

See the {@link PathTemplate} class documentation for examples. - * - *

For free wildcards in the template, the matching process creates variables named '$n', - * where 'n' is the wildcard's position in the template (starting at n=0). For example: - * - *

-   *   PathTemplate template = PathTemplate.create("shelves/*/books/*");
-   *   assert template.match("shelves/s1/books/b2")
-   *              .equals(ImmutableMap.of("$0", "s1", "$1", "b1"));
-   *   assert template.match("//somewhere.io/shelves/s1/books/b2")
-   *              .equals(ImmutableMap.of(HOSTNAME_VAR, "//somewhere.io", "$0", "s1", "$1", "b1"));
-   * 
- * - * All matched values will be properly unescaped using URL encoding rules. - */ - @Nullable - public ImmutableMap match(String path) { - return match(path, false); - } - - /** - * Matches the path, where the first segment is interpreted as the host name regardless of - * whether it starts with '//' or not. Example: - * - *
-   *   assert template("{name=shelves/*}").matchFromFullName("somewhere.io/shelves/s1")
-   *            .equals(ImmutableMap.of(HOSTNAME_VAR, "somewhere.io", "name", "shelves/s1"));
-   * 
- */ - @Nullable - public ImmutableMap matchFromFullName(String path) { - return match(path, true); - } - - // Matches a path. - private ImmutableMap match(String path, boolean forceHostName) { - // Quick check for trailing custom verb. - Segment last = segments.get(segments.size() - 1); - if (last.kind() == SegmentKind.CUSTOM_VERB) { - Matcher matcher = CUSTOM_VERB_PATTERN.matcher(path); - if (!matcher.find() || !decodeUrl(matcher.group(1)).equals(last.value())) { - return null; - } - path = path.substring(0, matcher.start(0)); - } - - // Do full match. - boolean withHostName = path.startsWith("//"); - if (withHostName) { - path = path.substring(2); - } - List input = SLASH_SPLITTER.splitToList(path); - int inPos = 0; - Map values = Maps.newLinkedHashMap(); - if (withHostName || forceHostName) { - if (input.isEmpty()) { - return null; - } - String hostName = input.get(inPos++); - if (withHostName) { - // Put the // back, so we can distinguish this case from forceHostName. - hostName = "//" + hostName; - } - values.put(HOSTNAME_VAR, hostName); - } - if (!match(input, inPos, segments, 0, values)) { - return null; - } - return ImmutableMap.copyOf(values); - } - - // Tries to match the input based on the segments at given positions. Returns a boolean - // indicating whether the match was successful. - private static boolean match(List input, int inPos, List segments, int segPos, - Map values) { - String currentVar = null; - while (segPos < segments.size()) { - Segment seg = segments.get(segPos++); - switch (seg.kind()) { - case END_BINDING: - // End current variable binding scope. - currentVar = null; - continue; - case BINDING: - // Start variable binding scope. - currentVar = seg.value(); - continue; - default: - if (inPos >= input.size()) { - // End of input - return false; - } - // Check literal match. - String next = decodeUrl(input.get(inPos++)); - if (seg.kind() == SegmentKind.LITERAL) { - if (!seg.value().equals(next)) { - // Literal does not match. - return false; - } - } - if (currentVar != null) { - // Create or extend current match - String current = values.get(currentVar); - if (current == null) { - values.put(currentVar, next); - } else { - values.put(currentVar, current + "/" + next); - } - } - if (seg.kind() == SegmentKind.PATH_WILDCARD) { - // Compute the number of additional input the ** can consume. This - // is possible because we restrict patterns to have only one **. - int segsToMatch = 0; - for (int i = segPos; i < segments.size(); i++) { - switch (segments.get(i).kind()) { - case BINDING: - case END_BINDING: - // skip - continue; - default: - segsToMatch++; - } - } - int available = (input.size() - inPos) - segsToMatch; - while (available-- > 0) { - values.put(currentVar, values.get(currentVar) + "/" + decodeUrl(input.get(inPos++))); - } - } - } - } - return inPos == input.size(); - } - - // Template Instantiation - // ====================== - - /** - * Instantiate the template based on the given variable assignment. Performs proper - * URL escaping of variable assignments. - * - *

Note that free wildcards in the template must have bindings of '$n' variables, where - * 'n' is the position of the wildcard (starting at 0). See the documentation of - * {@link #match(String)} for details. - * - * @throws ValidationException if a variable occurs in the template without a binding. - */ - public String instantiate(Map values) { - return instantiate(values, false); - } - - /** - * Shortcut for {@link #instantiate(Map)} with a vararg parameter for keys and values. - */ - public String instantiate(String... keysAndValues) { - ImmutableMap.Builder builder = ImmutableMap.builder(); - for (int i = 0; i < keysAndValues.length; i += 2) { - builder.put(keysAndValues[i], keysAndValues[i + 1]); - } - return instantiate(builder.build()); - } - - /** - * Same like {@link #instantiate(Map)} but allows for unbound variables, which are - * substituted using their original syntax. Example: - * - *

-   *   PathTemplate template = PathTemplate.create("v1/shelves/{shelf}/books/{book}");
-   *   assert template.instantiatePartial(ImmutableMap.of("shelf", "s1"))
-   *             .equals("v1/shelves/s1/books/{book}");
-   * 
- * - * The result of this call can be used to create a new template. - */ - public String instantiatePartial(Map values) { - return instantiate(values, true); - } - - private String instantiate(Map values, boolean allowPartial) { - StringBuilder result = new StringBuilder(); - if (values.containsKey(HOSTNAME_VAR)) { - result.append(values.get(HOSTNAME_VAR)); - result.append('/'); - } - boolean continueLast = true; // Whether to not append separator - boolean skip = false; // Whether we are substituting a binding and segments shall be skipped. - ListIterator iterator = segments.listIterator(); - while (iterator.hasNext()) { - Segment seg = iterator.next(); - if (!skip && !continueLast) { - result.append(seg.separator()); - } - continueLast = false; - switch (seg.kind()) { - case BINDING: - String var = seg.value(); - String value = values.get(seg.value()); - if (value == null) { - if (!allowPartial) { - throw new ValidationException("Unbound variable '%s'. Bindings: %s", - var, values); - } - // Append pattern to output - if (var.startsWith("$")) { - // Eliminate positional variable. - result.append(iterator.next().value()); - iterator.next(); - continue; - } - result.append('{'); - result.append(seg.value()); - result.append('='); - continueLast = true; - continue; - } - Segment next = iterator.next(); - Segment nextNext = iterator.next(); - boolean pathEscape = next.kind() == SegmentKind.PATH_WILDCARD - || nextNext.kind() != SegmentKind.END_BINDING; - restore(iterator, iterator.nextIndex() - 2); - if (!pathEscape) { - result.append(encodeUrl(value)); - } else { - // For a path wildcard or path of length greater 1, split the value and escape - // every sub-segment. - boolean first = true; - for (String subSeg : SLASH_SPLITTER.split(value)) { - if (!first) { - result.append('/'); - } - first = false; - result.append(encodeUrl(subSeg)); - } - } - skip = true; - continue; - case END_BINDING: - if (!skip) { - result.append('}'); - } - skip = false; - continue; - default: - if (!skip) { - result.append(seg.value()); - } - } - } - return result.toString(); - } - - // Positional Matching and Instantiation - // ===================================== - - /** - * Instantiates the template from the given positional parameters. The template must not be build - * from named bindings, but only contain wildcards. Each parameter position corresponds to a - * wildcard of the according position in the template. - */ - public String encode(String... values) { - ImmutableMap.Builder builder = ImmutableMap.builder(); - int i = 0; - for (String value : values) { - builder.put("$" + i++, value); - } - // We will get an error if there are named bindings which are not reached by values. - return instantiate(builder.build()); - } - - /** - * Matches the template into a list of positional values. The template must not be build from - * named bindings, but only contain wildcards. For each wildcard in the template, a value - * is returned at corresponding position in the list. - */ - public List decode(String path) { - Map match = match(path); - if (match == null) { - throw new IllegalArgumentException(String.format("template '%s' does not match '%s'", - this, path)); - } - List result = Lists.newArrayList(); - for (Map.Entry entry : match.entrySet()) { - String key = entry.getKey(); - if (!key.startsWith("$")) { - throw new IllegalArgumentException("template must not contain named bindings"); - } - int i = Integer.parseInt(key.substring(1)); - while (result.size() <= i) { - result.add(""); - } - result.set(i, entry.getValue()); - } - return ImmutableList.copyOf(result); - } - - // Template Parsing - // ================ - - private static ImmutableList parseTemplate(String template) { - // Skip useless leading slash. - if (template.startsWith("/")) { - template = template.substring(1); - } - - // Extract trailing custom verb. - Matcher matcher = CUSTOM_VERB_PATTERN.matcher(template); - String customVerb = null; - if (matcher.find()) { - customVerb = matcher.group(1); - template = template.substring(0, matcher.start(0)); - } - - ImmutableList.Builder builder = ImmutableList.builder(); - String varName = null; - int freeWildcardCounter = 0; - int pathWildCardBound = 0; - - for (String seg : Splitter.on('/').trimResults().split(template)) { - // If segment starts with '{', a binding group starts. - boolean bindingStarts = seg.startsWith("{"); - boolean implicitWildcard = false; - if (bindingStarts) { - if (varName != null) { - throw new ValidationException("parse error: nested binding in '%s'", template); - } - seg = seg.substring(1); - - int i = seg.indexOf('='); - if (i <= 0) { - // Possibly looking at something like "{name}" with implicit wildcard. - if (seg.endsWith("}")) { - // Remember to add an implicit wildcard later. - implicitWildcard = true; - varName = seg.substring(0, seg.length() - 1).trim(); - seg = seg.substring(seg.length() - 1).trim(); - } else { - throw new ValidationException("parse error: invalid binding syntax in '%s'", template); - } - } else { - // Looking at something like "{name=wildcard}". - varName = seg.substring(0, i).trim(); - seg = seg.substring(i + 1).trim(); - } - builder.add(Segment.create(SegmentKind.BINDING, varName)); - } - - // If segment ends with '}', a binding group ends. Remove the brace and remember. - boolean bindingEnds = seg.endsWith("}"); - if (bindingEnds) { - seg = seg.substring(0, seg.length() - 1).trim(); - } - - // Process the segment, after stripping off "{name=.." and "..}". - switch (seg) { - case "**": - case "*": - if ("**".equals(seg)) { - pathWildCardBound++; - } - Segment wildcard = seg.length() == 2 ? Segment.PATH_WILDCARD : Segment.WILDCARD; - if (varName == null) { - // Not in a binding, turn wildcard into implicit binding. - // "*" => "{$n=*}" - builder.add(Segment.create(SegmentKind.BINDING, "$" + freeWildcardCounter)); - freeWildcardCounter++; - builder.add(wildcard); - builder.add(Segment.END_BINDING); - } else { - builder.add(wildcard); - } - break; - case "": - if (!bindingEnds) { - throw new ValidationException("parse error: empty segment not allowed in '%s'", - template); - } - // If the wildcard is implicit, seg will be empty. Just continue. - break; - default: - builder.add(Segment.create(SegmentKind.LITERAL, seg)); - } - - // End a binding. - if (bindingEnds) { - // Reset varName to null for next binding. - varName = null; - - if (implicitWildcard) { - // Looking at something like "{var}". Insert an implicit wildcard, as it is the same - // as "{var=*}". - builder.add(Segment.WILDCARD); - } - builder.add(Segment.END_BINDING); - } - - if (pathWildCardBound > 1) { - // Report restriction on number of '**' in the pattern. There can be only one, which - // enables non-backtracking based matching. - throw new ValidationException( - "parse error: pattern must not contain more than one path wildcard ('**') in '%s'", - template); - } - - } - - if (customVerb != null) { - builder.add(Segment.create(SegmentKind.CUSTOM_VERB, customVerb)); - } - return builder.build(); - } - - // Helpers - // ======= - - private static String encodeUrl(String text) { - try { - return URLEncoder.encode(text, StandardCharsets.UTF_8.name()); - } catch (UnsupportedEncodingException e) { - throw new ValidationException("UTF-8 encoding is not supported on this platform"); - } - } - - private static String decodeUrl(String url) { - try { - return URLDecoder.decode(url, StandardCharsets.UTF_8.name()); - } catch (UnsupportedEncodingException e) { - throw new ValidationException("UTF-8 encoding is not supported on this platform"); - } - } - - // Checks for the given segments kind. On success, consumes them. Otherwise leaves - // the list iterator in its state. - private static boolean peek(ListIterator segments, SegmentKind... kinds) { - int start = segments.nextIndex(); - boolean success = false; - for (SegmentKind kind : kinds) { - if (!segments.hasNext() || segments.next().kind() != kind) { - success = false; - break; - } - } - if (success) { - return true; - } - restore(segments, start); - return false; - } - - // Restores a list iterator back to a given index. - private static void restore(ListIterator segments, int index) { - while (segments.nextIndex() > index) { - segments.previous(); - } - } - - // Equality and String Conversion - // ============================== - - /** - * Returns a pretty version of the template as a string. - */ - @Override - public String toString() { - return toSyntax(segments, true); - } - - /** - * Returns a raw version of the template as a string. This renders the template in its - * internal, normalized form. - */ - public String toRawString() { - return toSyntax(segments, false); - } - - private static String toSyntax(List segments, boolean pretty) { - StringBuilder result = new StringBuilder(); - boolean continueLast = true; // if true, no slash is appended. - ListIterator iterator = segments.listIterator(); - while (iterator.hasNext()) { - Segment seg = iterator.next(); - if (!continueLast) { - result.append(seg.separator()); - } - continueLast = false; - switch (seg.kind()) { - case BINDING: - if (pretty && seg.value().startsWith("$")) { - // Remove the internal binding. - seg = iterator.next(); // Consume wildcard - result.append(seg.value()); - iterator.next(); // Consume END_BINDING - continue; - } - result.append('{'); - result.append(seg.value()); - if (pretty && peek(iterator, SegmentKind.WILDCARD, SegmentKind.END_BINDING)) { - // Reduce {name=*} to {name}. - result.append('}'); - continue; - } - result.append('='); - continueLast = true; - continue; - case END_BINDING: - result.append('}'); - continue; - default: - result.append(seg.value()); - continue; - } - } - return result.toString(); - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof PathTemplate)) { - return false; - } - PathTemplate other = (PathTemplate) obj; - return Objects.equals(segments, other.segments); - } - - @Override - public int hashCode() { - return segments.hashCode(); - } -} diff --git a/gcloud-java-gax/src/main/java/io/gapi/gax/protobuf/ResourceName.java b/gcloud-java-gax/src/main/java/io/gapi/gax/protobuf/ResourceName.java deleted file mode 100644 index 5eea8509ff44..000000000000 --- a/gcloud-java-gax/src/main/java/io/gapi/gax/protobuf/ResourceName.java +++ /dev/null @@ -1,275 +0,0 @@ -package io.gapi.gax.protobuf; - -import com.google.common.annotations.Beta; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import com.google.common.collect.Sets; - -import java.util.Collection; -import java.util.Map; -import java.util.Objects; -import java.util.Set; - -import javax.annotation.Nullable; - -/** - * Class for representing and working with resource names. - * - *

A resource name is represented by {@link PathTemplate}, an assignment to variables in - * the template, and an optional endpoint. The {@code ResourceName} class implements - * the map interface (unmodifiable) to work with the variable assignments, and has methods - * to reproduce the string representation of the name, to construct new names, and to dereference - * names into resources. - * - *

As a resource name essentially represents a match of a path template against a string, it - * can be also used for other purposes than naming resources. However, not all provided methods - * may make sense in all applications. - * - *

Usage examples: - * - *

- *   PathTemplate template = PathTemplate.create("shelves/*/books/*");
- *   ResourceName resourceName = ResourceName.create(template, "shelves/s1/books/b1");
- *   assert resourceName.get("$1").equals("b1");
- *   assert resourceName.parentName().toString().equals("shelves/s1/books");
- * 
- */ -@Beta -public class ResourceName implements Map { - - // ResourceName Resolver - // ===================== - - /** - * Represents a resource name resolver which can be registered with this class. - */ - public interface Resolver { - /** - * Resolves the resource name into a resource by calling the underlying API. - */ - T resolve(Class resourceType, ResourceName name, @Nullable String version); - } - - // The registered resource name resolver. - // TODO(wgg): its a bit spooky to have this static global. Think of ways to - // configure this from the outside instead if programmatically (e.g. java properties). - private static volatile Resolver resourceNameResolver = new Resolver() { - @Override - public T resolve(Class resourceType, ResourceName name, String version) { - throw new IllegalStateException( - "No resource name resolver is registered in ResourceName class."); - } - }; - - /** - * Sets the resource name resolver which is used by the {@link #resolve(Class, String)} method. - * By default, no resolver is registered. - */ - public static void registerResourceNameResolver(Resolver resolver) { - resourceNameResolver = resolver; - } - - // ResourceName - // ============ - - /** - * Creates a new resource name based on given template and path. The path must match - * the template, otherwise null is returned. - * - * @throws ValidationException if the path does not match the template. - */ - public static ResourceName create(PathTemplate template, String path) { - ImmutableMap values = template.match(path); - if (values == null) { - throw new ValidationException("path '%s' does not match template '%s'", path, template); - } - return new ResourceName(template, values, null); - } - - /** - * Creates a new resource name from a template and a value assignment for variables. - * - * @throws ValidationException if not all variables in the template are bound. - */ - public static ResourceName create(PathTemplate template, Map values) { - if (!values.keySet().containsAll(template.vars())) { - Set unbound = Sets.newLinkedHashSet(template.vars()); - unbound.removeAll(values.keySet()); - throw new ValidationException("unbound variables: %s", unbound); - } - return new ResourceName(template, values, null); - } - - /** - * Creates a new resource name based on given template and path, where the path contains an - * endpoint. If the path does not match, null is returned. - */ - @Nullable - public static ResourceName createFromFullName(PathTemplate template, String path) { - ImmutableMap values = template.matchFromFullName(path); - if (values == null) { - return null; - } - return new ResourceName(template, values, null); - } - - private final PathTemplate template; - private final ImmutableMap values; - private final String endpoint; - - private volatile String stringRepr; - - private ResourceName(PathTemplate template, Map values, String endpoint) { - this.template = template; - this.values = ImmutableMap.copyOf(values); - this.endpoint = endpoint; - } - - @Override - public String toString() { - if (stringRepr == null) { - stringRepr = template.instantiate(values); - } - return stringRepr; - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof ResourceName)) { - return false; - } - ResourceName other = (ResourceName) obj; - return Objects.equals(template, other.template) - && Objects.equals(endpoint, other.endpoint) - && Objects.equals(values, other.values); - } - - @Override - public int hashCode() { - return Objects.hash(template, endpoint, values); - } - - /** - * Gets the template associated with this resource name. - */ - public PathTemplate template() { - return template; - } - - /** - * Checks whether the resource name has an endpoint. - */ - public boolean hasEndpoint() { - return endpoint != null; - } - - /** - * Returns the endpoint of this resource name, or null if none is defined. - */ - @Nullable - public String endpoint() { - return endpoint; - } - - /** - * Returns a resource name with specified endpoint. - */ - public ResourceName withEndpoint(String endpoint) { - return new ResourceName(template, values, Preconditions.checkNotNull(endpoint)); - } - - /** - * Returns the parent resource name. For example, if the name is {@code shelves/s1/books/b1}, the - * parent is {@code shelves/s1/books}. - */ - public ResourceName parentName() { - PathTemplate parentTemplate = template.parentTemplate(); - return new ResourceName(parentTemplate, values, endpoint); - } - - /** - * Returns true of the resource name starts with the parent resource name, i.e. is a child - * of the parent. - */ - public boolean startsWith(ResourceName parentName) { - // TODO(wgg): more efficient implementation. - return toString().startsWith(parentName.toString()); - } - - /** - * Attempts to resolve a resource name into a resource, by calling the associated API. - * The resource name must have an endpoint. An optional version can be specified to - * determine in which version of the API to call. - */ - public T resolve(Class resourceType, @Nullable String version) { - Preconditions.checkArgument(hasEndpoint(), "Resource name must have an endpoint."); - return resourceNameResolver.resolve(resourceType, this, version); - } - - // Map Interface - // ============= - - @Override - public int size() { - return values.size(); - } - - @Override - public boolean isEmpty() { - return values.isEmpty(); - } - - @Override - public boolean containsKey(Object key) { - return values.containsKey(key); - } - - @Override - public boolean containsValue(Object value) { - return values.containsValue(value); - } - - @Override - public String get(Object key) { - return values.get(key); - } - - @Override - @Deprecated - public String put(String key, String value) { - return values.put(key, value); - } - - @Override - @Deprecated - public String remove(Object key) { - return values.remove(key); - } - - @Override - @Deprecated - public void putAll(Map m) { - values.putAll(m); - } - - @Override - @Deprecated - public void clear() { - values.clear(); - } - - @Override - public Set keySet() { - return values.keySet(); - } - - @Override - public Collection values() { - return values.values(); - } - - @Override - public Set> entrySet() { - return values.entrySet(); - } -} diff --git a/gcloud-java-gax/src/main/java/io/gapi/gax/protobuf/ValidationException.java b/gcloud-java-gax/src/main/java/io/gapi/gax/protobuf/ValidationException.java deleted file mode 100644 index 3e2d90e6d118..000000000000 --- a/gcloud-java-gax/src/main/java/io/gapi/gax/protobuf/ValidationException.java +++ /dev/null @@ -1,63 +0,0 @@ -package io.gapi.gax.protobuf; - -import com.google.common.annotations.Beta; -import com.google.common.base.Supplier; -import com.google.common.base.Suppliers; - -import java.util.Stack; - -/** - * Exception thrown if there is a validation problem with a path template, http config, or related - * framework methods. Comes as an illegal argument exception subclass. Allows to globally - * set a thread-local validation context description which each exception inherits. - */ -@Beta -public class ValidationException extends IllegalArgumentException { - - private static ThreadLocal>> contextLocal = - new ThreadLocal>>(); - - /** - * Sets the validation context description. Each thread has its own description, so - * this is thread safe. - */ - public static void pushCurrentThreadValidationContext(Supplier supplier) { - Stack> stack = contextLocal.get(); - if (stack == null) { - stack = new Stack<>(); - contextLocal.set(stack); - } - stack.push(supplier); - } - - public static void pushCurrentThreadValidationContext(String context) { - pushCurrentThreadValidationContext(Suppliers.ofInstance(context)); - } - /** - * Clears the validation context. - */ - public static void popCurrentThreadValidationContext() { - Stack stack = contextLocal.get(); - if (stack != null) { - stack.pop(); - } - } - - /** - * Construct validation exception with implicit context. - */ - public ValidationException(String format, Object... args) { - super(message(contextLocal.get(), format, args)); - } - - private static String message(Stack> context, String format, Object... args) { - if (context == null || context.isEmpty()) { - return String.format(format, args); - } - StringBuilder result = new StringBuilder(); - for (Supplier supplier : context) { - result.append(supplier.get() + ": "); - } - return result.toString() + String.format(format, args); - } -} diff --git a/gcloud-java-gax/src/test/java/io/gapi/gax/grpc/ApiCallableTest.java b/gcloud-java-gax/src/test/java/io/gapi/gax/grpc/ApiCallableTest.java deleted file mode 100644 index 359f9da3693d..000000000000 --- a/gcloud-java-gax/src/test/java/io/gapi/gax/grpc/ApiCallableTest.java +++ /dev/null @@ -1,250 +0,0 @@ -/* - * Copyright 2015, Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -package io.gapi.gax.grpc; - -import com.google.common.base.Strings; -import com.google.common.collect.Lists; -import com.google.common.truth.Truth; - -import io.gapi.gax.grpc.ApiCallable; -import io.gapi.gax.grpc.PageDescriptor; -import io.gapi.gax.grpc.ApiCallable.Transformer; -import io.grpc.Channel; -import io.grpc.MethodDescriptor; -import io.grpc.Status; -import io.grpc.StatusException; -import io.grpc.stub.ClientCalls; -import io.grpc.stub.StreamObserver; - -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.ExpectedException; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; -import org.mockito.InOrder; -import org.mockito.Mock; -import org.mockito.Mockito; -import org.mockito.MockitoAnnotations; - -import java.util.ArrayList; -import java.util.List; -import java.util.Random; -import java.util.concurrent.Executors; - -/** - * Tests for {@link ApiCallable}. - */ -@RunWith(JUnit4.class) -public class ApiCallableTest { - - private static final Transformer PLUS_ONE = - new Transformer() { - @Override public Integer apply(Integer request) throws StatusException { - return request + 1; - } - }; - - private static final Transformer TO_STRING = - new Transformer() { - @Override public String apply(Object request) throws StatusException { - return request.toString(); - } - }; - - private static final Transformer TO_INT = - new Transformer() { - @Override public Integer apply(String request) throws StatusException { - return Integer.parseInt(request); - } - }; - - @Rule - public ExpectedException thrown = ExpectedException.none(); - - @Before public void setUp() { - MockitoAnnotations.initMocks(this); - } - - @Mock Channel channel; - - // Creation and Chaining - // ===================== - - @Mock StreamObserver output; - @Mock Transformer transformIntToInt; - - @Test public void transformAndFollowedBy() { - ApiCallable callable = - ApiCallable.create(TO_STRING) - .followedBy(ApiCallable.create(TO_INT)) - .followedBy(ApiCallable.create(PLUS_ONE)); - - // Unary call - Truth.assertThat(callable.call(channel, 1)).isEqualTo(2); - - // Streaming call - StreamObserver input = - ClientCalls.asyncBidiStreamingCall(callable.newCall(channel), output); - input.onNext(1); - input.onNext(2); - input.onNext(3); - input.onCompleted(); - - InOrder inOrder = Mockito.inOrder(output); - inOrder.verify(output).onNext(2); - inOrder.verify(output).onNext(3); - inOrder.verify(output).onNext(4); - } - - // Retry - // ===== - - @Test public void retry() throws StatusException { - Mockito.when(transformIntToInt.apply(Mockito.anyInt())) - .thenThrow(new StatusException(Status.UNAVAILABLE)) - .thenThrow(new StatusException(Status.UNAVAILABLE)) - .thenThrow(new StatusException(Status.UNAVAILABLE)) - .thenReturn(2); - ApiCallable callable = ApiCallable.create(transformIntToInt).retrying(); - Truth.assertThat(callable.call(channel, 1)).isEqualTo(2); - } - - - // Page Streaming - // ============== - - /** - * Request message. - */ - private static class Request { - String pageToken; - } - - /** - * Response message. - */ - private static class Response { - String nextPageToken; - List books; - } - - /** - * A page producer fake which uses a seeded random generator to produce different page - * sizes. - */ - private static class PageProducer implements Transformer { - List collection; - Random random = new Random(0); - - PageProducer() { - collection = new ArrayList(); - for (int i = 1; i < 20; i++) { - collection.add("book #" + i); - } - } - - @Override - public Response apply(Request request) { - int start = 0; - if (!Strings.isNullOrEmpty(request.pageToken)) { - start = Integer.parseInt(request.pageToken); - } - int end = start + random.nextInt(3); - String nextToken; - if (end >= collection.size()) { - end = collection.size(); - nextToken = ""; - } else { - nextToken = end + ""; - } - Response response = new Response(); - response.nextPageToken = nextToken; - response.books = collection.subList(start, end); - return response; - } - } - - private static class BooksPageDescriptor implements PageDescriptor { - - @Override - public Object emptyToken() { - return ""; - } - - @Override - public Request injectToken(Request payload, Object token) { - payload.pageToken = (String) token; - return payload; - } - - @Override - public Object extractNextToken(Response payload) { - return payload.nextPageToken; - } - - @Override - public Iterable extractResources(Response payload) { - return payload.books; - } - } - - @Test public void pageStreaming() { - - // Create a callable. - PageProducer producer = new PageProducer(); - ApiCallable callable = - ApiCallable.create(producer, Executors.newCachedThreadPool()) - .pageStreaming(new BooksPageDescriptor()); - - // Emit the call and check the result. - Truth.assertThat(Lists.newArrayList( - callable.iterableResponseStreamCall(channel, new Request()))) - .isEqualTo(producer.collection); - } - - // Binding - // ======= - - @Mock - MethodDescriptor method; - - @Test public void testUnboundFailure() { - Mockito.stub(method.getFullMethodName()).toReturn("mocked method"); - thrown.expectMessage( - "unbound callable for method 'mocked method' requires " - + "a channel for execution"); - - ApiCallable callable = ApiCallable.create(method); - callable.call(new Request()); - } -} diff --git a/gcloud-java-gax/src/test/java/io/gapi/gax/protobuf/PathTemplateTest.java b/gcloud-java-gax/src/test/java/io/gapi/gax/protobuf/PathTemplateTest.java deleted file mode 100644 index ecb16fc382aa..000000000000 --- a/gcloud-java-gax/src/test/java/io/gapi/gax/protobuf/PathTemplateTest.java +++ /dev/null @@ -1,168 +0,0 @@ -package io.gapi.gax.protobuf; - -import com.google.common.collect.ImmutableMap; -import com.google.common.truth.Truth; - -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.ExpectedException; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; - -import java.util.Map; - -/** - * Tests for {@link PathTemplate}. - */ -@RunWith(JUnit4.class) -public class PathTemplateTest { - - @Rule - public ExpectedException thrown = ExpectedException.none(); - - // Match - // ===== - - @Test - public void matchAtomicResourceName() { - PathTemplate template = PathTemplate.create("buckets/*/*/objects/*"); - assertPositionalMatch(template.match("buckets/f/o/objects/bar"), "f", "o", "bar"); - } - - @Test - public void matchTemplateWithUnboundedWildcard() { - PathTemplate template = PathTemplate.create("buckets/*/objects/**"); - assertPositionalMatch(template.match("buckets/foo/objects/bar/baz"), "foo", "bar/baz"); - } - - @Test - public void matchWithForcedHostName() { - PathTemplate template = PathTemplate.create("buckets/*/objects/*"); - Map match = template.matchFromFullName("somewhere.io/buckets/b/objects/o"); - Truth.assertThat(match).isNotNull(); - Truth.assertThat(match.get(PathTemplate.HOSTNAME_VAR)).isEqualTo("somewhere.io"); - Truth.assertThat(match.get("$0")).isEqualTo("b"); - Truth.assertThat(match.get("$1")).isEqualTo("o"); - } - - @Test - public void matchWithHostName() { - PathTemplate template = PathTemplate.create("buckets/*/objects/*"); - Map match = template.match("//somewhere.io/buckets/b/objects/o"); - Truth.assertThat(match).isNotNull(); - Truth.assertThat(match.get(PathTemplate.HOSTNAME_VAR)).isEqualTo("//somewhere.io"); - Truth.assertThat(match.get("$0")).isEqualTo("b"); - Truth.assertThat(match.get("$1")).isEqualTo("o"); - } - - @Test - public void matchFailWhenPathMismatch() { - PathTemplate template = PathTemplate.create("buckets/*/*/objects/*"); - Truth.assertThat(template.match("buckets/f/o/o/objects/bar")).isNull(); - } - - @Test - public void matchFailWhenPathTooShort() { - PathTemplate template = PathTemplate.create("buckets/*/*/objects/*"); - Truth.assertThat(template.match("buckets/f/o/objects")).isNull(); - } - - @Test - public void matchFailWhenPathTooLong() { - PathTemplate template = PathTemplate.create("buckets/*/*/objects/*"); - Truth.assertThat(template.match("buckets/f/o/objects/too/long")).isNull(); - } - - @Test - public void matchWithUnboundInMiddle() { - PathTemplate template = PathTemplate.create("bar/**/foo/*"); - assertPositionalMatch(template.match("bar/foo/foo/foo/bar"), "foo/foo", "bar"); - } - - // Instantiate - // =========== - - @Test - public void instantiateAtomicResource() { - PathTemplate template = PathTemplate.create("buckets/*/*/*/objects/*"); - String url = template.instantiate("$0", "f", "$1", "o", "$2", "o", "$3", "bar"); - Truth.assertThat(url).isEqualTo("buckets/f/o/o/objects/bar"); - } - - @Test - public void instantiateEscapeUnsafeChar() { - PathTemplate template = PathTemplate.create("buckets/*/objects/*"); - Truth.assertThat(template.instantiate("$0", "f/o/o", "$1", "b/a/r")) - .isEqualTo("buckets/f%2Fo%2Fo/objects/b%2Fa%2Fr"); - } - - @Test - public void instantiateNotEscapeForUnboundedWildcard() { - PathTemplate template = PathTemplate.create("buckets/*/objects/**"); - Truth.assertThat(template.instantiate("$0", "f/o/o", "$1", "b/a/r")) - .isEqualTo("buckets/f%2Fo%2Fo/objects/b/a/r"); - } - - @Test - public void instantiateFailWhenTooFewVariables() { - thrown.expect(ValidationException.class); - PathTemplate template = PathTemplate.create("buckets/*/*/*/objects/*"); - template.instantiate("$0", "f", "1", "o"); - } - - @Test - public void instantiateWithUnboundInMiddle() { - PathTemplate template = PathTemplate.create("bar/**/foo/*"); - Truth.assertThat(template.instantiate("$0", "1/2", "$1", "3")) - .isEqualTo("bar/1/2/foo/3"); - } - - @Test - public void instantiatePartial() { - PathTemplate template = PathTemplate.create("bar/*/foo/*"); - String instance = template.instantiatePartial(ImmutableMap.of("$0", "_1")); - Truth.assertThat(instance).isEqualTo("bar/_1/foo/*"); - } - - @Test - public void instantiateWithHostName() { - PathTemplate template = PathTemplate.create("bar/*"); - String instance = template.instantiate(ImmutableMap.of( - PathTemplate.HOSTNAME_VAR, "//somewhere.io", - "$0", "foo")); - Truth.assertThat(instance).isEqualTo("//somewhere.io/bar/foo"); - } - - // Other - // ===== - - @Test - public void testMultiplePathWildcardFailure() { - thrown.expect(IllegalArgumentException.class); - PathTemplate.create("bar/**/{name=foo/**}:verb"); - } - - @Test - public void testTemplateWithSimpleBinding() { - PathTemplate template = PathTemplate.create("/v1/messages/{message_id}"); - String url = template.instantiate("message_id", "mymessage"); - Truth.assertThat(url).isEqualTo("v1/messages/mymessage"); - } - - @Test - public void testTemplateWithMultipleSimpleBindings() { - PathTemplate template = PathTemplate.create("v1/shelves/{shelf}/books/{book}"); - String url = template.instantiate("shelf", "s1", "book", "b1"); - Truth.assertThat(url).isEqualTo("v1/shelves/s1/books/b1"); - } - - - private static void assertPositionalMatch(Map match, String... expected) { - Truth.assertThat(match).isNotNull(); - int i = 0; - for (; i < expected.length; ++i) { - Truth.assertThat(expected[i]).isEqualTo(match.get("$" + i)); - } - Truth.assertThat(i).isEqualTo(match.size()); - } -} diff --git a/gcloud-java-gax/src/test/java/io/gapi/gax/protobuf/ResourceNameTest.java b/gcloud-java-gax/src/test/java/io/gapi/gax/protobuf/ResourceNameTest.java deleted file mode 100644 index dbef60bb64c5..000000000000 --- a/gcloud-java-gax/src/test/java/io/gapi/gax/protobuf/ResourceNameTest.java +++ /dev/null @@ -1,25 +0,0 @@ -package io.gapi.gax.protobuf; - -import com.google.common.truth.Truth; - -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; - -/** - * Tests for {@link ResourceName}. As resource names are mostly a wrapper around path - * templates, not much needs to be done here. - */ -@RunWith(JUnit4.class) -public class ResourceNameTest { - - @Test - public void resourceNameMethods() { - PathTemplate template = PathTemplate.create("buckets/*/objects/**"); - ResourceName name = ResourceName.create(template, "buckets/b/objects/1/2"); - Truth.assertThat(name.toString()).isEqualTo("buckets/b/objects/1/2"); - Truth.assertThat(name.get("$1")).isEqualTo("1/2"); - Truth.assertThat(name.get("$0")).isEqualTo("b"); - Truth.assertThat(name.parentName().toString()).isEqualTo("buckets/b/objects"); - } -} From 65f2070c15b6588c1960d745540f2382e4af0387 Mon Sep 17 00:00:00 2001 From: Garrett Jones Date: Thu, 18 Feb 2016 13:36:40 -0800 Subject: [PATCH 2/5] Removing generated files from gcloud-java-pubsub --- .../google/pubsub/v1/AcknowledgeRequest.java | 710 ----------- .../v1/AcknowledgeRequestOrBuilder.java | 66 -- .../pubsub/v1/DeleteSubscriptionRequest.java | 476 -------- .../DeleteSubscriptionRequestOrBuilder.java | 27 - .../google/pubsub/v1/DeleteTopicRequest.java | 476 -------- .../v1/DeleteTopicRequestOrBuilder.java | 27 - .../pubsub/v1/GetSubscriptionRequest.java | 476 -------- .../v1/GetSubscriptionRequestOrBuilder.java | 27 - .../com/google/pubsub/v1/GetTopicRequest.java | 476 -------- .../pubsub/v1/GetTopicRequestOrBuilder.java | 27 - .../pubsub/v1/ListSubscriptionsRequest.java | 711 ----------- .../v1/ListSubscriptionsRequestOrBuilder.java | 58 - .../pubsub/v1/ListSubscriptionsResponse.java | 923 --------------- .../ListSubscriptionsResponseOrBuilder.java | 75 -- .../v1/ListTopicSubscriptionsRequest.java | 711 ----------- ...istTopicSubscriptionsRequestOrBuilder.java | 58 - .../v1/ListTopicSubscriptionsResponse.java | 711 ----------- ...stTopicSubscriptionsResponseOrBuilder.java | 66 -- .../google/pubsub/v1/ListTopicsRequest.java | 711 ----------- .../pubsub/v1/ListTopicsRequestOrBuilder.java | 58 - .../google/pubsub/v1/ListTopicsResponse.java | 916 --------------- .../v1/ListTopicsResponseOrBuilder.java | 73 -- .../pubsub/v1/ModifyAckDeadlineRequest.java | 783 ------------- .../v1/ModifyAckDeadlineRequestOrBuilder.java | 75 -- .../pubsub/v1/ModifyPushConfigRequest.java | 744 ------------ .../v1/ModifyPushConfigRequestOrBuilder.java | 64 - .../com/google/pubsub/v1/PublishRequest.java | 909 --------------- .../pubsub/v1/PublishRequestOrBuilder.java | 71 -- .../com/google/pubsub/v1/PublishResponse.java | 569 --------- .../pubsub/v1/PublishResponseOrBuilder.java | 52 - .../com/google/pubsub/v1/PublisherGrpc.java | 406 ------- .../com/google/pubsub/v1/PubsubMessage.java | 740 ------------ .../pubsub/v1/PubsubMessageOrBuilder.java | 53 - .../com/google/pubsub/v1/PubsubProto.java | 409 ------- .../com/google/pubsub/v1/PullRequest.java | 636 ---------- .../pubsub/v1/PullRequestOrBuilder.java | 50 - .../com/google/pubsub/v1/PullResponse.java | 824 ------------- .../pubsub/v1/PullResponseOrBuilder.java | 68 -- .../java/com/google/pubsub/v1/PushConfig.java | 711 ----------- .../google/pubsub/v1/PushConfigOrBuilder.java | 55 - .../com/google/pubsub/v1/ReceivedMessage.java | 696 ----------- .../pubsub/v1/ReceivedMessageOrBuilder.java | 52 - .../com/google/pubsub/v1/SubscriberGrpc.java | 506 -------- .../com/google/pubsub/v1/Subscription.java | 1038 ----------------- .../pubsub/v1/SubscriptionOrBuilder.java | 111 -- .../main/java/com/google/pubsub/v1/Topic.java | 511 -------- .../com/google/pubsub/v1/TopicOrBuilder.java | 37 - 47 files changed, 18029 deletions(-) delete mode 100644 gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/AcknowledgeRequest.java delete mode 100644 gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/AcknowledgeRequestOrBuilder.java delete mode 100644 gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/DeleteSubscriptionRequest.java delete mode 100644 gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/DeleteSubscriptionRequestOrBuilder.java delete mode 100644 gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/DeleteTopicRequest.java delete mode 100644 gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/DeleteTopicRequestOrBuilder.java delete mode 100644 gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/GetSubscriptionRequest.java delete mode 100644 gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/GetSubscriptionRequestOrBuilder.java delete mode 100644 gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/GetTopicRequest.java delete mode 100644 gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/GetTopicRequestOrBuilder.java delete mode 100644 gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/ListSubscriptionsRequest.java delete mode 100644 gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/ListSubscriptionsRequestOrBuilder.java delete mode 100644 gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/ListSubscriptionsResponse.java delete mode 100644 gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/ListSubscriptionsResponseOrBuilder.java delete mode 100644 gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/ListTopicSubscriptionsRequest.java delete mode 100644 gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/ListTopicSubscriptionsRequestOrBuilder.java delete mode 100644 gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/ListTopicSubscriptionsResponse.java delete mode 100644 gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/ListTopicSubscriptionsResponseOrBuilder.java delete mode 100644 gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/ListTopicsRequest.java delete mode 100644 gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/ListTopicsRequestOrBuilder.java delete mode 100644 gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/ListTopicsResponse.java delete mode 100644 gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/ListTopicsResponseOrBuilder.java delete mode 100644 gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/ModifyAckDeadlineRequest.java delete mode 100644 gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/ModifyAckDeadlineRequestOrBuilder.java delete mode 100644 gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/ModifyPushConfigRequest.java delete mode 100644 gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/ModifyPushConfigRequestOrBuilder.java delete mode 100644 gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/PublishRequest.java delete mode 100644 gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/PublishRequestOrBuilder.java delete mode 100644 gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/PublishResponse.java delete mode 100644 gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/PublishResponseOrBuilder.java delete mode 100644 gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/PublisherGrpc.java delete mode 100644 gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/PubsubMessage.java delete mode 100644 gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/PubsubMessageOrBuilder.java delete mode 100644 gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/PubsubProto.java delete mode 100644 gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/PullRequest.java delete mode 100644 gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/PullRequestOrBuilder.java delete mode 100644 gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/PullResponse.java delete mode 100644 gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/PullResponseOrBuilder.java delete mode 100644 gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/PushConfig.java delete mode 100644 gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/PushConfigOrBuilder.java delete mode 100644 gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/ReceivedMessage.java delete mode 100644 gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/ReceivedMessageOrBuilder.java delete mode 100644 gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/SubscriberGrpc.java delete mode 100644 gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/Subscription.java delete mode 100644 gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/SubscriptionOrBuilder.java delete mode 100644 gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/Topic.java delete mode 100644 gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/TopicOrBuilder.java diff --git a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/AcknowledgeRequest.java b/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/AcknowledgeRequest.java deleted file mode 100644 index 1c5af6fed5d6..000000000000 --- a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/AcknowledgeRequest.java +++ /dev/null @@ -1,710 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/pubsub/v1/pubsub.proto - -package com.google.pubsub.v1; - -/** - * Protobuf type {@code google.pubsub.v1.AcknowledgeRequest} - * - *
- * Request for the Acknowledge method.
- * 
- */ -public final class AcknowledgeRequest extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.pubsub.v1.AcknowledgeRequest) - AcknowledgeRequestOrBuilder { - // Use AcknowledgeRequest.newBuilder() to construct. - private AcknowledgeRequest(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private AcknowledgeRequest() { - subscription_ = ""; - ackIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private AcknowledgeRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - int mutable_bitField0_ = 0; - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!input.skipField(tag)) { - done = true; - } - break; - } - case 10: { - String s = input.readStringRequireUtf8(); - - subscription_ = s; - break; - } - case 18: { - String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - ackIds_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - ackIds_.add(s); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - ackIds_ = ackIds_.getUnmodifiableView(); - } - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_AcknowledgeRequest_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_AcknowledgeRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.pubsub.v1.AcknowledgeRequest.class, com.google.pubsub.v1.AcknowledgeRequest.Builder.class); - } - - private int bitField0_; - public static final int SUBSCRIPTION_FIELD_NUMBER = 1; - private volatile java.lang.Object subscription_; - /** - * optional string subscription = 1; - * - *
-   * The subscription whose message is being acknowledged.
-   * 
- */ - public java.lang.String getSubscription() { - java.lang.Object ref = subscription_; - 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(); - subscription_ = s; - return s; - } - } - /** - * optional string subscription = 1; - * - *
-   * The subscription whose message is being acknowledged.
-   * 
- */ - public com.google.protobuf.ByteString - getSubscriptionBytes() { - java.lang.Object ref = subscription_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - subscription_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ACK_IDS_FIELD_NUMBER = 2; - private com.google.protobuf.LazyStringList ackIds_; - /** - * repeated string ack_ids = 2; - * - *
-   * The acknowledgment ID for the messages being acknowledged that was returned
-   * by the Pub/Sub system in the Pull response. Must not be empty.
-   * 
- */ - public com.google.protobuf.ProtocolStringList - getAckIdsList() { - return ackIds_; - } - /** - * repeated string ack_ids = 2; - * - *
-   * The acknowledgment ID for the messages being acknowledged that was returned
-   * by the Pub/Sub system in the Pull response. Must not be empty.
-   * 
- */ - public int getAckIdsCount() { - return ackIds_.size(); - } - /** - * repeated string ack_ids = 2; - * - *
-   * The acknowledgment ID for the messages being acknowledged that was returned
-   * by the Pub/Sub system in the Pull response. Must not be empty.
-   * 
- */ - public java.lang.String getAckIds(int index) { - return ackIds_.get(index); - } - /** - * repeated string ack_ids = 2; - * - *
-   * The acknowledgment ID for the messages being acknowledged that was returned
-   * by the Pub/Sub system in the Pull response. Must not be empty.
-   * 
- */ - public com.google.protobuf.ByteString - getAckIdsBytes(int index) { - return ackIds_.getByteString(index); - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!getSubscriptionBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, subscription_); - } - for (int i = 0; i < ackIds_.size(); i++) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, ackIds_.getRaw(i)); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getSubscriptionBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, subscription_); - } - { - int dataSize = 0; - for (int i = 0; i < ackIds_.size(); i++) { - dataSize += computeStringSizeNoTag(ackIds_.getRaw(i)); - } - size += dataSize; - size += 1 * getAckIdsList().size(); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static com.google.pubsub.v1.AcknowledgeRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.pubsub.v1.AcknowledgeRequest 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.pubsub.v1.AcknowledgeRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.pubsub.v1.AcknowledgeRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.pubsub.v1.AcknowledgeRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.pubsub.v1.AcknowledgeRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.pubsub.v1.AcknowledgeRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.pubsub.v1.AcknowledgeRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.pubsub.v1.AcknowledgeRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.pubsub.v1.AcknowledgeRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.pubsub.v1.AcknowledgeRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - 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; - } - /** - * Protobuf type {@code google.pubsub.v1.AcknowledgeRequest} - * - *
-   * Request for the Acknowledge method.
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.pubsub.v1.AcknowledgeRequest) - com.google.pubsub.v1.AcknowledgeRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_AcknowledgeRequest_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_AcknowledgeRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.pubsub.v1.AcknowledgeRequest.class, com.google.pubsub.v1.AcknowledgeRequest.Builder.class); - } - - // Construct using com.google.pubsub.v1.AcknowledgeRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - subscription_ = ""; - - ackIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_AcknowledgeRequest_descriptor; - } - - public com.google.pubsub.v1.AcknowledgeRequest getDefaultInstanceForType() { - return com.google.pubsub.v1.AcknowledgeRequest.getDefaultInstance(); - } - - public com.google.pubsub.v1.AcknowledgeRequest build() { - com.google.pubsub.v1.AcknowledgeRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.pubsub.v1.AcknowledgeRequest buildPartial() { - com.google.pubsub.v1.AcknowledgeRequest result = new com.google.pubsub.v1.AcknowledgeRequest(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - result.subscription_ = subscription_; - if (((bitField0_ & 0x00000002) == 0x00000002)) { - ackIds_ = ackIds_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.ackIds_ = ackIds_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.pubsub.v1.AcknowledgeRequest) { - return mergeFrom((com.google.pubsub.v1.AcknowledgeRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.pubsub.v1.AcknowledgeRequest other) { - if (other == com.google.pubsub.v1.AcknowledgeRequest.getDefaultInstance()) return this; - if (!other.getSubscription().isEmpty()) { - subscription_ = other.subscription_; - onChanged(); - } - if (!other.ackIds_.isEmpty()) { - if (ackIds_.isEmpty()) { - ackIds_ = other.ackIds_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureAckIdsIsMutable(); - ackIds_.addAll(other.ackIds_); - } - onChanged(); - } - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.pubsub.v1.AcknowledgeRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.pubsub.v1.AcknowledgeRequest) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object subscription_ = ""; - /** - * optional string subscription = 1; - * - *
-     * The subscription whose message is being acknowledged.
-     * 
- */ - public java.lang.String getSubscription() { - java.lang.Object ref = subscription_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - subscription_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string subscription = 1; - * - *
-     * The subscription whose message is being acknowledged.
-     * 
- */ - public com.google.protobuf.ByteString - getSubscriptionBytes() { - java.lang.Object ref = subscription_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - subscription_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string subscription = 1; - * - *
-     * The subscription whose message is being acknowledged.
-     * 
- */ - public Builder setSubscription( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - subscription_ = value; - onChanged(); - return this; - } - /** - * optional string subscription = 1; - * - *
-     * The subscription whose message is being acknowledged.
-     * 
- */ - public Builder clearSubscription() { - - subscription_ = getDefaultInstance().getSubscription(); - onChanged(); - return this; - } - /** - * optional string subscription = 1; - * - *
-     * The subscription whose message is being acknowledged.
-     * 
- */ - public Builder setSubscriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - subscription_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList ackIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureAckIdsIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { - ackIds_ = new com.google.protobuf.LazyStringArrayList(ackIds_); - bitField0_ |= 0x00000002; - } - } - /** - * repeated string ack_ids = 2; - * - *
-     * The acknowledgment ID for the messages being acknowledged that was returned
-     * by the Pub/Sub system in the Pull response. Must not be empty.
-     * 
- */ - public com.google.protobuf.ProtocolStringList - getAckIdsList() { - return ackIds_.getUnmodifiableView(); - } - /** - * repeated string ack_ids = 2; - * - *
-     * The acknowledgment ID for the messages being acknowledged that was returned
-     * by the Pub/Sub system in the Pull response. Must not be empty.
-     * 
- */ - public int getAckIdsCount() { - return ackIds_.size(); - } - /** - * repeated string ack_ids = 2; - * - *
-     * The acknowledgment ID for the messages being acknowledged that was returned
-     * by the Pub/Sub system in the Pull response. Must not be empty.
-     * 
- */ - public java.lang.String getAckIds(int index) { - return ackIds_.get(index); - } - /** - * repeated string ack_ids = 2; - * - *
-     * The acknowledgment ID for the messages being acknowledged that was returned
-     * by the Pub/Sub system in the Pull response. Must not be empty.
-     * 
- */ - public com.google.protobuf.ByteString - getAckIdsBytes(int index) { - return ackIds_.getByteString(index); - } - /** - * repeated string ack_ids = 2; - * - *
-     * The acknowledgment ID for the messages being acknowledged that was returned
-     * by the Pub/Sub system in the Pull response. Must not be empty.
-     * 
- */ - public Builder setAckIds( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAckIdsIsMutable(); - ackIds_.set(index, value); - onChanged(); - return this; - } - /** - * repeated string ack_ids = 2; - * - *
-     * The acknowledgment ID for the messages being acknowledged that was returned
-     * by the Pub/Sub system in the Pull response. Must not be empty.
-     * 
- */ - public Builder addAckIds( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAckIdsIsMutable(); - ackIds_.add(value); - onChanged(); - return this; - } - /** - * repeated string ack_ids = 2; - * - *
-     * The acknowledgment ID for the messages being acknowledged that was returned
-     * by the Pub/Sub system in the Pull response. Must not be empty.
-     * 
- */ - public Builder addAllAckIds( - java.lang.Iterable values) { - ensureAckIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, ackIds_); - onChanged(); - return this; - } - /** - * repeated string ack_ids = 2; - * - *
-     * The acknowledgment ID for the messages being acknowledged that was returned
-     * by the Pub/Sub system in the Pull response. Must not be empty.
-     * 
- */ - public Builder clearAckIds() { - ackIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * repeated string ack_ids = 2; - * - *
-     * The acknowledgment ID for the messages being acknowledged that was returned
-     * by the Pub/Sub system in the Pull response. Must not be empty.
-     * 
- */ - public Builder addAckIdsBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureAckIdsIsMutable(); - ackIds_.add(value); - onChanged(); - return this; - } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.AcknowledgeRequest) - } - - // @@protoc_insertion_point(class_scope:google.pubsub.v1.AcknowledgeRequest) - private static final com.google.pubsub.v1.AcknowledgeRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.pubsub.v1.AcknowledgeRequest(); - } - - public static com.google.pubsub.v1.AcknowledgeRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public AcknowledgeRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new AcknowledgeRequest(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public com.google.pubsub.v1.AcknowledgeRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/AcknowledgeRequestOrBuilder.java b/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/AcknowledgeRequestOrBuilder.java deleted file mode 100644 index 7a89660bbcfb..000000000000 --- a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/AcknowledgeRequestOrBuilder.java +++ /dev/null @@ -1,66 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/pubsub/v1/pubsub.proto - -package com.google.pubsub.v1; - -public interface AcknowledgeRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.pubsub.v1.AcknowledgeRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string subscription = 1; - * - *
-   * The subscription whose message is being acknowledged.
-   * 
- */ - java.lang.String getSubscription(); - /** - * optional string subscription = 1; - * - *
-   * The subscription whose message is being acknowledged.
-   * 
- */ - com.google.protobuf.ByteString - getSubscriptionBytes(); - - /** - * repeated string ack_ids = 2; - * - *
-   * The acknowledgment ID for the messages being acknowledged that was returned
-   * by the Pub/Sub system in the Pull response. Must not be empty.
-   * 
- */ - com.google.protobuf.ProtocolStringList - getAckIdsList(); - /** - * repeated string ack_ids = 2; - * - *
-   * The acknowledgment ID for the messages being acknowledged that was returned
-   * by the Pub/Sub system in the Pull response. Must not be empty.
-   * 
- */ - int getAckIdsCount(); - /** - * repeated string ack_ids = 2; - * - *
-   * The acknowledgment ID for the messages being acknowledged that was returned
-   * by the Pub/Sub system in the Pull response. Must not be empty.
-   * 
- */ - java.lang.String getAckIds(int index); - /** - * repeated string ack_ids = 2; - * - *
-   * The acknowledgment ID for the messages being acknowledged that was returned
-   * by the Pub/Sub system in the Pull response. Must not be empty.
-   * 
- */ - com.google.protobuf.ByteString - getAckIdsBytes(int index); -} diff --git a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/DeleteSubscriptionRequest.java b/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/DeleteSubscriptionRequest.java deleted file mode 100644 index acdfd0d71c83..000000000000 --- a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/DeleteSubscriptionRequest.java +++ /dev/null @@ -1,476 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/pubsub/v1/pubsub.proto - -package com.google.pubsub.v1; - -/** - * Protobuf type {@code google.pubsub.v1.DeleteSubscriptionRequest} - * - *
- * Request for the DeleteSubscription method.
- * 
- */ -public final class DeleteSubscriptionRequest extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.pubsub.v1.DeleteSubscriptionRequest) - DeleteSubscriptionRequestOrBuilder { - // Use DeleteSubscriptionRequest.newBuilder() to construct. - private DeleteSubscriptionRequest(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private DeleteSubscriptionRequest() { - subscription_ = ""; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private DeleteSubscriptionRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - int mutable_bitField0_ = 0; - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!input.skipField(tag)) { - done = true; - } - break; - } - case 10: { - String s = input.readStringRequireUtf8(); - - subscription_ = s; - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_DeleteSubscriptionRequest_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_DeleteSubscriptionRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.pubsub.v1.DeleteSubscriptionRequest.class, com.google.pubsub.v1.DeleteSubscriptionRequest.Builder.class); - } - - public static final int SUBSCRIPTION_FIELD_NUMBER = 1; - private volatile java.lang.Object subscription_; - /** - * optional string subscription = 1; - * - *
-   * The subscription to delete.
-   * 
- */ - public java.lang.String getSubscription() { - java.lang.Object ref = subscription_; - 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(); - subscription_ = s; - return s; - } - } - /** - * optional string subscription = 1; - * - *
-   * The subscription to delete.
-   * 
- */ - public com.google.protobuf.ByteString - getSubscriptionBytes() { - java.lang.Object ref = subscription_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - subscription_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!getSubscriptionBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, subscription_); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getSubscriptionBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, subscription_); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static com.google.pubsub.v1.DeleteSubscriptionRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.pubsub.v1.DeleteSubscriptionRequest 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.pubsub.v1.DeleteSubscriptionRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.pubsub.v1.DeleteSubscriptionRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.pubsub.v1.DeleteSubscriptionRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.pubsub.v1.DeleteSubscriptionRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.pubsub.v1.DeleteSubscriptionRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.pubsub.v1.DeleteSubscriptionRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.pubsub.v1.DeleteSubscriptionRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.pubsub.v1.DeleteSubscriptionRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.pubsub.v1.DeleteSubscriptionRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - 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; - } - /** - * Protobuf type {@code google.pubsub.v1.DeleteSubscriptionRequest} - * - *
-   * Request for the DeleteSubscription method.
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.pubsub.v1.DeleteSubscriptionRequest) - com.google.pubsub.v1.DeleteSubscriptionRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_DeleteSubscriptionRequest_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_DeleteSubscriptionRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.pubsub.v1.DeleteSubscriptionRequest.class, com.google.pubsub.v1.DeleteSubscriptionRequest.Builder.class); - } - - // Construct using com.google.pubsub.v1.DeleteSubscriptionRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - subscription_ = ""; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_DeleteSubscriptionRequest_descriptor; - } - - public com.google.pubsub.v1.DeleteSubscriptionRequest getDefaultInstanceForType() { - return com.google.pubsub.v1.DeleteSubscriptionRequest.getDefaultInstance(); - } - - public com.google.pubsub.v1.DeleteSubscriptionRequest build() { - com.google.pubsub.v1.DeleteSubscriptionRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.pubsub.v1.DeleteSubscriptionRequest buildPartial() { - com.google.pubsub.v1.DeleteSubscriptionRequest result = new com.google.pubsub.v1.DeleteSubscriptionRequest(this); - result.subscription_ = subscription_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.pubsub.v1.DeleteSubscriptionRequest) { - return mergeFrom((com.google.pubsub.v1.DeleteSubscriptionRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.pubsub.v1.DeleteSubscriptionRequest other) { - if (other == com.google.pubsub.v1.DeleteSubscriptionRequest.getDefaultInstance()) return this; - if (!other.getSubscription().isEmpty()) { - subscription_ = other.subscription_; - onChanged(); - } - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.pubsub.v1.DeleteSubscriptionRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.pubsub.v1.DeleteSubscriptionRequest) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object subscription_ = ""; - /** - * optional string subscription = 1; - * - *
-     * The subscription to delete.
-     * 
- */ - public java.lang.String getSubscription() { - java.lang.Object ref = subscription_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - subscription_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string subscription = 1; - * - *
-     * The subscription to delete.
-     * 
- */ - public com.google.protobuf.ByteString - getSubscriptionBytes() { - java.lang.Object ref = subscription_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - subscription_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string subscription = 1; - * - *
-     * The subscription to delete.
-     * 
- */ - public Builder setSubscription( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - subscription_ = value; - onChanged(); - return this; - } - /** - * optional string subscription = 1; - * - *
-     * The subscription to delete.
-     * 
- */ - public Builder clearSubscription() { - - subscription_ = getDefaultInstance().getSubscription(); - onChanged(); - return this; - } - /** - * optional string subscription = 1; - * - *
-     * The subscription to delete.
-     * 
- */ - public Builder setSubscriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - subscription_ = value; - onChanged(); - return this; - } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.DeleteSubscriptionRequest) - } - - // @@protoc_insertion_point(class_scope:google.pubsub.v1.DeleteSubscriptionRequest) - private static final com.google.pubsub.v1.DeleteSubscriptionRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.pubsub.v1.DeleteSubscriptionRequest(); - } - - public static com.google.pubsub.v1.DeleteSubscriptionRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public DeleteSubscriptionRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new DeleteSubscriptionRequest(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public com.google.pubsub.v1.DeleteSubscriptionRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/DeleteSubscriptionRequestOrBuilder.java b/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/DeleteSubscriptionRequestOrBuilder.java deleted file mode 100644 index d43222fb965c..000000000000 --- a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/DeleteSubscriptionRequestOrBuilder.java +++ /dev/null @@ -1,27 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/pubsub/v1/pubsub.proto - -package com.google.pubsub.v1; - -public interface DeleteSubscriptionRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.pubsub.v1.DeleteSubscriptionRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string subscription = 1; - * - *
-   * The subscription to delete.
-   * 
- */ - java.lang.String getSubscription(); - /** - * optional string subscription = 1; - * - *
-   * The subscription to delete.
-   * 
- */ - com.google.protobuf.ByteString - getSubscriptionBytes(); -} diff --git a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/DeleteTopicRequest.java b/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/DeleteTopicRequest.java deleted file mode 100644 index cb7dd1257eea..000000000000 --- a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/DeleteTopicRequest.java +++ /dev/null @@ -1,476 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/pubsub/v1/pubsub.proto - -package com.google.pubsub.v1; - -/** - * Protobuf type {@code google.pubsub.v1.DeleteTopicRequest} - * - *
- * Request for the DeleteTopic method.
- * 
- */ -public final class DeleteTopicRequest extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.pubsub.v1.DeleteTopicRequest) - DeleteTopicRequestOrBuilder { - // Use DeleteTopicRequest.newBuilder() to construct. - private DeleteTopicRequest(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private DeleteTopicRequest() { - topic_ = ""; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private DeleteTopicRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - int mutable_bitField0_ = 0; - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!input.skipField(tag)) { - done = true; - } - break; - } - case 10: { - String s = input.readStringRequireUtf8(); - - topic_ = s; - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_DeleteTopicRequest_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_DeleteTopicRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.pubsub.v1.DeleteTopicRequest.class, com.google.pubsub.v1.DeleteTopicRequest.Builder.class); - } - - public static final int TOPIC_FIELD_NUMBER = 1; - private volatile java.lang.Object topic_; - /** - * optional string topic = 1; - * - *
-   * Name of the topic to delete.
-   * 
- */ - public java.lang.String getTopic() { - java.lang.Object ref = topic_; - 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(); - topic_ = s; - return s; - } - } - /** - * optional string topic = 1; - * - *
-   * Name of the topic to delete.
-   * 
- */ - public com.google.protobuf.ByteString - getTopicBytes() { - java.lang.Object ref = topic_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - topic_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!getTopicBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, topic_); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getTopicBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, topic_); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static com.google.pubsub.v1.DeleteTopicRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.pubsub.v1.DeleteTopicRequest 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.pubsub.v1.DeleteTopicRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.pubsub.v1.DeleteTopicRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.pubsub.v1.DeleteTopicRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.pubsub.v1.DeleteTopicRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.pubsub.v1.DeleteTopicRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.pubsub.v1.DeleteTopicRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.pubsub.v1.DeleteTopicRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.pubsub.v1.DeleteTopicRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.pubsub.v1.DeleteTopicRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - 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; - } - /** - * Protobuf type {@code google.pubsub.v1.DeleteTopicRequest} - * - *
-   * Request for the DeleteTopic method.
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.pubsub.v1.DeleteTopicRequest) - com.google.pubsub.v1.DeleteTopicRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_DeleteTopicRequest_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_DeleteTopicRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.pubsub.v1.DeleteTopicRequest.class, com.google.pubsub.v1.DeleteTopicRequest.Builder.class); - } - - // Construct using com.google.pubsub.v1.DeleteTopicRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - topic_ = ""; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_DeleteTopicRequest_descriptor; - } - - public com.google.pubsub.v1.DeleteTopicRequest getDefaultInstanceForType() { - return com.google.pubsub.v1.DeleteTopicRequest.getDefaultInstance(); - } - - public com.google.pubsub.v1.DeleteTopicRequest build() { - com.google.pubsub.v1.DeleteTopicRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.pubsub.v1.DeleteTopicRequest buildPartial() { - com.google.pubsub.v1.DeleteTopicRequest result = new com.google.pubsub.v1.DeleteTopicRequest(this); - result.topic_ = topic_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.pubsub.v1.DeleteTopicRequest) { - return mergeFrom((com.google.pubsub.v1.DeleteTopicRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.pubsub.v1.DeleteTopicRequest other) { - if (other == com.google.pubsub.v1.DeleteTopicRequest.getDefaultInstance()) return this; - if (!other.getTopic().isEmpty()) { - topic_ = other.topic_; - onChanged(); - } - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.pubsub.v1.DeleteTopicRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.pubsub.v1.DeleteTopicRequest) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object topic_ = ""; - /** - * optional string topic = 1; - * - *
-     * Name of the topic to delete.
-     * 
- */ - public java.lang.String getTopic() { - java.lang.Object ref = topic_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - topic_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string topic = 1; - * - *
-     * Name of the topic to delete.
-     * 
- */ - public com.google.protobuf.ByteString - getTopicBytes() { - java.lang.Object ref = topic_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - topic_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string topic = 1; - * - *
-     * Name of the topic to delete.
-     * 
- */ - public Builder setTopic( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - topic_ = value; - onChanged(); - return this; - } - /** - * optional string topic = 1; - * - *
-     * Name of the topic to delete.
-     * 
- */ - public Builder clearTopic() { - - topic_ = getDefaultInstance().getTopic(); - onChanged(); - return this; - } - /** - * optional string topic = 1; - * - *
-     * Name of the topic to delete.
-     * 
- */ - public Builder setTopicBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - topic_ = value; - onChanged(); - return this; - } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.DeleteTopicRequest) - } - - // @@protoc_insertion_point(class_scope:google.pubsub.v1.DeleteTopicRequest) - private static final com.google.pubsub.v1.DeleteTopicRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.pubsub.v1.DeleteTopicRequest(); - } - - public static com.google.pubsub.v1.DeleteTopicRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public DeleteTopicRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new DeleteTopicRequest(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public com.google.pubsub.v1.DeleteTopicRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/DeleteTopicRequestOrBuilder.java b/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/DeleteTopicRequestOrBuilder.java deleted file mode 100644 index c08d12083d31..000000000000 --- a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/DeleteTopicRequestOrBuilder.java +++ /dev/null @@ -1,27 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/pubsub/v1/pubsub.proto - -package com.google.pubsub.v1; - -public interface DeleteTopicRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.pubsub.v1.DeleteTopicRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string topic = 1; - * - *
-   * Name of the topic to delete.
-   * 
- */ - java.lang.String getTopic(); - /** - * optional string topic = 1; - * - *
-   * Name of the topic to delete.
-   * 
- */ - com.google.protobuf.ByteString - getTopicBytes(); -} diff --git a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/GetSubscriptionRequest.java b/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/GetSubscriptionRequest.java deleted file mode 100644 index b8bd3e5f0249..000000000000 --- a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/GetSubscriptionRequest.java +++ /dev/null @@ -1,476 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/pubsub/v1/pubsub.proto - -package com.google.pubsub.v1; - -/** - * Protobuf type {@code google.pubsub.v1.GetSubscriptionRequest} - * - *
- * Request for the GetSubscription method.
- * 
- */ -public final class GetSubscriptionRequest extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.pubsub.v1.GetSubscriptionRequest) - GetSubscriptionRequestOrBuilder { - // Use GetSubscriptionRequest.newBuilder() to construct. - private GetSubscriptionRequest(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private GetSubscriptionRequest() { - subscription_ = ""; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private GetSubscriptionRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - int mutable_bitField0_ = 0; - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!input.skipField(tag)) { - done = true; - } - break; - } - case 10: { - String s = input.readStringRequireUtf8(); - - subscription_ = s; - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_GetSubscriptionRequest_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_GetSubscriptionRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.pubsub.v1.GetSubscriptionRequest.class, com.google.pubsub.v1.GetSubscriptionRequest.Builder.class); - } - - public static final int SUBSCRIPTION_FIELD_NUMBER = 1; - private volatile java.lang.Object subscription_; - /** - * optional string subscription = 1; - * - *
-   * The name of the subscription to get.
-   * 
- */ - public java.lang.String getSubscription() { - java.lang.Object ref = subscription_; - 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(); - subscription_ = s; - return s; - } - } - /** - * optional string subscription = 1; - * - *
-   * The name of the subscription to get.
-   * 
- */ - public com.google.protobuf.ByteString - getSubscriptionBytes() { - java.lang.Object ref = subscription_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - subscription_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!getSubscriptionBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, subscription_); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getSubscriptionBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, subscription_); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static com.google.pubsub.v1.GetSubscriptionRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.pubsub.v1.GetSubscriptionRequest 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.pubsub.v1.GetSubscriptionRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.pubsub.v1.GetSubscriptionRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.pubsub.v1.GetSubscriptionRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.pubsub.v1.GetSubscriptionRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.pubsub.v1.GetSubscriptionRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.pubsub.v1.GetSubscriptionRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.pubsub.v1.GetSubscriptionRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.pubsub.v1.GetSubscriptionRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.pubsub.v1.GetSubscriptionRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - 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; - } - /** - * Protobuf type {@code google.pubsub.v1.GetSubscriptionRequest} - * - *
-   * Request for the GetSubscription method.
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.pubsub.v1.GetSubscriptionRequest) - com.google.pubsub.v1.GetSubscriptionRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_GetSubscriptionRequest_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_GetSubscriptionRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.pubsub.v1.GetSubscriptionRequest.class, com.google.pubsub.v1.GetSubscriptionRequest.Builder.class); - } - - // Construct using com.google.pubsub.v1.GetSubscriptionRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - subscription_ = ""; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_GetSubscriptionRequest_descriptor; - } - - public com.google.pubsub.v1.GetSubscriptionRequest getDefaultInstanceForType() { - return com.google.pubsub.v1.GetSubscriptionRequest.getDefaultInstance(); - } - - public com.google.pubsub.v1.GetSubscriptionRequest build() { - com.google.pubsub.v1.GetSubscriptionRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.pubsub.v1.GetSubscriptionRequest buildPartial() { - com.google.pubsub.v1.GetSubscriptionRequest result = new com.google.pubsub.v1.GetSubscriptionRequest(this); - result.subscription_ = subscription_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.pubsub.v1.GetSubscriptionRequest) { - return mergeFrom((com.google.pubsub.v1.GetSubscriptionRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.pubsub.v1.GetSubscriptionRequest other) { - if (other == com.google.pubsub.v1.GetSubscriptionRequest.getDefaultInstance()) return this; - if (!other.getSubscription().isEmpty()) { - subscription_ = other.subscription_; - onChanged(); - } - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.pubsub.v1.GetSubscriptionRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.pubsub.v1.GetSubscriptionRequest) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object subscription_ = ""; - /** - * optional string subscription = 1; - * - *
-     * The name of the subscription to get.
-     * 
- */ - public java.lang.String getSubscription() { - java.lang.Object ref = subscription_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - subscription_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string subscription = 1; - * - *
-     * The name of the subscription to get.
-     * 
- */ - public com.google.protobuf.ByteString - getSubscriptionBytes() { - java.lang.Object ref = subscription_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - subscription_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string subscription = 1; - * - *
-     * The name of the subscription to get.
-     * 
- */ - public Builder setSubscription( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - subscription_ = value; - onChanged(); - return this; - } - /** - * optional string subscription = 1; - * - *
-     * The name of the subscription to get.
-     * 
- */ - public Builder clearSubscription() { - - subscription_ = getDefaultInstance().getSubscription(); - onChanged(); - return this; - } - /** - * optional string subscription = 1; - * - *
-     * The name of the subscription to get.
-     * 
- */ - public Builder setSubscriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - subscription_ = value; - onChanged(); - return this; - } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.GetSubscriptionRequest) - } - - // @@protoc_insertion_point(class_scope:google.pubsub.v1.GetSubscriptionRequest) - private static final com.google.pubsub.v1.GetSubscriptionRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.pubsub.v1.GetSubscriptionRequest(); - } - - public static com.google.pubsub.v1.GetSubscriptionRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public GetSubscriptionRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new GetSubscriptionRequest(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public com.google.pubsub.v1.GetSubscriptionRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/GetSubscriptionRequestOrBuilder.java b/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/GetSubscriptionRequestOrBuilder.java deleted file mode 100644 index 248eb0561e6f..000000000000 --- a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/GetSubscriptionRequestOrBuilder.java +++ /dev/null @@ -1,27 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/pubsub/v1/pubsub.proto - -package com.google.pubsub.v1; - -public interface GetSubscriptionRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.pubsub.v1.GetSubscriptionRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string subscription = 1; - * - *
-   * The name of the subscription to get.
-   * 
- */ - java.lang.String getSubscription(); - /** - * optional string subscription = 1; - * - *
-   * The name of the subscription to get.
-   * 
- */ - com.google.protobuf.ByteString - getSubscriptionBytes(); -} diff --git a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/GetTopicRequest.java b/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/GetTopicRequest.java deleted file mode 100644 index 17961ce28ab0..000000000000 --- a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/GetTopicRequest.java +++ /dev/null @@ -1,476 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/pubsub/v1/pubsub.proto - -package com.google.pubsub.v1; - -/** - * Protobuf type {@code google.pubsub.v1.GetTopicRequest} - * - *
- * Request for the GetTopic method.
- * 
- */ -public final class GetTopicRequest extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.pubsub.v1.GetTopicRequest) - GetTopicRequestOrBuilder { - // Use GetTopicRequest.newBuilder() to construct. - private GetTopicRequest(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private GetTopicRequest() { - topic_ = ""; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private GetTopicRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - int mutable_bitField0_ = 0; - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!input.skipField(tag)) { - done = true; - } - break; - } - case 10: { - String s = input.readStringRequireUtf8(); - - topic_ = s; - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_GetTopicRequest_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_GetTopicRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.pubsub.v1.GetTopicRequest.class, com.google.pubsub.v1.GetTopicRequest.Builder.class); - } - - public static final int TOPIC_FIELD_NUMBER = 1; - private volatile java.lang.Object topic_; - /** - * optional string topic = 1; - * - *
-   * The name of the topic to get.
-   * 
- */ - public java.lang.String getTopic() { - java.lang.Object ref = topic_; - 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(); - topic_ = s; - return s; - } - } - /** - * optional string topic = 1; - * - *
-   * The name of the topic to get.
-   * 
- */ - public com.google.protobuf.ByteString - getTopicBytes() { - java.lang.Object ref = topic_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - topic_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!getTopicBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, topic_); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getTopicBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, topic_); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static com.google.pubsub.v1.GetTopicRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.pubsub.v1.GetTopicRequest 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.pubsub.v1.GetTopicRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.pubsub.v1.GetTopicRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.pubsub.v1.GetTopicRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.pubsub.v1.GetTopicRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.pubsub.v1.GetTopicRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.pubsub.v1.GetTopicRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.pubsub.v1.GetTopicRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.pubsub.v1.GetTopicRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.pubsub.v1.GetTopicRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - 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; - } - /** - * Protobuf type {@code google.pubsub.v1.GetTopicRequest} - * - *
-   * Request for the GetTopic method.
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.pubsub.v1.GetTopicRequest) - com.google.pubsub.v1.GetTopicRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_GetTopicRequest_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_GetTopicRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.pubsub.v1.GetTopicRequest.class, com.google.pubsub.v1.GetTopicRequest.Builder.class); - } - - // Construct using com.google.pubsub.v1.GetTopicRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - topic_ = ""; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_GetTopicRequest_descriptor; - } - - public com.google.pubsub.v1.GetTopicRequest getDefaultInstanceForType() { - return com.google.pubsub.v1.GetTopicRequest.getDefaultInstance(); - } - - public com.google.pubsub.v1.GetTopicRequest build() { - com.google.pubsub.v1.GetTopicRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.pubsub.v1.GetTopicRequest buildPartial() { - com.google.pubsub.v1.GetTopicRequest result = new com.google.pubsub.v1.GetTopicRequest(this); - result.topic_ = topic_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.pubsub.v1.GetTopicRequest) { - return mergeFrom((com.google.pubsub.v1.GetTopicRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.pubsub.v1.GetTopicRequest other) { - if (other == com.google.pubsub.v1.GetTopicRequest.getDefaultInstance()) return this; - if (!other.getTopic().isEmpty()) { - topic_ = other.topic_; - onChanged(); - } - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.pubsub.v1.GetTopicRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.pubsub.v1.GetTopicRequest) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object topic_ = ""; - /** - * optional string topic = 1; - * - *
-     * The name of the topic to get.
-     * 
- */ - public java.lang.String getTopic() { - java.lang.Object ref = topic_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - topic_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string topic = 1; - * - *
-     * The name of the topic to get.
-     * 
- */ - public com.google.protobuf.ByteString - getTopicBytes() { - java.lang.Object ref = topic_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - topic_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string topic = 1; - * - *
-     * The name of the topic to get.
-     * 
- */ - public Builder setTopic( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - topic_ = value; - onChanged(); - return this; - } - /** - * optional string topic = 1; - * - *
-     * The name of the topic to get.
-     * 
- */ - public Builder clearTopic() { - - topic_ = getDefaultInstance().getTopic(); - onChanged(); - return this; - } - /** - * optional string topic = 1; - * - *
-     * The name of the topic to get.
-     * 
- */ - public Builder setTopicBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - topic_ = value; - onChanged(); - return this; - } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.GetTopicRequest) - } - - // @@protoc_insertion_point(class_scope:google.pubsub.v1.GetTopicRequest) - private static final com.google.pubsub.v1.GetTopicRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.pubsub.v1.GetTopicRequest(); - } - - public static com.google.pubsub.v1.GetTopicRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public GetTopicRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new GetTopicRequest(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public com.google.pubsub.v1.GetTopicRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/GetTopicRequestOrBuilder.java b/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/GetTopicRequestOrBuilder.java deleted file mode 100644 index c26b5276c5da..000000000000 --- a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/GetTopicRequestOrBuilder.java +++ /dev/null @@ -1,27 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/pubsub/v1/pubsub.proto - -package com.google.pubsub.v1; - -public interface GetTopicRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.pubsub.v1.GetTopicRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string topic = 1; - * - *
-   * The name of the topic to get.
-   * 
- */ - java.lang.String getTopic(); - /** - * optional string topic = 1; - * - *
-   * The name of the topic to get.
-   * 
- */ - com.google.protobuf.ByteString - getTopicBytes(); -} diff --git a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/ListSubscriptionsRequest.java b/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/ListSubscriptionsRequest.java deleted file mode 100644 index 8b0cc2e8a04f..000000000000 --- a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/ListSubscriptionsRequest.java +++ /dev/null @@ -1,711 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/pubsub/v1/pubsub.proto - -package com.google.pubsub.v1; - -/** - * Protobuf type {@code google.pubsub.v1.ListSubscriptionsRequest} - * - *
- * Request for the ListSubscriptions method.
- * 
- */ -public final class ListSubscriptionsRequest extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.pubsub.v1.ListSubscriptionsRequest) - ListSubscriptionsRequestOrBuilder { - // Use ListSubscriptionsRequest.newBuilder() to construct. - private ListSubscriptionsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private ListSubscriptionsRequest() { - project_ = ""; - pageSize_ = 0; - pageToken_ = ""; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private ListSubscriptionsRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - int mutable_bitField0_ = 0; - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!input.skipField(tag)) { - done = true; - } - break; - } - case 10: { - String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 16: { - - pageSize_ = input.readInt32(); - break; - } - case 26: { - String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_ListSubscriptionsRequest_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_ListSubscriptionsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.pubsub.v1.ListSubscriptionsRequest.class, com.google.pubsub.v1.ListSubscriptionsRequest.Builder.class); - } - - public static final int PROJECT_FIELD_NUMBER = 1; - private volatile java.lang.Object project_; - /** - * optional string project = 1; - * - *
-   * The name of the cloud project that subscriptions belong to.
-   * 
- */ - public java.lang.String getProject() { - java.lang.Object ref = project_; - 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(); - project_ = s; - return s; - } - } - /** - * optional string project = 1; - * - *
-   * The name of the cloud project that subscriptions belong to.
-   * 
- */ - public com.google.protobuf.ByteString - getProjectBytes() { - java.lang.Object ref = project_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - project_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PAGE_SIZE_FIELD_NUMBER = 2; - private int pageSize_; - /** - * optional int32 page_size = 2; - * - *
-   * Maximum number of subscriptions to return.
-   * 
- */ - public int getPageSize() { - return pageSize_; - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 3; - private volatile java.lang.Object pageToken_; - /** - * optional string page_token = 3; - * - *
-   * The value returned by the last ListSubscriptionsResponse; indicates that
-   * this is a continuation of a prior ListSubscriptions call, and that the
-   * system should return the next page of data.
-   * 
- */ - 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 string page_token = 3; - * - *
-   * The value returned by the last ListSubscriptionsResponse; indicates that
-   * this is a continuation of a prior ListSubscriptions call, and that the
-   * system should return the next page of data.
-   * 
- */ - 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; - } - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!getProjectBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, project_); - } - if (pageSize_ != 0) { - output.writeInt32(2, pageSize_); - } - if (!getPageTokenBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getProjectBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, project_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, pageSize_); - } - if (!getPageTokenBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static com.google.pubsub.v1.ListSubscriptionsRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.pubsub.v1.ListSubscriptionsRequest 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.pubsub.v1.ListSubscriptionsRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.pubsub.v1.ListSubscriptionsRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.pubsub.v1.ListSubscriptionsRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.pubsub.v1.ListSubscriptionsRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.pubsub.v1.ListSubscriptionsRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.pubsub.v1.ListSubscriptionsRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.pubsub.v1.ListSubscriptionsRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.pubsub.v1.ListSubscriptionsRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.pubsub.v1.ListSubscriptionsRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - 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; - } - /** - * Protobuf type {@code google.pubsub.v1.ListSubscriptionsRequest} - * - *
-   * Request for the ListSubscriptions method.
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.pubsub.v1.ListSubscriptionsRequest) - com.google.pubsub.v1.ListSubscriptionsRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_ListSubscriptionsRequest_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_ListSubscriptionsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.pubsub.v1.ListSubscriptionsRequest.class, com.google.pubsub.v1.ListSubscriptionsRequest.Builder.class); - } - - // Construct using com.google.pubsub.v1.ListSubscriptionsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - project_ = ""; - - pageSize_ = 0; - - pageToken_ = ""; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_ListSubscriptionsRequest_descriptor; - } - - public com.google.pubsub.v1.ListSubscriptionsRequest getDefaultInstanceForType() { - return com.google.pubsub.v1.ListSubscriptionsRequest.getDefaultInstance(); - } - - public com.google.pubsub.v1.ListSubscriptionsRequest build() { - com.google.pubsub.v1.ListSubscriptionsRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.pubsub.v1.ListSubscriptionsRequest buildPartial() { - com.google.pubsub.v1.ListSubscriptionsRequest result = new com.google.pubsub.v1.ListSubscriptionsRequest(this); - result.project_ = project_; - result.pageSize_ = pageSize_; - result.pageToken_ = pageToken_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.pubsub.v1.ListSubscriptionsRequest) { - return mergeFrom((com.google.pubsub.v1.ListSubscriptionsRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.pubsub.v1.ListSubscriptionsRequest other) { - if (other == com.google.pubsub.v1.ListSubscriptionsRequest.getDefaultInstance()) return this; - if (!other.getProject().isEmpty()) { - project_ = other.project_; - onChanged(); - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - onChanged(); - } - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.pubsub.v1.ListSubscriptionsRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.pubsub.v1.ListSubscriptionsRequest) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object project_ = ""; - /** - * optional string project = 1; - * - *
-     * The name of the cloud project that subscriptions belong to.
-     * 
- */ - public java.lang.String getProject() { - java.lang.Object ref = project_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - project_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string project = 1; - * - *
-     * The name of the cloud project that subscriptions belong to.
-     * 
- */ - public com.google.protobuf.ByteString - getProjectBytes() { - java.lang.Object ref = project_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - project_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string project = 1; - * - *
-     * The name of the cloud project that subscriptions belong to.
-     * 
- */ - public Builder setProject( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - project_ = value; - onChanged(); - return this; - } - /** - * optional string project = 1; - * - *
-     * The name of the cloud project that subscriptions belong to.
-     * 
- */ - public Builder clearProject() { - - project_ = getDefaultInstance().getProject(); - onChanged(); - return this; - } - /** - * optional string project = 1; - * - *
-     * The name of the cloud project that subscriptions belong to.
-     * 
- */ - public Builder setProjectBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - project_ = value; - onChanged(); - return this; - } - - private int pageSize_ ; - /** - * optional int32 page_size = 2; - * - *
-     * Maximum number of subscriptions to return.
-     * 
- */ - public int getPageSize() { - return pageSize_; - } - /** - * optional int32 page_size = 2; - * - *
-     * Maximum number of subscriptions to return.
-     * 
- */ - public Builder setPageSize(int value) { - - pageSize_ = value; - onChanged(); - return this; - } - /** - * optional int32 page_size = 2; - * - *
-     * Maximum number of subscriptions to return.
-     * 
- */ - public Builder clearPageSize() { - - pageSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object pageToken_ = ""; - /** - * optional string page_token = 3; - * - *
-     * The value returned by the last ListSubscriptionsResponse; indicates that
-     * this is a continuation of a prior ListSubscriptions call, and that the
-     * system should return the next page of data.
-     * 
- */ - 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 string page_token = 3; - * - *
-     * The value returned by the last ListSubscriptionsResponse; indicates that
-     * this is a continuation of a prior ListSubscriptions call, and that the
-     * system should return the next page of data.
-     * 
- */ - 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 string page_token = 3; - * - *
-     * The value returned by the last ListSubscriptionsResponse; indicates that
-     * this is a continuation of a prior ListSubscriptions call, and that the
-     * system should return the next page of data.
-     * 
- */ - public Builder setPageToken( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - pageToken_ = value; - onChanged(); - return this; - } - /** - * optional string page_token = 3; - * - *
-     * The value returned by the last ListSubscriptionsResponse; indicates that
-     * this is a continuation of a prior ListSubscriptions call, and that the
-     * system should return the next page of data.
-     * 
- */ - public Builder clearPageToken() { - - pageToken_ = getDefaultInstance().getPageToken(); - onChanged(); - return this; - } - /** - * optional string page_token = 3; - * - *
-     * The value returned by the last ListSubscriptionsResponse; indicates that
-     * this is a continuation of a prior ListSubscriptions call, and that the
-     * system should return the next page of data.
-     * 
- */ - public Builder setPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - pageToken_ = value; - onChanged(); - return this; - } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.ListSubscriptionsRequest) - } - - // @@protoc_insertion_point(class_scope:google.pubsub.v1.ListSubscriptionsRequest) - private static final com.google.pubsub.v1.ListSubscriptionsRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.pubsub.v1.ListSubscriptionsRequest(); - } - - public static com.google.pubsub.v1.ListSubscriptionsRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public ListSubscriptionsRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new ListSubscriptionsRequest(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public com.google.pubsub.v1.ListSubscriptionsRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/ListSubscriptionsRequestOrBuilder.java b/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/ListSubscriptionsRequestOrBuilder.java deleted file mode 100644 index b8b08410f4a1..000000000000 --- a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/ListSubscriptionsRequestOrBuilder.java +++ /dev/null @@ -1,58 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/pubsub/v1/pubsub.proto - -package com.google.pubsub.v1; - -public interface ListSubscriptionsRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.pubsub.v1.ListSubscriptionsRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string project = 1; - * - *
-   * The name of the cloud project that subscriptions belong to.
-   * 
- */ - java.lang.String getProject(); - /** - * optional string project = 1; - * - *
-   * The name of the cloud project that subscriptions belong to.
-   * 
- */ - com.google.protobuf.ByteString - getProjectBytes(); - - /** - * optional int32 page_size = 2; - * - *
-   * Maximum number of subscriptions to return.
-   * 
- */ - int getPageSize(); - - /** - * optional string page_token = 3; - * - *
-   * The value returned by the last ListSubscriptionsResponse; indicates that
-   * this is a continuation of a prior ListSubscriptions call, and that the
-   * system should return the next page of data.
-   * 
- */ - java.lang.String getPageToken(); - /** - * optional string page_token = 3; - * - *
-   * The value returned by the last ListSubscriptionsResponse; indicates that
-   * this is a continuation of a prior ListSubscriptions call, and that the
-   * system should return the next page of data.
-   * 
- */ - com.google.protobuf.ByteString - getPageTokenBytes(); -} diff --git a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/ListSubscriptionsResponse.java b/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/ListSubscriptionsResponse.java deleted file mode 100644 index 3ef3d6cea957..000000000000 --- a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/ListSubscriptionsResponse.java +++ /dev/null @@ -1,923 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/pubsub/v1/pubsub.proto - -package com.google.pubsub.v1; - -/** - * Protobuf type {@code google.pubsub.v1.ListSubscriptionsResponse} - * - *
- * Response for the ListSubscriptions method.
- * 
- */ -public final class ListSubscriptionsResponse extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.pubsub.v1.ListSubscriptionsResponse) - ListSubscriptionsResponseOrBuilder { - // Use ListSubscriptionsResponse.newBuilder() to construct. - private ListSubscriptionsResponse(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private ListSubscriptionsResponse() { - subscriptions_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private ListSubscriptionsResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - int mutable_bitField0_ = 0; - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!input.skipField(tag)) { - done = true; - } - break; - } - case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - subscriptions_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - subscriptions_.add(input.readMessage(com.google.pubsub.v1.Subscription.parser(), extensionRegistry)); - break; - } - case 18: { - String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - subscriptions_ = java.util.Collections.unmodifiableList(subscriptions_); - } - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_ListSubscriptionsResponse_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_ListSubscriptionsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.pubsub.v1.ListSubscriptionsResponse.class, com.google.pubsub.v1.ListSubscriptionsResponse.Builder.class); - } - - private int bitField0_; - public static final int SUBSCRIPTIONS_FIELD_NUMBER = 1; - private java.util.List subscriptions_; - /** - * repeated .google.pubsub.v1.Subscription subscriptions = 1; - * - *
-   * The subscriptions that match the request.
-   * 
- */ - public java.util.List getSubscriptionsList() { - return subscriptions_; - } - /** - * repeated .google.pubsub.v1.Subscription subscriptions = 1; - * - *
-   * The subscriptions that match the request.
-   * 
- */ - public java.util.List - getSubscriptionsOrBuilderList() { - return subscriptions_; - } - /** - * repeated .google.pubsub.v1.Subscription subscriptions = 1; - * - *
-   * The subscriptions that match the request.
-   * 
- */ - public int getSubscriptionsCount() { - return subscriptions_.size(); - } - /** - * repeated .google.pubsub.v1.Subscription subscriptions = 1; - * - *
-   * The subscriptions that match the request.
-   * 
- */ - public com.google.pubsub.v1.Subscription getSubscriptions(int index) { - return subscriptions_.get(index); - } - /** - * repeated .google.pubsub.v1.Subscription subscriptions = 1; - * - *
-   * The subscriptions that match the request.
-   * 
- */ - public com.google.pubsub.v1.SubscriptionOrBuilder getSubscriptionsOrBuilder( - int index) { - return subscriptions_.get(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; - private volatile java.lang.Object nextPageToken_; - /** - * optional string next_page_token = 2; - * - *
-   * If not empty, indicates that there may be more subscriptions that match
-   * the request; this value should be passed in a new ListSubscriptionsRequest
-   * to get more subscriptions.
-   * 
- */ - 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; - } - } - /** - * optional string next_page_token = 2; - * - *
-   * If not empty, indicates that there may be more subscriptions that match
-   * the request; this value should be passed in a new ListSubscriptionsRequest
-   * to get more subscriptions.
-   * 
- */ - 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; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < subscriptions_.size(); i++) { - output.writeMessage(1, subscriptions_.get(i)); - } - if (!getNextPageTokenBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < subscriptions_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, subscriptions_.get(i)); - } - if (!getNextPageTokenBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static com.google.pubsub.v1.ListSubscriptionsResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.pubsub.v1.ListSubscriptionsResponse 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.pubsub.v1.ListSubscriptionsResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.pubsub.v1.ListSubscriptionsResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.pubsub.v1.ListSubscriptionsResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.pubsub.v1.ListSubscriptionsResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.pubsub.v1.ListSubscriptionsResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.pubsub.v1.ListSubscriptionsResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.pubsub.v1.ListSubscriptionsResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.pubsub.v1.ListSubscriptionsResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.pubsub.v1.ListSubscriptionsResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - 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; - } - /** - * Protobuf type {@code google.pubsub.v1.ListSubscriptionsResponse} - * - *
-   * Response for the ListSubscriptions method.
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.pubsub.v1.ListSubscriptionsResponse) - com.google.pubsub.v1.ListSubscriptionsResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_ListSubscriptionsResponse_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_ListSubscriptionsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.pubsub.v1.ListSubscriptionsResponse.class, com.google.pubsub.v1.ListSubscriptionsResponse.Builder.class); - } - - // Construct using com.google.pubsub.v1.ListSubscriptionsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getSubscriptionsFieldBuilder(); - } - } - public Builder clear() { - super.clear(); - if (subscriptionsBuilder_ == null) { - subscriptions_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - subscriptionsBuilder_.clear(); - } - nextPageToken_ = ""; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_ListSubscriptionsResponse_descriptor; - } - - public com.google.pubsub.v1.ListSubscriptionsResponse getDefaultInstanceForType() { - return com.google.pubsub.v1.ListSubscriptionsResponse.getDefaultInstance(); - } - - public com.google.pubsub.v1.ListSubscriptionsResponse build() { - com.google.pubsub.v1.ListSubscriptionsResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.pubsub.v1.ListSubscriptionsResponse buildPartial() { - com.google.pubsub.v1.ListSubscriptionsResponse result = new com.google.pubsub.v1.ListSubscriptionsResponse(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (subscriptionsBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - subscriptions_ = java.util.Collections.unmodifiableList(subscriptions_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.subscriptions_ = subscriptions_; - } else { - result.subscriptions_ = subscriptionsBuilder_.build(); - } - result.nextPageToken_ = nextPageToken_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.pubsub.v1.ListSubscriptionsResponse) { - return mergeFrom((com.google.pubsub.v1.ListSubscriptionsResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.pubsub.v1.ListSubscriptionsResponse other) { - if (other == com.google.pubsub.v1.ListSubscriptionsResponse.getDefaultInstance()) return this; - if (subscriptionsBuilder_ == null) { - if (!other.subscriptions_.isEmpty()) { - if (subscriptions_.isEmpty()) { - subscriptions_ = other.subscriptions_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureSubscriptionsIsMutable(); - subscriptions_.addAll(other.subscriptions_); - } - onChanged(); - } - } else { - if (!other.subscriptions_.isEmpty()) { - if (subscriptionsBuilder_.isEmpty()) { - subscriptionsBuilder_.dispose(); - subscriptionsBuilder_ = null; - subscriptions_ = other.subscriptions_; - bitField0_ = (bitField0_ & ~0x00000001); - subscriptionsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getSubscriptionsFieldBuilder() : null; - } else { - subscriptionsBuilder_.addAllMessages(other.subscriptions_); - } - } - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - onChanged(); - } - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.pubsub.v1.ListSubscriptionsResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.pubsub.v1.ListSubscriptionsResponse) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List subscriptions_ = - java.util.Collections.emptyList(); - private void ensureSubscriptionsIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { - subscriptions_ = new java.util.ArrayList(subscriptions_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.pubsub.v1.Subscription, com.google.pubsub.v1.Subscription.Builder, com.google.pubsub.v1.SubscriptionOrBuilder> subscriptionsBuilder_; - - /** - * repeated .google.pubsub.v1.Subscription subscriptions = 1; - * - *
-     * The subscriptions that match the request.
-     * 
- */ - public java.util.List getSubscriptionsList() { - if (subscriptionsBuilder_ == null) { - return java.util.Collections.unmodifiableList(subscriptions_); - } else { - return subscriptionsBuilder_.getMessageList(); - } - } - /** - * repeated .google.pubsub.v1.Subscription subscriptions = 1; - * - *
-     * The subscriptions that match the request.
-     * 
- */ - public int getSubscriptionsCount() { - if (subscriptionsBuilder_ == null) { - return subscriptions_.size(); - } else { - return subscriptionsBuilder_.getCount(); - } - } - /** - * repeated .google.pubsub.v1.Subscription subscriptions = 1; - * - *
-     * The subscriptions that match the request.
-     * 
- */ - public com.google.pubsub.v1.Subscription getSubscriptions(int index) { - if (subscriptionsBuilder_ == null) { - return subscriptions_.get(index); - } else { - return subscriptionsBuilder_.getMessage(index); - } - } - /** - * repeated .google.pubsub.v1.Subscription subscriptions = 1; - * - *
-     * The subscriptions that match the request.
-     * 
- */ - public Builder setSubscriptions( - int index, com.google.pubsub.v1.Subscription value) { - if (subscriptionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSubscriptionsIsMutable(); - subscriptions_.set(index, value); - onChanged(); - } else { - subscriptionsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .google.pubsub.v1.Subscription subscriptions = 1; - * - *
-     * The subscriptions that match the request.
-     * 
- */ - public Builder setSubscriptions( - int index, com.google.pubsub.v1.Subscription.Builder builderForValue) { - if (subscriptionsBuilder_ == null) { - ensureSubscriptionsIsMutable(); - subscriptions_.set(index, builderForValue.build()); - onChanged(); - } else { - subscriptionsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.pubsub.v1.Subscription subscriptions = 1; - * - *
-     * The subscriptions that match the request.
-     * 
- */ - public Builder addSubscriptions(com.google.pubsub.v1.Subscription value) { - if (subscriptionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSubscriptionsIsMutable(); - subscriptions_.add(value); - onChanged(); - } else { - subscriptionsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .google.pubsub.v1.Subscription subscriptions = 1; - * - *
-     * The subscriptions that match the request.
-     * 
- */ - public Builder addSubscriptions( - int index, com.google.pubsub.v1.Subscription value) { - if (subscriptionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSubscriptionsIsMutable(); - subscriptions_.add(index, value); - onChanged(); - } else { - subscriptionsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .google.pubsub.v1.Subscription subscriptions = 1; - * - *
-     * The subscriptions that match the request.
-     * 
- */ - public Builder addSubscriptions( - com.google.pubsub.v1.Subscription.Builder builderForValue) { - if (subscriptionsBuilder_ == null) { - ensureSubscriptionsIsMutable(); - subscriptions_.add(builderForValue.build()); - onChanged(); - } else { - subscriptionsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .google.pubsub.v1.Subscription subscriptions = 1; - * - *
-     * The subscriptions that match the request.
-     * 
- */ - public Builder addSubscriptions( - int index, com.google.pubsub.v1.Subscription.Builder builderForValue) { - if (subscriptionsBuilder_ == null) { - ensureSubscriptionsIsMutable(); - subscriptions_.add(index, builderForValue.build()); - onChanged(); - } else { - subscriptionsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.pubsub.v1.Subscription subscriptions = 1; - * - *
-     * The subscriptions that match the request.
-     * 
- */ - public Builder addAllSubscriptions( - java.lang.Iterable values) { - if (subscriptionsBuilder_ == null) { - ensureSubscriptionsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, subscriptions_); - onChanged(); - } else { - subscriptionsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .google.pubsub.v1.Subscription subscriptions = 1; - * - *
-     * The subscriptions that match the request.
-     * 
- */ - public Builder clearSubscriptions() { - if (subscriptionsBuilder_ == null) { - subscriptions_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - subscriptionsBuilder_.clear(); - } - return this; - } - /** - * repeated .google.pubsub.v1.Subscription subscriptions = 1; - * - *
-     * The subscriptions that match the request.
-     * 
- */ - public Builder removeSubscriptions(int index) { - if (subscriptionsBuilder_ == null) { - ensureSubscriptionsIsMutable(); - subscriptions_.remove(index); - onChanged(); - } else { - subscriptionsBuilder_.remove(index); - } - return this; - } - /** - * repeated .google.pubsub.v1.Subscription subscriptions = 1; - * - *
-     * The subscriptions that match the request.
-     * 
- */ - public com.google.pubsub.v1.Subscription.Builder getSubscriptionsBuilder( - int index) { - return getSubscriptionsFieldBuilder().getBuilder(index); - } - /** - * repeated .google.pubsub.v1.Subscription subscriptions = 1; - * - *
-     * The subscriptions that match the request.
-     * 
- */ - public com.google.pubsub.v1.SubscriptionOrBuilder getSubscriptionsOrBuilder( - int index) { - if (subscriptionsBuilder_ == null) { - return subscriptions_.get(index); } else { - return subscriptionsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .google.pubsub.v1.Subscription subscriptions = 1; - * - *
-     * The subscriptions that match the request.
-     * 
- */ - public java.util.List - getSubscriptionsOrBuilderList() { - if (subscriptionsBuilder_ != null) { - return subscriptionsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(subscriptions_); - } - } - /** - * repeated .google.pubsub.v1.Subscription subscriptions = 1; - * - *
-     * The subscriptions that match the request.
-     * 
- */ - public com.google.pubsub.v1.Subscription.Builder addSubscriptionsBuilder() { - return getSubscriptionsFieldBuilder().addBuilder( - com.google.pubsub.v1.Subscription.getDefaultInstance()); - } - /** - * repeated .google.pubsub.v1.Subscription subscriptions = 1; - * - *
-     * The subscriptions that match the request.
-     * 
- */ - public com.google.pubsub.v1.Subscription.Builder addSubscriptionsBuilder( - int index) { - return getSubscriptionsFieldBuilder().addBuilder( - index, com.google.pubsub.v1.Subscription.getDefaultInstance()); - } - /** - * repeated .google.pubsub.v1.Subscription subscriptions = 1; - * - *
-     * The subscriptions that match the request.
-     * 
- */ - public java.util.List - getSubscriptionsBuilderList() { - return getSubscriptionsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - com.google.pubsub.v1.Subscription, com.google.pubsub.v1.Subscription.Builder, com.google.pubsub.v1.SubscriptionOrBuilder> - getSubscriptionsFieldBuilder() { - if (subscriptionsBuilder_ == null) { - subscriptionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - com.google.pubsub.v1.Subscription, com.google.pubsub.v1.Subscription.Builder, com.google.pubsub.v1.SubscriptionOrBuilder>( - subscriptions_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); - subscriptions_ = null; - } - return subscriptionsBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - * optional string next_page_token = 2; - * - *
-     * If not empty, indicates that there may be more subscriptions that match
-     * the request; this value should be passed in a new ListSubscriptionsRequest
-     * to get more subscriptions.
-     * 
- */ - 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; - } - } - /** - * optional string next_page_token = 2; - * - *
-     * If not empty, indicates that there may be more subscriptions that match
-     * the request; this value should be passed in a new ListSubscriptionsRequest
-     * to get more subscriptions.
-     * 
- */ - 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; - } - } - /** - * optional string next_page_token = 2; - * - *
-     * If not empty, indicates that there may be more subscriptions that match
-     * the request; this value should be passed in a new ListSubscriptionsRequest
-     * to get more subscriptions.
-     * 
- */ - public Builder setNextPageToken( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - nextPageToken_ = value; - onChanged(); - return this; - } - /** - * optional string next_page_token = 2; - * - *
-     * If not empty, indicates that there may be more subscriptions that match
-     * the request; this value should be passed in a new ListSubscriptionsRequest
-     * to get more subscriptions.
-     * 
- */ - public Builder clearNextPageToken() { - - nextPageToken_ = getDefaultInstance().getNextPageToken(); - onChanged(); - return this; - } - /** - * optional string next_page_token = 2; - * - *
-     * If not empty, indicates that there may be more subscriptions that match
-     * the request; this value should be passed in a new ListSubscriptionsRequest
-     * to get more subscriptions.
-     * 
- */ - public Builder setNextPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - nextPageToken_ = value; - onChanged(); - return this; - } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.ListSubscriptionsResponse) - } - - // @@protoc_insertion_point(class_scope:google.pubsub.v1.ListSubscriptionsResponse) - private static final com.google.pubsub.v1.ListSubscriptionsResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.pubsub.v1.ListSubscriptionsResponse(); - } - - public static com.google.pubsub.v1.ListSubscriptionsResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public ListSubscriptionsResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new ListSubscriptionsResponse(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public com.google.pubsub.v1.ListSubscriptionsResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/ListSubscriptionsResponseOrBuilder.java b/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/ListSubscriptionsResponseOrBuilder.java deleted file mode 100644 index c931a95d7dc1..000000000000 --- a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/ListSubscriptionsResponseOrBuilder.java +++ /dev/null @@ -1,75 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/pubsub/v1/pubsub.proto - -package com.google.pubsub.v1; - -public interface ListSubscriptionsResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.pubsub.v1.ListSubscriptionsResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated .google.pubsub.v1.Subscription subscriptions = 1; - * - *
-   * The subscriptions that match the request.
-   * 
- */ - java.util.List - getSubscriptionsList(); - /** - * repeated .google.pubsub.v1.Subscription subscriptions = 1; - * - *
-   * The subscriptions that match the request.
-   * 
- */ - com.google.pubsub.v1.Subscription getSubscriptions(int index); - /** - * repeated .google.pubsub.v1.Subscription subscriptions = 1; - * - *
-   * The subscriptions that match the request.
-   * 
- */ - int getSubscriptionsCount(); - /** - * repeated .google.pubsub.v1.Subscription subscriptions = 1; - * - *
-   * The subscriptions that match the request.
-   * 
- */ - java.util.List - getSubscriptionsOrBuilderList(); - /** - * repeated .google.pubsub.v1.Subscription subscriptions = 1; - * - *
-   * The subscriptions that match the request.
-   * 
- */ - com.google.pubsub.v1.SubscriptionOrBuilder getSubscriptionsOrBuilder( - int index); - - /** - * optional string next_page_token = 2; - * - *
-   * If not empty, indicates that there may be more subscriptions that match
-   * the request; this value should be passed in a new ListSubscriptionsRequest
-   * to get more subscriptions.
-   * 
- */ - java.lang.String getNextPageToken(); - /** - * optional string next_page_token = 2; - * - *
-   * If not empty, indicates that there may be more subscriptions that match
-   * the request; this value should be passed in a new ListSubscriptionsRequest
-   * to get more subscriptions.
-   * 
- */ - com.google.protobuf.ByteString - getNextPageTokenBytes(); -} diff --git a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/ListTopicSubscriptionsRequest.java b/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/ListTopicSubscriptionsRequest.java deleted file mode 100644 index c0e56b784e13..000000000000 --- a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/ListTopicSubscriptionsRequest.java +++ /dev/null @@ -1,711 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/pubsub/v1/pubsub.proto - -package com.google.pubsub.v1; - -/** - * Protobuf type {@code google.pubsub.v1.ListTopicSubscriptionsRequest} - * - *
- * Request for the ListTopicSubscriptions method.
- * 
- */ -public final class ListTopicSubscriptionsRequest extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.pubsub.v1.ListTopicSubscriptionsRequest) - ListTopicSubscriptionsRequestOrBuilder { - // Use ListTopicSubscriptionsRequest.newBuilder() to construct. - private ListTopicSubscriptionsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private ListTopicSubscriptionsRequest() { - topic_ = ""; - pageSize_ = 0; - pageToken_ = ""; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private ListTopicSubscriptionsRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - int mutable_bitField0_ = 0; - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!input.skipField(tag)) { - done = true; - } - break; - } - case 10: { - String s = input.readStringRequireUtf8(); - - topic_ = s; - break; - } - case 16: { - - pageSize_ = input.readInt32(); - break; - } - case 26: { - String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_ListTopicSubscriptionsRequest_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_ListTopicSubscriptionsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.pubsub.v1.ListTopicSubscriptionsRequest.class, com.google.pubsub.v1.ListTopicSubscriptionsRequest.Builder.class); - } - - public static final int TOPIC_FIELD_NUMBER = 1; - private volatile java.lang.Object topic_; - /** - * optional string topic = 1; - * - *
-   * The name of the topic that subscriptions are attached to.
-   * 
- */ - public java.lang.String getTopic() { - java.lang.Object ref = topic_; - 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(); - topic_ = s; - return s; - } - } - /** - * optional string topic = 1; - * - *
-   * The name of the topic that subscriptions are attached to.
-   * 
- */ - public com.google.protobuf.ByteString - getTopicBytes() { - java.lang.Object ref = topic_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - topic_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PAGE_SIZE_FIELD_NUMBER = 2; - private int pageSize_; - /** - * optional int32 page_size = 2; - * - *
-   * Maximum number of subscription names to return.
-   * 
- */ - public int getPageSize() { - return pageSize_; - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 3; - private volatile java.lang.Object pageToken_; - /** - * optional string page_token = 3; - * - *
-   * The value returned by the last ListTopicSubscriptionsResponse; indicates
-   * that this is a continuation of a prior ListTopicSubscriptions call, and
-   * that the system should return the next page of data.
-   * 
- */ - 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 string page_token = 3; - * - *
-   * The value returned by the last ListTopicSubscriptionsResponse; indicates
-   * that this is a continuation of a prior ListTopicSubscriptions call, and
-   * that the system should return the next page of data.
-   * 
- */ - 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; - } - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!getTopicBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, topic_); - } - if (pageSize_ != 0) { - output.writeInt32(2, pageSize_); - } - if (!getPageTokenBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getTopicBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, topic_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, pageSize_); - } - if (!getPageTokenBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static com.google.pubsub.v1.ListTopicSubscriptionsRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.pubsub.v1.ListTopicSubscriptionsRequest 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.pubsub.v1.ListTopicSubscriptionsRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.pubsub.v1.ListTopicSubscriptionsRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.pubsub.v1.ListTopicSubscriptionsRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.pubsub.v1.ListTopicSubscriptionsRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.pubsub.v1.ListTopicSubscriptionsRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.pubsub.v1.ListTopicSubscriptionsRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.pubsub.v1.ListTopicSubscriptionsRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.pubsub.v1.ListTopicSubscriptionsRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.pubsub.v1.ListTopicSubscriptionsRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - 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; - } - /** - * Protobuf type {@code google.pubsub.v1.ListTopicSubscriptionsRequest} - * - *
-   * Request for the ListTopicSubscriptions method.
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.pubsub.v1.ListTopicSubscriptionsRequest) - com.google.pubsub.v1.ListTopicSubscriptionsRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_ListTopicSubscriptionsRequest_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_ListTopicSubscriptionsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.pubsub.v1.ListTopicSubscriptionsRequest.class, com.google.pubsub.v1.ListTopicSubscriptionsRequest.Builder.class); - } - - // Construct using com.google.pubsub.v1.ListTopicSubscriptionsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - topic_ = ""; - - pageSize_ = 0; - - pageToken_ = ""; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_ListTopicSubscriptionsRequest_descriptor; - } - - public com.google.pubsub.v1.ListTopicSubscriptionsRequest getDefaultInstanceForType() { - return com.google.pubsub.v1.ListTopicSubscriptionsRequest.getDefaultInstance(); - } - - public com.google.pubsub.v1.ListTopicSubscriptionsRequest build() { - com.google.pubsub.v1.ListTopicSubscriptionsRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.pubsub.v1.ListTopicSubscriptionsRequest buildPartial() { - com.google.pubsub.v1.ListTopicSubscriptionsRequest result = new com.google.pubsub.v1.ListTopicSubscriptionsRequest(this); - result.topic_ = topic_; - result.pageSize_ = pageSize_; - result.pageToken_ = pageToken_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.pubsub.v1.ListTopicSubscriptionsRequest) { - return mergeFrom((com.google.pubsub.v1.ListTopicSubscriptionsRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.pubsub.v1.ListTopicSubscriptionsRequest other) { - if (other == com.google.pubsub.v1.ListTopicSubscriptionsRequest.getDefaultInstance()) return this; - if (!other.getTopic().isEmpty()) { - topic_ = other.topic_; - onChanged(); - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - onChanged(); - } - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.pubsub.v1.ListTopicSubscriptionsRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.pubsub.v1.ListTopicSubscriptionsRequest) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object topic_ = ""; - /** - * optional string topic = 1; - * - *
-     * The name of the topic that subscriptions are attached to.
-     * 
- */ - public java.lang.String getTopic() { - java.lang.Object ref = topic_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - topic_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string topic = 1; - * - *
-     * The name of the topic that subscriptions are attached to.
-     * 
- */ - public com.google.protobuf.ByteString - getTopicBytes() { - java.lang.Object ref = topic_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - topic_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string topic = 1; - * - *
-     * The name of the topic that subscriptions are attached to.
-     * 
- */ - public Builder setTopic( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - topic_ = value; - onChanged(); - return this; - } - /** - * optional string topic = 1; - * - *
-     * The name of the topic that subscriptions are attached to.
-     * 
- */ - public Builder clearTopic() { - - topic_ = getDefaultInstance().getTopic(); - onChanged(); - return this; - } - /** - * optional string topic = 1; - * - *
-     * The name of the topic that subscriptions are attached to.
-     * 
- */ - public Builder setTopicBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - topic_ = value; - onChanged(); - return this; - } - - private int pageSize_ ; - /** - * optional int32 page_size = 2; - * - *
-     * Maximum number of subscription names to return.
-     * 
- */ - public int getPageSize() { - return pageSize_; - } - /** - * optional int32 page_size = 2; - * - *
-     * Maximum number of subscription names to return.
-     * 
- */ - public Builder setPageSize(int value) { - - pageSize_ = value; - onChanged(); - return this; - } - /** - * optional int32 page_size = 2; - * - *
-     * Maximum number of subscription names to return.
-     * 
- */ - public Builder clearPageSize() { - - pageSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object pageToken_ = ""; - /** - * optional string page_token = 3; - * - *
-     * The value returned by the last ListTopicSubscriptionsResponse; indicates
-     * that this is a continuation of a prior ListTopicSubscriptions call, and
-     * that the system should return the next page of data.
-     * 
- */ - 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 string page_token = 3; - * - *
-     * The value returned by the last ListTopicSubscriptionsResponse; indicates
-     * that this is a continuation of a prior ListTopicSubscriptions call, and
-     * that the system should return the next page of data.
-     * 
- */ - 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 string page_token = 3; - * - *
-     * The value returned by the last ListTopicSubscriptionsResponse; indicates
-     * that this is a continuation of a prior ListTopicSubscriptions call, and
-     * that the system should return the next page of data.
-     * 
- */ - public Builder setPageToken( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - pageToken_ = value; - onChanged(); - return this; - } - /** - * optional string page_token = 3; - * - *
-     * The value returned by the last ListTopicSubscriptionsResponse; indicates
-     * that this is a continuation of a prior ListTopicSubscriptions call, and
-     * that the system should return the next page of data.
-     * 
- */ - public Builder clearPageToken() { - - pageToken_ = getDefaultInstance().getPageToken(); - onChanged(); - return this; - } - /** - * optional string page_token = 3; - * - *
-     * The value returned by the last ListTopicSubscriptionsResponse; indicates
-     * that this is a continuation of a prior ListTopicSubscriptions call, and
-     * that the system should return the next page of data.
-     * 
- */ - public Builder setPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - pageToken_ = value; - onChanged(); - return this; - } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.ListTopicSubscriptionsRequest) - } - - // @@protoc_insertion_point(class_scope:google.pubsub.v1.ListTopicSubscriptionsRequest) - private static final com.google.pubsub.v1.ListTopicSubscriptionsRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.pubsub.v1.ListTopicSubscriptionsRequest(); - } - - public static com.google.pubsub.v1.ListTopicSubscriptionsRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public ListTopicSubscriptionsRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new ListTopicSubscriptionsRequest(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public com.google.pubsub.v1.ListTopicSubscriptionsRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/ListTopicSubscriptionsRequestOrBuilder.java b/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/ListTopicSubscriptionsRequestOrBuilder.java deleted file mode 100644 index dafee9be2078..000000000000 --- a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/ListTopicSubscriptionsRequestOrBuilder.java +++ /dev/null @@ -1,58 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/pubsub/v1/pubsub.proto - -package com.google.pubsub.v1; - -public interface ListTopicSubscriptionsRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.pubsub.v1.ListTopicSubscriptionsRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string topic = 1; - * - *
-   * The name of the topic that subscriptions are attached to.
-   * 
- */ - java.lang.String getTopic(); - /** - * optional string topic = 1; - * - *
-   * The name of the topic that subscriptions are attached to.
-   * 
- */ - com.google.protobuf.ByteString - getTopicBytes(); - - /** - * optional int32 page_size = 2; - * - *
-   * Maximum number of subscription names to return.
-   * 
- */ - int getPageSize(); - - /** - * optional string page_token = 3; - * - *
-   * The value returned by the last ListTopicSubscriptionsResponse; indicates
-   * that this is a continuation of a prior ListTopicSubscriptions call, and
-   * that the system should return the next page of data.
-   * 
- */ - java.lang.String getPageToken(); - /** - * optional string page_token = 3; - * - *
-   * The value returned by the last ListTopicSubscriptionsResponse; indicates
-   * that this is a continuation of a prior ListTopicSubscriptions call, and
-   * that the system should return the next page of data.
-   * 
- */ - com.google.protobuf.ByteString - getPageTokenBytes(); -} diff --git a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/ListTopicSubscriptionsResponse.java b/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/ListTopicSubscriptionsResponse.java deleted file mode 100644 index 3fe8e4ccf74b..000000000000 --- a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/ListTopicSubscriptionsResponse.java +++ /dev/null @@ -1,711 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/pubsub/v1/pubsub.proto - -package com.google.pubsub.v1; - -/** - * Protobuf type {@code google.pubsub.v1.ListTopicSubscriptionsResponse} - * - *
- * Response for the ListTopicSubscriptions method.
- * 
- */ -public final class ListTopicSubscriptionsResponse extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.pubsub.v1.ListTopicSubscriptionsResponse) - ListTopicSubscriptionsResponseOrBuilder { - // Use ListTopicSubscriptionsResponse.newBuilder() to construct. - private ListTopicSubscriptionsResponse(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private ListTopicSubscriptionsResponse() { - subscriptions_ = com.google.protobuf.LazyStringArrayList.EMPTY; - nextPageToken_ = ""; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private ListTopicSubscriptionsResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - int mutable_bitField0_ = 0; - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!input.skipField(tag)) { - done = true; - } - break; - } - case 10: { - String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - subscriptions_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - subscriptions_.add(s); - break; - } - case 18: { - String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - subscriptions_ = subscriptions_.getUnmodifiableView(); - } - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_ListTopicSubscriptionsResponse_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_ListTopicSubscriptionsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.pubsub.v1.ListTopicSubscriptionsResponse.class, com.google.pubsub.v1.ListTopicSubscriptionsResponse.Builder.class); - } - - private int bitField0_; - public static final int SUBSCRIPTIONS_FIELD_NUMBER = 1; - private com.google.protobuf.LazyStringList subscriptions_; - /** - * repeated string subscriptions = 1; - * - *
-   * The names of the subscriptions that match the request.
-   * 
- */ - public com.google.protobuf.ProtocolStringList - getSubscriptionsList() { - return subscriptions_; - } - /** - * repeated string subscriptions = 1; - * - *
-   * The names of the subscriptions that match the request.
-   * 
- */ - public int getSubscriptionsCount() { - return subscriptions_.size(); - } - /** - * repeated string subscriptions = 1; - * - *
-   * The names of the subscriptions that match the request.
-   * 
- */ - public java.lang.String getSubscriptions(int index) { - return subscriptions_.get(index); - } - /** - * repeated string subscriptions = 1; - * - *
-   * The names of the subscriptions that match the request.
-   * 
- */ - public com.google.protobuf.ByteString - getSubscriptionsBytes(int index) { - return subscriptions_.getByteString(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; - private volatile java.lang.Object nextPageToken_; - /** - * optional string next_page_token = 2; - * - *
-   * If not empty, indicates that there may be more subscriptions that match
-   * the request; this value should be passed in a new
-   * ListTopicSubscriptionsRequest to get more subscriptions.
-   * 
- */ - 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; - } - } - /** - * optional string next_page_token = 2; - * - *
-   * If not empty, indicates that there may be more subscriptions that match
-   * the request; this value should be passed in a new
-   * ListTopicSubscriptionsRequest to get more subscriptions.
-   * 
- */ - 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; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < subscriptions_.size(); i++) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, subscriptions_.getRaw(i)); - } - if (!getNextPageTokenBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < subscriptions_.size(); i++) { - dataSize += computeStringSizeNoTag(subscriptions_.getRaw(i)); - } - size += dataSize; - size += 1 * getSubscriptionsList().size(); - } - if (!getNextPageTokenBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static com.google.pubsub.v1.ListTopicSubscriptionsResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.pubsub.v1.ListTopicSubscriptionsResponse 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.pubsub.v1.ListTopicSubscriptionsResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.pubsub.v1.ListTopicSubscriptionsResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.pubsub.v1.ListTopicSubscriptionsResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.pubsub.v1.ListTopicSubscriptionsResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.pubsub.v1.ListTopicSubscriptionsResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.pubsub.v1.ListTopicSubscriptionsResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.pubsub.v1.ListTopicSubscriptionsResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.pubsub.v1.ListTopicSubscriptionsResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.pubsub.v1.ListTopicSubscriptionsResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - 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; - } - /** - * Protobuf type {@code google.pubsub.v1.ListTopicSubscriptionsResponse} - * - *
-   * Response for the ListTopicSubscriptions method.
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.pubsub.v1.ListTopicSubscriptionsResponse) - com.google.pubsub.v1.ListTopicSubscriptionsResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_ListTopicSubscriptionsResponse_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_ListTopicSubscriptionsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.pubsub.v1.ListTopicSubscriptionsResponse.class, com.google.pubsub.v1.ListTopicSubscriptionsResponse.Builder.class); - } - - // Construct using com.google.pubsub.v1.ListTopicSubscriptionsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - subscriptions_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - nextPageToken_ = ""; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_ListTopicSubscriptionsResponse_descriptor; - } - - public com.google.pubsub.v1.ListTopicSubscriptionsResponse getDefaultInstanceForType() { - return com.google.pubsub.v1.ListTopicSubscriptionsResponse.getDefaultInstance(); - } - - public com.google.pubsub.v1.ListTopicSubscriptionsResponse build() { - com.google.pubsub.v1.ListTopicSubscriptionsResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.pubsub.v1.ListTopicSubscriptionsResponse buildPartial() { - com.google.pubsub.v1.ListTopicSubscriptionsResponse result = new com.google.pubsub.v1.ListTopicSubscriptionsResponse(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - subscriptions_ = subscriptions_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.subscriptions_ = subscriptions_; - result.nextPageToken_ = nextPageToken_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.pubsub.v1.ListTopicSubscriptionsResponse) { - return mergeFrom((com.google.pubsub.v1.ListTopicSubscriptionsResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.pubsub.v1.ListTopicSubscriptionsResponse other) { - if (other == com.google.pubsub.v1.ListTopicSubscriptionsResponse.getDefaultInstance()) return this; - if (!other.subscriptions_.isEmpty()) { - if (subscriptions_.isEmpty()) { - subscriptions_ = other.subscriptions_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureSubscriptionsIsMutable(); - subscriptions_.addAll(other.subscriptions_); - } - onChanged(); - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - onChanged(); - } - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.pubsub.v1.ListTopicSubscriptionsResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.pubsub.v1.ListTopicSubscriptionsResponse) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.protobuf.LazyStringList subscriptions_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureSubscriptionsIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { - subscriptions_ = new com.google.protobuf.LazyStringArrayList(subscriptions_); - bitField0_ |= 0x00000001; - } - } - /** - * repeated string subscriptions = 1; - * - *
-     * The names of the subscriptions that match the request.
-     * 
- */ - public com.google.protobuf.ProtocolStringList - getSubscriptionsList() { - return subscriptions_.getUnmodifiableView(); - } - /** - * repeated string subscriptions = 1; - * - *
-     * The names of the subscriptions that match the request.
-     * 
- */ - public int getSubscriptionsCount() { - return subscriptions_.size(); - } - /** - * repeated string subscriptions = 1; - * - *
-     * The names of the subscriptions that match the request.
-     * 
- */ - public java.lang.String getSubscriptions(int index) { - return subscriptions_.get(index); - } - /** - * repeated string subscriptions = 1; - * - *
-     * The names of the subscriptions that match the request.
-     * 
- */ - public com.google.protobuf.ByteString - getSubscriptionsBytes(int index) { - return subscriptions_.getByteString(index); - } - /** - * repeated string subscriptions = 1; - * - *
-     * The names of the subscriptions that match the request.
-     * 
- */ - public Builder setSubscriptions( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureSubscriptionsIsMutable(); - subscriptions_.set(index, value); - onChanged(); - return this; - } - /** - * repeated string subscriptions = 1; - * - *
-     * The names of the subscriptions that match the request.
-     * 
- */ - public Builder addSubscriptions( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureSubscriptionsIsMutable(); - subscriptions_.add(value); - onChanged(); - return this; - } - /** - * repeated string subscriptions = 1; - * - *
-     * The names of the subscriptions that match the request.
-     * 
- */ - public Builder addAllSubscriptions( - java.lang.Iterable values) { - ensureSubscriptionsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, subscriptions_); - onChanged(); - return this; - } - /** - * repeated string subscriptions = 1; - * - *
-     * The names of the subscriptions that match the request.
-     * 
- */ - public Builder clearSubscriptions() { - subscriptions_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * repeated string subscriptions = 1; - * - *
-     * The names of the subscriptions that match the request.
-     * 
- */ - public Builder addSubscriptionsBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureSubscriptionsIsMutable(); - subscriptions_.add(value); - onChanged(); - return this; - } - - private java.lang.Object nextPageToken_ = ""; - /** - * optional string next_page_token = 2; - * - *
-     * If not empty, indicates that there may be more subscriptions that match
-     * the request; this value should be passed in a new
-     * ListTopicSubscriptionsRequest to get more subscriptions.
-     * 
- */ - 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; - } - } - /** - * optional string next_page_token = 2; - * - *
-     * If not empty, indicates that there may be more subscriptions that match
-     * the request; this value should be passed in a new
-     * ListTopicSubscriptionsRequest to get more subscriptions.
-     * 
- */ - 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; - } - } - /** - * optional string next_page_token = 2; - * - *
-     * If not empty, indicates that there may be more subscriptions that match
-     * the request; this value should be passed in a new
-     * ListTopicSubscriptionsRequest to get more subscriptions.
-     * 
- */ - public Builder setNextPageToken( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - nextPageToken_ = value; - onChanged(); - return this; - } - /** - * optional string next_page_token = 2; - * - *
-     * If not empty, indicates that there may be more subscriptions that match
-     * the request; this value should be passed in a new
-     * ListTopicSubscriptionsRequest to get more subscriptions.
-     * 
- */ - public Builder clearNextPageToken() { - - nextPageToken_ = getDefaultInstance().getNextPageToken(); - onChanged(); - return this; - } - /** - * optional string next_page_token = 2; - * - *
-     * If not empty, indicates that there may be more subscriptions that match
-     * the request; this value should be passed in a new
-     * ListTopicSubscriptionsRequest to get more subscriptions.
-     * 
- */ - public Builder setNextPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - nextPageToken_ = value; - onChanged(); - return this; - } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.ListTopicSubscriptionsResponse) - } - - // @@protoc_insertion_point(class_scope:google.pubsub.v1.ListTopicSubscriptionsResponse) - private static final com.google.pubsub.v1.ListTopicSubscriptionsResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.pubsub.v1.ListTopicSubscriptionsResponse(); - } - - public static com.google.pubsub.v1.ListTopicSubscriptionsResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public ListTopicSubscriptionsResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new ListTopicSubscriptionsResponse(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public com.google.pubsub.v1.ListTopicSubscriptionsResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/ListTopicSubscriptionsResponseOrBuilder.java b/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/ListTopicSubscriptionsResponseOrBuilder.java deleted file mode 100644 index 7cfc77118c55..000000000000 --- a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/ListTopicSubscriptionsResponseOrBuilder.java +++ /dev/null @@ -1,66 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/pubsub/v1/pubsub.proto - -package com.google.pubsub.v1; - -public interface ListTopicSubscriptionsResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.pubsub.v1.ListTopicSubscriptionsResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated string subscriptions = 1; - * - *
-   * The names of the subscriptions that match the request.
-   * 
- */ - com.google.protobuf.ProtocolStringList - getSubscriptionsList(); - /** - * repeated string subscriptions = 1; - * - *
-   * The names of the subscriptions that match the request.
-   * 
- */ - int getSubscriptionsCount(); - /** - * repeated string subscriptions = 1; - * - *
-   * The names of the subscriptions that match the request.
-   * 
- */ - java.lang.String getSubscriptions(int index); - /** - * repeated string subscriptions = 1; - * - *
-   * The names of the subscriptions that match the request.
-   * 
- */ - com.google.protobuf.ByteString - getSubscriptionsBytes(int index); - - /** - * optional string next_page_token = 2; - * - *
-   * If not empty, indicates that there may be more subscriptions that match
-   * the request; this value should be passed in a new
-   * ListTopicSubscriptionsRequest to get more subscriptions.
-   * 
- */ - java.lang.String getNextPageToken(); - /** - * optional string next_page_token = 2; - * - *
-   * If not empty, indicates that there may be more subscriptions that match
-   * the request; this value should be passed in a new
-   * ListTopicSubscriptionsRequest to get more subscriptions.
-   * 
- */ - com.google.protobuf.ByteString - getNextPageTokenBytes(); -} diff --git a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/ListTopicsRequest.java b/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/ListTopicsRequest.java deleted file mode 100644 index 3657dfe92162..000000000000 --- a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/ListTopicsRequest.java +++ /dev/null @@ -1,711 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/pubsub/v1/pubsub.proto - -package com.google.pubsub.v1; - -/** - * Protobuf type {@code google.pubsub.v1.ListTopicsRequest} - * - *
- * Request for the ListTopics method.
- * 
- */ -public final class ListTopicsRequest extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.pubsub.v1.ListTopicsRequest) - ListTopicsRequestOrBuilder { - // Use ListTopicsRequest.newBuilder() to construct. - private ListTopicsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private ListTopicsRequest() { - project_ = ""; - pageSize_ = 0; - pageToken_ = ""; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private ListTopicsRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - int mutable_bitField0_ = 0; - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!input.skipField(tag)) { - done = true; - } - break; - } - case 10: { - String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 16: { - - pageSize_ = input.readInt32(); - break; - } - case 26: { - String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_ListTopicsRequest_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_ListTopicsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.pubsub.v1.ListTopicsRequest.class, com.google.pubsub.v1.ListTopicsRequest.Builder.class); - } - - public static final int PROJECT_FIELD_NUMBER = 1; - private volatile java.lang.Object project_; - /** - * optional string project = 1; - * - *
-   * The name of the cloud project that topics belong to.
-   * 
- */ - public java.lang.String getProject() { - java.lang.Object ref = project_; - 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(); - project_ = s; - return s; - } - } - /** - * optional string project = 1; - * - *
-   * The name of the cloud project that topics belong to.
-   * 
- */ - public com.google.protobuf.ByteString - getProjectBytes() { - java.lang.Object ref = project_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - project_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PAGE_SIZE_FIELD_NUMBER = 2; - private int pageSize_; - /** - * optional int32 page_size = 2; - * - *
-   * Maximum number of topics to return.
-   * 
- */ - public int getPageSize() { - return pageSize_; - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 3; - private volatile java.lang.Object pageToken_; - /** - * optional string page_token = 3; - * - *
-   * The value returned by the last ListTopicsResponse; indicates that this is
-   * a continuation of a prior ListTopics call, and that the system should
-   * return the next page of data.
-   * 
- */ - 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 string page_token = 3; - * - *
-   * The value returned by the last ListTopicsResponse; indicates that this is
-   * a continuation of a prior ListTopics call, and that the system should
-   * return the next page of data.
-   * 
- */ - 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; - } - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!getProjectBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, project_); - } - if (pageSize_ != 0) { - output.writeInt32(2, pageSize_); - } - if (!getPageTokenBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getProjectBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, project_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, pageSize_); - } - if (!getPageTokenBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static com.google.pubsub.v1.ListTopicsRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.pubsub.v1.ListTopicsRequest 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.pubsub.v1.ListTopicsRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.pubsub.v1.ListTopicsRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.pubsub.v1.ListTopicsRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.pubsub.v1.ListTopicsRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.pubsub.v1.ListTopicsRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.pubsub.v1.ListTopicsRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.pubsub.v1.ListTopicsRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.pubsub.v1.ListTopicsRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.pubsub.v1.ListTopicsRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - 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; - } - /** - * Protobuf type {@code google.pubsub.v1.ListTopicsRequest} - * - *
-   * Request for the ListTopics method.
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.pubsub.v1.ListTopicsRequest) - com.google.pubsub.v1.ListTopicsRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_ListTopicsRequest_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_ListTopicsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.pubsub.v1.ListTopicsRequest.class, com.google.pubsub.v1.ListTopicsRequest.Builder.class); - } - - // Construct using com.google.pubsub.v1.ListTopicsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - project_ = ""; - - pageSize_ = 0; - - pageToken_ = ""; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_ListTopicsRequest_descriptor; - } - - public com.google.pubsub.v1.ListTopicsRequest getDefaultInstanceForType() { - return com.google.pubsub.v1.ListTopicsRequest.getDefaultInstance(); - } - - public com.google.pubsub.v1.ListTopicsRequest build() { - com.google.pubsub.v1.ListTopicsRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.pubsub.v1.ListTopicsRequest buildPartial() { - com.google.pubsub.v1.ListTopicsRequest result = new com.google.pubsub.v1.ListTopicsRequest(this); - result.project_ = project_; - result.pageSize_ = pageSize_; - result.pageToken_ = pageToken_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.pubsub.v1.ListTopicsRequest) { - return mergeFrom((com.google.pubsub.v1.ListTopicsRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.pubsub.v1.ListTopicsRequest other) { - if (other == com.google.pubsub.v1.ListTopicsRequest.getDefaultInstance()) return this; - if (!other.getProject().isEmpty()) { - project_ = other.project_; - onChanged(); - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - onChanged(); - } - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.pubsub.v1.ListTopicsRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.pubsub.v1.ListTopicsRequest) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object project_ = ""; - /** - * optional string project = 1; - * - *
-     * The name of the cloud project that topics belong to.
-     * 
- */ - public java.lang.String getProject() { - java.lang.Object ref = project_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - project_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string project = 1; - * - *
-     * The name of the cloud project that topics belong to.
-     * 
- */ - public com.google.protobuf.ByteString - getProjectBytes() { - java.lang.Object ref = project_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - project_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string project = 1; - * - *
-     * The name of the cloud project that topics belong to.
-     * 
- */ - public Builder setProject( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - project_ = value; - onChanged(); - return this; - } - /** - * optional string project = 1; - * - *
-     * The name of the cloud project that topics belong to.
-     * 
- */ - public Builder clearProject() { - - project_ = getDefaultInstance().getProject(); - onChanged(); - return this; - } - /** - * optional string project = 1; - * - *
-     * The name of the cloud project that topics belong to.
-     * 
- */ - public Builder setProjectBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - project_ = value; - onChanged(); - return this; - } - - private int pageSize_ ; - /** - * optional int32 page_size = 2; - * - *
-     * Maximum number of topics to return.
-     * 
- */ - public int getPageSize() { - return pageSize_; - } - /** - * optional int32 page_size = 2; - * - *
-     * Maximum number of topics to return.
-     * 
- */ - public Builder setPageSize(int value) { - - pageSize_ = value; - onChanged(); - return this; - } - /** - * optional int32 page_size = 2; - * - *
-     * Maximum number of topics to return.
-     * 
- */ - public Builder clearPageSize() { - - pageSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object pageToken_ = ""; - /** - * optional string page_token = 3; - * - *
-     * The value returned by the last ListTopicsResponse; indicates that this is
-     * a continuation of a prior ListTopics call, and that the system should
-     * return the next page of data.
-     * 
- */ - 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 string page_token = 3; - * - *
-     * The value returned by the last ListTopicsResponse; indicates that this is
-     * a continuation of a prior ListTopics call, and that the system should
-     * return the next page of data.
-     * 
- */ - 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 string page_token = 3; - * - *
-     * The value returned by the last ListTopicsResponse; indicates that this is
-     * a continuation of a prior ListTopics call, and that the system should
-     * return the next page of data.
-     * 
- */ - public Builder setPageToken( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - pageToken_ = value; - onChanged(); - return this; - } - /** - * optional string page_token = 3; - * - *
-     * The value returned by the last ListTopicsResponse; indicates that this is
-     * a continuation of a prior ListTopics call, and that the system should
-     * return the next page of data.
-     * 
- */ - public Builder clearPageToken() { - - pageToken_ = getDefaultInstance().getPageToken(); - onChanged(); - return this; - } - /** - * optional string page_token = 3; - * - *
-     * The value returned by the last ListTopicsResponse; indicates that this is
-     * a continuation of a prior ListTopics call, and that the system should
-     * return the next page of data.
-     * 
- */ - public Builder setPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - pageToken_ = value; - onChanged(); - return this; - } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.ListTopicsRequest) - } - - // @@protoc_insertion_point(class_scope:google.pubsub.v1.ListTopicsRequest) - private static final com.google.pubsub.v1.ListTopicsRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.pubsub.v1.ListTopicsRequest(); - } - - public static com.google.pubsub.v1.ListTopicsRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public ListTopicsRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new ListTopicsRequest(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public com.google.pubsub.v1.ListTopicsRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/ListTopicsRequestOrBuilder.java b/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/ListTopicsRequestOrBuilder.java deleted file mode 100644 index 2b8d27032226..000000000000 --- a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/ListTopicsRequestOrBuilder.java +++ /dev/null @@ -1,58 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/pubsub/v1/pubsub.proto - -package com.google.pubsub.v1; - -public interface ListTopicsRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.pubsub.v1.ListTopicsRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string project = 1; - * - *
-   * The name of the cloud project that topics belong to.
-   * 
- */ - java.lang.String getProject(); - /** - * optional string project = 1; - * - *
-   * The name of the cloud project that topics belong to.
-   * 
- */ - com.google.protobuf.ByteString - getProjectBytes(); - - /** - * optional int32 page_size = 2; - * - *
-   * Maximum number of topics to return.
-   * 
- */ - int getPageSize(); - - /** - * optional string page_token = 3; - * - *
-   * The value returned by the last ListTopicsResponse; indicates that this is
-   * a continuation of a prior ListTopics call, and that the system should
-   * return the next page of data.
-   * 
- */ - java.lang.String getPageToken(); - /** - * optional string page_token = 3; - * - *
-   * The value returned by the last ListTopicsResponse; indicates that this is
-   * a continuation of a prior ListTopics call, and that the system should
-   * return the next page of data.
-   * 
- */ - com.google.protobuf.ByteString - getPageTokenBytes(); -} diff --git a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/ListTopicsResponse.java b/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/ListTopicsResponse.java deleted file mode 100644 index 80928fca5160..000000000000 --- a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/ListTopicsResponse.java +++ /dev/null @@ -1,916 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/pubsub/v1/pubsub.proto - -package com.google.pubsub.v1; - -/** - * Protobuf type {@code google.pubsub.v1.ListTopicsResponse} - * - *
- * Response for the ListTopics method.
- * 
- */ -public final class ListTopicsResponse extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.pubsub.v1.ListTopicsResponse) - ListTopicsResponseOrBuilder { - // Use ListTopicsResponse.newBuilder() to construct. - private ListTopicsResponse(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private ListTopicsResponse() { - topics_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private ListTopicsResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - int mutable_bitField0_ = 0; - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!input.skipField(tag)) { - done = true; - } - break; - } - case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - topics_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - topics_.add(input.readMessage(com.google.pubsub.v1.Topic.parser(), extensionRegistry)); - break; - } - case 18: { - String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - topics_ = java.util.Collections.unmodifiableList(topics_); - } - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_ListTopicsResponse_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_ListTopicsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.pubsub.v1.ListTopicsResponse.class, com.google.pubsub.v1.ListTopicsResponse.Builder.class); - } - - private int bitField0_; - public static final int TOPICS_FIELD_NUMBER = 1; - private java.util.List topics_; - /** - * repeated .google.pubsub.v1.Topic topics = 1; - * - *
-   * The resulting topics.
-   * 
- */ - public java.util.List getTopicsList() { - return topics_; - } - /** - * repeated .google.pubsub.v1.Topic topics = 1; - * - *
-   * The resulting topics.
-   * 
- */ - public java.util.List - getTopicsOrBuilderList() { - return topics_; - } - /** - * repeated .google.pubsub.v1.Topic topics = 1; - * - *
-   * The resulting topics.
-   * 
- */ - public int getTopicsCount() { - return topics_.size(); - } - /** - * repeated .google.pubsub.v1.Topic topics = 1; - * - *
-   * The resulting topics.
-   * 
- */ - public com.google.pubsub.v1.Topic getTopics(int index) { - return topics_.get(index); - } - /** - * repeated .google.pubsub.v1.Topic topics = 1; - * - *
-   * The resulting topics.
-   * 
- */ - public com.google.pubsub.v1.TopicOrBuilder getTopicsOrBuilder( - int index) { - return topics_.get(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; - private volatile java.lang.Object nextPageToken_; - /** - * optional string next_page_token = 2; - * - *
-   * If not empty, indicates that there may be more topics that match the
-   * request; this value should be passed in a new ListTopicsRequest.
-   * 
- */ - 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; - } - } - /** - * optional string next_page_token = 2; - * - *
-   * If not empty, indicates that there may be more topics that match the
-   * request; this value should be passed in a new ListTopicsRequest.
-   * 
- */ - 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; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < topics_.size(); i++) { - output.writeMessage(1, topics_.get(i)); - } - if (!getNextPageTokenBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < topics_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, topics_.get(i)); - } - if (!getNextPageTokenBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static com.google.pubsub.v1.ListTopicsResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.pubsub.v1.ListTopicsResponse 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.pubsub.v1.ListTopicsResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.pubsub.v1.ListTopicsResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.pubsub.v1.ListTopicsResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.pubsub.v1.ListTopicsResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.pubsub.v1.ListTopicsResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.pubsub.v1.ListTopicsResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.pubsub.v1.ListTopicsResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.pubsub.v1.ListTopicsResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.pubsub.v1.ListTopicsResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - 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; - } - /** - * Protobuf type {@code google.pubsub.v1.ListTopicsResponse} - * - *
-   * Response for the ListTopics method.
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.pubsub.v1.ListTopicsResponse) - com.google.pubsub.v1.ListTopicsResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_ListTopicsResponse_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_ListTopicsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.pubsub.v1.ListTopicsResponse.class, com.google.pubsub.v1.ListTopicsResponse.Builder.class); - } - - // Construct using com.google.pubsub.v1.ListTopicsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getTopicsFieldBuilder(); - } - } - public Builder clear() { - super.clear(); - if (topicsBuilder_ == null) { - topics_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - topicsBuilder_.clear(); - } - nextPageToken_ = ""; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_ListTopicsResponse_descriptor; - } - - public com.google.pubsub.v1.ListTopicsResponse getDefaultInstanceForType() { - return com.google.pubsub.v1.ListTopicsResponse.getDefaultInstance(); - } - - public com.google.pubsub.v1.ListTopicsResponse build() { - com.google.pubsub.v1.ListTopicsResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.pubsub.v1.ListTopicsResponse buildPartial() { - com.google.pubsub.v1.ListTopicsResponse result = new com.google.pubsub.v1.ListTopicsResponse(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (topicsBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - topics_ = java.util.Collections.unmodifiableList(topics_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.topics_ = topics_; - } else { - result.topics_ = topicsBuilder_.build(); - } - result.nextPageToken_ = nextPageToken_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.pubsub.v1.ListTopicsResponse) { - return mergeFrom((com.google.pubsub.v1.ListTopicsResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.pubsub.v1.ListTopicsResponse other) { - if (other == com.google.pubsub.v1.ListTopicsResponse.getDefaultInstance()) return this; - if (topicsBuilder_ == null) { - if (!other.topics_.isEmpty()) { - if (topics_.isEmpty()) { - topics_ = other.topics_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureTopicsIsMutable(); - topics_.addAll(other.topics_); - } - onChanged(); - } - } else { - if (!other.topics_.isEmpty()) { - if (topicsBuilder_.isEmpty()) { - topicsBuilder_.dispose(); - topicsBuilder_ = null; - topics_ = other.topics_; - bitField0_ = (bitField0_ & ~0x00000001); - topicsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getTopicsFieldBuilder() : null; - } else { - topicsBuilder_.addAllMessages(other.topics_); - } - } - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - onChanged(); - } - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.pubsub.v1.ListTopicsResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.pubsub.v1.ListTopicsResponse) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List topics_ = - java.util.Collections.emptyList(); - private void ensureTopicsIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { - topics_ = new java.util.ArrayList(topics_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.pubsub.v1.Topic, com.google.pubsub.v1.Topic.Builder, com.google.pubsub.v1.TopicOrBuilder> topicsBuilder_; - - /** - * repeated .google.pubsub.v1.Topic topics = 1; - * - *
-     * The resulting topics.
-     * 
- */ - public java.util.List getTopicsList() { - if (topicsBuilder_ == null) { - return java.util.Collections.unmodifiableList(topics_); - } else { - return topicsBuilder_.getMessageList(); - } - } - /** - * repeated .google.pubsub.v1.Topic topics = 1; - * - *
-     * The resulting topics.
-     * 
- */ - public int getTopicsCount() { - if (topicsBuilder_ == null) { - return topics_.size(); - } else { - return topicsBuilder_.getCount(); - } - } - /** - * repeated .google.pubsub.v1.Topic topics = 1; - * - *
-     * The resulting topics.
-     * 
- */ - public com.google.pubsub.v1.Topic getTopics(int index) { - if (topicsBuilder_ == null) { - return topics_.get(index); - } else { - return topicsBuilder_.getMessage(index); - } - } - /** - * repeated .google.pubsub.v1.Topic topics = 1; - * - *
-     * The resulting topics.
-     * 
- */ - public Builder setTopics( - int index, com.google.pubsub.v1.Topic value) { - if (topicsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTopicsIsMutable(); - topics_.set(index, value); - onChanged(); - } else { - topicsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .google.pubsub.v1.Topic topics = 1; - * - *
-     * The resulting topics.
-     * 
- */ - public Builder setTopics( - int index, com.google.pubsub.v1.Topic.Builder builderForValue) { - if (topicsBuilder_ == null) { - ensureTopicsIsMutable(); - topics_.set(index, builderForValue.build()); - onChanged(); - } else { - topicsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.pubsub.v1.Topic topics = 1; - * - *
-     * The resulting topics.
-     * 
- */ - public Builder addTopics(com.google.pubsub.v1.Topic value) { - if (topicsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTopicsIsMutable(); - topics_.add(value); - onChanged(); - } else { - topicsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .google.pubsub.v1.Topic topics = 1; - * - *
-     * The resulting topics.
-     * 
- */ - public Builder addTopics( - int index, com.google.pubsub.v1.Topic value) { - if (topicsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTopicsIsMutable(); - topics_.add(index, value); - onChanged(); - } else { - topicsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .google.pubsub.v1.Topic topics = 1; - * - *
-     * The resulting topics.
-     * 
- */ - public Builder addTopics( - com.google.pubsub.v1.Topic.Builder builderForValue) { - if (topicsBuilder_ == null) { - ensureTopicsIsMutable(); - topics_.add(builderForValue.build()); - onChanged(); - } else { - topicsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .google.pubsub.v1.Topic topics = 1; - * - *
-     * The resulting topics.
-     * 
- */ - public Builder addTopics( - int index, com.google.pubsub.v1.Topic.Builder builderForValue) { - if (topicsBuilder_ == null) { - ensureTopicsIsMutable(); - topics_.add(index, builderForValue.build()); - onChanged(); - } else { - topicsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.pubsub.v1.Topic topics = 1; - * - *
-     * The resulting topics.
-     * 
- */ - public Builder addAllTopics( - java.lang.Iterable values) { - if (topicsBuilder_ == null) { - ensureTopicsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, topics_); - onChanged(); - } else { - topicsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .google.pubsub.v1.Topic topics = 1; - * - *
-     * The resulting topics.
-     * 
- */ - public Builder clearTopics() { - if (topicsBuilder_ == null) { - topics_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - topicsBuilder_.clear(); - } - return this; - } - /** - * repeated .google.pubsub.v1.Topic topics = 1; - * - *
-     * The resulting topics.
-     * 
- */ - public Builder removeTopics(int index) { - if (topicsBuilder_ == null) { - ensureTopicsIsMutable(); - topics_.remove(index); - onChanged(); - } else { - topicsBuilder_.remove(index); - } - return this; - } - /** - * repeated .google.pubsub.v1.Topic topics = 1; - * - *
-     * The resulting topics.
-     * 
- */ - public com.google.pubsub.v1.Topic.Builder getTopicsBuilder( - int index) { - return getTopicsFieldBuilder().getBuilder(index); - } - /** - * repeated .google.pubsub.v1.Topic topics = 1; - * - *
-     * The resulting topics.
-     * 
- */ - public com.google.pubsub.v1.TopicOrBuilder getTopicsOrBuilder( - int index) { - if (topicsBuilder_ == null) { - return topics_.get(index); } else { - return topicsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .google.pubsub.v1.Topic topics = 1; - * - *
-     * The resulting topics.
-     * 
- */ - public java.util.List - getTopicsOrBuilderList() { - if (topicsBuilder_ != null) { - return topicsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(topics_); - } - } - /** - * repeated .google.pubsub.v1.Topic topics = 1; - * - *
-     * The resulting topics.
-     * 
- */ - public com.google.pubsub.v1.Topic.Builder addTopicsBuilder() { - return getTopicsFieldBuilder().addBuilder( - com.google.pubsub.v1.Topic.getDefaultInstance()); - } - /** - * repeated .google.pubsub.v1.Topic topics = 1; - * - *
-     * The resulting topics.
-     * 
- */ - public com.google.pubsub.v1.Topic.Builder addTopicsBuilder( - int index) { - return getTopicsFieldBuilder().addBuilder( - index, com.google.pubsub.v1.Topic.getDefaultInstance()); - } - /** - * repeated .google.pubsub.v1.Topic topics = 1; - * - *
-     * The resulting topics.
-     * 
- */ - public java.util.List - getTopicsBuilderList() { - return getTopicsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - com.google.pubsub.v1.Topic, com.google.pubsub.v1.Topic.Builder, com.google.pubsub.v1.TopicOrBuilder> - getTopicsFieldBuilder() { - if (topicsBuilder_ == null) { - topicsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - com.google.pubsub.v1.Topic, com.google.pubsub.v1.Topic.Builder, com.google.pubsub.v1.TopicOrBuilder>( - topics_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); - topics_ = null; - } - return topicsBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - * optional string next_page_token = 2; - * - *
-     * If not empty, indicates that there may be more topics that match the
-     * request; this value should be passed in a new ListTopicsRequest.
-     * 
- */ - 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; - } - } - /** - * optional string next_page_token = 2; - * - *
-     * If not empty, indicates that there may be more topics that match the
-     * request; this value should be passed in a new ListTopicsRequest.
-     * 
- */ - 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; - } - } - /** - * optional string next_page_token = 2; - * - *
-     * If not empty, indicates that there may be more topics that match the
-     * request; this value should be passed in a new ListTopicsRequest.
-     * 
- */ - public Builder setNextPageToken( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - nextPageToken_ = value; - onChanged(); - return this; - } - /** - * optional string next_page_token = 2; - * - *
-     * If not empty, indicates that there may be more topics that match the
-     * request; this value should be passed in a new ListTopicsRequest.
-     * 
- */ - public Builder clearNextPageToken() { - - nextPageToken_ = getDefaultInstance().getNextPageToken(); - onChanged(); - return this; - } - /** - * optional string next_page_token = 2; - * - *
-     * If not empty, indicates that there may be more topics that match the
-     * request; this value should be passed in a new ListTopicsRequest.
-     * 
- */ - public Builder setNextPageTokenBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - nextPageToken_ = value; - onChanged(); - return this; - } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.ListTopicsResponse) - } - - // @@protoc_insertion_point(class_scope:google.pubsub.v1.ListTopicsResponse) - private static final com.google.pubsub.v1.ListTopicsResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.pubsub.v1.ListTopicsResponse(); - } - - public static com.google.pubsub.v1.ListTopicsResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public ListTopicsResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new ListTopicsResponse(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public com.google.pubsub.v1.ListTopicsResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/ListTopicsResponseOrBuilder.java b/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/ListTopicsResponseOrBuilder.java deleted file mode 100644 index 60d5d7ac17da..000000000000 --- a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/ListTopicsResponseOrBuilder.java +++ /dev/null @@ -1,73 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/pubsub/v1/pubsub.proto - -package com.google.pubsub.v1; - -public interface ListTopicsResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.pubsub.v1.ListTopicsResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated .google.pubsub.v1.Topic topics = 1; - * - *
-   * The resulting topics.
-   * 
- */ - java.util.List - getTopicsList(); - /** - * repeated .google.pubsub.v1.Topic topics = 1; - * - *
-   * The resulting topics.
-   * 
- */ - com.google.pubsub.v1.Topic getTopics(int index); - /** - * repeated .google.pubsub.v1.Topic topics = 1; - * - *
-   * The resulting topics.
-   * 
- */ - int getTopicsCount(); - /** - * repeated .google.pubsub.v1.Topic topics = 1; - * - *
-   * The resulting topics.
-   * 
- */ - java.util.List - getTopicsOrBuilderList(); - /** - * repeated .google.pubsub.v1.Topic topics = 1; - * - *
-   * The resulting topics.
-   * 
- */ - com.google.pubsub.v1.TopicOrBuilder getTopicsOrBuilder( - int index); - - /** - * optional string next_page_token = 2; - * - *
-   * If not empty, indicates that there may be more topics that match the
-   * request; this value should be passed in a new ListTopicsRequest.
-   * 
- */ - java.lang.String getNextPageToken(); - /** - * optional string next_page_token = 2; - * - *
-   * If not empty, indicates that there may be more topics that match the
-   * request; this value should be passed in a new ListTopicsRequest.
-   * 
- */ - com.google.protobuf.ByteString - getNextPageTokenBytes(); -} diff --git a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/ModifyAckDeadlineRequest.java b/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/ModifyAckDeadlineRequest.java deleted file mode 100644 index aa51afc2f99e..000000000000 --- a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/ModifyAckDeadlineRequest.java +++ /dev/null @@ -1,783 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/pubsub/v1/pubsub.proto - -package com.google.pubsub.v1; - -/** - * Protobuf type {@code google.pubsub.v1.ModifyAckDeadlineRequest} - * - *
- * Request for the ModifyAckDeadline method.
- * 
- */ -public final class ModifyAckDeadlineRequest extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.pubsub.v1.ModifyAckDeadlineRequest) - ModifyAckDeadlineRequestOrBuilder { - // Use ModifyAckDeadlineRequest.newBuilder() to construct. - private ModifyAckDeadlineRequest(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private ModifyAckDeadlineRequest() { - subscription_ = ""; - ackIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; - ackDeadlineSeconds_ = 0; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private ModifyAckDeadlineRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - int mutable_bitField0_ = 0; - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!input.skipField(tag)) { - done = true; - } - break; - } - case 10: { - String s = input.readStringRequireUtf8(); - - subscription_ = s; - break; - } - case 24: { - - ackDeadlineSeconds_ = input.readInt32(); - break; - } - case 34: { - String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - ackIds_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - ackIds_.add(s); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - ackIds_ = ackIds_.getUnmodifiableView(); - } - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_ModifyAckDeadlineRequest_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_ModifyAckDeadlineRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.pubsub.v1.ModifyAckDeadlineRequest.class, com.google.pubsub.v1.ModifyAckDeadlineRequest.Builder.class); - } - - private int bitField0_; - public static final int SUBSCRIPTION_FIELD_NUMBER = 1; - private volatile java.lang.Object subscription_; - /** - * optional string subscription = 1; - * - *
-   * The name of the subscription.
-   * 
- */ - public java.lang.String getSubscription() { - java.lang.Object ref = subscription_; - 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(); - subscription_ = s; - return s; - } - } - /** - * optional string subscription = 1; - * - *
-   * The name of the subscription.
-   * 
- */ - public com.google.protobuf.ByteString - getSubscriptionBytes() { - java.lang.Object ref = subscription_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - subscription_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ACK_IDS_FIELD_NUMBER = 4; - private com.google.protobuf.LazyStringList ackIds_; - /** - * repeated string ack_ids = 4; - * - *
-   * List of acknowledgment IDs.
-   * 
- */ - public com.google.protobuf.ProtocolStringList - getAckIdsList() { - return ackIds_; - } - /** - * repeated string ack_ids = 4; - * - *
-   * List of acknowledgment IDs.
-   * 
- */ - public int getAckIdsCount() { - return ackIds_.size(); - } - /** - * repeated string ack_ids = 4; - * - *
-   * List of acknowledgment IDs.
-   * 
- */ - public java.lang.String getAckIds(int index) { - return ackIds_.get(index); - } - /** - * repeated string ack_ids = 4; - * - *
-   * List of acknowledgment IDs.
-   * 
- */ - public com.google.protobuf.ByteString - getAckIdsBytes(int index) { - return ackIds_.getByteString(index); - } - - public static final int ACK_DEADLINE_SECONDS_FIELD_NUMBER = 3; - private int ackDeadlineSeconds_; - /** - * optional int32 ack_deadline_seconds = 3; - * - *
-   * The new ack deadline with respect to the time this request was sent to the
-   * Pub/Sub system. Must be >= 0. For example, if the value is 10, the new ack
-   * deadline will expire 10 seconds after the ModifyAckDeadline call was made.
-   * Specifying zero may immediately make the message available for another pull
-   * request.
-   * 
- */ - public int getAckDeadlineSeconds() { - return ackDeadlineSeconds_; - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!getSubscriptionBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, subscription_); - } - if (ackDeadlineSeconds_ != 0) { - output.writeInt32(3, ackDeadlineSeconds_); - } - for (int i = 0; i < ackIds_.size(); i++) { - com.google.protobuf.GeneratedMessage.writeString(output, 4, ackIds_.getRaw(i)); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getSubscriptionBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, subscription_); - } - if (ackDeadlineSeconds_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(3, ackDeadlineSeconds_); - } - { - int dataSize = 0; - for (int i = 0; i < ackIds_.size(); i++) { - dataSize += computeStringSizeNoTag(ackIds_.getRaw(i)); - } - size += dataSize; - size += 1 * getAckIdsList().size(); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static com.google.pubsub.v1.ModifyAckDeadlineRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.pubsub.v1.ModifyAckDeadlineRequest 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.pubsub.v1.ModifyAckDeadlineRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.pubsub.v1.ModifyAckDeadlineRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.pubsub.v1.ModifyAckDeadlineRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.pubsub.v1.ModifyAckDeadlineRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.pubsub.v1.ModifyAckDeadlineRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.pubsub.v1.ModifyAckDeadlineRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.pubsub.v1.ModifyAckDeadlineRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.pubsub.v1.ModifyAckDeadlineRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.pubsub.v1.ModifyAckDeadlineRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - 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; - } - /** - * Protobuf type {@code google.pubsub.v1.ModifyAckDeadlineRequest} - * - *
-   * Request for the ModifyAckDeadline method.
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.pubsub.v1.ModifyAckDeadlineRequest) - com.google.pubsub.v1.ModifyAckDeadlineRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_ModifyAckDeadlineRequest_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_ModifyAckDeadlineRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.pubsub.v1.ModifyAckDeadlineRequest.class, com.google.pubsub.v1.ModifyAckDeadlineRequest.Builder.class); - } - - // Construct using com.google.pubsub.v1.ModifyAckDeadlineRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - subscription_ = ""; - - ackIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - ackDeadlineSeconds_ = 0; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_ModifyAckDeadlineRequest_descriptor; - } - - public com.google.pubsub.v1.ModifyAckDeadlineRequest getDefaultInstanceForType() { - return com.google.pubsub.v1.ModifyAckDeadlineRequest.getDefaultInstance(); - } - - public com.google.pubsub.v1.ModifyAckDeadlineRequest build() { - com.google.pubsub.v1.ModifyAckDeadlineRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.pubsub.v1.ModifyAckDeadlineRequest buildPartial() { - com.google.pubsub.v1.ModifyAckDeadlineRequest result = new com.google.pubsub.v1.ModifyAckDeadlineRequest(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - result.subscription_ = subscription_; - if (((bitField0_ & 0x00000002) == 0x00000002)) { - ackIds_ = ackIds_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.ackIds_ = ackIds_; - result.ackDeadlineSeconds_ = ackDeadlineSeconds_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.pubsub.v1.ModifyAckDeadlineRequest) { - return mergeFrom((com.google.pubsub.v1.ModifyAckDeadlineRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.pubsub.v1.ModifyAckDeadlineRequest other) { - if (other == com.google.pubsub.v1.ModifyAckDeadlineRequest.getDefaultInstance()) return this; - if (!other.getSubscription().isEmpty()) { - subscription_ = other.subscription_; - onChanged(); - } - if (!other.ackIds_.isEmpty()) { - if (ackIds_.isEmpty()) { - ackIds_ = other.ackIds_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureAckIdsIsMutable(); - ackIds_.addAll(other.ackIds_); - } - onChanged(); - } - if (other.getAckDeadlineSeconds() != 0) { - setAckDeadlineSeconds(other.getAckDeadlineSeconds()); - } - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.pubsub.v1.ModifyAckDeadlineRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.pubsub.v1.ModifyAckDeadlineRequest) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object subscription_ = ""; - /** - * optional string subscription = 1; - * - *
-     * The name of the subscription.
-     * 
- */ - public java.lang.String getSubscription() { - java.lang.Object ref = subscription_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - subscription_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string subscription = 1; - * - *
-     * The name of the subscription.
-     * 
- */ - public com.google.protobuf.ByteString - getSubscriptionBytes() { - java.lang.Object ref = subscription_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - subscription_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string subscription = 1; - * - *
-     * The name of the subscription.
-     * 
- */ - public Builder setSubscription( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - subscription_ = value; - onChanged(); - return this; - } - /** - * optional string subscription = 1; - * - *
-     * The name of the subscription.
-     * 
- */ - public Builder clearSubscription() { - - subscription_ = getDefaultInstance().getSubscription(); - onChanged(); - return this; - } - /** - * optional string subscription = 1; - * - *
-     * The name of the subscription.
-     * 
- */ - public Builder setSubscriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - subscription_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList ackIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureAckIdsIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { - ackIds_ = new com.google.protobuf.LazyStringArrayList(ackIds_); - bitField0_ |= 0x00000002; - } - } - /** - * repeated string ack_ids = 4; - * - *
-     * List of acknowledgment IDs.
-     * 
- */ - public com.google.protobuf.ProtocolStringList - getAckIdsList() { - return ackIds_.getUnmodifiableView(); - } - /** - * repeated string ack_ids = 4; - * - *
-     * List of acknowledgment IDs.
-     * 
- */ - public int getAckIdsCount() { - return ackIds_.size(); - } - /** - * repeated string ack_ids = 4; - * - *
-     * List of acknowledgment IDs.
-     * 
- */ - public java.lang.String getAckIds(int index) { - return ackIds_.get(index); - } - /** - * repeated string ack_ids = 4; - * - *
-     * List of acknowledgment IDs.
-     * 
- */ - public com.google.protobuf.ByteString - getAckIdsBytes(int index) { - return ackIds_.getByteString(index); - } - /** - * repeated string ack_ids = 4; - * - *
-     * List of acknowledgment IDs.
-     * 
- */ - public Builder setAckIds( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAckIdsIsMutable(); - ackIds_.set(index, value); - onChanged(); - return this; - } - /** - * repeated string ack_ids = 4; - * - *
-     * List of acknowledgment IDs.
-     * 
- */ - public Builder addAckIds( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAckIdsIsMutable(); - ackIds_.add(value); - onChanged(); - return this; - } - /** - * repeated string ack_ids = 4; - * - *
-     * List of acknowledgment IDs.
-     * 
- */ - public Builder addAllAckIds( - java.lang.Iterable values) { - ensureAckIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, ackIds_); - onChanged(); - return this; - } - /** - * repeated string ack_ids = 4; - * - *
-     * List of acknowledgment IDs.
-     * 
- */ - public Builder clearAckIds() { - ackIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * repeated string ack_ids = 4; - * - *
-     * List of acknowledgment IDs.
-     * 
- */ - public Builder addAckIdsBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureAckIdsIsMutable(); - ackIds_.add(value); - onChanged(); - return this; - } - - private int ackDeadlineSeconds_ ; - /** - * optional int32 ack_deadline_seconds = 3; - * - *
-     * The new ack deadline with respect to the time this request was sent to the
-     * Pub/Sub system. Must be >= 0. For example, if the value is 10, the new ack
-     * deadline will expire 10 seconds after the ModifyAckDeadline call was made.
-     * Specifying zero may immediately make the message available for another pull
-     * request.
-     * 
- */ - public int getAckDeadlineSeconds() { - return ackDeadlineSeconds_; - } - /** - * optional int32 ack_deadline_seconds = 3; - * - *
-     * The new ack deadline with respect to the time this request was sent to the
-     * Pub/Sub system. Must be >= 0. For example, if the value is 10, the new ack
-     * deadline will expire 10 seconds after the ModifyAckDeadline call was made.
-     * Specifying zero may immediately make the message available for another pull
-     * request.
-     * 
- */ - public Builder setAckDeadlineSeconds(int value) { - - ackDeadlineSeconds_ = value; - onChanged(); - return this; - } - /** - * optional int32 ack_deadline_seconds = 3; - * - *
-     * The new ack deadline with respect to the time this request was sent to the
-     * Pub/Sub system. Must be >= 0. For example, if the value is 10, the new ack
-     * deadline will expire 10 seconds after the ModifyAckDeadline call was made.
-     * Specifying zero may immediately make the message available for another pull
-     * request.
-     * 
- */ - public Builder clearAckDeadlineSeconds() { - - ackDeadlineSeconds_ = 0; - onChanged(); - return this; - } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.ModifyAckDeadlineRequest) - } - - // @@protoc_insertion_point(class_scope:google.pubsub.v1.ModifyAckDeadlineRequest) - private static final com.google.pubsub.v1.ModifyAckDeadlineRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.pubsub.v1.ModifyAckDeadlineRequest(); - } - - public static com.google.pubsub.v1.ModifyAckDeadlineRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public ModifyAckDeadlineRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new ModifyAckDeadlineRequest(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public com.google.pubsub.v1.ModifyAckDeadlineRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/ModifyAckDeadlineRequestOrBuilder.java b/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/ModifyAckDeadlineRequestOrBuilder.java deleted file mode 100644 index 1e375b70cc30..000000000000 --- a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/ModifyAckDeadlineRequestOrBuilder.java +++ /dev/null @@ -1,75 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/pubsub/v1/pubsub.proto - -package com.google.pubsub.v1; - -public interface ModifyAckDeadlineRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.pubsub.v1.ModifyAckDeadlineRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string subscription = 1; - * - *
-   * The name of the subscription.
-   * 
- */ - java.lang.String getSubscription(); - /** - * optional string subscription = 1; - * - *
-   * The name of the subscription.
-   * 
- */ - com.google.protobuf.ByteString - getSubscriptionBytes(); - - /** - * repeated string ack_ids = 4; - * - *
-   * List of acknowledgment IDs.
-   * 
- */ - com.google.protobuf.ProtocolStringList - getAckIdsList(); - /** - * repeated string ack_ids = 4; - * - *
-   * List of acknowledgment IDs.
-   * 
- */ - int getAckIdsCount(); - /** - * repeated string ack_ids = 4; - * - *
-   * List of acknowledgment IDs.
-   * 
- */ - java.lang.String getAckIds(int index); - /** - * repeated string ack_ids = 4; - * - *
-   * List of acknowledgment IDs.
-   * 
- */ - com.google.protobuf.ByteString - getAckIdsBytes(int index); - - /** - * optional int32 ack_deadline_seconds = 3; - * - *
-   * The new ack deadline with respect to the time this request was sent to the
-   * Pub/Sub system. Must be >= 0. For example, if the value is 10, the new ack
-   * deadline will expire 10 seconds after the ModifyAckDeadline call was made.
-   * Specifying zero may immediately make the message available for another pull
-   * request.
-   * 
- */ - int getAckDeadlineSeconds(); -} diff --git a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/ModifyPushConfigRequest.java b/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/ModifyPushConfigRequest.java deleted file mode 100644 index d3706a1c87c4..000000000000 --- a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/ModifyPushConfigRequest.java +++ /dev/null @@ -1,744 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/pubsub/v1/pubsub.proto - -package com.google.pubsub.v1; - -/** - * Protobuf type {@code google.pubsub.v1.ModifyPushConfigRequest} - * - *
- * Request for the ModifyPushConfig method.
- * 
- */ -public final class ModifyPushConfigRequest extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.pubsub.v1.ModifyPushConfigRequest) - ModifyPushConfigRequestOrBuilder { - // Use ModifyPushConfigRequest.newBuilder() to construct. - private ModifyPushConfigRequest(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private ModifyPushConfigRequest() { - subscription_ = ""; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private ModifyPushConfigRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - int mutable_bitField0_ = 0; - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!input.skipField(tag)) { - done = true; - } - break; - } - case 10: { - String s = input.readStringRequireUtf8(); - - subscription_ = s; - break; - } - case 18: { - com.google.pubsub.v1.PushConfig.Builder subBuilder = null; - if (pushConfig_ != null) { - subBuilder = pushConfig_.toBuilder(); - } - pushConfig_ = input.readMessage(com.google.pubsub.v1.PushConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(pushConfig_); - pushConfig_ = subBuilder.buildPartial(); - } - - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_ModifyPushConfigRequest_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_ModifyPushConfigRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.pubsub.v1.ModifyPushConfigRequest.class, com.google.pubsub.v1.ModifyPushConfigRequest.Builder.class); - } - - public static final int SUBSCRIPTION_FIELD_NUMBER = 1; - private volatile java.lang.Object subscription_; - /** - * optional string subscription = 1; - * - *
-   * The name of the subscription.
-   * 
- */ - public java.lang.String getSubscription() { - java.lang.Object ref = subscription_; - 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(); - subscription_ = s; - return s; - } - } - /** - * optional string subscription = 1; - * - *
-   * The name of the subscription.
-   * 
- */ - public com.google.protobuf.ByteString - getSubscriptionBytes() { - java.lang.Object ref = subscription_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - subscription_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PUSH_CONFIG_FIELD_NUMBER = 2; - private com.google.pubsub.v1.PushConfig pushConfig_; - /** - * optional .google.pubsub.v1.PushConfig push_config = 2; - * - *
-   * The push configuration for future deliveries.
-   * An empty pushConfig indicates that the Pub/Sub system should
-   * stop pushing messages from the given subscription and allow
-   * messages to be pulled and acknowledged - effectively pausing
-   * the subscription if Pull is not called.
-   * 
- */ - public boolean hasPushConfig() { - return pushConfig_ != null; - } - /** - * optional .google.pubsub.v1.PushConfig push_config = 2; - * - *
-   * The push configuration for future deliveries.
-   * An empty pushConfig indicates that the Pub/Sub system should
-   * stop pushing messages from the given subscription and allow
-   * messages to be pulled and acknowledged - effectively pausing
-   * the subscription if Pull is not called.
-   * 
- */ - public com.google.pubsub.v1.PushConfig getPushConfig() { - return pushConfig_ == null ? com.google.pubsub.v1.PushConfig.getDefaultInstance() : pushConfig_; - } - /** - * optional .google.pubsub.v1.PushConfig push_config = 2; - * - *
-   * The push configuration for future deliveries.
-   * An empty pushConfig indicates that the Pub/Sub system should
-   * stop pushing messages from the given subscription and allow
-   * messages to be pulled and acknowledged - effectively pausing
-   * the subscription if Pull is not called.
-   * 
- */ - public com.google.pubsub.v1.PushConfigOrBuilder getPushConfigOrBuilder() { - return getPushConfig(); - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!getSubscriptionBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, subscription_); - } - if (pushConfig_ != null) { - output.writeMessage(2, getPushConfig()); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getSubscriptionBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, subscription_); - } - if (pushConfig_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getPushConfig()); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static com.google.pubsub.v1.ModifyPushConfigRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.pubsub.v1.ModifyPushConfigRequest 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.pubsub.v1.ModifyPushConfigRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.pubsub.v1.ModifyPushConfigRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.pubsub.v1.ModifyPushConfigRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.pubsub.v1.ModifyPushConfigRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.pubsub.v1.ModifyPushConfigRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.pubsub.v1.ModifyPushConfigRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.pubsub.v1.ModifyPushConfigRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.pubsub.v1.ModifyPushConfigRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.pubsub.v1.ModifyPushConfigRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - 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; - } - /** - * Protobuf type {@code google.pubsub.v1.ModifyPushConfigRequest} - * - *
-   * Request for the ModifyPushConfig method.
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.pubsub.v1.ModifyPushConfigRequest) - com.google.pubsub.v1.ModifyPushConfigRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_ModifyPushConfigRequest_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_ModifyPushConfigRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.pubsub.v1.ModifyPushConfigRequest.class, com.google.pubsub.v1.ModifyPushConfigRequest.Builder.class); - } - - // Construct using com.google.pubsub.v1.ModifyPushConfigRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - subscription_ = ""; - - if (pushConfigBuilder_ == null) { - pushConfig_ = null; - } else { - pushConfig_ = null; - pushConfigBuilder_ = null; - } - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_ModifyPushConfigRequest_descriptor; - } - - public com.google.pubsub.v1.ModifyPushConfigRequest getDefaultInstanceForType() { - return com.google.pubsub.v1.ModifyPushConfigRequest.getDefaultInstance(); - } - - public com.google.pubsub.v1.ModifyPushConfigRequest build() { - com.google.pubsub.v1.ModifyPushConfigRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.pubsub.v1.ModifyPushConfigRequest buildPartial() { - com.google.pubsub.v1.ModifyPushConfigRequest result = new com.google.pubsub.v1.ModifyPushConfigRequest(this); - result.subscription_ = subscription_; - if (pushConfigBuilder_ == null) { - result.pushConfig_ = pushConfig_; - } else { - result.pushConfig_ = pushConfigBuilder_.build(); - } - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.pubsub.v1.ModifyPushConfigRequest) { - return mergeFrom((com.google.pubsub.v1.ModifyPushConfigRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.pubsub.v1.ModifyPushConfigRequest other) { - if (other == com.google.pubsub.v1.ModifyPushConfigRequest.getDefaultInstance()) return this; - if (!other.getSubscription().isEmpty()) { - subscription_ = other.subscription_; - onChanged(); - } - if (other.hasPushConfig()) { - mergePushConfig(other.getPushConfig()); - } - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.pubsub.v1.ModifyPushConfigRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.pubsub.v1.ModifyPushConfigRequest) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object subscription_ = ""; - /** - * optional string subscription = 1; - * - *
-     * The name of the subscription.
-     * 
- */ - public java.lang.String getSubscription() { - java.lang.Object ref = subscription_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - subscription_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string subscription = 1; - * - *
-     * The name of the subscription.
-     * 
- */ - public com.google.protobuf.ByteString - getSubscriptionBytes() { - java.lang.Object ref = subscription_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - subscription_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string subscription = 1; - * - *
-     * The name of the subscription.
-     * 
- */ - public Builder setSubscription( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - subscription_ = value; - onChanged(); - return this; - } - /** - * optional string subscription = 1; - * - *
-     * The name of the subscription.
-     * 
- */ - public Builder clearSubscription() { - - subscription_ = getDefaultInstance().getSubscription(); - onChanged(); - return this; - } - /** - * optional string subscription = 1; - * - *
-     * The name of the subscription.
-     * 
- */ - public Builder setSubscriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - subscription_ = value; - onChanged(); - return this; - } - - private com.google.pubsub.v1.PushConfig pushConfig_ = null; - private com.google.protobuf.SingleFieldBuilder< - com.google.pubsub.v1.PushConfig, com.google.pubsub.v1.PushConfig.Builder, com.google.pubsub.v1.PushConfigOrBuilder> pushConfigBuilder_; - /** - * optional .google.pubsub.v1.PushConfig push_config = 2; - * - *
-     * The push configuration for future deliveries.
-     * An empty pushConfig indicates that the Pub/Sub system should
-     * stop pushing messages from the given subscription and allow
-     * messages to be pulled and acknowledged - effectively pausing
-     * the subscription if Pull is not called.
-     * 
- */ - public boolean hasPushConfig() { - return pushConfigBuilder_ != null || pushConfig_ != null; - } - /** - * optional .google.pubsub.v1.PushConfig push_config = 2; - * - *
-     * The push configuration for future deliveries.
-     * An empty pushConfig indicates that the Pub/Sub system should
-     * stop pushing messages from the given subscription and allow
-     * messages to be pulled and acknowledged - effectively pausing
-     * the subscription if Pull is not called.
-     * 
- */ - public com.google.pubsub.v1.PushConfig getPushConfig() { - if (pushConfigBuilder_ == null) { - return pushConfig_ == null ? com.google.pubsub.v1.PushConfig.getDefaultInstance() : pushConfig_; - } else { - return pushConfigBuilder_.getMessage(); - } - } - /** - * optional .google.pubsub.v1.PushConfig push_config = 2; - * - *
-     * The push configuration for future deliveries.
-     * An empty pushConfig indicates that the Pub/Sub system should
-     * stop pushing messages from the given subscription and allow
-     * messages to be pulled and acknowledged - effectively pausing
-     * the subscription if Pull is not called.
-     * 
- */ - public Builder setPushConfig(com.google.pubsub.v1.PushConfig value) { - if (pushConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - pushConfig_ = value; - onChanged(); - } else { - pushConfigBuilder_.setMessage(value); - } - - return this; - } - /** - * optional .google.pubsub.v1.PushConfig push_config = 2; - * - *
-     * The push configuration for future deliveries.
-     * An empty pushConfig indicates that the Pub/Sub system should
-     * stop pushing messages from the given subscription and allow
-     * messages to be pulled and acknowledged - effectively pausing
-     * the subscription if Pull is not called.
-     * 
- */ - public Builder setPushConfig( - com.google.pubsub.v1.PushConfig.Builder builderForValue) { - if (pushConfigBuilder_ == null) { - pushConfig_ = builderForValue.build(); - onChanged(); - } else { - pushConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * optional .google.pubsub.v1.PushConfig push_config = 2; - * - *
-     * The push configuration for future deliveries.
-     * An empty pushConfig indicates that the Pub/Sub system should
-     * stop pushing messages from the given subscription and allow
-     * messages to be pulled and acknowledged - effectively pausing
-     * the subscription if Pull is not called.
-     * 
- */ - public Builder mergePushConfig(com.google.pubsub.v1.PushConfig value) { - if (pushConfigBuilder_ == null) { - if (pushConfig_ != null) { - pushConfig_ = - com.google.pubsub.v1.PushConfig.newBuilder(pushConfig_).mergeFrom(value).buildPartial(); - } else { - pushConfig_ = value; - } - onChanged(); - } else { - pushConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - * optional .google.pubsub.v1.PushConfig push_config = 2; - * - *
-     * The push configuration for future deliveries.
-     * An empty pushConfig indicates that the Pub/Sub system should
-     * stop pushing messages from the given subscription and allow
-     * messages to be pulled and acknowledged - effectively pausing
-     * the subscription if Pull is not called.
-     * 
- */ - public Builder clearPushConfig() { - if (pushConfigBuilder_ == null) { - pushConfig_ = null; - onChanged(); - } else { - pushConfig_ = null; - pushConfigBuilder_ = null; - } - - return this; - } - /** - * optional .google.pubsub.v1.PushConfig push_config = 2; - * - *
-     * The push configuration for future deliveries.
-     * An empty pushConfig indicates that the Pub/Sub system should
-     * stop pushing messages from the given subscription and allow
-     * messages to be pulled and acknowledged - effectively pausing
-     * the subscription if Pull is not called.
-     * 
- */ - public com.google.pubsub.v1.PushConfig.Builder getPushConfigBuilder() { - - onChanged(); - return getPushConfigFieldBuilder().getBuilder(); - } - /** - * optional .google.pubsub.v1.PushConfig push_config = 2; - * - *
-     * The push configuration for future deliveries.
-     * An empty pushConfig indicates that the Pub/Sub system should
-     * stop pushing messages from the given subscription and allow
-     * messages to be pulled and acknowledged - effectively pausing
-     * the subscription if Pull is not called.
-     * 
- */ - public com.google.pubsub.v1.PushConfigOrBuilder getPushConfigOrBuilder() { - if (pushConfigBuilder_ != null) { - return pushConfigBuilder_.getMessageOrBuilder(); - } else { - return pushConfig_ == null ? - com.google.pubsub.v1.PushConfig.getDefaultInstance() : pushConfig_; - } - } - /** - * optional .google.pubsub.v1.PushConfig push_config = 2; - * - *
-     * The push configuration for future deliveries.
-     * An empty pushConfig indicates that the Pub/Sub system should
-     * stop pushing messages from the given subscription and allow
-     * messages to be pulled and acknowledged - effectively pausing
-     * the subscription if Pull is not called.
-     * 
- */ - private com.google.protobuf.SingleFieldBuilder< - com.google.pubsub.v1.PushConfig, com.google.pubsub.v1.PushConfig.Builder, com.google.pubsub.v1.PushConfigOrBuilder> - getPushConfigFieldBuilder() { - if (pushConfigBuilder_ == null) { - pushConfigBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.pubsub.v1.PushConfig, com.google.pubsub.v1.PushConfig.Builder, com.google.pubsub.v1.PushConfigOrBuilder>( - getPushConfig(), - getParentForChildren(), - isClean()); - pushConfig_ = null; - } - return pushConfigBuilder_; - } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.ModifyPushConfigRequest) - } - - // @@protoc_insertion_point(class_scope:google.pubsub.v1.ModifyPushConfigRequest) - private static final com.google.pubsub.v1.ModifyPushConfigRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.pubsub.v1.ModifyPushConfigRequest(); - } - - public static com.google.pubsub.v1.ModifyPushConfigRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public ModifyPushConfigRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new ModifyPushConfigRequest(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public com.google.pubsub.v1.ModifyPushConfigRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/ModifyPushConfigRequestOrBuilder.java b/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/ModifyPushConfigRequestOrBuilder.java deleted file mode 100644 index 50d85cc4ad08..000000000000 --- a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/ModifyPushConfigRequestOrBuilder.java +++ /dev/null @@ -1,64 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/pubsub/v1/pubsub.proto - -package com.google.pubsub.v1; - -public interface ModifyPushConfigRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.pubsub.v1.ModifyPushConfigRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string subscription = 1; - * - *
-   * The name of the subscription.
-   * 
- */ - java.lang.String getSubscription(); - /** - * optional string subscription = 1; - * - *
-   * The name of the subscription.
-   * 
- */ - com.google.protobuf.ByteString - getSubscriptionBytes(); - - /** - * optional .google.pubsub.v1.PushConfig push_config = 2; - * - *
-   * The push configuration for future deliveries.
-   * An empty pushConfig indicates that the Pub/Sub system should
-   * stop pushing messages from the given subscription and allow
-   * messages to be pulled and acknowledged - effectively pausing
-   * the subscription if Pull is not called.
-   * 
- */ - boolean hasPushConfig(); - /** - * optional .google.pubsub.v1.PushConfig push_config = 2; - * - *
-   * The push configuration for future deliveries.
-   * An empty pushConfig indicates that the Pub/Sub system should
-   * stop pushing messages from the given subscription and allow
-   * messages to be pulled and acknowledged - effectively pausing
-   * the subscription if Pull is not called.
-   * 
- */ - com.google.pubsub.v1.PushConfig getPushConfig(); - /** - * optional .google.pubsub.v1.PushConfig push_config = 2; - * - *
-   * The push configuration for future deliveries.
-   * An empty pushConfig indicates that the Pub/Sub system should
-   * stop pushing messages from the given subscription and allow
-   * messages to be pulled and acknowledged - effectively pausing
-   * the subscription if Pull is not called.
-   * 
- */ - com.google.pubsub.v1.PushConfigOrBuilder getPushConfigOrBuilder(); -} diff --git a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/PublishRequest.java b/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/PublishRequest.java deleted file mode 100644 index b68d33924dd0..000000000000 --- a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/PublishRequest.java +++ /dev/null @@ -1,909 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/pubsub/v1/pubsub.proto - -package com.google.pubsub.v1; - -/** - * Protobuf type {@code google.pubsub.v1.PublishRequest} - * - *
- * Request for the Publish method.
- * 
- */ -public final class PublishRequest extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.pubsub.v1.PublishRequest) - PublishRequestOrBuilder { - // Use PublishRequest.newBuilder() to construct. - private PublishRequest(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private PublishRequest() { - topic_ = ""; - messages_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private PublishRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - int mutable_bitField0_ = 0; - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!input.skipField(tag)) { - done = true; - } - break; - } - case 10: { - String s = input.readStringRequireUtf8(); - - topic_ = s; - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - messages_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - messages_.add(input.readMessage(com.google.pubsub.v1.PubsubMessage.parser(), extensionRegistry)); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - messages_ = java.util.Collections.unmodifiableList(messages_); - } - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_PublishRequest_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_PublishRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.pubsub.v1.PublishRequest.class, com.google.pubsub.v1.PublishRequest.Builder.class); - } - - private int bitField0_; - public static final int TOPIC_FIELD_NUMBER = 1; - private volatile java.lang.Object topic_; - /** - * optional string topic = 1; - * - *
-   * The messages in the request will be published on this topic.
-   * 
- */ - public java.lang.String getTopic() { - java.lang.Object ref = topic_; - 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(); - topic_ = s; - return s; - } - } - /** - * optional string topic = 1; - * - *
-   * The messages in the request will be published on this topic.
-   * 
- */ - public com.google.protobuf.ByteString - getTopicBytes() { - java.lang.Object ref = topic_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - topic_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int MESSAGES_FIELD_NUMBER = 2; - private java.util.List messages_; - /** - * repeated .google.pubsub.v1.PubsubMessage messages = 2; - * - *
-   * The messages to publish.
-   * 
- */ - public java.util.List getMessagesList() { - return messages_; - } - /** - * repeated .google.pubsub.v1.PubsubMessage messages = 2; - * - *
-   * The messages to publish.
-   * 
- */ - public java.util.List - getMessagesOrBuilderList() { - return messages_; - } - /** - * repeated .google.pubsub.v1.PubsubMessage messages = 2; - * - *
-   * The messages to publish.
-   * 
- */ - public int getMessagesCount() { - return messages_.size(); - } - /** - * repeated .google.pubsub.v1.PubsubMessage messages = 2; - * - *
-   * The messages to publish.
-   * 
- */ - public com.google.pubsub.v1.PubsubMessage getMessages(int index) { - return messages_.get(index); - } - /** - * repeated .google.pubsub.v1.PubsubMessage messages = 2; - * - *
-   * The messages to publish.
-   * 
- */ - public com.google.pubsub.v1.PubsubMessageOrBuilder getMessagesOrBuilder( - int index) { - return messages_.get(index); - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!getTopicBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, topic_); - } - for (int i = 0; i < messages_.size(); i++) { - output.writeMessage(2, messages_.get(i)); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getTopicBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, topic_); - } - for (int i = 0; i < messages_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, messages_.get(i)); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static com.google.pubsub.v1.PublishRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.pubsub.v1.PublishRequest 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.pubsub.v1.PublishRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.pubsub.v1.PublishRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.pubsub.v1.PublishRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.pubsub.v1.PublishRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.pubsub.v1.PublishRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.pubsub.v1.PublishRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.pubsub.v1.PublishRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.pubsub.v1.PublishRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.pubsub.v1.PublishRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - 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; - } - /** - * Protobuf type {@code google.pubsub.v1.PublishRequest} - * - *
-   * Request for the Publish method.
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.pubsub.v1.PublishRequest) - com.google.pubsub.v1.PublishRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_PublishRequest_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_PublishRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.pubsub.v1.PublishRequest.class, com.google.pubsub.v1.PublishRequest.Builder.class); - } - - // Construct using com.google.pubsub.v1.PublishRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getMessagesFieldBuilder(); - } - } - public Builder clear() { - super.clear(); - topic_ = ""; - - if (messagesBuilder_ == null) { - messages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - messagesBuilder_.clear(); - } - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_PublishRequest_descriptor; - } - - public com.google.pubsub.v1.PublishRequest getDefaultInstanceForType() { - return com.google.pubsub.v1.PublishRequest.getDefaultInstance(); - } - - public com.google.pubsub.v1.PublishRequest build() { - com.google.pubsub.v1.PublishRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.pubsub.v1.PublishRequest buildPartial() { - com.google.pubsub.v1.PublishRequest result = new com.google.pubsub.v1.PublishRequest(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - result.topic_ = topic_; - if (messagesBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002)) { - messages_ = java.util.Collections.unmodifiableList(messages_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.messages_ = messages_; - } else { - result.messages_ = messagesBuilder_.build(); - } - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.pubsub.v1.PublishRequest) { - return mergeFrom((com.google.pubsub.v1.PublishRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.pubsub.v1.PublishRequest other) { - if (other == com.google.pubsub.v1.PublishRequest.getDefaultInstance()) return this; - if (!other.getTopic().isEmpty()) { - topic_ = other.topic_; - onChanged(); - } - if (messagesBuilder_ == null) { - if (!other.messages_.isEmpty()) { - if (messages_.isEmpty()) { - messages_ = other.messages_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureMessagesIsMutable(); - messages_.addAll(other.messages_); - } - onChanged(); - } - } else { - if (!other.messages_.isEmpty()) { - if (messagesBuilder_.isEmpty()) { - messagesBuilder_.dispose(); - messagesBuilder_ = null; - messages_ = other.messages_; - bitField0_ = (bitField0_ & ~0x00000002); - messagesBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getMessagesFieldBuilder() : null; - } else { - messagesBuilder_.addAllMessages(other.messages_); - } - } - } - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.pubsub.v1.PublishRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.pubsub.v1.PublishRequest) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object topic_ = ""; - /** - * optional string topic = 1; - * - *
-     * The messages in the request will be published on this topic.
-     * 
- */ - public java.lang.String getTopic() { - java.lang.Object ref = topic_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - topic_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string topic = 1; - * - *
-     * The messages in the request will be published on this topic.
-     * 
- */ - public com.google.protobuf.ByteString - getTopicBytes() { - java.lang.Object ref = topic_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - topic_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string topic = 1; - * - *
-     * The messages in the request will be published on this topic.
-     * 
- */ - public Builder setTopic( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - topic_ = value; - onChanged(); - return this; - } - /** - * optional string topic = 1; - * - *
-     * The messages in the request will be published on this topic.
-     * 
- */ - public Builder clearTopic() { - - topic_ = getDefaultInstance().getTopic(); - onChanged(); - return this; - } - /** - * optional string topic = 1; - * - *
-     * The messages in the request will be published on this topic.
-     * 
- */ - public Builder setTopicBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - topic_ = value; - onChanged(); - return this; - } - - private java.util.List messages_ = - java.util.Collections.emptyList(); - private void ensureMessagesIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { - messages_ = new java.util.ArrayList(messages_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.pubsub.v1.PubsubMessage, com.google.pubsub.v1.PubsubMessage.Builder, com.google.pubsub.v1.PubsubMessageOrBuilder> messagesBuilder_; - - /** - * repeated .google.pubsub.v1.PubsubMessage messages = 2; - * - *
-     * The messages to publish.
-     * 
- */ - public java.util.List getMessagesList() { - if (messagesBuilder_ == null) { - return java.util.Collections.unmodifiableList(messages_); - } else { - return messagesBuilder_.getMessageList(); - } - } - /** - * repeated .google.pubsub.v1.PubsubMessage messages = 2; - * - *
-     * The messages to publish.
-     * 
- */ - public int getMessagesCount() { - if (messagesBuilder_ == null) { - return messages_.size(); - } else { - return messagesBuilder_.getCount(); - } - } - /** - * repeated .google.pubsub.v1.PubsubMessage messages = 2; - * - *
-     * The messages to publish.
-     * 
- */ - public com.google.pubsub.v1.PubsubMessage getMessages(int index) { - if (messagesBuilder_ == null) { - return messages_.get(index); - } else { - return messagesBuilder_.getMessage(index); - } - } - /** - * repeated .google.pubsub.v1.PubsubMessage messages = 2; - * - *
-     * The messages to publish.
-     * 
- */ - public Builder setMessages( - int index, com.google.pubsub.v1.PubsubMessage value) { - if (messagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMessagesIsMutable(); - messages_.set(index, value); - onChanged(); - } else { - messagesBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .google.pubsub.v1.PubsubMessage messages = 2; - * - *
-     * The messages to publish.
-     * 
- */ - public Builder setMessages( - int index, com.google.pubsub.v1.PubsubMessage.Builder builderForValue) { - if (messagesBuilder_ == null) { - ensureMessagesIsMutable(); - messages_.set(index, builderForValue.build()); - onChanged(); - } else { - messagesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.pubsub.v1.PubsubMessage messages = 2; - * - *
-     * The messages to publish.
-     * 
- */ - public Builder addMessages(com.google.pubsub.v1.PubsubMessage value) { - if (messagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMessagesIsMutable(); - messages_.add(value); - onChanged(); - } else { - messagesBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .google.pubsub.v1.PubsubMessage messages = 2; - * - *
-     * The messages to publish.
-     * 
- */ - public Builder addMessages( - int index, com.google.pubsub.v1.PubsubMessage value) { - if (messagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMessagesIsMutable(); - messages_.add(index, value); - onChanged(); - } else { - messagesBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .google.pubsub.v1.PubsubMessage messages = 2; - * - *
-     * The messages to publish.
-     * 
- */ - public Builder addMessages( - com.google.pubsub.v1.PubsubMessage.Builder builderForValue) { - if (messagesBuilder_ == null) { - ensureMessagesIsMutable(); - messages_.add(builderForValue.build()); - onChanged(); - } else { - messagesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .google.pubsub.v1.PubsubMessage messages = 2; - * - *
-     * The messages to publish.
-     * 
- */ - public Builder addMessages( - int index, com.google.pubsub.v1.PubsubMessage.Builder builderForValue) { - if (messagesBuilder_ == null) { - ensureMessagesIsMutable(); - messages_.add(index, builderForValue.build()); - onChanged(); - } else { - messagesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.pubsub.v1.PubsubMessage messages = 2; - * - *
-     * The messages to publish.
-     * 
- */ - public Builder addAllMessages( - java.lang.Iterable values) { - if (messagesBuilder_ == null) { - ensureMessagesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, messages_); - onChanged(); - } else { - messagesBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .google.pubsub.v1.PubsubMessage messages = 2; - * - *
-     * The messages to publish.
-     * 
- */ - public Builder clearMessages() { - if (messagesBuilder_ == null) { - messages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - messagesBuilder_.clear(); - } - return this; - } - /** - * repeated .google.pubsub.v1.PubsubMessage messages = 2; - * - *
-     * The messages to publish.
-     * 
- */ - public Builder removeMessages(int index) { - if (messagesBuilder_ == null) { - ensureMessagesIsMutable(); - messages_.remove(index); - onChanged(); - } else { - messagesBuilder_.remove(index); - } - return this; - } - /** - * repeated .google.pubsub.v1.PubsubMessage messages = 2; - * - *
-     * The messages to publish.
-     * 
- */ - public com.google.pubsub.v1.PubsubMessage.Builder getMessagesBuilder( - int index) { - return getMessagesFieldBuilder().getBuilder(index); - } - /** - * repeated .google.pubsub.v1.PubsubMessage messages = 2; - * - *
-     * The messages to publish.
-     * 
- */ - public com.google.pubsub.v1.PubsubMessageOrBuilder getMessagesOrBuilder( - int index) { - if (messagesBuilder_ == null) { - return messages_.get(index); } else { - return messagesBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .google.pubsub.v1.PubsubMessage messages = 2; - * - *
-     * The messages to publish.
-     * 
- */ - public java.util.List - getMessagesOrBuilderList() { - if (messagesBuilder_ != null) { - return messagesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(messages_); - } - } - /** - * repeated .google.pubsub.v1.PubsubMessage messages = 2; - * - *
-     * The messages to publish.
-     * 
- */ - public com.google.pubsub.v1.PubsubMessage.Builder addMessagesBuilder() { - return getMessagesFieldBuilder().addBuilder( - com.google.pubsub.v1.PubsubMessage.getDefaultInstance()); - } - /** - * repeated .google.pubsub.v1.PubsubMessage messages = 2; - * - *
-     * The messages to publish.
-     * 
- */ - public com.google.pubsub.v1.PubsubMessage.Builder addMessagesBuilder( - int index) { - return getMessagesFieldBuilder().addBuilder( - index, com.google.pubsub.v1.PubsubMessage.getDefaultInstance()); - } - /** - * repeated .google.pubsub.v1.PubsubMessage messages = 2; - * - *
-     * The messages to publish.
-     * 
- */ - public java.util.List - getMessagesBuilderList() { - return getMessagesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - com.google.pubsub.v1.PubsubMessage, com.google.pubsub.v1.PubsubMessage.Builder, com.google.pubsub.v1.PubsubMessageOrBuilder> - getMessagesFieldBuilder() { - if (messagesBuilder_ == null) { - messagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - com.google.pubsub.v1.PubsubMessage, com.google.pubsub.v1.PubsubMessage.Builder, com.google.pubsub.v1.PubsubMessageOrBuilder>( - messages_, - ((bitField0_ & 0x00000002) == 0x00000002), - getParentForChildren(), - isClean()); - messages_ = null; - } - return messagesBuilder_; - } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.PublishRequest) - } - - // @@protoc_insertion_point(class_scope:google.pubsub.v1.PublishRequest) - private static final com.google.pubsub.v1.PublishRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.pubsub.v1.PublishRequest(); - } - - public static com.google.pubsub.v1.PublishRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public PublishRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new PublishRequest(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public com.google.pubsub.v1.PublishRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/PublishRequestOrBuilder.java b/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/PublishRequestOrBuilder.java deleted file mode 100644 index d862735fe6df..000000000000 --- a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/PublishRequestOrBuilder.java +++ /dev/null @@ -1,71 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/pubsub/v1/pubsub.proto - -package com.google.pubsub.v1; - -public interface PublishRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.pubsub.v1.PublishRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string topic = 1; - * - *
-   * The messages in the request will be published on this topic.
-   * 
- */ - java.lang.String getTopic(); - /** - * optional string topic = 1; - * - *
-   * The messages in the request will be published on this topic.
-   * 
- */ - com.google.protobuf.ByteString - getTopicBytes(); - - /** - * repeated .google.pubsub.v1.PubsubMessage messages = 2; - * - *
-   * The messages to publish.
-   * 
- */ - java.util.List - getMessagesList(); - /** - * repeated .google.pubsub.v1.PubsubMessage messages = 2; - * - *
-   * The messages to publish.
-   * 
- */ - com.google.pubsub.v1.PubsubMessage getMessages(int index); - /** - * repeated .google.pubsub.v1.PubsubMessage messages = 2; - * - *
-   * The messages to publish.
-   * 
- */ - int getMessagesCount(); - /** - * repeated .google.pubsub.v1.PubsubMessage messages = 2; - * - *
-   * The messages to publish.
-   * 
- */ - java.util.List - getMessagesOrBuilderList(); - /** - * repeated .google.pubsub.v1.PubsubMessage messages = 2; - * - *
-   * The messages to publish.
-   * 
- */ - com.google.pubsub.v1.PubsubMessageOrBuilder getMessagesOrBuilder( - int index); -} diff --git a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/PublishResponse.java b/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/PublishResponse.java deleted file mode 100644 index 9a7a30834bce..000000000000 --- a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/PublishResponse.java +++ /dev/null @@ -1,569 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/pubsub/v1/pubsub.proto - -package com.google.pubsub.v1; - -/** - * Protobuf type {@code google.pubsub.v1.PublishResponse} - * - *
- * Response for the Publish method.
- * 
- */ -public final class PublishResponse extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.pubsub.v1.PublishResponse) - PublishResponseOrBuilder { - // Use PublishResponse.newBuilder() to construct. - private PublishResponse(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private PublishResponse() { - messageIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private PublishResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - int mutable_bitField0_ = 0; - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!input.skipField(tag)) { - done = true; - } - break; - } - case 10: { - String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - messageIds_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - messageIds_.add(s); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - messageIds_ = messageIds_.getUnmodifiableView(); - } - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_PublishResponse_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_PublishResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.pubsub.v1.PublishResponse.class, com.google.pubsub.v1.PublishResponse.Builder.class); - } - - public static final int MESSAGE_IDS_FIELD_NUMBER = 1; - private com.google.protobuf.LazyStringList messageIds_; - /** - * repeated string message_ids = 1; - * - *
-   * The server-assigned ID of each published message, in the same order as
-   * the messages in the request. IDs are guaranteed to be unique within
-   * the topic.
-   * 
- */ - public com.google.protobuf.ProtocolStringList - getMessageIdsList() { - return messageIds_; - } - /** - * repeated string message_ids = 1; - * - *
-   * The server-assigned ID of each published message, in the same order as
-   * the messages in the request. IDs are guaranteed to be unique within
-   * the topic.
-   * 
- */ - public int getMessageIdsCount() { - return messageIds_.size(); - } - /** - * repeated string message_ids = 1; - * - *
-   * The server-assigned ID of each published message, in the same order as
-   * the messages in the request. IDs are guaranteed to be unique within
-   * the topic.
-   * 
- */ - public java.lang.String getMessageIds(int index) { - return messageIds_.get(index); - } - /** - * repeated string message_ids = 1; - * - *
-   * The server-assigned ID of each published message, in the same order as
-   * the messages in the request. IDs are guaranteed to be unique within
-   * the topic.
-   * 
- */ - public com.google.protobuf.ByteString - getMessageIdsBytes(int index) { - return messageIds_.getByteString(index); - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < messageIds_.size(); i++) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, messageIds_.getRaw(i)); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < messageIds_.size(); i++) { - dataSize += computeStringSizeNoTag(messageIds_.getRaw(i)); - } - size += dataSize; - size += 1 * getMessageIdsList().size(); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static com.google.pubsub.v1.PublishResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.pubsub.v1.PublishResponse 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.pubsub.v1.PublishResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.pubsub.v1.PublishResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.pubsub.v1.PublishResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.pubsub.v1.PublishResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.pubsub.v1.PublishResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.pubsub.v1.PublishResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.pubsub.v1.PublishResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.pubsub.v1.PublishResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.pubsub.v1.PublishResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - 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; - } - /** - * Protobuf type {@code google.pubsub.v1.PublishResponse} - * - *
-   * Response for the Publish method.
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.pubsub.v1.PublishResponse) - com.google.pubsub.v1.PublishResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_PublishResponse_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_PublishResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.pubsub.v1.PublishResponse.class, com.google.pubsub.v1.PublishResponse.Builder.class); - } - - // Construct using com.google.pubsub.v1.PublishResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - messageIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_PublishResponse_descriptor; - } - - public com.google.pubsub.v1.PublishResponse getDefaultInstanceForType() { - return com.google.pubsub.v1.PublishResponse.getDefaultInstance(); - } - - public com.google.pubsub.v1.PublishResponse build() { - com.google.pubsub.v1.PublishResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.pubsub.v1.PublishResponse buildPartial() { - com.google.pubsub.v1.PublishResponse result = new com.google.pubsub.v1.PublishResponse(this); - int from_bitField0_ = bitField0_; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - messageIds_ = messageIds_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.messageIds_ = messageIds_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.pubsub.v1.PublishResponse) { - return mergeFrom((com.google.pubsub.v1.PublishResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.pubsub.v1.PublishResponse other) { - if (other == com.google.pubsub.v1.PublishResponse.getDefaultInstance()) return this; - if (!other.messageIds_.isEmpty()) { - if (messageIds_.isEmpty()) { - messageIds_ = other.messageIds_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureMessageIdsIsMutable(); - messageIds_.addAll(other.messageIds_); - } - onChanged(); - } - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.pubsub.v1.PublishResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.pubsub.v1.PublishResponse) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.protobuf.LazyStringList messageIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureMessageIdsIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { - messageIds_ = new com.google.protobuf.LazyStringArrayList(messageIds_); - bitField0_ |= 0x00000001; - } - } - /** - * repeated string message_ids = 1; - * - *
-     * The server-assigned ID of each published message, in the same order as
-     * the messages in the request. IDs are guaranteed to be unique within
-     * the topic.
-     * 
- */ - public com.google.protobuf.ProtocolStringList - getMessageIdsList() { - return messageIds_.getUnmodifiableView(); - } - /** - * repeated string message_ids = 1; - * - *
-     * The server-assigned ID of each published message, in the same order as
-     * the messages in the request. IDs are guaranteed to be unique within
-     * the topic.
-     * 
- */ - public int getMessageIdsCount() { - return messageIds_.size(); - } - /** - * repeated string message_ids = 1; - * - *
-     * The server-assigned ID of each published message, in the same order as
-     * the messages in the request. IDs are guaranteed to be unique within
-     * the topic.
-     * 
- */ - public java.lang.String getMessageIds(int index) { - return messageIds_.get(index); - } - /** - * repeated string message_ids = 1; - * - *
-     * The server-assigned ID of each published message, in the same order as
-     * the messages in the request. IDs are guaranteed to be unique within
-     * the topic.
-     * 
- */ - public com.google.protobuf.ByteString - getMessageIdsBytes(int index) { - return messageIds_.getByteString(index); - } - /** - * repeated string message_ids = 1; - * - *
-     * The server-assigned ID of each published message, in the same order as
-     * the messages in the request. IDs are guaranteed to be unique within
-     * the topic.
-     * 
- */ - public Builder setMessageIds( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureMessageIdsIsMutable(); - messageIds_.set(index, value); - onChanged(); - return this; - } - /** - * repeated string message_ids = 1; - * - *
-     * The server-assigned ID of each published message, in the same order as
-     * the messages in the request. IDs are guaranteed to be unique within
-     * the topic.
-     * 
- */ - public Builder addMessageIds( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureMessageIdsIsMutable(); - messageIds_.add(value); - onChanged(); - return this; - } - /** - * repeated string message_ids = 1; - * - *
-     * The server-assigned ID of each published message, in the same order as
-     * the messages in the request. IDs are guaranteed to be unique within
-     * the topic.
-     * 
- */ - public Builder addAllMessageIds( - java.lang.Iterable values) { - ensureMessageIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, messageIds_); - onChanged(); - return this; - } - /** - * repeated string message_ids = 1; - * - *
-     * The server-assigned ID of each published message, in the same order as
-     * the messages in the request. IDs are guaranteed to be unique within
-     * the topic.
-     * 
- */ - public Builder clearMessageIds() { - messageIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * repeated string message_ids = 1; - * - *
-     * The server-assigned ID of each published message, in the same order as
-     * the messages in the request. IDs are guaranteed to be unique within
-     * the topic.
-     * 
- */ - public Builder addMessageIdsBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureMessageIdsIsMutable(); - messageIds_.add(value); - onChanged(); - return this; - } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.PublishResponse) - } - - // @@protoc_insertion_point(class_scope:google.pubsub.v1.PublishResponse) - private static final com.google.pubsub.v1.PublishResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.pubsub.v1.PublishResponse(); - } - - public static com.google.pubsub.v1.PublishResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public PublishResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new PublishResponse(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public com.google.pubsub.v1.PublishResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/PublishResponseOrBuilder.java b/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/PublishResponseOrBuilder.java deleted file mode 100644 index 6908fac0c93b..000000000000 --- a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/PublishResponseOrBuilder.java +++ /dev/null @@ -1,52 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/pubsub/v1/pubsub.proto - -package com.google.pubsub.v1; - -public interface PublishResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.pubsub.v1.PublishResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated string message_ids = 1; - * - *
-   * The server-assigned ID of each published message, in the same order as
-   * the messages in the request. IDs are guaranteed to be unique within
-   * the topic.
-   * 
- */ - com.google.protobuf.ProtocolStringList - getMessageIdsList(); - /** - * repeated string message_ids = 1; - * - *
-   * The server-assigned ID of each published message, in the same order as
-   * the messages in the request. IDs are guaranteed to be unique within
-   * the topic.
-   * 
- */ - int getMessageIdsCount(); - /** - * repeated string message_ids = 1; - * - *
-   * The server-assigned ID of each published message, in the same order as
-   * the messages in the request. IDs are guaranteed to be unique within
-   * the topic.
-   * 
- */ - java.lang.String getMessageIds(int index); - /** - * repeated string message_ids = 1; - * - *
-   * The server-assigned ID of each published message, in the same order as
-   * the messages in the request. IDs are guaranteed to be unique within
-   * the topic.
-   * 
- */ - com.google.protobuf.ByteString - getMessageIdsBytes(int index); -} diff --git a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/PublisherGrpc.java b/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/PublisherGrpc.java deleted file mode 100644 index a2c47fcdeb01..000000000000 --- a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/PublisherGrpc.java +++ /dev/null @@ -1,406 +0,0 @@ -package com.google.pubsub.v1; - -import static io.grpc.stub.ClientCalls.asyncUnaryCall; -import static io.grpc.stub.ClientCalls.asyncServerStreamingCall; -import static io.grpc.stub.ClientCalls.asyncClientStreamingCall; -import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall; -import static io.grpc.stub.ClientCalls.blockingUnaryCall; -import static io.grpc.stub.ClientCalls.blockingServerStreamingCall; -import static io.grpc.stub.ClientCalls.futureUnaryCall; -import static io.grpc.MethodDescriptor.generateFullMethodName; -import static io.grpc.stub.ServerCalls.asyncUnaryCall; -import static io.grpc.stub.ServerCalls.asyncServerStreamingCall; -import static io.grpc.stub.ServerCalls.asyncClientStreamingCall; -import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall; - -@javax.annotation.Generated("by gRPC proto compiler") -public class PublisherGrpc { - - private PublisherGrpc() {} - - public static final String SERVICE_NAME = "google.pubsub.v1.Publisher"; - - // Static method descriptors that strictly reflect the proto. - @io.grpc.ExperimentalApi - public static final io.grpc.MethodDescriptor METHOD_CREATE_TOPIC = - io.grpc.MethodDescriptor.create( - io.grpc.MethodDescriptor.MethodType.UNARY, - generateFullMethodName( - "google.pubsub.v1.Publisher", "CreateTopic"), - io.grpc.protobuf.ProtoUtils.marshaller(com.google.pubsub.v1.Topic.getDefaultInstance()), - io.grpc.protobuf.ProtoUtils.marshaller(com.google.pubsub.v1.Topic.getDefaultInstance())); - @io.grpc.ExperimentalApi - public static final io.grpc.MethodDescriptor METHOD_PUBLISH = - io.grpc.MethodDescriptor.create( - io.grpc.MethodDescriptor.MethodType.UNARY, - generateFullMethodName( - "google.pubsub.v1.Publisher", "Publish"), - io.grpc.protobuf.ProtoUtils.marshaller(com.google.pubsub.v1.PublishRequest.getDefaultInstance()), - io.grpc.protobuf.ProtoUtils.marshaller(com.google.pubsub.v1.PublishResponse.getDefaultInstance())); - @io.grpc.ExperimentalApi - public static final io.grpc.MethodDescriptor METHOD_GET_TOPIC = - io.grpc.MethodDescriptor.create( - io.grpc.MethodDescriptor.MethodType.UNARY, - generateFullMethodName( - "google.pubsub.v1.Publisher", "GetTopic"), - io.grpc.protobuf.ProtoUtils.marshaller(com.google.pubsub.v1.GetTopicRequest.getDefaultInstance()), - io.grpc.protobuf.ProtoUtils.marshaller(com.google.pubsub.v1.Topic.getDefaultInstance())); - @io.grpc.ExperimentalApi - public static final io.grpc.MethodDescriptor METHOD_LIST_TOPICS = - io.grpc.MethodDescriptor.create( - io.grpc.MethodDescriptor.MethodType.UNARY, - generateFullMethodName( - "google.pubsub.v1.Publisher", "ListTopics"), - io.grpc.protobuf.ProtoUtils.marshaller(com.google.pubsub.v1.ListTopicsRequest.getDefaultInstance()), - io.grpc.protobuf.ProtoUtils.marshaller(com.google.pubsub.v1.ListTopicsResponse.getDefaultInstance())); - @io.grpc.ExperimentalApi - public static final io.grpc.MethodDescriptor METHOD_LIST_TOPIC_SUBSCRIPTIONS = - io.grpc.MethodDescriptor.create( - io.grpc.MethodDescriptor.MethodType.UNARY, - generateFullMethodName( - "google.pubsub.v1.Publisher", "ListTopicSubscriptions"), - io.grpc.protobuf.ProtoUtils.marshaller(com.google.pubsub.v1.ListTopicSubscriptionsRequest.getDefaultInstance()), - io.grpc.protobuf.ProtoUtils.marshaller(com.google.pubsub.v1.ListTopicSubscriptionsResponse.getDefaultInstance())); - @io.grpc.ExperimentalApi - public static final io.grpc.MethodDescriptor METHOD_DELETE_TOPIC = - io.grpc.MethodDescriptor.create( - io.grpc.MethodDescriptor.MethodType.UNARY, - generateFullMethodName( - "google.pubsub.v1.Publisher", "DeleteTopic"), - io.grpc.protobuf.ProtoUtils.marshaller(com.google.pubsub.v1.DeleteTopicRequest.getDefaultInstance()), - io.grpc.protobuf.ProtoUtils.marshaller(com.google.protobuf.Empty.getDefaultInstance())); - - public static PublisherStub newStub(io.grpc.Channel channel) { - return new PublisherStub(channel); - } - - public static PublisherBlockingStub newBlockingStub( - io.grpc.Channel channel) { - return new PublisherBlockingStub(channel); - } - - public static PublisherFutureStub newFutureStub( - io.grpc.Channel channel) { - return new PublisherFutureStub(channel); - } - - public static interface Publisher { - - public void createTopic(com.google.pubsub.v1.Topic request, - io.grpc.stub.StreamObserver responseObserver); - - public void publish(com.google.pubsub.v1.PublishRequest request, - io.grpc.stub.StreamObserver responseObserver); - - public void getTopic(com.google.pubsub.v1.GetTopicRequest request, - io.grpc.stub.StreamObserver responseObserver); - - public void listTopics(com.google.pubsub.v1.ListTopicsRequest request, - io.grpc.stub.StreamObserver responseObserver); - - public void listTopicSubscriptions(com.google.pubsub.v1.ListTopicSubscriptionsRequest request, - io.grpc.stub.StreamObserver responseObserver); - - public void deleteTopic(com.google.pubsub.v1.DeleteTopicRequest request, - io.grpc.stub.StreamObserver responseObserver); - } - - public static interface PublisherBlockingClient { - - public com.google.pubsub.v1.Topic createTopic(com.google.pubsub.v1.Topic request); - - public com.google.pubsub.v1.PublishResponse publish(com.google.pubsub.v1.PublishRequest request); - - public com.google.pubsub.v1.Topic getTopic(com.google.pubsub.v1.GetTopicRequest request); - - public com.google.pubsub.v1.ListTopicsResponse listTopics(com.google.pubsub.v1.ListTopicsRequest request); - - public com.google.pubsub.v1.ListTopicSubscriptionsResponse listTopicSubscriptions(com.google.pubsub.v1.ListTopicSubscriptionsRequest request); - - public com.google.protobuf.Empty deleteTopic(com.google.pubsub.v1.DeleteTopicRequest request); - } - - public static interface PublisherFutureClient { - - public com.google.common.util.concurrent.ListenableFuture createTopic( - com.google.pubsub.v1.Topic request); - - public com.google.common.util.concurrent.ListenableFuture publish( - com.google.pubsub.v1.PublishRequest request); - - public com.google.common.util.concurrent.ListenableFuture getTopic( - com.google.pubsub.v1.GetTopicRequest request); - - public com.google.common.util.concurrent.ListenableFuture listTopics( - com.google.pubsub.v1.ListTopicsRequest request); - - public com.google.common.util.concurrent.ListenableFuture listTopicSubscriptions( - com.google.pubsub.v1.ListTopicSubscriptionsRequest request); - - public com.google.common.util.concurrent.ListenableFuture deleteTopic( - com.google.pubsub.v1.DeleteTopicRequest request); - } - - public static class PublisherStub extends io.grpc.stub.AbstractStub - implements Publisher { - private PublisherStub(io.grpc.Channel channel) { - super(channel); - } - - private PublisherStub(io.grpc.Channel channel, - io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected PublisherStub build(io.grpc.Channel channel, - io.grpc.CallOptions callOptions) { - return new PublisherStub(channel, callOptions); - } - - @java.lang.Override - public void createTopic(com.google.pubsub.v1.Topic request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnaryCall( - getChannel().newCall(METHOD_CREATE_TOPIC, getCallOptions()), request, responseObserver); - } - - @java.lang.Override - public void publish(com.google.pubsub.v1.PublishRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnaryCall( - getChannel().newCall(METHOD_PUBLISH, getCallOptions()), request, responseObserver); - } - - @java.lang.Override - public void getTopic(com.google.pubsub.v1.GetTopicRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnaryCall( - getChannel().newCall(METHOD_GET_TOPIC, getCallOptions()), request, responseObserver); - } - - @java.lang.Override - public void listTopics(com.google.pubsub.v1.ListTopicsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnaryCall( - getChannel().newCall(METHOD_LIST_TOPICS, getCallOptions()), request, responseObserver); - } - - @java.lang.Override - public void listTopicSubscriptions(com.google.pubsub.v1.ListTopicSubscriptionsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnaryCall( - getChannel().newCall(METHOD_LIST_TOPIC_SUBSCRIPTIONS, getCallOptions()), request, responseObserver); - } - - @java.lang.Override - public void deleteTopic(com.google.pubsub.v1.DeleteTopicRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnaryCall( - getChannel().newCall(METHOD_DELETE_TOPIC, getCallOptions()), request, responseObserver); - } - } - - public static class PublisherBlockingStub extends io.grpc.stub.AbstractStub - implements PublisherBlockingClient { - private PublisherBlockingStub(io.grpc.Channel channel) { - super(channel); - } - - private PublisherBlockingStub(io.grpc.Channel channel, - io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected PublisherBlockingStub build(io.grpc.Channel channel, - io.grpc.CallOptions callOptions) { - return new PublisherBlockingStub(channel, callOptions); - } - - @java.lang.Override - public com.google.pubsub.v1.Topic createTopic(com.google.pubsub.v1.Topic request) { - return blockingUnaryCall( - getChannel().newCall(METHOD_CREATE_TOPIC, getCallOptions()), request); - } - - @java.lang.Override - public com.google.pubsub.v1.PublishResponse publish(com.google.pubsub.v1.PublishRequest request) { - return blockingUnaryCall( - getChannel().newCall(METHOD_PUBLISH, getCallOptions()), request); - } - - @java.lang.Override - public com.google.pubsub.v1.Topic getTopic(com.google.pubsub.v1.GetTopicRequest request) { - return blockingUnaryCall( - getChannel().newCall(METHOD_GET_TOPIC, getCallOptions()), request); - } - - @java.lang.Override - public com.google.pubsub.v1.ListTopicsResponse listTopics(com.google.pubsub.v1.ListTopicsRequest request) { - return blockingUnaryCall( - getChannel().newCall(METHOD_LIST_TOPICS, getCallOptions()), request); - } - - @java.lang.Override - public com.google.pubsub.v1.ListTopicSubscriptionsResponse listTopicSubscriptions(com.google.pubsub.v1.ListTopicSubscriptionsRequest request) { - return blockingUnaryCall( - getChannel().newCall(METHOD_LIST_TOPIC_SUBSCRIPTIONS, getCallOptions()), request); - } - - @java.lang.Override - public com.google.protobuf.Empty deleteTopic(com.google.pubsub.v1.DeleteTopicRequest request) { - return blockingUnaryCall( - getChannel().newCall(METHOD_DELETE_TOPIC, getCallOptions()), request); - } - } - - public static class PublisherFutureStub extends io.grpc.stub.AbstractStub - implements PublisherFutureClient { - private PublisherFutureStub(io.grpc.Channel channel) { - super(channel); - } - - private PublisherFutureStub(io.grpc.Channel channel, - io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected PublisherFutureStub build(io.grpc.Channel channel, - io.grpc.CallOptions callOptions) { - return new PublisherFutureStub(channel, callOptions); - } - - @java.lang.Override - public com.google.common.util.concurrent.ListenableFuture createTopic( - com.google.pubsub.v1.Topic request) { - return futureUnaryCall( - getChannel().newCall(METHOD_CREATE_TOPIC, getCallOptions()), request); - } - - @java.lang.Override - public com.google.common.util.concurrent.ListenableFuture publish( - com.google.pubsub.v1.PublishRequest request) { - return futureUnaryCall( - getChannel().newCall(METHOD_PUBLISH, getCallOptions()), request); - } - - @java.lang.Override - public com.google.common.util.concurrent.ListenableFuture getTopic( - com.google.pubsub.v1.GetTopicRequest request) { - return futureUnaryCall( - getChannel().newCall(METHOD_GET_TOPIC, getCallOptions()), request); - } - - @java.lang.Override - public com.google.common.util.concurrent.ListenableFuture listTopics( - com.google.pubsub.v1.ListTopicsRequest request) { - return futureUnaryCall( - getChannel().newCall(METHOD_LIST_TOPICS, getCallOptions()), request); - } - - @java.lang.Override - public com.google.common.util.concurrent.ListenableFuture listTopicSubscriptions( - com.google.pubsub.v1.ListTopicSubscriptionsRequest request) { - return futureUnaryCall( - getChannel().newCall(METHOD_LIST_TOPIC_SUBSCRIPTIONS, getCallOptions()), request); - } - - @java.lang.Override - public com.google.common.util.concurrent.ListenableFuture deleteTopic( - com.google.pubsub.v1.DeleteTopicRequest request) { - return futureUnaryCall( - getChannel().newCall(METHOD_DELETE_TOPIC, getCallOptions()), request); - } - } - - public static io.grpc.ServerServiceDefinition bindService( - final Publisher serviceImpl) { - return io.grpc.ServerServiceDefinition.builder(SERVICE_NAME) - .addMethod( - METHOD_CREATE_TOPIC, - asyncUnaryCall( - new io.grpc.stub.ServerCalls.UnaryMethod< - com.google.pubsub.v1.Topic, - com.google.pubsub.v1.Topic>() { - @java.lang.Override - public void invoke( - com.google.pubsub.v1.Topic request, - io.grpc.stub.StreamObserver responseObserver) { - serviceImpl.createTopic(request, responseObserver); - } - })) - .addMethod( - METHOD_PUBLISH, - asyncUnaryCall( - new io.grpc.stub.ServerCalls.UnaryMethod< - com.google.pubsub.v1.PublishRequest, - com.google.pubsub.v1.PublishResponse>() { - @java.lang.Override - public void invoke( - com.google.pubsub.v1.PublishRequest request, - io.grpc.stub.StreamObserver responseObserver) { - serviceImpl.publish(request, responseObserver); - } - })) - .addMethod( - METHOD_GET_TOPIC, - asyncUnaryCall( - new io.grpc.stub.ServerCalls.UnaryMethod< - com.google.pubsub.v1.GetTopicRequest, - com.google.pubsub.v1.Topic>() { - @java.lang.Override - public void invoke( - com.google.pubsub.v1.GetTopicRequest request, - io.grpc.stub.StreamObserver responseObserver) { - serviceImpl.getTopic(request, responseObserver); - } - })) - .addMethod( - METHOD_LIST_TOPICS, - asyncUnaryCall( - new io.grpc.stub.ServerCalls.UnaryMethod< - com.google.pubsub.v1.ListTopicsRequest, - com.google.pubsub.v1.ListTopicsResponse>() { - @java.lang.Override - public void invoke( - com.google.pubsub.v1.ListTopicsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - serviceImpl.listTopics(request, responseObserver); - } - })) - .addMethod( - METHOD_LIST_TOPIC_SUBSCRIPTIONS, - asyncUnaryCall( - new io.grpc.stub.ServerCalls.UnaryMethod< - com.google.pubsub.v1.ListTopicSubscriptionsRequest, - com.google.pubsub.v1.ListTopicSubscriptionsResponse>() { - @java.lang.Override - public void invoke( - com.google.pubsub.v1.ListTopicSubscriptionsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - serviceImpl.listTopicSubscriptions(request, responseObserver); - } - })) - .addMethod( - METHOD_DELETE_TOPIC, - asyncUnaryCall( - new io.grpc.stub.ServerCalls.UnaryMethod< - com.google.pubsub.v1.DeleteTopicRequest, - com.google.protobuf.Empty>() { - @java.lang.Override - public void invoke( - com.google.pubsub.v1.DeleteTopicRequest request, - io.grpc.stub.StreamObserver responseObserver) { - serviceImpl.deleteTopic(request, responseObserver); - } - })).build(); - } -} diff --git a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/PubsubMessage.java b/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/PubsubMessage.java deleted file mode 100644 index 5228be2f8998..000000000000 --- a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/PubsubMessage.java +++ /dev/null @@ -1,740 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/pubsub/v1/pubsub.proto - -package com.google.pubsub.v1; - -/** - * Protobuf type {@code google.pubsub.v1.PubsubMessage} - * - *
- * A message data and its attributes. The message payload must not be empty;
- * it must contain either a non-empty data field, or at least one attribute.
- * 
- */ -public final class PubsubMessage extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.pubsub.v1.PubsubMessage) - PubsubMessageOrBuilder { - // Use PubsubMessage.newBuilder() to construct. - private PubsubMessage(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private PubsubMessage() { - data_ = com.google.protobuf.ByteString.EMPTY; - messageId_ = ""; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private PubsubMessage( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - int mutable_bitField0_ = 0; - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!input.skipField(tag)) { - done = true; - } - break; - } - case 10: { - - data_ = input.readBytes(); - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - attributes_ = com.google.protobuf.MapField.newMapField( - AttributesDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000002; - } - com.google.protobuf.MapEntry - attributes = input.readMessage( - AttributesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - attributes_.getMutableMap().put(attributes.getKey(), attributes.getValue()); - break; - } - case 26: { - String s = input.readStringRequireUtf8(); - - messageId_ = s; - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_PubsubMessage_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 2: - return internalGetAttributes(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_PubsubMessage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.pubsub.v1.PubsubMessage.class, com.google.pubsub.v1.PubsubMessage.Builder.class); - } - - private int bitField0_; - public static final int DATA_FIELD_NUMBER = 1; - private com.google.protobuf.ByteString data_; - /** - * optional bytes data = 1; - * - *
-   * The message payload. For JSON requests, the value of this field must be
-   * base64-encoded.
-   * 
- */ - public com.google.protobuf.ByteString getData() { - return data_; - } - - public static final int ATTRIBUTES_FIELD_NUMBER = 2; - private static final class AttributesDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, java.lang.String> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_PubsubMessage_AttributesEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> attributes_; - private com.google.protobuf.MapField - internalGetAttributes() { - if (attributes_ == null) { - return com.google.protobuf.MapField.emptyMapField( - AttributesDefaultEntryHolder.defaultEntry); - } - return attributes_; - } - /** - * map<string, string> attributes = 2; - * - *
-   * Optional attributes for this message.
-   * 
- */ - - public java.util.Map getAttributes() { - return internalGetAttributes().getMap(); - } - - public static final int MESSAGE_ID_FIELD_NUMBER = 3; - private volatile java.lang.Object messageId_; - /** - * optional string message_id = 3; - * - *
-   * ID of this message assigned by the server at publication time. Guaranteed
-   * to be unique within the topic. This value may be read by a subscriber
-   * that receives a PubsubMessage via a Pull call or a push delivery. It must
-   * not be populated by a publisher in a Publish call.
-   * 
- */ - public java.lang.String getMessageId() { - java.lang.Object ref = messageId_; - 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(); - messageId_ = s; - return s; - } - } - /** - * optional string message_id = 3; - * - *
-   * ID of this message assigned by the server at publication time. Guaranteed
-   * to be unique within the topic. This value may be read by a subscriber
-   * that receives a PubsubMessage via a Pull call or a push delivery. It must
-   * not be populated by a publisher in a Publish call.
-   * 
- */ - public com.google.protobuf.ByteString - getMessageIdBytes() { - java.lang.Object ref = messageId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - messageId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!data_.isEmpty()) { - output.writeBytes(1, data_); - } - for (java.util.Map.Entry entry - : internalGetAttributes().getMap().entrySet()) { - com.google.protobuf.MapEntry - attributes = AttributesDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - output.writeMessage(2, attributes); - } - if (!getMessageIdBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 3, messageId_); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!data_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, data_); - } - for (java.util.Map.Entry entry - : internalGetAttributes().getMap().entrySet()) { - com.google.protobuf.MapEntry - attributes = AttributesDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, attributes); - } - if (!getMessageIdBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(3, messageId_); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static com.google.pubsub.v1.PubsubMessage parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.pubsub.v1.PubsubMessage 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.pubsub.v1.PubsubMessage parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.pubsub.v1.PubsubMessage parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.pubsub.v1.PubsubMessage parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.pubsub.v1.PubsubMessage parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.pubsub.v1.PubsubMessage parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.pubsub.v1.PubsubMessage parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.pubsub.v1.PubsubMessage parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.pubsub.v1.PubsubMessage parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.pubsub.v1.PubsubMessage prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - 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; - } - /** - * Protobuf type {@code google.pubsub.v1.PubsubMessage} - * - *
-   * A message data and its attributes. The message payload must not be empty;
-   * it must contain either a non-empty data field, or at least one attribute.
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.pubsub.v1.PubsubMessage) - com.google.pubsub.v1.PubsubMessageOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_PubsubMessage_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 2: - return internalGetAttributes(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField( - int number) { - switch (number) { - case 2: - return internalGetMutableAttributes(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_PubsubMessage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.pubsub.v1.PubsubMessage.class, com.google.pubsub.v1.PubsubMessage.Builder.class); - } - - // Construct using com.google.pubsub.v1.PubsubMessage.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - data_ = com.google.protobuf.ByteString.EMPTY; - - internalGetMutableAttributes().clear(); - messageId_ = ""; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_PubsubMessage_descriptor; - } - - public com.google.pubsub.v1.PubsubMessage getDefaultInstanceForType() { - return com.google.pubsub.v1.PubsubMessage.getDefaultInstance(); - } - - public com.google.pubsub.v1.PubsubMessage build() { - com.google.pubsub.v1.PubsubMessage result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.pubsub.v1.PubsubMessage buildPartial() { - com.google.pubsub.v1.PubsubMessage result = new com.google.pubsub.v1.PubsubMessage(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - result.data_ = data_; - result.attributes_ = internalGetAttributes(); - result.attributes_.makeImmutable(); - result.messageId_ = messageId_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.pubsub.v1.PubsubMessage) { - return mergeFrom((com.google.pubsub.v1.PubsubMessage)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.pubsub.v1.PubsubMessage other) { - if (other == com.google.pubsub.v1.PubsubMessage.getDefaultInstance()) return this; - if (other.getData() != com.google.protobuf.ByteString.EMPTY) { - setData(other.getData()); - } - internalGetMutableAttributes().mergeFrom( - other.internalGetAttributes()); - if (!other.getMessageId().isEmpty()) { - messageId_ = other.messageId_; - onChanged(); - } - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.pubsub.v1.PubsubMessage parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.pubsub.v1.PubsubMessage) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY; - /** - * optional bytes data = 1; - * - *
-     * The message payload. For JSON requests, the value of this field must be
-     * base64-encoded.
-     * 
- */ - public com.google.protobuf.ByteString getData() { - return data_; - } - /** - * optional bytes data = 1; - * - *
-     * The message payload. For JSON requests, the value of this field must be
-     * base64-encoded.
-     * 
- */ - public Builder setData(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - - data_ = value; - onChanged(); - return this; - } - /** - * optional bytes data = 1; - * - *
-     * The message payload. For JSON requests, the value of this field must be
-     * base64-encoded.
-     * 
- */ - public Builder clearData() { - - data_ = getDefaultInstance().getData(); - onChanged(); - return this; - } - - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> attributes_; - private com.google.protobuf.MapField - internalGetAttributes() { - if (attributes_ == null) { - return com.google.protobuf.MapField.emptyMapField( - AttributesDefaultEntryHolder.defaultEntry); - } - return attributes_; - } - private com.google.protobuf.MapField - internalGetMutableAttributes() { - onChanged();; - if (attributes_ == null) { - attributes_ = com.google.protobuf.MapField.newMapField( - AttributesDefaultEntryHolder.defaultEntry); - } - if (!attributes_.isMutable()) { - attributes_ = attributes_.copy(); - } - return attributes_; - } - /** - * map<string, string> attributes = 2; - * - *
-     * Optional attributes for this message.
-     * 
- */ - public java.util.Map getAttributes() { - return internalGetAttributes().getMap(); - } - /** - * map<string, string> attributes = 2; - * - *
-     * Optional attributes for this message.
-     * 
- */ - public java.util.Map - getMutableAttributes() { - return internalGetMutableAttributes().getMutableMap(); - } - /** - * map<string, string> attributes = 2; - * - *
-     * Optional attributes for this message.
-     * 
- */ - public Builder putAllAttributes( - java.util.Map values) { - getMutableAttributes().putAll(values); - return this; - } - - private java.lang.Object messageId_ = ""; - /** - * optional string message_id = 3; - * - *
-     * ID of this message assigned by the server at publication time. Guaranteed
-     * to be unique within the topic. This value may be read by a subscriber
-     * that receives a PubsubMessage via a Pull call or a push delivery. It must
-     * not be populated by a publisher in a Publish call.
-     * 
- */ - public java.lang.String getMessageId() { - java.lang.Object ref = messageId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - messageId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string message_id = 3; - * - *
-     * ID of this message assigned by the server at publication time. Guaranteed
-     * to be unique within the topic. This value may be read by a subscriber
-     * that receives a PubsubMessage via a Pull call or a push delivery. It must
-     * not be populated by a publisher in a Publish call.
-     * 
- */ - public com.google.protobuf.ByteString - getMessageIdBytes() { - java.lang.Object ref = messageId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - messageId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string message_id = 3; - * - *
-     * ID of this message assigned by the server at publication time. Guaranteed
-     * to be unique within the topic. This value may be read by a subscriber
-     * that receives a PubsubMessage via a Pull call or a push delivery. It must
-     * not be populated by a publisher in a Publish call.
-     * 
- */ - public Builder setMessageId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - messageId_ = value; - onChanged(); - return this; - } - /** - * optional string message_id = 3; - * - *
-     * ID of this message assigned by the server at publication time. Guaranteed
-     * to be unique within the topic. This value may be read by a subscriber
-     * that receives a PubsubMessage via a Pull call or a push delivery. It must
-     * not be populated by a publisher in a Publish call.
-     * 
- */ - public Builder clearMessageId() { - - messageId_ = getDefaultInstance().getMessageId(); - onChanged(); - return this; - } - /** - * optional string message_id = 3; - * - *
-     * ID of this message assigned by the server at publication time. Guaranteed
-     * to be unique within the topic. This value may be read by a subscriber
-     * that receives a PubsubMessage via a Pull call or a push delivery. It must
-     * not be populated by a publisher in a Publish call.
-     * 
- */ - public Builder setMessageIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - messageId_ = value; - onChanged(); - return this; - } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.PubsubMessage) - } - - // @@protoc_insertion_point(class_scope:google.pubsub.v1.PubsubMessage) - private static final com.google.pubsub.v1.PubsubMessage DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.pubsub.v1.PubsubMessage(); - } - - public static com.google.pubsub.v1.PubsubMessage getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public PubsubMessage parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new PubsubMessage(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public com.google.pubsub.v1.PubsubMessage getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/PubsubMessageOrBuilder.java b/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/PubsubMessageOrBuilder.java deleted file mode 100644 index 706d17d65291..000000000000 --- a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/PubsubMessageOrBuilder.java +++ /dev/null @@ -1,53 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/pubsub/v1/pubsub.proto - -package com.google.pubsub.v1; - -public interface PubsubMessageOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.pubsub.v1.PubsubMessage) - com.google.protobuf.MessageOrBuilder { - - /** - * optional bytes data = 1; - * - *
-   * The message payload. For JSON requests, the value of this field must be
-   * base64-encoded.
-   * 
- */ - com.google.protobuf.ByteString getData(); - - /** - * map<string, string> attributes = 2; - * - *
-   * Optional attributes for this message.
-   * 
- */ - java.util.Map - getAttributes(); - - /** - * optional string message_id = 3; - * - *
-   * ID of this message assigned by the server at publication time. Guaranteed
-   * to be unique within the topic. This value may be read by a subscriber
-   * that receives a PubsubMessage via a Pull call or a push delivery. It must
-   * not be populated by a publisher in a Publish call.
-   * 
- */ - java.lang.String getMessageId(); - /** - * optional string message_id = 3; - * - *
-   * ID of this message assigned by the server at publication time. Guaranteed
-   * to be unique within the topic. This value may be read by a subscriber
-   * that receives a PubsubMessage via a Pull call or a push delivery. It must
-   * not be populated by a publisher in a Publish call.
-   * 
- */ - com.google.protobuf.ByteString - getMessageIdBytes(); -} diff --git a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/PubsubProto.java b/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/PubsubProto.java deleted file mode 100644 index 197384a867d9..000000000000 --- a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/PubsubProto.java +++ /dev/null @@ -1,409 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/pubsub/v1/pubsub.proto - -package com.google.pubsub.v1; - -public final class PubsubProto { - private PubsubProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - } - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_pubsub_v1_Topic_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_pubsub_v1_Topic_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_pubsub_v1_PubsubMessage_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_pubsub_v1_PubsubMessage_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_pubsub_v1_PubsubMessage_AttributesEntry_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_pubsub_v1_PubsubMessage_AttributesEntry_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_pubsub_v1_GetTopicRequest_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_pubsub_v1_GetTopicRequest_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_pubsub_v1_PublishRequest_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_pubsub_v1_PublishRequest_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_pubsub_v1_PublishResponse_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_pubsub_v1_PublishResponse_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_pubsub_v1_ListTopicsRequest_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_pubsub_v1_ListTopicsRequest_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_pubsub_v1_ListTopicsResponse_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_pubsub_v1_ListTopicsResponse_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_pubsub_v1_ListTopicSubscriptionsRequest_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_pubsub_v1_ListTopicSubscriptionsRequest_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_pubsub_v1_ListTopicSubscriptionsResponse_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_pubsub_v1_ListTopicSubscriptionsResponse_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_pubsub_v1_DeleteTopicRequest_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_pubsub_v1_DeleteTopicRequest_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_pubsub_v1_Subscription_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_pubsub_v1_Subscription_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_pubsub_v1_PushConfig_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_pubsub_v1_PushConfig_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_pubsub_v1_PushConfig_AttributesEntry_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_pubsub_v1_PushConfig_AttributesEntry_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_pubsub_v1_ReceivedMessage_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_pubsub_v1_ReceivedMessage_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_pubsub_v1_GetSubscriptionRequest_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_pubsub_v1_GetSubscriptionRequest_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_pubsub_v1_ListSubscriptionsRequest_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_pubsub_v1_ListSubscriptionsRequest_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_pubsub_v1_ListSubscriptionsResponse_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_pubsub_v1_ListSubscriptionsResponse_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_pubsub_v1_DeleteSubscriptionRequest_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_pubsub_v1_DeleteSubscriptionRequest_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_pubsub_v1_ModifyPushConfigRequest_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_pubsub_v1_ModifyPushConfigRequest_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_pubsub_v1_PullRequest_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_pubsub_v1_PullRequest_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_pubsub_v1_PullResponse_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_pubsub_v1_PullResponse_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_pubsub_v1_ModifyAckDeadlineRequest_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_pubsub_v1_ModifyAckDeadlineRequest_fieldAccessorTable; - static com.google.protobuf.Descriptors.Descriptor - internal_static_google_pubsub_v1_AcknowledgeRequest_descriptor; - static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_pubsub_v1_AcknowledgeRequest_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\035google/pubsub/v1/pubsub.proto\022\020google." + - "pubsub.v1\032\034google/api/annotations.proto\032" + - "\033google/protobuf/empty.proto\"\025\n\005Topic\022\014\n" + - "\004name\030\001 \001(\t\"\251\001\n\rPubsubMessage\022\014\n\004data\030\001 " + - "\001(\014\022C\n\nattributes\030\002 \003(\0132/.google.pubsub." + - "v1.PubsubMessage.AttributesEntry\022\022\n\nmess" + - "age_id\030\003 \001(\t\0321\n\017AttributesEntry\022\013\n\003key\030\001" + - " \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\" \n\017GetTopicReque" + - "st\022\r\n\005topic\030\001 \001(\t\"R\n\016PublishRequest\022\r\n\005t" + - "opic\030\001 \001(\t\0221\n\010messages\030\002 \003(\0132\037.google.pu", - "bsub.v1.PubsubMessage\"&\n\017PublishResponse" + - "\022\023\n\013message_ids\030\001 \003(\t\"K\n\021ListTopicsReque" + - "st\022\017\n\007project\030\001 \001(\t\022\021\n\tpage_size\030\002 \001(\005\022\022" + - "\n\npage_token\030\003 \001(\t\"V\n\022ListTopicsResponse" + - "\022\'\n\006topics\030\001 \003(\0132\027.google.pubsub.v1.Topi" + - "c\022\027\n\017next_page_token\030\002 \001(\t\"U\n\035ListTopicS" + - "ubscriptionsRequest\022\r\n\005topic\030\001 \001(\t\022\021\n\tpa" + - "ge_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"P\n\036Lis" + - "tTopicSubscriptionsResponse\022\025\n\rsubscript" + - "ions\030\001 \003(\t\022\027\n\017next_page_token\030\002 \001(\t\"#\n\022D", - "eleteTopicRequest\022\r\n\005topic\030\001 \001(\t\"|\n\014Subs" + - "cription\022\014\n\004name\030\001 \001(\t\022\r\n\005topic\030\002 \001(\t\0221\n" + - "\013push_config\030\004 \001(\0132\034.google.pubsub.v1.Pu" + - "shConfig\022\034\n\024ack_deadline_seconds\030\005 \001(\005\"\230" + - "\001\n\nPushConfig\022\025\n\rpush_endpoint\030\001 \001(\t\022@\n\n" + - "attributes\030\002 \003(\0132,.google.pubsub.v1.Push" + - "Config.AttributesEntry\0321\n\017AttributesEntr" + - "y\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"S\n\017Rec" + - "eivedMessage\022\016\n\006ack_id\030\001 \001(\t\0220\n\007message\030" + - "\002 \001(\0132\037.google.pubsub.v1.PubsubMessage\".", - "\n\026GetSubscriptionRequest\022\024\n\014subscription" + - "\030\001 \001(\t\"R\n\030ListSubscriptionsRequest\022\017\n\007pr" + - "oject\030\001 \001(\t\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_t" + - "oken\030\003 \001(\t\"k\n\031ListSubscriptionsResponse\022" + - "5\n\rsubscriptions\030\001 \003(\0132\036.google.pubsub.v" + - "1.Subscription\022\027\n\017next_page_token\030\002 \001(\t\"" + - "1\n\031DeleteSubscriptionRequest\022\024\n\014subscrip" + - "tion\030\001 \001(\t\"b\n\027ModifyPushConfigRequest\022\024\n" + - "\014subscription\030\001 \001(\t\0221\n\013push_config\030\002 \001(\013" + - "2\034.google.pubsub.v1.PushConfig\"U\n\013PullRe", - "quest\022\024\n\014subscription\030\001 \001(\t\022\032\n\022return_im" + - "mediately\030\002 \001(\010\022\024\n\014max_messages\030\003 \001(\005\"L\n" + - "\014PullResponse\022<\n\021received_messages\030\001 \003(\013" + - "2!.google.pubsub.v1.ReceivedMessage\"_\n\030M" + - "odifyAckDeadlineRequest\022\024\n\014subscription\030" + - "\001 \001(\t\022\017\n\007ack_ids\030\004 \003(\t\022\034\n\024ack_deadline_s" + - "econds\030\003 \001(\005\";\n\022AcknowledgeRequest\022\024\n\014su" + - "bscription\030\001 \001(\t\022\017\n\007ack_ids\030\002 \003(\t2\300\t\n\nSu" + - "bscriber\022\206\001\n\022CreateSubscription\022\036.google" + - ".pubsub.v1.Subscription\032\036.google.pubsub.", - "v1.Subscription\"0\202\323\344\223\002*\032%/v1/{name=proje" + - "cts/*/subscriptions/*}:\001*\022\222\001\n\017GetSubscri" + - "ption\022(.google.pubsub.v1.GetSubscription" + - "Request\032\036.google.pubsub.v1.Subscription\"" + - "5\202\323\344\223\002/\022-/v1/{subscription=projects/*/su" + - "bscriptions/*}\022\234\001\n\021ListSubscriptions\022*.g" + - "oogle.pubsub.v1.ListSubscriptionsRequest" + - "\032+.google.pubsub.v1.ListSubscriptionsRes" + - "ponse\".\202\323\344\223\002(\022&/v1/{project=projects/*}/" + - "subscriptions\022\220\001\n\022DeleteSubscription\022+.g", - "oogle.pubsub.v1.DeleteSubscriptionReques" + - "t\032\026.google.protobuf.Empty\"5\202\323\344\223\002/*-/v1/{" + - "subscription=projects/*/subscriptions/*}" + - "\022\243\001\n\021ModifyAckDeadline\022*.google.pubsub.v" + - "1.ModifyAckDeadlineRequest\032\026.google.prot" + - "obuf.Empty\"J\202\323\344\223\002D\"?/v1/{subscription=pr" + - "ojects/*/subscriptions/*}:modifyAckDeadl" + - "ine:\001*\022\221\001\n\013Acknowledge\022$.google.pubsub.v" + - "1.AcknowledgeRequest\032\026.google.protobuf.E" + - "mpty\"D\202\323\344\223\002>\"9/v1/{subscription=projects", - "/*/subscriptions/*}:acknowledge:\001*\022\204\001\n\004P" + - "ull\022\035.google.pubsub.v1.PullRequest\032\036.goo" + - "gle.pubsub.v1.PullResponse\"=\202\323\344\223\0027\"2/v1/" + - "{subscription=projects/*/subscriptions/*" + - "}:pull:\001*\022\240\001\n\020ModifyPushConfig\022).google." + - "pubsub.v1.ModifyPushConfigRequest\032\026.goog" + - "le.protobuf.Empty\"I\202\323\344\223\002C\">/v1/{subscrip" + - "tion=projects/*/subscriptions/*}:modifyP" + - "ushConfig:\001*2\233\006\n\tPublisher\022j\n\013CreateTopi" + - "c\022\027.google.pubsub.v1.Topic\032\027.google.pubs", - "ub.v1.Topic\")\202\323\344\223\002#\032\036/v1/{name=projects/" + - "*/topics/*}:\001*\022\202\001\n\007Publish\022 .google.pubs" + - "ub.v1.PublishRequest\032!.google.pubsub.v1." + - "PublishResponse\"2\202\323\344\223\002,\"\'/v1/{topic=proj" + - "ects/*/topics/*}:publish:\001*\022o\n\010GetTopic\022" + - "!.google.pubsub.v1.GetTopicRequest\032\027.goo" + - "gle.pubsub.v1.Topic\"\'\202\323\344\223\002!\022\037/v1/{topic=" + - "projects/*/topics/*}\022\200\001\n\nListTopics\022#.go" + - "ogle.pubsub.v1.ListTopicsRequest\032$.googl" + - "e.pubsub.v1.ListTopicsResponse\"\'\202\323\344\223\002!\022\037", - "/v1/{project=projects/*}/topics\022\262\001\n\026List" + - "TopicSubscriptions\022/.google.pubsub.v1.Li" + - "stTopicSubscriptionsRequest\0320.google.pub" + - "sub.v1.ListTopicSubscriptionsResponse\"5\202" + - "\323\344\223\002/\022-/v1/{topic=projects/*/topics/*}/s" + - "ubscriptions\022t\n\013DeleteTopic\022$.google.pub" + - "sub.v1.DeleteTopicRequest\032\026.google.proto" + - "buf.Empty\"\'\202\323\344\223\002!*\037/v1/{topic=projects/*" + - "/topics/*}B%\n\024com.google.pubsub.v1B\013Pubs" + - "ubProtoP\001b\006proto3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.AnnotationsProto.getDescriptor(), - com.google.protobuf.EmptyProto.getDescriptor(), - }, assigner); - internal_static_google_pubsub_v1_Topic_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_pubsub_v1_Topic_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_pubsub_v1_Topic_descriptor, - new java.lang.String[] { "Name", }); - internal_static_google_pubsub_v1_PubsubMessage_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_pubsub_v1_PubsubMessage_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_pubsub_v1_PubsubMessage_descriptor, - new java.lang.String[] { "Data", "Attributes", "MessageId", }); - internal_static_google_pubsub_v1_PubsubMessage_AttributesEntry_descriptor = - internal_static_google_pubsub_v1_PubsubMessage_descriptor.getNestedTypes().get(0); - internal_static_google_pubsub_v1_PubsubMessage_AttributesEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_pubsub_v1_PubsubMessage_AttributesEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_google_pubsub_v1_GetTopicRequest_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_google_pubsub_v1_GetTopicRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_pubsub_v1_GetTopicRequest_descriptor, - new java.lang.String[] { "Topic", }); - internal_static_google_pubsub_v1_PublishRequest_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_google_pubsub_v1_PublishRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_pubsub_v1_PublishRequest_descriptor, - new java.lang.String[] { "Topic", "Messages", }); - internal_static_google_pubsub_v1_PublishResponse_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_google_pubsub_v1_PublishResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_pubsub_v1_PublishResponse_descriptor, - new java.lang.String[] { "MessageIds", }); - internal_static_google_pubsub_v1_ListTopicsRequest_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_google_pubsub_v1_ListTopicsRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_pubsub_v1_ListTopicsRequest_descriptor, - new java.lang.String[] { "Project", "PageSize", "PageToken", }); - internal_static_google_pubsub_v1_ListTopicsResponse_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_google_pubsub_v1_ListTopicsResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_pubsub_v1_ListTopicsResponse_descriptor, - new java.lang.String[] { "Topics", "NextPageToken", }); - internal_static_google_pubsub_v1_ListTopicSubscriptionsRequest_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_google_pubsub_v1_ListTopicSubscriptionsRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_pubsub_v1_ListTopicSubscriptionsRequest_descriptor, - new java.lang.String[] { "Topic", "PageSize", "PageToken", }); - internal_static_google_pubsub_v1_ListTopicSubscriptionsResponse_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_google_pubsub_v1_ListTopicSubscriptionsResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_pubsub_v1_ListTopicSubscriptionsResponse_descriptor, - new java.lang.String[] { "Subscriptions", "NextPageToken", }); - internal_static_google_pubsub_v1_DeleteTopicRequest_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_google_pubsub_v1_DeleteTopicRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_pubsub_v1_DeleteTopicRequest_descriptor, - new java.lang.String[] { "Topic", }); - internal_static_google_pubsub_v1_Subscription_descriptor = - getDescriptor().getMessageTypes().get(10); - internal_static_google_pubsub_v1_Subscription_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_pubsub_v1_Subscription_descriptor, - new java.lang.String[] { "Name", "Topic", "PushConfig", "AckDeadlineSeconds", }); - internal_static_google_pubsub_v1_PushConfig_descriptor = - getDescriptor().getMessageTypes().get(11); - internal_static_google_pubsub_v1_PushConfig_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_pubsub_v1_PushConfig_descriptor, - new java.lang.String[] { "PushEndpoint", "Attributes", }); - internal_static_google_pubsub_v1_PushConfig_AttributesEntry_descriptor = - internal_static_google_pubsub_v1_PushConfig_descriptor.getNestedTypes().get(0); - internal_static_google_pubsub_v1_PushConfig_AttributesEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_pubsub_v1_PushConfig_AttributesEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_google_pubsub_v1_ReceivedMessage_descriptor = - getDescriptor().getMessageTypes().get(12); - internal_static_google_pubsub_v1_ReceivedMessage_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_pubsub_v1_ReceivedMessage_descriptor, - new java.lang.String[] { "AckId", "Message", }); - internal_static_google_pubsub_v1_GetSubscriptionRequest_descriptor = - getDescriptor().getMessageTypes().get(13); - internal_static_google_pubsub_v1_GetSubscriptionRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_pubsub_v1_GetSubscriptionRequest_descriptor, - new java.lang.String[] { "Subscription", }); - internal_static_google_pubsub_v1_ListSubscriptionsRequest_descriptor = - getDescriptor().getMessageTypes().get(14); - internal_static_google_pubsub_v1_ListSubscriptionsRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_pubsub_v1_ListSubscriptionsRequest_descriptor, - new java.lang.String[] { "Project", "PageSize", "PageToken", }); - internal_static_google_pubsub_v1_ListSubscriptionsResponse_descriptor = - getDescriptor().getMessageTypes().get(15); - internal_static_google_pubsub_v1_ListSubscriptionsResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_pubsub_v1_ListSubscriptionsResponse_descriptor, - new java.lang.String[] { "Subscriptions", "NextPageToken", }); - internal_static_google_pubsub_v1_DeleteSubscriptionRequest_descriptor = - getDescriptor().getMessageTypes().get(16); - internal_static_google_pubsub_v1_DeleteSubscriptionRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_pubsub_v1_DeleteSubscriptionRequest_descriptor, - new java.lang.String[] { "Subscription", }); - internal_static_google_pubsub_v1_ModifyPushConfigRequest_descriptor = - getDescriptor().getMessageTypes().get(17); - internal_static_google_pubsub_v1_ModifyPushConfigRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_pubsub_v1_ModifyPushConfigRequest_descriptor, - new java.lang.String[] { "Subscription", "PushConfig", }); - internal_static_google_pubsub_v1_PullRequest_descriptor = - getDescriptor().getMessageTypes().get(18); - internal_static_google_pubsub_v1_PullRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_pubsub_v1_PullRequest_descriptor, - new java.lang.String[] { "Subscription", "ReturnImmediately", "MaxMessages", }); - internal_static_google_pubsub_v1_PullResponse_descriptor = - getDescriptor().getMessageTypes().get(19); - internal_static_google_pubsub_v1_PullResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_pubsub_v1_PullResponse_descriptor, - new java.lang.String[] { "ReceivedMessages", }); - internal_static_google_pubsub_v1_ModifyAckDeadlineRequest_descriptor = - getDescriptor().getMessageTypes().get(20); - internal_static_google_pubsub_v1_ModifyAckDeadlineRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_pubsub_v1_ModifyAckDeadlineRequest_descriptor, - new java.lang.String[] { "Subscription", "AckIds", "AckDeadlineSeconds", }); - internal_static_google_pubsub_v1_AcknowledgeRequest_descriptor = - getDescriptor().getMessageTypes().get(21); - internal_static_google_pubsub_v1_AcknowledgeRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_pubsub_v1_AcknowledgeRequest_descriptor, - new java.lang.String[] { "Subscription", "AckIds", }); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(com.google.api.AnnotationsProto.http); - com.google.protobuf.Descriptors.FileDescriptor - .internalUpdateFileDescriptor(descriptor, registry); - com.google.api.AnnotationsProto.getDescriptor(); - com.google.protobuf.EmptyProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/PullRequest.java b/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/PullRequest.java deleted file mode 100644 index faab0adbe20d..000000000000 --- a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/PullRequest.java +++ /dev/null @@ -1,636 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/pubsub/v1/pubsub.proto - -package com.google.pubsub.v1; - -/** - * Protobuf type {@code google.pubsub.v1.PullRequest} - * - *
- * Request for the Pull method.
- * 
- */ -public final class PullRequest extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.pubsub.v1.PullRequest) - PullRequestOrBuilder { - // Use PullRequest.newBuilder() to construct. - private PullRequest(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private PullRequest() { - subscription_ = ""; - returnImmediately_ = false; - maxMessages_ = 0; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private PullRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - int mutable_bitField0_ = 0; - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!input.skipField(tag)) { - done = true; - } - break; - } - case 10: { - String s = input.readStringRequireUtf8(); - - subscription_ = s; - break; - } - case 16: { - - returnImmediately_ = input.readBool(); - break; - } - case 24: { - - maxMessages_ = input.readInt32(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_PullRequest_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_PullRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.pubsub.v1.PullRequest.class, com.google.pubsub.v1.PullRequest.Builder.class); - } - - public static final int SUBSCRIPTION_FIELD_NUMBER = 1; - private volatile java.lang.Object subscription_; - /** - * optional string subscription = 1; - * - *
-   * The subscription from which messages should be pulled.
-   * 
- */ - public java.lang.String getSubscription() { - java.lang.Object ref = subscription_; - 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(); - subscription_ = s; - return s; - } - } - /** - * optional string subscription = 1; - * - *
-   * The subscription from which messages should be pulled.
-   * 
- */ - public com.google.protobuf.ByteString - getSubscriptionBytes() { - java.lang.Object ref = subscription_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - subscription_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int RETURN_IMMEDIATELY_FIELD_NUMBER = 2; - private boolean returnImmediately_; - /** - * optional bool return_immediately = 2; - * - *
-   * If this is specified as true the system will respond immediately even if
-   * it is not able to return a message in the Pull response. Otherwise the
-   * system is allowed to wait until at least one message is available rather
-   * than returning no messages. The client may cancel the request if it does
-   * not wish to wait any longer for the response.
-   * 
- */ - public boolean getReturnImmediately() { - return returnImmediately_; - } - - public static final int MAX_MESSAGES_FIELD_NUMBER = 3; - private int maxMessages_; - /** - * optional int32 max_messages = 3; - * - *
-   * The maximum number of messages returned for this request. The Pub/Sub
-   * system may return fewer than the number specified.
-   * 
- */ - public int getMaxMessages() { - return maxMessages_; - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!getSubscriptionBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, subscription_); - } - if (returnImmediately_ != false) { - output.writeBool(2, returnImmediately_); - } - if (maxMessages_ != 0) { - output.writeInt32(3, maxMessages_); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getSubscriptionBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, subscription_); - } - if (returnImmediately_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(2, returnImmediately_); - } - if (maxMessages_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(3, maxMessages_); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static com.google.pubsub.v1.PullRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.pubsub.v1.PullRequest 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.pubsub.v1.PullRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.pubsub.v1.PullRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.pubsub.v1.PullRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.pubsub.v1.PullRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.pubsub.v1.PullRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.pubsub.v1.PullRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.pubsub.v1.PullRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.pubsub.v1.PullRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.pubsub.v1.PullRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - 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; - } - /** - * Protobuf type {@code google.pubsub.v1.PullRequest} - * - *
-   * Request for the Pull method.
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.pubsub.v1.PullRequest) - com.google.pubsub.v1.PullRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_PullRequest_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_PullRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.pubsub.v1.PullRequest.class, com.google.pubsub.v1.PullRequest.Builder.class); - } - - // Construct using com.google.pubsub.v1.PullRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - subscription_ = ""; - - returnImmediately_ = false; - - maxMessages_ = 0; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_PullRequest_descriptor; - } - - public com.google.pubsub.v1.PullRequest getDefaultInstanceForType() { - return com.google.pubsub.v1.PullRequest.getDefaultInstance(); - } - - public com.google.pubsub.v1.PullRequest build() { - com.google.pubsub.v1.PullRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.pubsub.v1.PullRequest buildPartial() { - com.google.pubsub.v1.PullRequest result = new com.google.pubsub.v1.PullRequest(this); - result.subscription_ = subscription_; - result.returnImmediately_ = returnImmediately_; - result.maxMessages_ = maxMessages_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.pubsub.v1.PullRequest) { - return mergeFrom((com.google.pubsub.v1.PullRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.pubsub.v1.PullRequest other) { - if (other == com.google.pubsub.v1.PullRequest.getDefaultInstance()) return this; - if (!other.getSubscription().isEmpty()) { - subscription_ = other.subscription_; - onChanged(); - } - if (other.getReturnImmediately() != false) { - setReturnImmediately(other.getReturnImmediately()); - } - if (other.getMaxMessages() != 0) { - setMaxMessages(other.getMaxMessages()); - } - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.pubsub.v1.PullRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.pubsub.v1.PullRequest) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object subscription_ = ""; - /** - * optional string subscription = 1; - * - *
-     * The subscription from which messages should be pulled.
-     * 
- */ - public java.lang.String getSubscription() { - java.lang.Object ref = subscription_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - subscription_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string subscription = 1; - * - *
-     * The subscription from which messages should be pulled.
-     * 
- */ - public com.google.protobuf.ByteString - getSubscriptionBytes() { - java.lang.Object ref = subscription_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - subscription_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string subscription = 1; - * - *
-     * The subscription from which messages should be pulled.
-     * 
- */ - public Builder setSubscription( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - subscription_ = value; - onChanged(); - return this; - } - /** - * optional string subscription = 1; - * - *
-     * The subscription from which messages should be pulled.
-     * 
- */ - public Builder clearSubscription() { - - subscription_ = getDefaultInstance().getSubscription(); - onChanged(); - return this; - } - /** - * optional string subscription = 1; - * - *
-     * The subscription from which messages should be pulled.
-     * 
- */ - public Builder setSubscriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - subscription_ = value; - onChanged(); - return this; - } - - private boolean returnImmediately_ ; - /** - * optional bool return_immediately = 2; - * - *
-     * If this is specified as true the system will respond immediately even if
-     * it is not able to return a message in the Pull response. Otherwise the
-     * system is allowed to wait until at least one message is available rather
-     * than returning no messages. The client may cancel the request if it does
-     * not wish to wait any longer for the response.
-     * 
- */ - public boolean getReturnImmediately() { - return returnImmediately_; - } - /** - * optional bool return_immediately = 2; - * - *
-     * If this is specified as true the system will respond immediately even if
-     * it is not able to return a message in the Pull response. Otherwise the
-     * system is allowed to wait until at least one message is available rather
-     * than returning no messages. The client may cancel the request if it does
-     * not wish to wait any longer for the response.
-     * 
- */ - public Builder setReturnImmediately(boolean value) { - - returnImmediately_ = value; - onChanged(); - return this; - } - /** - * optional bool return_immediately = 2; - * - *
-     * If this is specified as true the system will respond immediately even if
-     * it is not able to return a message in the Pull response. Otherwise the
-     * system is allowed to wait until at least one message is available rather
-     * than returning no messages. The client may cancel the request if it does
-     * not wish to wait any longer for the response.
-     * 
- */ - public Builder clearReturnImmediately() { - - returnImmediately_ = false; - onChanged(); - return this; - } - - private int maxMessages_ ; - /** - * optional int32 max_messages = 3; - * - *
-     * The maximum number of messages returned for this request. The Pub/Sub
-     * system may return fewer than the number specified.
-     * 
- */ - public int getMaxMessages() { - return maxMessages_; - } - /** - * optional int32 max_messages = 3; - * - *
-     * The maximum number of messages returned for this request. The Pub/Sub
-     * system may return fewer than the number specified.
-     * 
- */ - public Builder setMaxMessages(int value) { - - maxMessages_ = value; - onChanged(); - return this; - } - /** - * optional int32 max_messages = 3; - * - *
-     * The maximum number of messages returned for this request. The Pub/Sub
-     * system may return fewer than the number specified.
-     * 
- */ - public Builder clearMaxMessages() { - - maxMessages_ = 0; - onChanged(); - return this; - } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.PullRequest) - } - - // @@protoc_insertion_point(class_scope:google.pubsub.v1.PullRequest) - private static final com.google.pubsub.v1.PullRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.pubsub.v1.PullRequest(); - } - - public static com.google.pubsub.v1.PullRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public PullRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new PullRequest(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public com.google.pubsub.v1.PullRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/PullRequestOrBuilder.java b/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/PullRequestOrBuilder.java deleted file mode 100644 index 698925a51401..000000000000 --- a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/PullRequestOrBuilder.java +++ /dev/null @@ -1,50 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/pubsub/v1/pubsub.proto - -package com.google.pubsub.v1; - -public interface PullRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.pubsub.v1.PullRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string subscription = 1; - * - *
-   * The subscription from which messages should be pulled.
-   * 
- */ - java.lang.String getSubscription(); - /** - * optional string subscription = 1; - * - *
-   * The subscription from which messages should be pulled.
-   * 
- */ - com.google.protobuf.ByteString - getSubscriptionBytes(); - - /** - * optional bool return_immediately = 2; - * - *
-   * If this is specified as true the system will respond immediately even if
-   * it is not able to return a message in the Pull response. Otherwise the
-   * system is allowed to wait until at least one message is available rather
-   * than returning no messages. The client may cancel the request if it does
-   * not wish to wait any longer for the response.
-   * 
- */ - boolean getReturnImmediately(); - - /** - * optional int32 max_messages = 3; - * - *
-   * The maximum number of messages returned for this request. The Pub/Sub
-   * system may return fewer than the number specified.
-   * 
- */ - int getMaxMessages(); -} diff --git a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/PullResponse.java b/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/PullResponse.java deleted file mode 100644 index 738e34b0137d..000000000000 --- a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/PullResponse.java +++ /dev/null @@ -1,824 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/pubsub/v1/pubsub.proto - -package com.google.pubsub.v1; - -/** - * Protobuf type {@code google.pubsub.v1.PullResponse} - * - *
- * Response for the Pull method.
- * 
- */ -public final class PullResponse extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.pubsub.v1.PullResponse) - PullResponseOrBuilder { - // Use PullResponse.newBuilder() to construct. - private PullResponse(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private PullResponse() { - receivedMessages_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private PullResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - int mutable_bitField0_ = 0; - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!input.skipField(tag)) { - done = true; - } - break; - } - case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - receivedMessages_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - receivedMessages_.add(input.readMessage(com.google.pubsub.v1.ReceivedMessage.parser(), extensionRegistry)); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - receivedMessages_ = java.util.Collections.unmodifiableList(receivedMessages_); - } - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_PullResponse_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_PullResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.pubsub.v1.PullResponse.class, com.google.pubsub.v1.PullResponse.Builder.class); - } - - public static final int RECEIVED_MESSAGES_FIELD_NUMBER = 1; - private java.util.List receivedMessages_; - /** - * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; - * - *
-   * Received Pub/Sub messages. The Pub/Sub system will return zero messages if
-   * there are no more available in the backlog. The Pub/Sub system may return
-   * fewer than the maxMessages requested even if there are more messages
-   * available in the backlog.
-   * 
- */ - public java.util.List getReceivedMessagesList() { - return receivedMessages_; - } - /** - * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; - * - *
-   * Received Pub/Sub messages. The Pub/Sub system will return zero messages if
-   * there are no more available in the backlog. The Pub/Sub system may return
-   * fewer than the maxMessages requested even if there are more messages
-   * available in the backlog.
-   * 
- */ - public java.util.List - getReceivedMessagesOrBuilderList() { - return receivedMessages_; - } - /** - * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; - * - *
-   * Received Pub/Sub messages. The Pub/Sub system will return zero messages if
-   * there are no more available in the backlog. The Pub/Sub system may return
-   * fewer than the maxMessages requested even if there are more messages
-   * available in the backlog.
-   * 
- */ - public int getReceivedMessagesCount() { - return receivedMessages_.size(); - } - /** - * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; - * - *
-   * Received Pub/Sub messages. The Pub/Sub system will return zero messages if
-   * there are no more available in the backlog. The Pub/Sub system may return
-   * fewer than the maxMessages requested even if there are more messages
-   * available in the backlog.
-   * 
- */ - public com.google.pubsub.v1.ReceivedMessage getReceivedMessages(int index) { - return receivedMessages_.get(index); - } - /** - * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; - * - *
-   * Received Pub/Sub messages. The Pub/Sub system will return zero messages if
-   * there are no more available in the backlog. The Pub/Sub system may return
-   * fewer than the maxMessages requested even if there are more messages
-   * available in the backlog.
-   * 
- */ - public com.google.pubsub.v1.ReceivedMessageOrBuilder getReceivedMessagesOrBuilder( - int index) { - return receivedMessages_.get(index); - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < receivedMessages_.size(); i++) { - output.writeMessage(1, receivedMessages_.get(i)); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < receivedMessages_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, receivedMessages_.get(i)); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static com.google.pubsub.v1.PullResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.pubsub.v1.PullResponse 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.pubsub.v1.PullResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.pubsub.v1.PullResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.pubsub.v1.PullResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.pubsub.v1.PullResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.pubsub.v1.PullResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.pubsub.v1.PullResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.pubsub.v1.PullResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.pubsub.v1.PullResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.pubsub.v1.PullResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - 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; - } - /** - * Protobuf type {@code google.pubsub.v1.PullResponse} - * - *
-   * Response for the Pull method.
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.pubsub.v1.PullResponse) - com.google.pubsub.v1.PullResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_PullResponse_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_PullResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.pubsub.v1.PullResponse.class, com.google.pubsub.v1.PullResponse.Builder.class); - } - - // Construct using com.google.pubsub.v1.PullResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getReceivedMessagesFieldBuilder(); - } - } - public Builder clear() { - super.clear(); - if (receivedMessagesBuilder_ == null) { - receivedMessages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - receivedMessagesBuilder_.clear(); - } - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_PullResponse_descriptor; - } - - public com.google.pubsub.v1.PullResponse getDefaultInstanceForType() { - return com.google.pubsub.v1.PullResponse.getDefaultInstance(); - } - - public com.google.pubsub.v1.PullResponse build() { - com.google.pubsub.v1.PullResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.pubsub.v1.PullResponse buildPartial() { - com.google.pubsub.v1.PullResponse result = new com.google.pubsub.v1.PullResponse(this); - int from_bitField0_ = bitField0_; - if (receivedMessagesBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - receivedMessages_ = java.util.Collections.unmodifiableList(receivedMessages_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.receivedMessages_ = receivedMessages_; - } else { - result.receivedMessages_ = receivedMessagesBuilder_.build(); - } - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.pubsub.v1.PullResponse) { - return mergeFrom((com.google.pubsub.v1.PullResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.pubsub.v1.PullResponse other) { - if (other == com.google.pubsub.v1.PullResponse.getDefaultInstance()) return this; - if (receivedMessagesBuilder_ == null) { - if (!other.receivedMessages_.isEmpty()) { - if (receivedMessages_.isEmpty()) { - receivedMessages_ = other.receivedMessages_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureReceivedMessagesIsMutable(); - receivedMessages_.addAll(other.receivedMessages_); - } - onChanged(); - } - } else { - if (!other.receivedMessages_.isEmpty()) { - if (receivedMessagesBuilder_.isEmpty()) { - receivedMessagesBuilder_.dispose(); - receivedMessagesBuilder_ = null; - receivedMessages_ = other.receivedMessages_; - bitField0_ = (bitField0_ & ~0x00000001); - receivedMessagesBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getReceivedMessagesFieldBuilder() : null; - } else { - receivedMessagesBuilder_.addAllMessages(other.receivedMessages_); - } - } - } - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.pubsub.v1.PullResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.pubsub.v1.PullResponse) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List receivedMessages_ = - java.util.Collections.emptyList(); - private void ensureReceivedMessagesIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { - receivedMessages_ = new java.util.ArrayList(receivedMessages_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.pubsub.v1.ReceivedMessage, com.google.pubsub.v1.ReceivedMessage.Builder, com.google.pubsub.v1.ReceivedMessageOrBuilder> receivedMessagesBuilder_; - - /** - * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; - * - *
-     * Received Pub/Sub messages. The Pub/Sub system will return zero messages if
-     * there are no more available in the backlog. The Pub/Sub system may return
-     * fewer than the maxMessages requested even if there are more messages
-     * available in the backlog.
-     * 
- */ - public java.util.List getReceivedMessagesList() { - if (receivedMessagesBuilder_ == null) { - return java.util.Collections.unmodifiableList(receivedMessages_); - } else { - return receivedMessagesBuilder_.getMessageList(); - } - } - /** - * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; - * - *
-     * Received Pub/Sub messages. The Pub/Sub system will return zero messages if
-     * there are no more available in the backlog. The Pub/Sub system may return
-     * fewer than the maxMessages requested even if there are more messages
-     * available in the backlog.
-     * 
- */ - public int getReceivedMessagesCount() { - if (receivedMessagesBuilder_ == null) { - return receivedMessages_.size(); - } else { - return receivedMessagesBuilder_.getCount(); - } - } - /** - * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; - * - *
-     * Received Pub/Sub messages. The Pub/Sub system will return zero messages if
-     * there are no more available in the backlog. The Pub/Sub system may return
-     * fewer than the maxMessages requested even if there are more messages
-     * available in the backlog.
-     * 
- */ - public com.google.pubsub.v1.ReceivedMessage getReceivedMessages(int index) { - if (receivedMessagesBuilder_ == null) { - return receivedMessages_.get(index); - } else { - return receivedMessagesBuilder_.getMessage(index); - } - } - /** - * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; - * - *
-     * Received Pub/Sub messages. The Pub/Sub system will return zero messages if
-     * there are no more available in the backlog. The Pub/Sub system may return
-     * fewer than the maxMessages requested even if there are more messages
-     * available in the backlog.
-     * 
- */ - public Builder setReceivedMessages( - int index, com.google.pubsub.v1.ReceivedMessage value) { - if (receivedMessagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureReceivedMessagesIsMutable(); - receivedMessages_.set(index, value); - onChanged(); - } else { - receivedMessagesBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; - * - *
-     * Received Pub/Sub messages. The Pub/Sub system will return zero messages if
-     * there are no more available in the backlog. The Pub/Sub system may return
-     * fewer than the maxMessages requested even if there are more messages
-     * available in the backlog.
-     * 
- */ - public Builder setReceivedMessages( - int index, com.google.pubsub.v1.ReceivedMessage.Builder builderForValue) { - if (receivedMessagesBuilder_ == null) { - ensureReceivedMessagesIsMutable(); - receivedMessages_.set(index, builderForValue.build()); - onChanged(); - } else { - receivedMessagesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; - * - *
-     * Received Pub/Sub messages. The Pub/Sub system will return zero messages if
-     * there are no more available in the backlog. The Pub/Sub system may return
-     * fewer than the maxMessages requested even if there are more messages
-     * available in the backlog.
-     * 
- */ - public Builder addReceivedMessages(com.google.pubsub.v1.ReceivedMessage value) { - if (receivedMessagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureReceivedMessagesIsMutable(); - receivedMessages_.add(value); - onChanged(); - } else { - receivedMessagesBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; - * - *
-     * Received Pub/Sub messages. The Pub/Sub system will return zero messages if
-     * there are no more available in the backlog. The Pub/Sub system may return
-     * fewer than the maxMessages requested even if there are more messages
-     * available in the backlog.
-     * 
- */ - public Builder addReceivedMessages( - int index, com.google.pubsub.v1.ReceivedMessage value) { - if (receivedMessagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureReceivedMessagesIsMutable(); - receivedMessages_.add(index, value); - onChanged(); - } else { - receivedMessagesBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; - * - *
-     * Received Pub/Sub messages. The Pub/Sub system will return zero messages if
-     * there are no more available in the backlog. The Pub/Sub system may return
-     * fewer than the maxMessages requested even if there are more messages
-     * available in the backlog.
-     * 
- */ - public Builder addReceivedMessages( - com.google.pubsub.v1.ReceivedMessage.Builder builderForValue) { - if (receivedMessagesBuilder_ == null) { - ensureReceivedMessagesIsMutable(); - receivedMessages_.add(builderForValue.build()); - onChanged(); - } else { - receivedMessagesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; - * - *
-     * Received Pub/Sub messages. The Pub/Sub system will return zero messages if
-     * there are no more available in the backlog. The Pub/Sub system may return
-     * fewer than the maxMessages requested even if there are more messages
-     * available in the backlog.
-     * 
- */ - public Builder addReceivedMessages( - int index, com.google.pubsub.v1.ReceivedMessage.Builder builderForValue) { - if (receivedMessagesBuilder_ == null) { - ensureReceivedMessagesIsMutable(); - receivedMessages_.add(index, builderForValue.build()); - onChanged(); - } else { - receivedMessagesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; - * - *
-     * Received Pub/Sub messages. The Pub/Sub system will return zero messages if
-     * there are no more available in the backlog. The Pub/Sub system may return
-     * fewer than the maxMessages requested even if there are more messages
-     * available in the backlog.
-     * 
- */ - public Builder addAllReceivedMessages( - java.lang.Iterable values) { - if (receivedMessagesBuilder_ == null) { - ensureReceivedMessagesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, receivedMessages_); - onChanged(); - } else { - receivedMessagesBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; - * - *
-     * Received Pub/Sub messages. The Pub/Sub system will return zero messages if
-     * there are no more available in the backlog. The Pub/Sub system may return
-     * fewer than the maxMessages requested even if there are more messages
-     * available in the backlog.
-     * 
- */ - public Builder clearReceivedMessages() { - if (receivedMessagesBuilder_ == null) { - receivedMessages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - receivedMessagesBuilder_.clear(); - } - return this; - } - /** - * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; - * - *
-     * Received Pub/Sub messages. The Pub/Sub system will return zero messages if
-     * there are no more available in the backlog. The Pub/Sub system may return
-     * fewer than the maxMessages requested even if there are more messages
-     * available in the backlog.
-     * 
- */ - public Builder removeReceivedMessages(int index) { - if (receivedMessagesBuilder_ == null) { - ensureReceivedMessagesIsMutable(); - receivedMessages_.remove(index); - onChanged(); - } else { - receivedMessagesBuilder_.remove(index); - } - return this; - } - /** - * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; - * - *
-     * Received Pub/Sub messages. The Pub/Sub system will return zero messages if
-     * there are no more available in the backlog. The Pub/Sub system may return
-     * fewer than the maxMessages requested even if there are more messages
-     * available in the backlog.
-     * 
- */ - public com.google.pubsub.v1.ReceivedMessage.Builder getReceivedMessagesBuilder( - int index) { - return getReceivedMessagesFieldBuilder().getBuilder(index); - } - /** - * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; - * - *
-     * Received Pub/Sub messages. The Pub/Sub system will return zero messages if
-     * there are no more available in the backlog. The Pub/Sub system may return
-     * fewer than the maxMessages requested even if there are more messages
-     * available in the backlog.
-     * 
- */ - public com.google.pubsub.v1.ReceivedMessageOrBuilder getReceivedMessagesOrBuilder( - int index) { - if (receivedMessagesBuilder_ == null) { - return receivedMessages_.get(index); } else { - return receivedMessagesBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; - * - *
-     * Received Pub/Sub messages. The Pub/Sub system will return zero messages if
-     * there are no more available in the backlog. The Pub/Sub system may return
-     * fewer than the maxMessages requested even if there are more messages
-     * available in the backlog.
-     * 
- */ - public java.util.List - getReceivedMessagesOrBuilderList() { - if (receivedMessagesBuilder_ != null) { - return receivedMessagesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(receivedMessages_); - } - } - /** - * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; - * - *
-     * Received Pub/Sub messages. The Pub/Sub system will return zero messages if
-     * there are no more available in the backlog. The Pub/Sub system may return
-     * fewer than the maxMessages requested even if there are more messages
-     * available in the backlog.
-     * 
- */ - public com.google.pubsub.v1.ReceivedMessage.Builder addReceivedMessagesBuilder() { - return getReceivedMessagesFieldBuilder().addBuilder( - com.google.pubsub.v1.ReceivedMessage.getDefaultInstance()); - } - /** - * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; - * - *
-     * Received Pub/Sub messages. The Pub/Sub system will return zero messages if
-     * there are no more available in the backlog. The Pub/Sub system may return
-     * fewer than the maxMessages requested even if there are more messages
-     * available in the backlog.
-     * 
- */ - public com.google.pubsub.v1.ReceivedMessage.Builder addReceivedMessagesBuilder( - int index) { - return getReceivedMessagesFieldBuilder().addBuilder( - index, com.google.pubsub.v1.ReceivedMessage.getDefaultInstance()); - } - /** - * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; - * - *
-     * Received Pub/Sub messages. The Pub/Sub system will return zero messages if
-     * there are no more available in the backlog. The Pub/Sub system may return
-     * fewer than the maxMessages requested even if there are more messages
-     * available in the backlog.
-     * 
- */ - public java.util.List - getReceivedMessagesBuilderList() { - return getReceivedMessagesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - com.google.pubsub.v1.ReceivedMessage, com.google.pubsub.v1.ReceivedMessage.Builder, com.google.pubsub.v1.ReceivedMessageOrBuilder> - getReceivedMessagesFieldBuilder() { - if (receivedMessagesBuilder_ == null) { - receivedMessagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - com.google.pubsub.v1.ReceivedMessage, com.google.pubsub.v1.ReceivedMessage.Builder, com.google.pubsub.v1.ReceivedMessageOrBuilder>( - receivedMessages_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); - receivedMessages_ = null; - } - return receivedMessagesBuilder_; - } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.PullResponse) - } - - // @@protoc_insertion_point(class_scope:google.pubsub.v1.PullResponse) - private static final com.google.pubsub.v1.PullResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.pubsub.v1.PullResponse(); - } - - public static com.google.pubsub.v1.PullResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public PullResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new PullResponse(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public com.google.pubsub.v1.PullResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/PullResponseOrBuilder.java b/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/PullResponseOrBuilder.java deleted file mode 100644 index a93ac1757e3b..000000000000 --- a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/PullResponseOrBuilder.java +++ /dev/null @@ -1,68 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/pubsub/v1/pubsub.proto - -package com.google.pubsub.v1; - -public interface PullResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.pubsub.v1.PullResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; - * - *
-   * Received Pub/Sub messages. The Pub/Sub system will return zero messages if
-   * there are no more available in the backlog. The Pub/Sub system may return
-   * fewer than the maxMessages requested even if there are more messages
-   * available in the backlog.
-   * 
- */ - java.util.List - getReceivedMessagesList(); - /** - * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; - * - *
-   * Received Pub/Sub messages. The Pub/Sub system will return zero messages if
-   * there are no more available in the backlog. The Pub/Sub system may return
-   * fewer than the maxMessages requested even if there are more messages
-   * available in the backlog.
-   * 
- */ - com.google.pubsub.v1.ReceivedMessage getReceivedMessages(int index); - /** - * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; - * - *
-   * Received Pub/Sub messages. The Pub/Sub system will return zero messages if
-   * there are no more available in the backlog. The Pub/Sub system may return
-   * fewer than the maxMessages requested even if there are more messages
-   * available in the backlog.
-   * 
- */ - int getReceivedMessagesCount(); - /** - * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; - * - *
-   * Received Pub/Sub messages. The Pub/Sub system will return zero messages if
-   * there are no more available in the backlog. The Pub/Sub system may return
-   * fewer than the maxMessages requested even if there are more messages
-   * available in the backlog.
-   * 
- */ - java.util.List - getReceivedMessagesOrBuilderList(); - /** - * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; - * - *
-   * Received Pub/Sub messages. The Pub/Sub system will return zero messages if
-   * there are no more available in the backlog. The Pub/Sub system may return
-   * fewer than the maxMessages requested even if there are more messages
-   * available in the backlog.
-   * 
- */ - com.google.pubsub.v1.ReceivedMessageOrBuilder getReceivedMessagesOrBuilder( - int index); -} diff --git a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/PushConfig.java b/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/PushConfig.java deleted file mode 100644 index fc8c34dc5be5..000000000000 --- a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/PushConfig.java +++ /dev/null @@ -1,711 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/pubsub/v1/pubsub.proto - -package com.google.pubsub.v1; - -/** - * Protobuf type {@code google.pubsub.v1.PushConfig} - * - *
- * Configuration for a push delivery endpoint.
- * 
- */ -public final class PushConfig extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.pubsub.v1.PushConfig) - PushConfigOrBuilder { - // Use PushConfig.newBuilder() to construct. - private PushConfig(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private PushConfig() { - pushEndpoint_ = ""; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private PushConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - int mutable_bitField0_ = 0; - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!input.skipField(tag)) { - done = true; - } - break; - } - case 10: { - String s = input.readStringRequireUtf8(); - - pushEndpoint_ = s; - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - attributes_ = com.google.protobuf.MapField.newMapField( - AttributesDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000002; - } - com.google.protobuf.MapEntry - attributes = input.readMessage( - AttributesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - attributes_.getMutableMap().put(attributes.getKey(), attributes.getValue()); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_PushConfig_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 2: - return internalGetAttributes(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_PushConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.pubsub.v1.PushConfig.class, com.google.pubsub.v1.PushConfig.Builder.class); - } - - private int bitField0_; - public static final int PUSH_ENDPOINT_FIELD_NUMBER = 1; - private volatile java.lang.Object pushEndpoint_; - /** - * optional string push_endpoint = 1; - * - *
-   * A URL locating the endpoint to which messages should be pushed.
-   * For example, a Webhook endpoint might use "https://example.com/push".
-   * 
- */ - public java.lang.String getPushEndpoint() { - java.lang.Object ref = pushEndpoint_; - 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(); - pushEndpoint_ = s; - return s; - } - } - /** - * optional string push_endpoint = 1; - * - *
-   * A URL locating the endpoint to which messages should be pushed.
-   * For example, a Webhook endpoint might use "https://example.com/push".
-   * 
- */ - public com.google.protobuf.ByteString - getPushEndpointBytes() { - java.lang.Object ref = pushEndpoint_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pushEndpoint_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ATTRIBUTES_FIELD_NUMBER = 2; - private static final class AttributesDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, java.lang.String> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_PushConfig_AttributesEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> attributes_; - private com.google.protobuf.MapField - internalGetAttributes() { - if (attributes_ == null) { - return com.google.protobuf.MapField.emptyMapField( - AttributesDefaultEntryHolder.defaultEntry); - } - return attributes_; - } - /** - * map<string, string> attributes = 2; - * - *
-   * Endpoint configuration attributes.
-   * Every endpoint has a set of API supported attributes that can be used to
-   * control different aspects of the message delivery.
-   * The currently supported attribute is `x-goog-version`, which you can
-   * use to change the format of the push message. This attribute
-   * indicates the version of the data expected by the endpoint. This
-   * controls the shape of the envelope (i.e. its fields and metadata).
-   * The endpoint version is based on the version of the Pub/Sub
-   * API.
-   * If not present during the CreateSubscription call, it will default to
-   * the version of the API used to make such call. If not present during a
-   * ModifyPushConfig call, its value will not be changed. GetSubscription
-   * calls will always return a valid version, even if the subscription was
-   * created without this attribute.
-   * The possible values for this attribute are:
-   * * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API.
-   * * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API.
-   * 
- */ - - public java.util.Map getAttributes() { - return internalGetAttributes().getMap(); - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!getPushEndpointBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, pushEndpoint_); - } - for (java.util.Map.Entry entry - : internalGetAttributes().getMap().entrySet()) { - com.google.protobuf.MapEntry - attributes = AttributesDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - output.writeMessage(2, attributes); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getPushEndpointBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, pushEndpoint_); - } - for (java.util.Map.Entry entry - : internalGetAttributes().getMap().entrySet()) { - com.google.protobuf.MapEntry - attributes = AttributesDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, attributes); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static com.google.pubsub.v1.PushConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.pubsub.v1.PushConfig 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.pubsub.v1.PushConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.pubsub.v1.PushConfig parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.pubsub.v1.PushConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.pubsub.v1.PushConfig parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.pubsub.v1.PushConfig parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.pubsub.v1.PushConfig parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.pubsub.v1.PushConfig parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.pubsub.v1.PushConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.pubsub.v1.PushConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - 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; - } - /** - * Protobuf type {@code google.pubsub.v1.PushConfig} - * - *
-   * Configuration for a push delivery endpoint.
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.pubsub.v1.PushConfig) - com.google.pubsub.v1.PushConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_PushConfig_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 2: - return internalGetAttributes(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField( - int number) { - switch (number) { - case 2: - return internalGetMutableAttributes(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_PushConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.pubsub.v1.PushConfig.class, com.google.pubsub.v1.PushConfig.Builder.class); - } - - // Construct using com.google.pubsub.v1.PushConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - pushEndpoint_ = ""; - - internalGetMutableAttributes().clear(); - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_PushConfig_descriptor; - } - - public com.google.pubsub.v1.PushConfig getDefaultInstanceForType() { - return com.google.pubsub.v1.PushConfig.getDefaultInstance(); - } - - public com.google.pubsub.v1.PushConfig build() { - com.google.pubsub.v1.PushConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.pubsub.v1.PushConfig buildPartial() { - com.google.pubsub.v1.PushConfig result = new com.google.pubsub.v1.PushConfig(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - result.pushEndpoint_ = pushEndpoint_; - result.attributes_ = internalGetAttributes(); - result.attributes_.makeImmutable(); - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.pubsub.v1.PushConfig) { - return mergeFrom((com.google.pubsub.v1.PushConfig)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.pubsub.v1.PushConfig other) { - if (other == com.google.pubsub.v1.PushConfig.getDefaultInstance()) return this; - if (!other.getPushEndpoint().isEmpty()) { - pushEndpoint_ = other.pushEndpoint_; - onChanged(); - } - internalGetMutableAttributes().mergeFrom( - other.internalGetAttributes()); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.pubsub.v1.PushConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.pubsub.v1.PushConfig) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object pushEndpoint_ = ""; - /** - * optional string push_endpoint = 1; - * - *
-     * A URL locating the endpoint to which messages should be pushed.
-     * For example, a Webhook endpoint might use "https://example.com/push".
-     * 
- */ - public java.lang.String getPushEndpoint() { - java.lang.Object ref = pushEndpoint_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pushEndpoint_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string push_endpoint = 1; - * - *
-     * A URL locating the endpoint to which messages should be pushed.
-     * For example, a Webhook endpoint might use "https://example.com/push".
-     * 
- */ - public com.google.protobuf.ByteString - getPushEndpointBytes() { - java.lang.Object ref = pushEndpoint_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - pushEndpoint_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string push_endpoint = 1; - * - *
-     * A URL locating the endpoint to which messages should be pushed.
-     * For example, a Webhook endpoint might use "https://example.com/push".
-     * 
- */ - public Builder setPushEndpoint( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - pushEndpoint_ = value; - onChanged(); - return this; - } - /** - * optional string push_endpoint = 1; - * - *
-     * A URL locating the endpoint to which messages should be pushed.
-     * For example, a Webhook endpoint might use "https://example.com/push".
-     * 
- */ - public Builder clearPushEndpoint() { - - pushEndpoint_ = getDefaultInstance().getPushEndpoint(); - onChanged(); - return this; - } - /** - * optional string push_endpoint = 1; - * - *
-     * A URL locating the endpoint to which messages should be pushed.
-     * For example, a Webhook endpoint might use "https://example.com/push".
-     * 
- */ - public Builder setPushEndpointBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - pushEndpoint_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> attributes_; - private com.google.protobuf.MapField - internalGetAttributes() { - if (attributes_ == null) { - return com.google.protobuf.MapField.emptyMapField( - AttributesDefaultEntryHolder.defaultEntry); - } - return attributes_; - } - private com.google.protobuf.MapField - internalGetMutableAttributes() { - onChanged();; - if (attributes_ == null) { - attributes_ = com.google.protobuf.MapField.newMapField( - AttributesDefaultEntryHolder.defaultEntry); - } - if (!attributes_.isMutable()) { - attributes_ = attributes_.copy(); - } - return attributes_; - } - /** - * map<string, string> attributes = 2; - * - *
-     * Endpoint configuration attributes.
-     * Every endpoint has a set of API supported attributes that can be used to
-     * control different aspects of the message delivery.
-     * The currently supported attribute is `x-goog-version`, which you can
-     * use to change the format of the push message. This attribute
-     * indicates the version of the data expected by the endpoint. This
-     * controls the shape of the envelope (i.e. its fields and metadata).
-     * The endpoint version is based on the version of the Pub/Sub
-     * API.
-     * If not present during the CreateSubscription call, it will default to
-     * the version of the API used to make such call. If not present during a
-     * ModifyPushConfig call, its value will not be changed. GetSubscription
-     * calls will always return a valid version, even if the subscription was
-     * created without this attribute.
-     * The possible values for this attribute are:
-     * * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API.
-     * * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API.
-     * 
- */ - public java.util.Map getAttributes() { - return internalGetAttributes().getMap(); - } - /** - * map<string, string> attributes = 2; - * - *
-     * Endpoint configuration attributes.
-     * Every endpoint has a set of API supported attributes that can be used to
-     * control different aspects of the message delivery.
-     * The currently supported attribute is `x-goog-version`, which you can
-     * use to change the format of the push message. This attribute
-     * indicates the version of the data expected by the endpoint. This
-     * controls the shape of the envelope (i.e. its fields and metadata).
-     * The endpoint version is based on the version of the Pub/Sub
-     * API.
-     * If not present during the CreateSubscription call, it will default to
-     * the version of the API used to make such call. If not present during a
-     * ModifyPushConfig call, its value will not be changed. GetSubscription
-     * calls will always return a valid version, even if the subscription was
-     * created without this attribute.
-     * The possible values for this attribute are:
-     * * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API.
-     * * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API.
-     * 
- */ - public java.util.Map - getMutableAttributes() { - return internalGetMutableAttributes().getMutableMap(); - } - /** - * map<string, string> attributes = 2; - * - *
-     * Endpoint configuration attributes.
-     * Every endpoint has a set of API supported attributes that can be used to
-     * control different aspects of the message delivery.
-     * The currently supported attribute is `x-goog-version`, which you can
-     * use to change the format of the push message. This attribute
-     * indicates the version of the data expected by the endpoint. This
-     * controls the shape of the envelope (i.e. its fields and metadata).
-     * The endpoint version is based on the version of the Pub/Sub
-     * API.
-     * If not present during the CreateSubscription call, it will default to
-     * the version of the API used to make such call. If not present during a
-     * ModifyPushConfig call, its value will not be changed. GetSubscription
-     * calls will always return a valid version, even if the subscription was
-     * created without this attribute.
-     * The possible values for this attribute are:
-     * * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API.
-     * * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API.
-     * 
- */ - public Builder putAllAttributes( - java.util.Map values) { - getMutableAttributes().putAll(values); - return this; - } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.PushConfig) - } - - // @@protoc_insertion_point(class_scope:google.pubsub.v1.PushConfig) - private static final com.google.pubsub.v1.PushConfig DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.pubsub.v1.PushConfig(); - } - - public static com.google.pubsub.v1.PushConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public PushConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new PushConfig(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public com.google.pubsub.v1.PushConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/PushConfigOrBuilder.java b/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/PushConfigOrBuilder.java deleted file mode 100644 index 6a4e995b8232..000000000000 --- a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/PushConfigOrBuilder.java +++ /dev/null @@ -1,55 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/pubsub/v1/pubsub.proto - -package com.google.pubsub.v1; - -public interface PushConfigOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.pubsub.v1.PushConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string push_endpoint = 1; - * - *
-   * A URL locating the endpoint to which messages should be pushed.
-   * For example, a Webhook endpoint might use "https://example.com/push".
-   * 
- */ - java.lang.String getPushEndpoint(); - /** - * optional string push_endpoint = 1; - * - *
-   * A URL locating the endpoint to which messages should be pushed.
-   * For example, a Webhook endpoint might use "https://example.com/push".
-   * 
- */ - com.google.protobuf.ByteString - getPushEndpointBytes(); - - /** - * map<string, string> attributes = 2; - * - *
-   * Endpoint configuration attributes.
-   * Every endpoint has a set of API supported attributes that can be used to
-   * control different aspects of the message delivery.
-   * The currently supported attribute is `x-goog-version`, which you can
-   * use to change the format of the push message. This attribute
-   * indicates the version of the data expected by the endpoint. This
-   * controls the shape of the envelope (i.e. its fields and metadata).
-   * The endpoint version is based on the version of the Pub/Sub
-   * API.
-   * If not present during the CreateSubscription call, it will default to
-   * the version of the API used to make such call. If not present during a
-   * ModifyPushConfig call, its value will not be changed. GetSubscription
-   * calls will always return a valid version, even if the subscription was
-   * created without this attribute.
-   * The possible values for this attribute are:
-   * * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API.
-   * * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API.
-   * 
- */ - java.util.Map - getAttributes(); -} diff --git a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/ReceivedMessage.java b/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/ReceivedMessage.java deleted file mode 100644 index 091d0ca610b2..000000000000 --- a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/ReceivedMessage.java +++ /dev/null @@ -1,696 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/pubsub/v1/pubsub.proto - -package com.google.pubsub.v1; - -/** - * Protobuf type {@code google.pubsub.v1.ReceivedMessage} - * - *
- * A message and its corresponding acknowledgment ID.
- * 
- */ -public final class ReceivedMessage extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.pubsub.v1.ReceivedMessage) - ReceivedMessageOrBuilder { - // Use ReceivedMessage.newBuilder() to construct. - private ReceivedMessage(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private ReceivedMessage() { - ackId_ = ""; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private ReceivedMessage( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - int mutable_bitField0_ = 0; - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!input.skipField(tag)) { - done = true; - } - break; - } - case 10: { - String s = input.readStringRequireUtf8(); - - ackId_ = s; - break; - } - case 18: { - com.google.pubsub.v1.PubsubMessage.Builder subBuilder = null; - if (message_ != null) { - subBuilder = message_.toBuilder(); - } - message_ = input.readMessage(com.google.pubsub.v1.PubsubMessage.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(message_); - message_ = subBuilder.buildPartial(); - } - - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_ReceivedMessage_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_ReceivedMessage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.pubsub.v1.ReceivedMessage.class, com.google.pubsub.v1.ReceivedMessage.Builder.class); - } - - public static final int ACK_ID_FIELD_NUMBER = 1; - private volatile java.lang.Object ackId_; - /** - * optional string ack_id = 1; - * - *
-   * This ID can be used to acknowledge the received message.
-   * 
- */ - public java.lang.String getAckId() { - java.lang.Object ref = ackId_; - 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(); - ackId_ = s; - return s; - } - } - /** - * optional string ack_id = 1; - * - *
-   * This ID can be used to acknowledge the received message.
-   * 
- */ - public com.google.protobuf.ByteString - getAckIdBytes() { - java.lang.Object ref = ackId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - ackId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int MESSAGE_FIELD_NUMBER = 2; - private com.google.pubsub.v1.PubsubMessage message_; - /** - * optional .google.pubsub.v1.PubsubMessage message = 2; - * - *
-   * The message.
-   * 
- */ - public boolean hasMessage() { - return message_ != null; - } - /** - * optional .google.pubsub.v1.PubsubMessage message = 2; - * - *
-   * The message.
-   * 
- */ - public com.google.pubsub.v1.PubsubMessage getMessage() { - return message_ == null ? com.google.pubsub.v1.PubsubMessage.getDefaultInstance() : message_; - } - /** - * optional .google.pubsub.v1.PubsubMessage message = 2; - * - *
-   * The message.
-   * 
- */ - public com.google.pubsub.v1.PubsubMessageOrBuilder getMessageOrBuilder() { - return getMessage(); - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!getAckIdBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, ackId_); - } - if (message_ != null) { - output.writeMessage(2, getMessage()); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getAckIdBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, ackId_); - } - if (message_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getMessage()); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static com.google.pubsub.v1.ReceivedMessage parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.pubsub.v1.ReceivedMessage 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.pubsub.v1.ReceivedMessage parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.pubsub.v1.ReceivedMessage parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.pubsub.v1.ReceivedMessage parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.pubsub.v1.ReceivedMessage parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.pubsub.v1.ReceivedMessage parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.pubsub.v1.ReceivedMessage parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.pubsub.v1.ReceivedMessage parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.pubsub.v1.ReceivedMessage parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.pubsub.v1.ReceivedMessage prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - 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; - } - /** - * Protobuf type {@code google.pubsub.v1.ReceivedMessage} - * - *
-   * A message and its corresponding acknowledgment ID.
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.pubsub.v1.ReceivedMessage) - com.google.pubsub.v1.ReceivedMessageOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_ReceivedMessage_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_ReceivedMessage_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.pubsub.v1.ReceivedMessage.class, com.google.pubsub.v1.ReceivedMessage.Builder.class); - } - - // Construct using com.google.pubsub.v1.ReceivedMessage.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - ackId_ = ""; - - if (messageBuilder_ == null) { - message_ = null; - } else { - message_ = null; - messageBuilder_ = null; - } - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_ReceivedMessage_descriptor; - } - - public com.google.pubsub.v1.ReceivedMessage getDefaultInstanceForType() { - return com.google.pubsub.v1.ReceivedMessage.getDefaultInstance(); - } - - public com.google.pubsub.v1.ReceivedMessage build() { - com.google.pubsub.v1.ReceivedMessage result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.pubsub.v1.ReceivedMessage buildPartial() { - com.google.pubsub.v1.ReceivedMessage result = new com.google.pubsub.v1.ReceivedMessage(this); - result.ackId_ = ackId_; - if (messageBuilder_ == null) { - result.message_ = message_; - } else { - result.message_ = messageBuilder_.build(); - } - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.pubsub.v1.ReceivedMessage) { - return mergeFrom((com.google.pubsub.v1.ReceivedMessage)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.pubsub.v1.ReceivedMessage other) { - if (other == com.google.pubsub.v1.ReceivedMessage.getDefaultInstance()) return this; - if (!other.getAckId().isEmpty()) { - ackId_ = other.ackId_; - onChanged(); - } - if (other.hasMessage()) { - mergeMessage(other.getMessage()); - } - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.pubsub.v1.ReceivedMessage parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.pubsub.v1.ReceivedMessage) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object ackId_ = ""; - /** - * optional string ack_id = 1; - * - *
-     * This ID can be used to acknowledge the received message.
-     * 
- */ - public java.lang.String getAckId() { - java.lang.Object ref = ackId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - ackId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string ack_id = 1; - * - *
-     * This ID can be used to acknowledge the received message.
-     * 
- */ - public com.google.protobuf.ByteString - getAckIdBytes() { - java.lang.Object ref = ackId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - ackId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string ack_id = 1; - * - *
-     * This ID can be used to acknowledge the received message.
-     * 
- */ - public Builder setAckId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - ackId_ = value; - onChanged(); - return this; - } - /** - * optional string ack_id = 1; - * - *
-     * This ID can be used to acknowledge the received message.
-     * 
- */ - public Builder clearAckId() { - - ackId_ = getDefaultInstance().getAckId(); - onChanged(); - return this; - } - /** - * optional string ack_id = 1; - * - *
-     * This ID can be used to acknowledge the received message.
-     * 
- */ - public Builder setAckIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - ackId_ = value; - onChanged(); - return this; - } - - private com.google.pubsub.v1.PubsubMessage message_ = null; - private com.google.protobuf.SingleFieldBuilder< - com.google.pubsub.v1.PubsubMessage, com.google.pubsub.v1.PubsubMessage.Builder, com.google.pubsub.v1.PubsubMessageOrBuilder> messageBuilder_; - /** - * optional .google.pubsub.v1.PubsubMessage message = 2; - * - *
-     * The message.
-     * 
- */ - public boolean hasMessage() { - return messageBuilder_ != null || message_ != null; - } - /** - * optional .google.pubsub.v1.PubsubMessage message = 2; - * - *
-     * The message.
-     * 
- */ - public com.google.pubsub.v1.PubsubMessage getMessage() { - if (messageBuilder_ == null) { - return message_ == null ? com.google.pubsub.v1.PubsubMessage.getDefaultInstance() : message_; - } else { - return messageBuilder_.getMessage(); - } - } - /** - * optional .google.pubsub.v1.PubsubMessage message = 2; - * - *
-     * The message.
-     * 
- */ - public Builder setMessage(com.google.pubsub.v1.PubsubMessage value) { - if (messageBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - message_ = value; - onChanged(); - } else { - messageBuilder_.setMessage(value); - } - - return this; - } - /** - * optional .google.pubsub.v1.PubsubMessage message = 2; - * - *
-     * The message.
-     * 
- */ - public Builder setMessage( - com.google.pubsub.v1.PubsubMessage.Builder builderForValue) { - if (messageBuilder_ == null) { - message_ = builderForValue.build(); - onChanged(); - } else { - messageBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * optional .google.pubsub.v1.PubsubMessage message = 2; - * - *
-     * The message.
-     * 
- */ - public Builder mergeMessage(com.google.pubsub.v1.PubsubMessage value) { - if (messageBuilder_ == null) { - if (message_ != null) { - message_ = - com.google.pubsub.v1.PubsubMessage.newBuilder(message_).mergeFrom(value).buildPartial(); - } else { - message_ = value; - } - onChanged(); - } else { - messageBuilder_.mergeFrom(value); - } - - return this; - } - /** - * optional .google.pubsub.v1.PubsubMessage message = 2; - * - *
-     * The message.
-     * 
- */ - public Builder clearMessage() { - if (messageBuilder_ == null) { - message_ = null; - onChanged(); - } else { - message_ = null; - messageBuilder_ = null; - } - - return this; - } - /** - * optional .google.pubsub.v1.PubsubMessage message = 2; - * - *
-     * The message.
-     * 
- */ - public com.google.pubsub.v1.PubsubMessage.Builder getMessageBuilder() { - - onChanged(); - return getMessageFieldBuilder().getBuilder(); - } - /** - * optional .google.pubsub.v1.PubsubMessage message = 2; - * - *
-     * The message.
-     * 
- */ - public com.google.pubsub.v1.PubsubMessageOrBuilder getMessageOrBuilder() { - if (messageBuilder_ != null) { - return messageBuilder_.getMessageOrBuilder(); - } else { - return message_ == null ? - com.google.pubsub.v1.PubsubMessage.getDefaultInstance() : message_; - } - } - /** - * optional .google.pubsub.v1.PubsubMessage message = 2; - * - *
-     * The message.
-     * 
- */ - private com.google.protobuf.SingleFieldBuilder< - com.google.pubsub.v1.PubsubMessage, com.google.pubsub.v1.PubsubMessage.Builder, com.google.pubsub.v1.PubsubMessageOrBuilder> - getMessageFieldBuilder() { - if (messageBuilder_ == null) { - messageBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.pubsub.v1.PubsubMessage, com.google.pubsub.v1.PubsubMessage.Builder, com.google.pubsub.v1.PubsubMessageOrBuilder>( - getMessage(), - getParentForChildren(), - isClean()); - message_ = null; - } - return messageBuilder_; - } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.ReceivedMessage) - } - - // @@protoc_insertion_point(class_scope:google.pubsub.v1.ReceivedMessage) - private static final com.google.pubsub.v1.ReceivedMessage DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.pubsub.v1.ReceivedMessage(); - } - - public static com.google.pubsub.v1.ReceivedMessage getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public ReceivedMessage parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new ReceivedMessage(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public com.google.pubsub.v1.ReceivedMessage getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/ReceivedMessageOrBuilder.java b/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/ReceivedMessageOrBuilder.java deleted file mode 100644 index c832555d57a4..000000000000 --- a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/ReceivedMessageOrBuilder.java +++ /dev/null @@ -1,52 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/pubsub/v1/pubsub.proto - -package com.google.pubsub.v1; - -public interface ReceivedMessageOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.pubsub.v1.ReceivedMessage) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string ack_id = 1; - * - *
-   * This ID can be used to acknowledge the received message.
-   * 
- */ - java.lang.String getAckId(); - /** - * optional string ack_id = 1; - * - *
-   * This ID can be used to acknowledge the received message.
-   * 
- */ - com.google.protobuf.ByteString - getAckIdBytes(); - - /** - * optional .google.pubsub.v1.PubsubMessage message = 2; - * - *
-   * The message.
-   * 
- */ - boolean hasMessage(); - /** - * optional .google.pubsub.v1.PubsubMessage message = 2; - * - *
-   * The message.
-   * 
- */ - com.google.pubsub.v1.PubsubMessage getMessage(); - /** - * optional .google.pubsub.v1.PubsubMessage message = 2; - * - *
-   * The message.
-   * 
- */ - com.google.pubsub.v1.PubsubMessageOrBuilder getMessageOrBuilder(); -} diff --git a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/SubscriberGrpc.java b/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/SubscriberGrpc.java deleted file mode 100644 index 32c81fe096a5..000000000000 --- a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/SubscriberGrpc.java +++ /dev/null @@ -1,506 +0,0 @@ -package com.google.pubsub.v1; - -import static io.grpc.stub.ClientCalls.asyncUnaryCall; -import static io.grpc.stub.ClientCalls.asyncServerStreamingCall; -import static io.grpc.stub.ClientCalls.asyncClientStreamingCall; -import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall; -import static io.grpc.stub.ClientCalls.blockingUnaryCall; -import static io.grpc.stub.ClientCalls.blockingServerStreamingCall; -import static io.grpc.stub.ClientCalls.futureUnaryCall; -import static io.grpc.MethodDescriptor.generateFullMethodName; -import static io.grpc.stub.ServerCalls.asyncUnaryCall; -import static io.grpc.stub.ServerCalls.asyncServerStreamingCall; -import static io.grpc.stub.ServerCalls.asyncClientStreamingCall; -import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall; - -@javax.annotation.Generated("by gRPC proto compiler") -public class SubscriberGrpc { - - private SubscriberGrpc() {} - - public static final String SERVICE_NAME = "google.pubsub.v1.Subscriber"; - - // Static method descriptors that strictly reflect the proto. - @io.grpc.ExperimentalApi - public static final io.grpc.MethodDescriptor METHOD_CREATE_SUBSCRIPTION = - io.grpc.MethodDescriptor.create( - io.grpc.MethodDescriptor.MethodType.UNARY, - generateFullMethodName( - "google.pubsub.v1.Subscriber", "CreateSubscription"), - io.grpc.protobuf.ProtoUtils.marshaller(com.google.pubsub.v1.Subscription.getDefaultInstance()), - io.grpc.protobuf.ProtoUtils.marshaller(com.google.pubsub.v1.Subscription.getDefaultInstance())); - @io.grpc.ExperimentalApi - public static final io.grpc.MethodDescriptor METHOD_GET_SUBSCRIPTION = - io.grpc.MethodDescriptor.create( - io.grpc.MethodDescriptor.MethodType.UNARY, - generateFullMethodName( - "google.pubsub.v1.Subscriber", "GetSubscription"), - io.grpc.protobuf.ProtoUtils.marshaller(com.google.pubsub.v1.GetSubscriptionRequest.getDefaultInstance()), - io.grpc.protobuf.ProtoUtils.marshaller(com.google.pubsub.v1.Subscription.getDefaultInstance())); - @io.grpc.ExperimentalApi - public static final io.grpc.MethodDescriptor METHOD_LIST_SUBSCRIPTIONS = - io.grpc.MethodDescriptor.create( - io.grpc.MethodDescriptor.MethodType.UNARY, - generateFullMethodName( - "google.pubsub.v1.Subscriber", "ListSubscriptions"), - io.grpc.protobuf.ProtoUtils.marshaller(com.google.pubsub.v1.ListSubscriptionsRequest.getDefaultInstance()), - io.grpc.protobuf.ProtoUtils.marshaller(com.google.pubsub.v1.ListSubscriptionsResponse.getDefaultInstance())); - @io.grpc.ExperimentalApi - public static final io.grpc.MethodDescriptor METHOD_DELETE_SUBSCRIPTION = - io.grpc.MethodDescriptor.create( - io.grpc.MethodDescriptor.MethodType.UNARY, - generateFullMethodName( - "google.pubsub.v1.Subscriber", "DeleteSubscription"), - io.grpc.protobuf.ProtoUtils.marshaller(com.google.pubsub.v1.DeleteSubscriptionRequest.getDefaultInstance()), - io.grpc.protobuf.ProtoUtils.marshaller(com.google.protobuf.Empty.getDefaultInstance())); - @io.grpc.ExperimentalApi - public static final io.grpc.MethodDescriptor METHOD_MODIFY_ACK_DEADLINE = - io.grpc.MethodDescriptor.create( - io.grpc.MethodDescriptor.MethodType.UNARY, - generateFullMethodName( - "google.pubsub.v1.Subscriber", "ModifyAckDeadline"), - io.grpc.protobuf.ProtoUtils.marshaller(com.google.pubsub.v1.ModifyAckDeadlineRequest.getDefaultInstance()), - io.grpc.protobuf.ProtoUtils.marshaller(com.google.protobuf.Empty.getDefaultInstance())); - @io.grpc.ExperimentalApi - public static final io.grpc.MethodDescriptor METHOD_ACKNOWLEDGE = - io.grpc.MethodDescriptor.create( - io.grpc.MethodDescriptor.MethodType.UNARY, - generateFullMethodName( - "google.pubsub.v1.Subscriber", "Acknowledge"), - io.grpc.protobuf.ProtoUtils.marshaller(com.google.pubsub.v1.AcknowledgeRequest.getDefaultInstance()), - io.grpc.protobuf.ProtoUtils.marshaller(com.google.protobuf.Empty.getDefaultInstance())); - @io.grpc.ExperimentalApi - public static final io.grpc.MethodDescriptor METHOD_PULL = - io.grpc.MethodDescriptor.create( - io.grpc.MethodDescriptor.MethodType.UNARY, - generateFullMethodName( - "google.pubsub.v1.Subscriber", "Pull"), - io.grpc.protobuf.ProtoUtils.marshaller(com.google.pubsub.v1.PullRequest.getDefaultInstance()), - io.grpc.protobuf.ProtoUtils.marshaller(com.google.pubsub.v1.PullResponse.getDefaultInstance())); - @io.grpc.ExperimentalApi - public static final io.grpc.MethodDescriptor METHOD_MODIFY_PUSH_CONFIG = - io.grpc.MethodDescriptor.create( - io.grpc.MethodDescriptor.MethodType.UNARY, - generateFullMethodName( - "google.pubsub.v1.Subscriber", "ModifyPushConfig"), - io.grpc.protobuf.ProtoUtils.marshaller(com.google.pubsub.v1.ModifyPushConfigRequest.getDefaultInstance()), - io.grpc.protobuf.ProtoUtils.marshaller(com.google.protobuf.Empty.getDefaultInstance())); - - public static SubscriberStub newStub(io.grpc.Channel channel) { - return new SubscriberStub(channel); - } - - public static SubscriberBlockingStub newBlockingStub( - io.grpc.Channel channel) { - return new SubscriberBlockingStub(channel); - } - - public static SubscriberFutureStub newFutureStub( - io.grpc.Channel channel) { - return new SubscriberFutureStub(channel); - } - - public static interface Subscriber { - - public void createSubscription(com.google.pubsub.v1.Subscription request, - io.grpc.stub.StreamObserver responseObserver); - - public void getSubscription(com.google.pubsub.v1.GetSubscriptionRequest request, - io.grpc.stub.StreamObserver responseObserver); - - public void listSubscriptions(com.google.pubsub.v1.ListSubscriptionsRequest request, - io.grpc.stub.StreamObserver responseObserver); - - public void deleteSubscription(com.google.pubsub.v1.DeleteSubscriptionRequest request, - io.grpc.stub.StreamObserver responseObserver); - - public void modifyAckDeadline(com.google.pubsub.v1.ModifyAckDeadlineRequest request, - io.grpc.stub.StreamObserver responseObserver); - - public void acknowledge(com.google.pubsub.v1.AcknowledgeRequest request, - io.grpc.stub.StreamObserver responseObserver); - - public void pull(com.google.pubsub.v1.PullRequest request, - io.grpc.stub.StreamObserver responseObserver); - - public void modifyPushConfig(com.google.pubsub.v1.ModifyPushConfigRequest request, - io.grpc.stub.StreamObserver responseObserver); - } - - public static interface SubscriberBlockingClient { - - public com.google.pubsub.v1.Subscription createSubscription(com.google.pubsub.v1.Subscription request); - - public com.google.pubsub.v1.Subscription getSubscription(com.google.pubsub.v1.GetSubscriptionRequest request); - - public com.google.pubsub.v1.ListSubscriptionsResponse listSubscriptions(com.google.pubsub.v1.ListSubscriptionsRequest request); - - public com.google.protobuf.Empty deleteSubscription(com.google.pubsub.v1.DeleteSubscriptionRequest request); - - public com.google.protobuf.Empty modifyAckDeadline(com.google.pubsub.v1.ModifyAckDeadlineRequest request); - - public com.google.protobuf.Empty acknowledge(com.google.pubsub.v1.AcknowledgeRequest request); - - public com.google.pubsub.v1.PullResponse pull(com.google.pubsub.v1.PullRequest request); - - public com.google.protobuf.Empty modifyPushConfig(com.google.pubsub.v1.ModifyPushConfigRequest request); - } - - public static interface SubscriberFutureClient { - - public com.google.common.util.concurrent.ListenableFuture createSubscription( - com.google.pubsub.v1.Subscription request); - - public com.google.common.util.concurrent.ListenableFuture getSubscription( - com.google.pubsub.v1.GetSubscriptionRequest request); - - public com.google.common.util.concurrent.ListenableFuture listSubscriptions( - com.google.pubsub.v1.ListSubscriptionsRequest request); - - public com.google.common.util.concurrent.ListenableFuture deleteSubscription( - com.google.pubsub.v1.DeleteSubscriptionRequest request); - - public com.google.common.util.concurrent.ListenableFuture modifyAckDeadline( - com.google.pubsub.v1.ModifyAckDeadlineRequest request); - - public com.google.common.util.concurrent.ListenableFuture acknowledge( - com.google.pubsub.v1.AcknowledgeRequest request); - - public com.google.common.util.concurrent.ListenableFuture pull( - com.google.pubsub.v1.PullRequest request); - - public com.google.common.util.concurrent.ListenableFuture modifyPushConfig( - com.google.pubsub.v1.ModifyPushConfigRequest request); - } - - public static class SubscriberStub extends io.grpc.stub.AbstractStub - implements Subscriber { - private SubscriberStub(io.grpc.Channel channel) { - super(channel); - } - - private SubscriberStub(io.grpc.Channel channel, - io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected SubscriberStub build(io.grpc.Channel channel, - io.grpc.CallOptions callOptions) { - return new SubscriberStub(channel, callOptions); - } - - @java.lang.Override - public void createSubscription(com.google.pubsub.v1.Subscription request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnaryCall( - getChannel().newCall(METHOD_CREATE_SUBSCRIPTION, getCallOptions()), request, responseObserver); - } - - @java.lang.Override - public void getSubscription(com.google.pubsub.v1.GetSubscriptionRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnaryCall( - getChannel().newCall(METHOD_GET_SUBSCRIPTION, getCallOptions()), request, responseObserver); - } - - @java.lang.Override - public void listSubscriptions(com.google.pubsub.v1.ListSubscriptionsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnaryCall( - getChannel().newCall(METHOD_LIST_SUBSCRIPTIONS, getCallOptions()), request, responseObserver); - } - - @java.lang.Override - public void deleteSubscription(com.google.pubsub.v1.DeleteSubscriptionRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnaryCall( - getChannel().newCall(METHOD_DELETE_SUBSCRIPTION, getCallOptions()), request, responseObserver); - } - - @java.lang.Override - public void modifyAckDeadline(com.google.pubsub.v1.ModifyAckDeadlineRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnaryCall( - getChannel().newCall(METHOD_MODIFY_ACK_DEADLINE, getCallOptions()), request, responseObserver); - } - - @java.lang.Override - public void acknowledge(com.google.pubsub.v1.AcknowledgeRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnaryCall( - getChannel().newCall(METHOD_ACKNOWLEDGE, getCallOptions()), request, responseObserver); - } - - @java.lang.Override - public void pull(com.google.pubsub.v1.PullRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnaryCall( - getChannel().newCall(METHOD_PULL, getCallOptions()), request, responseObserver); - } - - @java.lang.Override - public void modifyPushConfig(com.google.pubsub.v1.ModifyPushConfigRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnaryCall( - getChannel().newCall(METHOD_MODIFY_PUSH_CONFIG, getCallOptions()), request, responseObserver); - } - } - - public static class SubscriberBlockingStub extends io.grpc.stub.AbstractStub - implements SubscriberBlockingClient { - private SubscriberBlockingStub(io.grpc.Channel channel) { - super(channel); - } - - private SubscriberBlockingStub(io.grpc.Channel channel, - io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected SubscriberBlockingStub build(io.grpc.Channel channel, - io.grpc.CallOptions callOptions) { - return new SubscriberBlockingStub(channel, callOptions); - } - - @java.lang.Override - public com.google.pubsub.v1.Subscription createSubscription(com.google.pubsub.v1.Subscription request) { - return blockingUnaryCall( - getChannel().newCall(METHOD_CREATE_SUBSCRIPTION, getCallOptions()), request); - } - - @java.lang.Override - public com.google.pubsub.v1.Subscription getSubscription(com.google.pubsub.v1.GetSubscriptionRequest request) { - return blockingUnaryCall( - getChannel().newCall(METHOD_GET_SUBSCRIPTION, getCallOptions()), request); - } - - @java.lang.Override - public com.google.pubsub.v1.ListSubscriptionsResponse listSubscriptions(com.google.pubsub.v1.ListSubscriptionsRequest request) { - return blockingUnaryCall( - getChannel().newCall(METHOD_LIST_SUBSCRIPTIONS, getCallOptions()), request); - } - - @java.lang.Override - public com.google.protobuf.Empty deleteSubscription(com.google.pubsub.v1.DeleteSubscriptionRequest request) { - return blockingUnaryCall( - getChannel().newCall(METHOD_DELETE_SUBSCRIPTION, getCallOptions()), request); - } - - @java.lang.Override - public com.google.protobuf.Empty modifyAckDeadline(com.google.pubsub.v1.ModifyAckDeadlineRequest request) { - return blockingUnaryCall( - getChannel().newCall(METHOD_MODIFY_ACK_DEADLINE, getCallOptions()), request); - } - - @java.lang.Override - public com.google.protobuf.Empty acknowledge(com.google.pubsub.v1.AcknowledgeRequest request) { - return blockingUnaryCall( - getChannel().newCall(METHOD_ACKNOWLEDGE, getCallOptions()), request); - } - - @java.lang.Override - public com.google.pubsub.v1.PullResponse pull(com.google.pubsub.v1.PullRequest request) { - return blockingUnaryCall( - getChannel().newCall(METHOD_PULL, getCallOptions()), request); - } - - @java.lang.Override - public com.google.protobuf.Empty modifyPushConfig(com.google.pubsub.v1.ModifyPushConfigRequest request) { - return blockingUnaryCall( - getChannel().newCall(METHOD_MODIFY_PUSH_CONFIG, getCallOptions()), request); - } - } - - public static class SubscriberFutureStub extends io.grpc.stub.AbstractStub - implements SubscriberFutureClient { - private SubscriberFutureStub(io.grpc.Channel channel) { - super(channel); - } - - private SubscriberFutureStub(io.grpc.Channel channel, - io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected SubscriberFutureStub build(io.grpc.Channel channel, - io.grpc.CallOptions callOptions) { - return new SubscriberFutureStub(channel, callOptions); - } - - @java.lang.Override - public com.google.common.util.concurrent.ListenableFuture createSubscription( - com.google.pubsub.v1.Subscription request) { - return futureUnaryCall( - getChannel().newCall(METHOD_CREATE_SUBSCRIPTION, getCallOptions()), request); - } - - @java.lang.Override - public com.google.common.util.concurrent.ListenableFuture getSubscription( - com.google.pubsub.v1.GetSubscriptionRequest request) { - return futureUnaryCall( - getChannel().newCall(METHOD_GET_SUBSCRIPTION, getCallOptions()), request); - } - - @java.lang.Override - public com.google.common.util.concurrent.ListenableFuture listSubscriptions( - com.google.pubsub.v1.ListSubscriptionsRequest request) { - return futureUnaryCall( - getChannel().newCall(METHOD_LIST_SUBSCRIPTIONS, getCallOptions()), request); - } - - @java.lang.Override - public com.google.common.util.concurrent.ListenableFuture deleteSubscription( - com.google.pubsub.v1.DeleteSubscriptionRequest request) { - return futureUnaryCall( - getChannel().newCall(METHOD_DELETE_SUBSCRIPTION, getCallOptions()), request); - } - - @java.lang.Override - public com.google.common.util.concurrent.ListenableFuture modifyAckDeadline( - com.google.pubsub.v1.ModifyAckDeadlineRequest request) { - return futureUnaryCall( - getChannel().newCall(METHOD_MODIFY_ACK_DEADLINE, getCallOptions()), request); - } - - @java.lang.Override - public com.google.common.util.concurrent.ListenableFuture acknowledge( - com.google.pubsub.v1.AcknowledgeRequest request) { - return futureUnaryCall( - getChannel().newCall(METHOD_ACKNOWLEDGE, getCallOptions()), request); - } - - @java.lang.Override - public com.google.common.util.concurrent.ListenableFuture pull( - com.google.pubsub.v1.PullRequest request) { - return futureUnaryCall( - getChannel().newCall(METHOD_PULL, getCallOptions()), request); - } - - @java.lang.Override - public com.google.common.util.concurrent.ListenableFuture modifyPushConfig( - com.google.pubsub.v1.ModifyPushConfigRequest request) { - return futureUnaryCall( - getChannel().newCall(METHOD_MODIFY_PUSH_CONFIG, getCallOptions()), request); - } - } - - public static io.grpc.ServerServiceDefinition bindService( - final Subscriber serviceImpl) { - return io.grpc.ServerServiceDefinition.builder(SERVICE_NAME) - .addMethod( - METHOD_CREATE_SUBSCRIPTION, - asyncUnaryCall( - new io.grpc.stub.ServerCalls.UnaryMethod< - com.google.pubsub.v1.Subscription, - com.google.pubsub.v1.Subscription>() { - @java.lang.Override - public void invoke( - com.google.pubsub.v1.Subscription request, - io.grpc.stub.StreamObserver responseObserver) { - serviceImpl.createSubscription(request, responseObserver); - } - })) - .addMethod( - METHOD_GET_SUBSCRIPTION, - asyncUnaryCall( - new io.grpc.stub.ServerCalls.UnaryMethod< - com.google.pubsub.v1.GetSubscriptionRequest, - com.google.pubsub.v1.Subscription>() { - @java.lang.Override - public void invoke( - com.google.pubsub.v1.GetSubscriptionRequest request, - io.grpc.stub.StreamObserver responseObserver) { - serviceImpl.getSubscription(request, responseObserver); - } - })) - .addMethod( - METHOD_LIST_SUBSCRIPTIONS, - asyncUnaryCall( - new io.grpc.stub.ServerCalls.UnaryMethod< - com.google.pubsub.v1.ListSubscriptionsRequest, - com.google.pubsub.v1.ListSubscriptionsResponse>() { - @java.lang.Override - public void invoke( - com.google.pubsub.v1.ListSubscriptionsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - serviceImpl.listSubscriptions(request, responseObserver); - } - })) - .addMethod( - METHOD_DELETE_SUBSCRIPTION, - asyncUnaryCall( - new io.grpc.stub.ServerCalls.UnaryMethod< - com.google.pubsub.v1.DeleteSubscriptionRequest, - com.google.protobuf.Empty>() { - @java.lang.Override - public void invoke( - com.google.pubsub.v1.DeleteSubscriptionRequest request, - io.grpc.stub.StreamObserver responseObserver) { - serviceImpl.deleteSubscription(request, responseObserver); - } - })) - .addMethod( - METHOD_MODIFY_ACK_DEADLINE, - asyncUnaryCall( - new io.grpc.stub.ServerCalls.UnaryMethod< - com.google.pubsub.v1.ModifyAckDeadlineRequest, - com.google.protobuf.Empty>() { - @java.lang.Override - public void invoke( - com.google.pubsub.v1.ModifyAckDeadlineRequest request, - io.grpc.stub.StreamObserver responseObserver) { - serviceImpl.modifyAckDeadline(request, responseObserver); - } - })) - .addMethod( - METHOD_ACKNOWLEDGE, - asyncUnaryCall( - new io.grpc.stub.ServerCalls.UnaryMethod< - com.google.pubsub.v1.AcknowledgeRequest, - com.google.protobuf.Empty>() { - @java.lang.Override - public void invoke( - com.google.pubsub.v1.AcknowledgeRequest request, - io.grpc.stub.StreamObserver responseObserver) { - serviceImpl.acknowledge(request, responseObserver); - } - })) - .addMethod( - METHOD_PULL, - asyncUnaryCall( - new io.grpc.stub.ServerCalls.UnaryMethod< - com.google.pubsub.v1.PullRequest, - com.google.pubsub.v1.PullResponse>() { - @java.lang.Override - public void invoke( - com.google.pubsub.v1.PullRequest request, - io.grpc.stub.StreamObserver responseObserver) { - serviceImpl.pull(request, responseObserver); - } - })) - .addMethod( - METHOD_MODIFY_PUSH_CONFIG, - asyncUnaryCall( - new io.grpc.stub.ServerCalls.UnaryMethod< - com.google.pubsub.v1.ModifyPushConfigRequest, - com.google.protobuf.Empty>() { - @java.lang.Override - public void invoke( - com.google.pubsub.v1.ModifyPushConfigRequest request, - io.grpc.stub.StreamObserver responseObserver) { - serviceImpl.modifyPushConfig(request, responseObserver); - } - })).build(); - } -} diff --git a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/Subscription.java b/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/Subscription.java deleted file mode 100644 index 45175301338d..000000000000 --- a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/Subscription.java +++ /dev/null @@ -1,1038 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/pubsub/v1/pubsub.proto - -package com.google.pubsub.v1; - -/** - * Protobuf type {@code google.pubsub.v1.Subscription} - * - *
- * A subscription resource.
- * 
- */ -public final class Subscription extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.pubsub.v1.Subscription) - SubscriptionOrBuilder { - // Use Subscription.newBuilder() to construct. - private Subscription(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Subscription() { - name_ = ""; - topic_ = ""; - ackDeadlineSeconds_ = 0; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private Subscription( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - int mutable_bitField0_ = 0; - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!input.skipField(tag)) { - done = true; - } - break; - } - case 10: { - String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: { - String s = input.readStringRequireUtf8(); - - topic_ = s; - break; - } - case 34: { - com.google.pubsub.v1.PushConfig.Builder subBuilder = null; - if (pushConfig_ != null) { - subBuilder = pushConfig_.toBuilder(); - } - pushConfig_ = input.readMessage(com.google.pubsub.v1.PushConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(pushConfig_); - pushConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 40: { - - ackDeadlineSeconds_ = input.readInt32(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_Subscription_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_Subscription_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.pubsub.v1.Subscription.class, com.google.pubsub.v1.Subscription.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * optional string name = 1; - * - *
-   * The name of the subscription. It must have the format
-   * `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must
-   * start with a letter, and contain only letters (`[A-Za-z]`), numbers
-   * (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),
-   * plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters
-   * in length, and it must not start with `"goog"`.
-   * 
- */ - 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; - } - } - /** - * optional string name = 1; - * - *
-   * The name of the subscription. It must have the format
-   * `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must
-   * start with a letter, and contain only letters (`[A-Za-z]`), numbers
-   * (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),
-   * plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters
-   * in length, and it must not start with `"goog"`.
-   * 
- */ - 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 TOPIC_FIELD_NUMBER = 2; - private volatile java.lang.Object topic_; - /** - * optional string topic = 2; - * - *
-   * The name of the topic from which this subscription is receiving messages.
-   * The value of this field will be `_deleted-topic_` if the topic has been
-   * deleted.
-   * 
- */ - public java.lang.String getTopic() { - java.lang.Object ref = topic_; - 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(); - topic_ = s; - return s; - } - } - /** - * optional string topic = 2; - * - *
-   * The name of the topic from which this subscription is receiving messages.
-   * The value of this field will be `_deleted-topic_` if the topic has been
-   * deleted.
-   * 
- */ - public com.google.protobuf.ByteString - getTopicBytes() { - java.lang.Object ref = topic_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - topic_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PUSH_CONFIG_FIELD_NUMBER = 4; - private com.google.pubsub.v1.PushConfig pushConfig_; - /** - * optional .google.pubsub.v1.PushConfig push_config = 4; - * - *
-   * If push delivery is used with this subscription, this field is
-   * used to configure it. An empty pushConfig signifies that the subscriber
-   * will pull and ack messages using API methods.
-   * 
- */ - public boolean hasPushConfig() { - return pushConfig_ != null; - } - /** - * optional .google.pubsub.v1.PushConfig push_config = 4; - * - *
-   * If push delivery is used with this subscription, this field is
-   * used to configure it. An empty pushConfig signifies that the subscriber
-   * will pull and ack messages using API methods.
-   * 
- */ - public com.google.pubsub.v1.PushConfig getPushConfig() { - return pushConfig_ == null ? com.google.pubsub.v1.PushConfig.getDefaultInstance() : pushConfig_; - } - /** - * optional .google.pubsub.v1.PushConfig push_config = 4; - * - *
-   * If push delivery is used with this subscription, this field is
-   * used to configure it. An empty pushConfig signifies that the subscriber
-   * will pull and ack messages using API methods.
-   * 
- */ - public com.google.pubsub.v1.PushConfigOrBuilder getPushConfigOrBuilder() { - return getPushConfig(); - } - - public static final int ACK_DEADLINE_SECONDS_FIELD_NUMBER = 5; - private int ackDeadlineSeconds_; - /** - * optional int32 ack_deadline_seconds = 5; - * - *
-   * This value is the maximum time after a subscriber receives a message
-   * before the subscriber should acknowledge the message. After message
-   * delivery but before the ack deadline expires and before the message is
-   * acknowledged, it is an outstanding message and will not be delivered
-   * again during that time (on a best-effort basis).
-   * For pull delivery this value is used as the initial value for the ack
-   * deadline. To override this value for a given message, call
-   * ModifyAckDeadline with the corresponding ack_id.
-   * For push delivery, this value is also used to set the request timeout for
-   * the call to the push endpoint.
-   * If the subscriber never acknowledges the message, the Pub/Sub
-   * system will eventually redeliver the message.
-   * If this parameter is not set, the default value of 10 seconds is used.
-   * 
- */ - public int getAckDeadlineSeconds() { - return ackDeadlineSeconds_; - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); - } - if (!getTopicBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, topic_); - } - if (pushConfig_ != null) { - output.writeMessage(4, getPushConfig()); - } - if (ackDeadlineSeconds_ != 0) { - output.writeInt32(5, ackDeadlineSeconds_); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); - } - if (!getTopicBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, topic_); - } - if (pushConfig_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getPushConfig()); - } - if (ackDeadlineSeconds_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(5, ackDeadlineSeconds_); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static com.google.pubsub.v1.Subscription parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.pubsub.v1.Subscription 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.pubsub.v1.Subscription parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.pubsub.v1.Subscription parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.pubsub.v1.Subscription parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.pubsub.v1.Subscription parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.pubsub.v1.Subscription parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.pubsub.v1.Subscription parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.pubsub.v1.Subscription parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.pubsub.v1.Subscription parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.pubsub.v1.Subscription prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - 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; - } - /** - * Protobuf type {@code google.pubsub.v1.Subscription} - * - *
-   * A subscription resource.
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.pubsub.v1.Subscription) - com.google.pubsub.v1.SubscriptionOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_Subscription_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_Subscription_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.pubsub.v1.Subscription.class, com.google.pubsub.v1.Subscription.Builder.class); - } - - // Construct using com.google.pubsub.v1.Subscription.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - name_ = ""; - - topic_ = ""; - - if (pushConfigBuilder_ == null) { - pushConfig_ = null; - } else { - pushConfig_ = null; - pushConfigBuilder_ = null; - } - ackDeadlineSeconds_ = 0; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_Subscription_descriptor; - } - - public com.google.pubsub.v1.Subscription getDefaultInstanceForType() { - return com.google.pubsub.v1.Subscription.getDefaultInstance(); - } - - public com.google.pubsub.v1.Subscription build() { - com.google.pubsub.v1.Subscription result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.pubsub.v1.Subscription buildPartial() { - com.google.pubsub.v1.Subscription result = new com.google.pubsub.v1.Subscription(this); - result.name_ = name_; - result.topic_ = topic_; - if (pushConfigBuilder_ == null) { - result.pushConfig_ = pushConfig_; - } else { - result.pushConfig_ = pushConfigBuilder_.build(); - } - result.ackDeadlineSeconds_ = ackDeadlineSeconds_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.pubsub.v1.Subscription) { - return mergeFrom((com.google.pubsub.v1.Subscription)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.pubsub.v1.Subscription other) { - if (other == com.google.pubsub.v1.Subscription.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getTopic().isEmpty()) { - topic_ = other.topic_; - onChanged(); - } - if (other.hasPushConfig()) { - mergePushConfig(other.getPushConfig()); - } - if (other.getAckDeadlineSeconds() != 0) { - setAckDeadlineSeconds(other.getAckDeadlineSeconds()); - } - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.pubsub.v1.Subscription parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.pubsub.v1.Subscription) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - * optional string name = 1; - * - *
-     * The name of the subscription. It must have the format
-     * `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must
-     * start with a letter, and contain only letters (`[A-Za-z]`), numbers
-     * (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),
-     * plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters
-     * in length, and it must not start with `"goog"`.
-     * 
- */ - 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; - } - } - /** - * optional string name = 1; - * - *
-     * The name of the subscription. It must have the format
-     * `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must
-     * start with a letter, and contain only letters (`[A-Za-z]`), numbers
-     * (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),
-     * plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters
-     * in length, and it must not start with `"goog"`.
-     * 
- */ - 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; - } - } - /** - * optional string name = 1; - * - *
-     * The name of the subscription. It must have the format
-     * `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must
-     * start with a letter, and contain only letters (`[A-Za-z]`), numbers
-     * (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),
-     * plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters
-     * in length, and it must not start with `"goog"`.
-     * 
- */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * optional string name = 1; - * - *
-     * The name of the subscription. It must have the format
-     * `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must
-     * start with a letter, and contain only letters (`[A-Za-z]`), numbers
-     * (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),
-     * plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters
-     * in length, and it must not start with `"goog"`.
-     * 
- */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * optional string name = 1; - * - *
-     * The name of the subscription. It must have the format
-     * `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must
-     * start with a letter, and contain only letters (`[A-Za-z]`), numbers
-     * (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),
-     * plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters
-     * in length, and it must not start with `"goog"`.
-     * 
- */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.lang.Object topic_ = ""; - /** - * optional string topic = 2; - * - *
-     * The name of the topic from which this subscription is receiving messages.
-     * The value of this field will be `_deleted-topic_` if the topic has been
-     * deleted.
-     * 
- */ - public java.lang.String getTopic() { - java.lang.Object ref = topic_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - topic_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string topic = 2; - * - *
-     * The name of the topic from which this subscription is receiving messages.
-     * The value of this field will be `_deleted-topic_` if the topic has been
-     * deleted.
-     * 
- */ - public com.google.protobuf.ByteString - getTopicBytes() { - java.lang.Object ref = topic_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - topic_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string topic = 2; - * - *
-     * The name of the topic from which this subscription is receiving messages.
-     * The value of this field will be `_deleted-topic_` if the topic has been
-     * deleted.
-     * 
- */ - public Builder setTopic( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - topic_ = value; - onChanged(); - return this; - } - /** - * optional string topic = 2; - * - *
-     * The name of the topic from which this subscription is receiving messages.
-     * The value of this field will be `_deleted-topic_` if the topic has been
-     * deleted.
-     * 
- */ - public Builder clearTopic() { - - topic_ = getDefaultInstance().getTopic(); - onChanged(); - return this; - } - /** - * optional string topic = 2; - * - *
-     * The name of the topic from which this subscription is receiving messages.
-     * The value of this field will be `_deleted-topic_` if the topic has been
-     * deleted.
-     * 
- */ - public Builder setTopicBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - topic_ = value; - onChanged(); - return this; - } - - private com.google.pubsub.v1.PushConfig pushConfig_ = null; - private com.google.protobuf.SingleFieldBuilder< - com.google.pubsub.v1.PushConfig, com.google.pubsub.v1.PushConfig.Builder, com.google.pubsub.v1.PushConfigOrBuilder> pushConfigBuilder_; - /** - * optional .google.pubsub.v1.PushConfig push_config = 4; - * - *
-     * If push delivery is used with this subscription, this field is
-     * used to configure it. An empty pushConfig signifies that the subscriber
-     * will pull and ack messages using API methods.
-     * 
- */ - public boolean hasPushConfig() { - return pushConfigBuilder_ != null || pushConfig_ != null; - } - /** - * optional .google.pubsub.v1.PushConfig push_config = 4; - * - *
-     * If push delivery is used with this subscription, this field is
-     * used to configure it. An empty pushConfig signifies that the subscriber
-     * will pull and ack messages using API methods.
-     * 
- */ - public com.google.pubsub.v1.PushConfig getPushConfig() { - if (pushConfigBuilder_ == null) { - return pushConfig_ == null ? com.google.pubsub.v1.PushConfig.getDefaultInstance() : pushConfig_; - } else { - return pushConfigBuilder_.getMessage(); - } - } - /** - * optional .google.pubsub.v1.PushConfig push_config = 4; - * - *
-     * If push delivery is used with this subscription, this field is
-     * used to configure it. An empty pushConfig signifies that the subscriber
-     * will pull and ack messages using API methods.
-     * 
- */ - public Builder setPushConfig(com.google.pubsub.v1.PushConfig value) { - if (pushConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - pushConfig_ = value; - onChanged(); - } else { - pushConfigBuilder_.setMessage(value); - } - - return this; - } - /** - * optional .google.pubsub.v1.PushConfig push_config = 4; - * - *
-     * If push delivery is used with this subscription, this field is
-     * used to configure it. An empty pushConfig signifies that the subscriber
-     * will pull and ack messages using API methods.
-     * 
- */ - public Builder setPushConfig( - com.google.pubsub.v1.PushConfig.Builder builderForValue) { - if (pushConfigBuilder_ == null) { - pushConfig_ = builderForValue.build(); - onChanged(); - } else { - pushConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * optional .google.pubsub.v1.PushConfig push_config = 4; - * - *
-     * If push delivery is used with this subscription, this field is
-     * used to configure it. An empty pushConfig signifies that the subscriber
-     * will pull and ack messages using API methods.
-     * 
- */ - public Builder mergePushConfig(com.google.pubsub.v1.PushConfig value) { - if (pushConfigBuilder_ == null) { - if (pushConfig_ != null) { - pushConfig_ = - com.google.pubsub.v1.PushConfig.newBuilder(pushConfig_).mergeFrom(value).buildPartial(); - } else { - pushConfig_ = value; - } - onChanged(); - } else { - pushConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - * optional .google.pubsub.v1.PushConfig push_config = 4; - * - *
-     * If push delivery is used with this subscription, this field is
-     * used to configure it. An empty pushConfig signifies that the subscriber
-     * will pull and ack messages using API methods.
-     * 
- */ - public Builder clearPushConfig() { - if (pushConfigBuilder_ == null) { - pushConfig_ = null; - onChanged(); - } else { - pushConfig_ = null; - pushConfigBuilder_ = null; - } - - return this; - } - /** - * optional .google.pubsub.v1.PushConfig push_config = 4; - * - *
-     * If push delivery is used with this subscription, this field is
-     * used to configure it. An empty pushConfig signifies that the subscriber
-     * will pull and ack messages using API methods.
-     * 
- */ - public com.google.pubsub.v1.PushConfig.Builder getPushConfigBuilder() { - - onChanged(); - return getPushConfigFieldBuilder().getBuilder(); - } - /** - * optional .google.pubsub.v1.PushConfig push_config = 4; - * - *
-     * If push delivery is used with this subscription, this field is
-     * used to configure it. An empty pushConfig signifies that the subscriber
-     * will pull and ack messages using API methods.
-     * 
- */ - public com.google.pubsub.v1.PushConfigOrBuilder getPushConfigOrBuilder() { - if (pushConfigBuilder_ != null) { - return pushConfigBuilder_.getMessageOrBuilder(); - } else { - return pushConfig_ == null ? - com.google.pubsub.v1.PushConfig.getDefaultInstance() : pushConfig_; - } - } - /** - * optional .google.pubsub.v1.PushConfig push_config = 4; - * - *
-     * If push delivery is used with this subscription, this field is
-     * used to configure it. An empty pushConfig signifies that the subscriber
-     * will pull and ack messages using API methods.
-     * 
- */ - private com.google.protobuf.SingleFieldBuilder< - com.google.pubsub.v1.PushConfig, com.google.pubsub.v1.PushConfig.Builder, com.google.pubsub.v1.PushConfigOrBuilder> - getPushConfigFieldBuilder() { - if (pushConfigBuilder_ == null) { - pushConfigBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.pubsub.v1.PushConfig, com.google.pubsub.v1.PushConfig.Builder, com.google.pubsub.v1.PushConfigOrBuilder>( - getPushConfig(), - getParentForChildren(), - isClean()); - pushConfig_ = null; - } - return pushConfigBuilder_; - } - - private int ackDeadlineSeconds_ ; - /** - * optional int32 ack_deadline_seconds = 5; - * - *
-     * This value is the maximum time after a subscriber receives a message
-     * before the subscriber should acknowledge the message. After message
-     * delivery but before the ack deadline expires and before the message is
-     * acknowledged, it is an outstanding message and will not be delivered
-     * again during that time (on a best-effort basis).
-     * For pull delivery this value is used as the initial value for the ack
-     * deadline. To override this value for a given message, call
-     * ModifyAckDeadline with the corresponding ack_id.
-     * For push delivery, this value is also used to set the request timeout for
-     * the call to the push endpoint.
-     * If the subscriber never acknowledges the message, the Pub/Sub
-     * system will eventually redeliver the message.
-     * If this parameter is not set, the default value of 10 seconds is used.
-     * 
- */ - public int getAckDeadlineSeconds() { - return ackDeadlineSeconds_; - } - /** - * optional int32 ack_deadline_seconds = 5; - * - *
-     * This value is the maximum time after a subscriber receives a message
-     * before the subscriber should acknowledge the message. After message
-     * delivery but before the ack deadline expires and before the message is
-     * acknowledged, it is an outstanding message and will not be delivered
-     * again during that time (on a best-effort basis).
-     * For pull delivery this value is used as the initial value for the ack
-     * deadline. To override this value for a given message, call
-     * ModifyAckDeadline with the corresponding ack_id.
-     * For push delivery, this value is also used to set the request timeout for
-     * the call to the push endpoint.
-     * If the subscriber never acknowledges the message, the Pub/Sub
-     * system will eventually redeliver the message.
-     * If this parameter is not set, the default value of 10 seconds is used.
-     * 
- */ - public Builder setAckDeadlineSeconds(int value) { - - ackDeadlineSeconds_ = value; - onChanged(); - return this; - } - /** - * optional int32 ack_deadline_seconds = 5; - * - *
-     * This value is the maximum time after a subscriber receives a message
-     * before the subscriber should acknowledge the message. After message
-     * delivery but before the ack deadline expires and before the message is
-     * acknowledged, it is an outstanding message and will not be delivered
-     * again during that time (on a best-effort basis).
-     * For pull delivery this value is used as the initial value for the ack
-     * deadline. To override this value for a given message, call
-     * ModifyAckDeadline with the corresponding ack_id.
-     * For push delivery, this value is also used to set the request timeout for
-     * the call to the push endpoint.
-     * If the subscriber never acknowledges the message, the Pub/Sub
-     * system will eventually redeliver the message.
-     * If this parameter is not set, the default value of 10 seconds is used.
-     * 
- */ - public Builder clearAckDeadlineSeconds() { - - ackDeadlineSeconds_ = 0; - onChanged(); - return this; - } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.Subscription) - } - - // @@protoc_insertion_point(class_scope:google.pubsub.v1.Subscription) - private static final com.google.pubsub.v1.Subscription DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.pubsub.v1.Subscription(); - } - - public static com.google.pubsub.v1.Subscription getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public Subscription parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new Subscription(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public com.google.pubsub.v1.Subscription getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/SubscriptionOrBuilder.java b/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/SubscriptionOrBuilder.java deleted file mode 100644 index b74cbb696209..000000000000 --- a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/SubscriptionOrBuilder.java +++ /dev/null @@ -1,111 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/pubsub/v1/pubsub.proto - -package com.google.pubsub.v1; - -public interface SubscriptionOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.pubsub.v1.Subscription) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string name = 1; - * - *
-   * The name of the subscription. It must have the format
-   * `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must
-   * start with a letter, and contain only letters (`[A-Za-z]`), numbers
-   * (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),
-   * plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters
-   * in length, and it must not start with `"goog"`.
-   * 
- */ - java.lang.String getName(); - /** - * optional string name = 1; - * - *
-   * The name of the subscription. It must have the format
-   * `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must
-   * start with a letter, and contain only letters (`[A-Za-z]`), numbers
-   * (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`),
-   * plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters
-   * in length, and it must not start with `"goog"`.
-   * 
- */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - * optional string topic = 2; - * - *
-   * The name of the topic from which this subscription is receiving messages.
-   * The value of this field will be `_deleted-topic_` if the topic has been
-   * deleted.
-   * 
- */ - java.lang.String getTopic(); - /** - * optional string topic = 2; - * - *
-   * The name of the topic from which this subscription is receiving messages.
-   * The value of this field will be `_deleted-topic_` if the topic has been
-   * deleted.
-   * 
- */ - com.google.protobuf.ByteString - getTopicBytes(); - - /** - * optional .google.pubsub.v1.PushConfig push_config = 4; - * - *
-   * If push delivery is used with this subscription, this field is
-   * used to configure it. An empty pushConfig signifies that the subscriber
-   * will pull and ack messages using API methods.
-   * 
- */ - boolean hasPushConfig(); - /** - * optional .google.pubsub.v1.PushConfig push_config = 4; - * - *
-   * If push delivery is used with this subscription, this field is
-   * used to configure it. An empty pushConfig signifies that the subscriber
-   * will pull and ack messages using API methods.
-   * 
- */ - com.google.pubsub.v1.PushConfig getPushConfig(); - /** - * optional .google.pubsub.v1.PushConfig push_config = 4; - * - *
-   * If push delivery is used with this subscription, this field is
-   * used to configure it. An empty pushConfig signifies that the subscriber
-   * will pull and ack messages using API methods.
-   * 
- */ - com.google.pubsub.v1.PushConfigOrBuilder getPushConfigOrBuilder(); - - /** - * optional int32 ack_deadline_seconds = 5; - * - *
-   * This value is the maximum time after a subscriber receives a message
-   * before the subscriber should acknowledge the message. After message
-   * delivery but before the ack deadline expires and before the message is
-   * acknowledged, it is an outstanding message and will not be delivered
-   * again during that time (on a best-effort basis).
-   * For pull delivery this value is used as the initial value for the ack
-   * deadline. To override this value for a given message, call
-   * ModifyAckDeadline with the corresponding ack_id.
-   * For push delivery, this value is also used to set the request timeout for
-   * the call to the push endpoint.
-   * If the subscriber never acknowledges the message, the Pub/Sub
-   * system will eventually redeliver the message.
-   * If this parameter is not set, the default value of 10 seconds is used.
-   * 
- */ - int getAckDeadlineSeconds(); -} diff --git a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/Topic.java b/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/Topic.java deleted file mode 100644 index d1317aed31ef..000000000000 --- a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/Topic.java +++ /dev/null @@ -1,511 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/pubsub/v1/pubsub.proto - -package com.google.pubsub.v1; - -/** - * Protobuf type {@code google.pubsub.v1.Topic} - * - *
- * A topic resource.
- * 
- */ -public final class Topic extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.pubsub.v1.Topic) - TopicOrBuilder { - // Use Topic.newBuilder() to construct. - private Topic(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private Topic() { - name_ = ""; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - private Topic( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { - this(); - int mutable_bitField0_ = 0; - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!input.skipField(tag)) { - done = true; - } - break; - } - case 10: { - String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); - } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); - } finally { - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_Topic_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_Topic_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.pubsub.v1.Topic.class, com.google.pubsub.v1.Topic.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * optional string name = 1; - * - *
-   * The name of the topic. It must have the format
-   * `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter,
-   * and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),
-   * underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent
-   * signs (`%`). It must be between 3 and 255 characters in length, and it
-   * must not start with `"goog"`.
-   * 
- */ - 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; - } - } - /** - * optional string name = 1; - * - *
-   * The name of the topic. It must have the format
-   * `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter,
-   * and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),
-   * underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent
-   * signs (`%`). It must be between 3 and 255 characters in length, and it
-   * must not start with `"goog"`.
-   * 
- */ - 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; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); - } - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); - } - memoizedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - public static com.google.pubsub.v1.Topic parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.pubsub.v1.Topic 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.pubsub.v1.Topic parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.pubsub.v1.Topic parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.pubsub.v1.Topic parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.pubsub.v1.Topic parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static com.google.pubsub.v1.Topic parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static com.google.pubsub.v1.Topic parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static com.google.pubsub.v1.Topic parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static com.google.pubsub.v1.Topic parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.pubsub.v1.Topic prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - 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; - } - /** - * Protobuf type {@code google.pubsub.v1.Topic} - * - *
-   * A topic resource.
-   * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.pubsub.v1.Topic) - com.google.pubsub.v1.TopicOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_Topic_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_Topic_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.pubsub.v1.Topic.class, com.google.pubsub.v1.Topic.Builder.class); - } - - // Construct using com.google.pubsub.v1.Topic.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - name_ = ""; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.pubsub.v1.PubsubProto.internal_static_google_pubsub_v1_Topic_descriptor; - } - - public com.google.pubsub.v1.Topic getDefaultInstanceForType() { - return com.google.pubsub.v1.Topic.getDefaultInstance(); - } - - public com.google.pubsub.v1.Topic build() { - com.google.pubsub.v1.Topic result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.pubsub.v1.Topic buildPartial() { - com.google.pubsub.v1.Topic result = new com.google.pubsub.v1.Topic(this); - result.name_ = name_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.pubsub.v1.Topic) { - return mergeFrom((com.google.pubsub.v1.Topic)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.pubsub.v1.Topic other) { - if (other == com.google.pubsub.v1.Topic.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.pubsub.v1.Topic parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.pubsub.v1.Topic) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - * optional string name = 1; - * - *
-     * The name of the topic. It must have the format
-     * `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter,
-     * and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),
-     * underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent
-     * signs (`%`). It must be between 3 and 255 characters in length, and it
-     * must not start with `"goog"`.
-     * 
- */ - 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; - } - } - /** - * optional string name = 1; - * - *
-     * The name of the topic. It must have the format
-     * `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter,
-     * and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),
-     * underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent
-     * signs (`%`). It must be between 3 and 255 characters in length, and it
-     * must not start with `"goog"`.
-     * 
- */ - 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; - } - } - /** - * optional string name = 1; - * - *
-     * The name of the topic. It must have the format
-     * `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter,
-     * and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),
-     * underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent
-     * signs (`%`). It must be between 3 and 255 characters in length, and it
-     * must not start with `"goog"`.
-     * 
- */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * optional string name = 1; - * - *
-     * The name of the topic. It must have the format
-     * `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter,
-     * and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),
-     * underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent
-     * signs (`%`). It must be between 3 and 255 characters in length, and it
-     * must not start with `"goog"`.
-     * 
- */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * optional string name = 1; - * - *
-     * The name of the topic. It must have the format
-     * `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter,
-     * and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),
-     * underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent
-     * signs (`%`). It must be between 3 and 255 characters in length, and it
-     * must not start with `"goog"`.
-     * 
- */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; - } - - - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.Topic) - } - - // @@protoc_insertion_point(class_scope:google.pubsub.v1.Topic) - private static final com.google.pubsub.v1.Topic DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.pubsub.v1.Topic(); - } - - public static com.google.pubsub.v1.Topic getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public Topic parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new Topic(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public com.google.pubsub.v1.Topic getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/TopicOrBuilder.java b/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/TopicOrBuilder.java deleted file mode 100644 index 9a80b8a4512b..000000000000 --- a/gcloud-java-pubsub/generated/src/main/java/com/google/pubsub/v1/TopicOrBuilder.java +++ /dev/null @@ -1,37 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/pubsub/v1/pubsub.proto - -package com.google.pubsub.v1; - -public interface TopicOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.pubsub.v1.Topic) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string name = 1; - * - *
-   * The name of the topic. It must have the format
-   * `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter,
-   * and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),
-   * underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent
-   * signs (`%`). It must be between 3 and 255 characters in length, and it
-   * must not start with `"goog"`.
-   * 
- */ - java.lang.String getName(); - /** - * optional string name = 1; - * - *
-   * The name of the topic. It must have the format
-   * `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter,
-   * and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),
-   * underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent
-   * signs (`%`). It must be between 3 and 255 characters in length, and it
-   * must not start with `"goog"`.
-   * 
- */ - com.google.protobuf.ByteString - getNameBytes(); -} From 4cf0c8f9939c29d93758c1010928d03262b4056f Mon Sep 17 00:00:00 2001 From: Garrett Jones Date: Thu, 18 Feb 2016 14:05:54 -0800 Subject: [PATCH 3/5] Switching dependencies, regenerating code * Add dependency on gax-java * Add dependency on grpc-pubsub-v1 * Regenerating the *Api classes * Using the emulator runner from GAX * Updating the test accordingly --- gcloud-java-pubsub/pom.xml | 11 +- .../gcloud/pubsub/spi/PublisherApi.java | 511 ++++++++++----- .../gcloud/pubsub/spi/SubscriberApi.java | 614 +++++++++++++----- .../pubsub/testing/LocalPubsubHelper.java | 116 ++-- .../gcloud/pubsub/spi/PublisherApiTest.java | 73 ++- 5 files changed, 931 insertions(+), 394 deletions(-) diff --git a/gcloud-java-pubsub/pom.xml b/gcloud-java-pubsub/pom.xml index 289580c9eeb2..cec635adca31 100644 --- a/gcloud-java-pubsub/pom.xml +++ b/gcloud-java-pubsub/pom.xml @@ -17,9 +17,14 @@ - ${project.groupId} - gcloud-java-gax - ${project.version} + com.google.api + gax + 0.0.1 + + + com.google.api.grpc + grpc-pubsub-v1 + 0.0.0 io.grpc diff --git a/gcloud-java-pubsub/src/main/java/com/google/gcloud/pubsub/spi/PublisherApi.java b/gcloud-java-pubsub/src/main/java/com/google/gcloud/pubsub/spi/PublisherApi.java index 54572afa2e6d..632d84cfe5de 100644 --- a/gcloud-java-pubsub/src/main/java/com/google/gcloud/pubsub/spi/PublisherApi.java +++ b/gcloud-java-pubsub/src/main/java/com/google/gcloud/pubsub/spi/PublisherApi.java @@ -26,11 +26,25 @@ * Allowed modifications - currently these are the only types allowed: * 1. New methods (these should be added to the end of the class) * 2. New imports + * 3. Additional documentation between "manual edit" demarcations * * Happy editing! */ package com.google.gcloud.pubsub.spi; +import com.google.api.gax.core.BackoffParams; +import com.google.api.gax.core.ConnectionSettings; +import com.google.api.gax.core.RetryParams; +import com.google.api.gax.grpc.ApiCallable; +import com.google.api.gax.grpc.PageDescriptor; +import com.google.api.gax.grpc.ServiceApiSettings; +import com.google.api.gax.protobuf.PathTemplate; +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.common.collect.Maps; +import com.google.common.collect.Sets; import com.google.protobuf.Empty; import com.google.pubsub.v1.DeleteTopicRequest; import com.google.pubsub.v1.GetTopicRequest; @@ -43,129 +57,228 @@ import com.google.pubsub.v1.PublisherGrpc; import com.google.pubsub.v1.PubsubMessage; import com.google.pubsub.v1.Topic; - -import io.gapi.gax.grpc.ApiCallable; -import io.gapi.gax.grpc.PageDescriptor; -import io.gapi.gax.grpc.ServiceApiSettings; -import io.gapi.gax.internal.ApiUtils; -import io.gapi.gax.protobuf.PathTemplate; import io.grpc.ManagedChannel; - +import io.grpc.Status; import java.io.IOException; +import java.util.EnumMap; +import java.util.HashMap; import java.util.List; +import java.util.Map; // Manually-added imports: add custom (non-generated) imports after this point. - - // AUTO-GENERATED DOCUMENTATION AND SERVICE - see instructions at the top of the file for editing. /** * The service that an application uses to manipulate topics, and to send * messages to a topic. + * + * + * */ @javax.annotation.Generated("by the veneer generator") public class PublisherApi implements AutoCloseable { + public enum MethodIdentifier { + CREATE_TOPIC, + PUBLISH, + GET_TOPIC, + LIST_TOPICS, + LIST_TOPIC_SUBSCRIPTIONS, + DELETE_TOPIC + } + // ========= // Constants // ========= /** * The default address of the service. + * + * + * */ - public static final String SERVICE_ADDRESS = "pubsub-experimental.googleapis.com"; + public static final String DEFAULT_SERVICE_ADDRESS = "pubsub-experimental.googleapis.com"; /** * The default port of the service. + * + * + * */ public static final int DEFAULT_SERVICE_PORT = 443; + /** + * The default scopes of the service. + */ + public static ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder() + .add("https://www.googleapis.com/auth/pubsub") + .add("https://www.googleapis.com/auth/cloud-platform") + .build(); + + /** + * The default settings for the service. + */ + public static ServiceApiSettings DEFAULT_SETTINGS = + ServiceApiSettings.builder() + .provideChannelWith( + ConnectionSettings.builder() + .setServiceAddress(DEFAULT_SERVICE_ADDRESS) + .setPort(DEFAULT_SERVICE_PORT) + .provideCredentialsWith(DEFAULT_SERVICE_SCOPES) + .build()) + .build(); + + private static final ImmutableMap> + DEFAULT_RETRY_CONFIG; + + static { + Map> definition = new HashMap<>(); + definition.put( + "idempotent", + Sets.immutableEnumSet( + Lists.newArrayList( + Status.Code.DEADLINE_EXCEEDED, Status.Code.UNAVAILABLE))); + definition.put("non_idempotent", Sets.immutableEnumSet(Lists.newArrayList())); + + Map> retryableCodes = + new EnumMap<>(MethodIdentifier.class); + retryableCodes.put(MethodIdentifier.CREATE_TOPIC, definition.get("idempotent")); + retryableCodes.put(MethodIdentifier.PUBLISH, definition.get("non_idempotent")); + retryableCodes.put(MethodIdentifier.GET_TOPIC, definition.get("idempotent")); + retryableCodes.put(MethodIdentifier.LIST_TOPICS, definition.get("idempotent")); + retryableCodes.put(MethodIdentifier.LIST_TOPIC_SUBSCRIPTIONS, definition.get("idempotent")); + retryableCodes.put(MethodIdentifier.DELETE_TOPIC, definition.get("idempotent")); + DEFAULT_RETRY_CONFIG = + Maps.>immutableEnumMap(retryableCodes); + } + + private static final ImmutableMap DEFAULT_RETRY_PARAMS; + + static { + Map definition = new HashMap<>(); + RetryParams params = null; + params = + RetryParams.newBuilder() + .setRetryBackoff( + BackoffParams.newBuilder() + .setInitialDelayMillis(100L) + .setDelayMultiplier(1.2) + .setMaxDelayMillis(1000L) + .build()) + .setTimeoutBackoff( + BackoffParams.newBuilder() + .setInitialDelayMillis(300L) + .setDelayMultiplier(1.3) + .setMaxDelayMillis(3000L) + .build()) + .setTotalTimeout(30000L) + .build(); + definition.put("default", params); + + Map retryParams = new EnumMap<>(MethodIdentifier.class); + retryParams.put(MethodIdentifier.CREATE_TOPIC, definition.get("default")); + retryParams.put(MethodIdentifier.PUBLISH, definition.get("default")); + retryParams.put(MethodIdentifier.GET_TOPIC, definition.get("default")); + retryParams.put(MethodIdentifier.LIST_TOPICS, definition.get("default")); + retryParams.put(MethodIdentifier.LIST_TOPIC_SUBSCRIPTIONS, definition.get("default")); + retryParams.put(MethodIdentifier.DELETE_TOPIC, definition.get("default")); + DEFAULT_RETRY_PARAMS = Maps.immutableEnumMap(retryParams); + } - private static final ApiCallable - CREATE_TOPIC = ApiCallable.create(PublisherGrpc.METHOD_CREATE_TOPIC); - private static final ApiCallable - PUBLISH = ApiCallable.create(PublisherGrpc.METHOD_PUBLISH); - private static final ApiCallable - GET_TOPIC = ApiCallable.create(PublisherGrpc.METHOD_GET_TOPIC); - private static final ApiCallable - LIST_TOPICS = ApiCallable.create(PublisherGrpc.METHOD_LIST_TOPICS); + private static final ApiCallable CREATE_TOPIC = + ApiCallable.create(PublisherGrpc.METHOD_CREATE_TOPIC); + private static final ApiCallable PUBLISH = + ApiCallable.create(PublisherGrpc.METHOD_PUBLISH); + private static final ApiCallable GET_TOPIC = + ApiCallable.create(PublisherGrpc.METHOD_GET_TOPIC); + private static final ApiCallable LIST_TOPICS = + ApiCallable.create(PublisherGrpc.METHOD_LIST_TOPICS); private static final ApiCallable LIST_TOPIC_SUBSCRIPTIONS = ApiCallable.create(PublisherGrpc.METHOD_LIST_TOPIC_SUBSCRIPTIONS); - private static final ApiCallable - DELETE_TOPIC = ApiCallable.create(PublisherGrpc.METHOD_DELETE_TOPIC); - - private static PageDescriptor LIST_TOPICS_PAGE_DESC = - new PageDescriptor() { - @Override - public Object emptyToken() { - return ""; - } - @Override - public ListTopicsRequest injectToken( - ListTopicsRequest payload, Object token) { - return ListTopicsRequest - .newBuilder(payload) - .setPageToken((String) token) - .build(); - } - @Override - public Object extractNextToken(ListTopicsResponse payload) { - return payload.getNextPageToken(); - } - @Override - public Iterable extractResources(ListTopicsResponse payload) { - return payload.getTopicsList(); - } - }; - - private static PageDescriptor LIST_TOPIC_SUBSCRIPTIONS_PAGE_DESC = - new PageDescriptor() { - @Override - public Object emptyToken() { - return ""; - } - @Override - public ListTopicSubscriptionsRequest injectToken( - ListTopicSubscriptionsRequest payload, Object token) { - return ListTopicSubscriptionsRequest - .newBuilder(payload) - .setPageToken((String) token) - .build(); - } - @Override - public Object extractNextToken(ListTopicSubscriptionsResponse payload) { - return payload.getNextPageToken(); - } - @Override - public Iterable extractResources(ListTopicSubscriptionsResponse payload) { - return payload.getSubscriptionsList(); - } - }; - - private static String ALL_SCOPES[] = { - "https://www.googleapis.com/auth/pubsub" - }; + private static final ApiCallable DELETE_TOPIC = + ApiCallable.create(PublisherGrpc.METHOD_DELETE_TOPIC); + + private static PageDescriptor + LIST_TOPICS_PAGE_DESC = + new PageDescriptor() { + @Override + public Object emptyToken() { + return ""; + } + + @Override + public ListTopicsRequest injectToken(ListTopicsRequest payload, Object token) { + return ListTopicsRequest.newBuilder(payload).setPageToken((String) token).build(); + } + + @Override + public Object extractNextToken(ListTopicsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListTopicsResponse payload) { + return payload.getTopicsList(); + } + }; + + private static PageDescriptor< + ListTopicSubscriptionsRequest, ListTopicSubscriptionsResponse, String> + LIST_TOPIC_SUBSCRIPTIONS_PAGE_DESC = + new PageDescriptor< + ListTopicSubscriptionsRequest, ListTopicSubscriptionsResponse, String>() { + @Override + public Object emptyToken() { + return ""; + } + + @Override + public ListTopicSubscriptionsRequest injectToken( + ListTopicSubscriptionsRequest payload, Object token) { + return ListTopicSubscriptionsRequest.newBuilder(payload) + .setPageToken((String) token) + .build(); + } + + @Override + public Object extractNextToken(ListTopicSubscriptionsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListTopicSubscriptionsResponse payload) { + return payload.getSubscriptionsList(); + } + }; /** * A PathTemplate representing the fully-qualified path to represent * a project resource. + * + * + * */ private static final PathTemplate PROJECT_PATH_TEMPLATE = - PathTemplate.create("/projects/{project}"); - + PathTemplate.create("projects/{project}"); /** * A PathTemplate representing the fully-qualified path to represent * a topic resource. + * + * + * */ private static final PathTemplate TOPIC_PATH_TEMPLATE = - PathTemplate.create("/projects/{project}/topics/{topic}"); + PathTemplate.create("projects/{project}/topics/{topic}"); // ======== // Members // ======== private final ManagedChannel channel; - private final ServiceApiSettings settings; + private final ServiceApiSettings settings; + private final ImmutableMap> retryCodesConfig; + private final ImmutableMap retryParamsConfig; // =============== // Factory Methods @@ -173,28 +286,47 @@ public Iterable extractResources(ListTopicSubscriptionsResponse payload) /** * Constructs an instance of PublisherApi with default settings. + * + * + * */ public static PublisherApi create() throws IOException { - return create(new ServiceApiSettings()); + return create(DEFAULT_SETTINGS); } /** * Constructs an instance of PublisherApi, 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 PublisherApi create(ServiceApiSettings settings) throws IOException { + public static PublisherApi create(ServiceApiSettings settings) + throws IOException { return new PublisherApi(settings); } /** * Constructs an instance of PublisherApi, using the given settings. This is protected so that it * easy to make a subclass, but otherwise, the static factory methods should be preferred. - */ - protected PublisherApi(ServiceApiSettings settings) throws IOException { - ServiceApiSettings internalSettings = ApiUtils.populateSettings(settings, - SERVICE_ADDRESS, DEFAULT_SERVICE_PORT, ALL_SCOPES); - this.settings = internalSettings; - this.channel = internalSettings.getChannel(); + * + * + * + */ + protected PublisherApi(ServiceApiSettings settings) throws IOException { + this.settings = settings; + this.channel = settings.getChannel(); + + Map> retryCodesConfig = + new EnumMap<>(DEFAULT_RETRY_CONFIG); + retryCodesConfig.putAll(settings.getRetryableCodes()); + this.retryCodesConfig = + Maps.>immutableEnumMap(retryCodesConfig); + + Map retryParamsConfig = new EnumMap<>(DEFAULT_RETRY_PARAMS); + retryParamsConfig.putAll(settings.getRetryParams()); + this.retryParamsConfig = + Maps.immutableEnumMap(retryParamsConfig); } // ============================== @@ -204,24 +336,31 @@ protected PublisherApi(ServiceApiSettings settings) throws IOException { /** * Creates a string containing the fully-qualified path to represent * a project resource. + * + * + * */ public static final String createProjectPath(String project) { - return PROJECT_PATH_TEMPLATE.instantiate( - "project", project); + return PROJECT_PATH_TEMPLATE.instantiate("project", project); } /** * Creates a string containing the fully-qualified path to represent * a topic resource. + * + * + * */ public static final String createTopicPath(String project, String topic) { - return TOPIC_PATH_TEMPLATE.instantiate( - "project", project,"topic", topic); + return TOPIC_PATH_TEMPLATE.instantiate("project", project, "topic", topic); } /** * Extracts the project from the given fully-qualified path which * represents a project resource. + * + * + * */ public static final String extractProjectFromProjectPath(String projectPath) { return PROJECT_PATH_TEMPLATE.parse(projectPath).get("project"); @@ -230,6 +369,9 @@ public static final String extractProjectFromProjectPath(String projectPath) { /** * Extracts the project from the given fully-qualified path which * represents a topic resource. + * + * + * */ public static final String extractProjectFromTopicPath(String topicPath) { return TOPIC_PATH_TEMPLATE.parse(topicPath).get("project"); @@ -238,12 +380,14 @@ public static final String extractProjectFromTopicPath(String topicPath) { /** * Extracts the topic from the given fully-qualified path which * represents a topic resource. + * + * + * */ public static final String extractTopicFromTopicPath(String topicPath) { return TOPIC_PATH_TEMPLATE.parse(topicPath).get("topic"); } - // ============= // Service Calls // ============= @@ -254,6 +398,9 @@ public static final String extractTopicFromTopicPath(String topicPath) { /** * Creates the given topic with the given name. * + * + * + * * @param name The name of the topic. It must have the format * `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter, * and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), @@ -262,10 +409,7 @@ public static final String extractTopicFromTopicPath(String topicPath) { * must not start with `"goog"`. */ public Topic createTopic(String name) { - Topic request = - Topic.newBuilder() - .setName(name) - .build(); + Topic request = Topic.newBuilder().setName(name).build(); return createTopic(request); } @@ -274,6 +418,9 @@ public Topic createTopic(String name) { /** * Creates the given topic with the given name. * + * + * + * * @param request The request object containing all of the parameters for the API call. */ public Topic createTopic(Topic request) { @@ -283,37 +430,48 @@ public Topic createTopic(Topic request) { // AUTO-GENERATED DOCUMENTATION AND METHOD - see instructions at the top of the file for editing. /** * Creates the given topic with the given name. + * + * + * */ public ApiCallable createTopicCallable() { - return ApiUtils.prepareIdempotentCallable(CREATE_TOPIC, settings).bind(channel); + ImmutableSet retryableCodes = retryCodesConfig.get(MethodIdentifier.CREATE_TOPIC); + RetryParams retryParams = retryParamsConfig.get(MethodIdentifier.CREATE_TOPIC); + return CREATE_TOPIC + .retryableOn(retryableCodes) + .retrying(retryParams, settings.getExecutor()) + .bind(channel); } // ----- publish ----- // AUTO-GENERATED DOCUMENTATION AND METHOD - see instructions at the top of the file for editing. /** - * Adds one or more messages to the topic. Returns NOT_FOUND if the topic does - * not exist. The message payload must not be empty; it must contain either a - * non-empty data field, or at least one attribute. + * Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic + * does not exist. The message payload must not be empty; it must contain + * either a non-empty data field, or at least one attribute. + * + * + * * * @param topic The messages in the request will be published on this topic. * @param messages The messages to publish. */ public PublishResponse publish(String topic, List messages) { PublishRequest request = - PublishRequest.newBuilder() - .setTopic(topic) - .addAllMessages(messages) - .build(); + PublishRequest.newBuilder().setTopic(topic).addAllMessages(messages).build(); return publish(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD - see instructions at the top of the file for editing. /** - * Adds one or more messages to the topic. Returns NOT_FOUND if the topic does - * not exist. The message payload must not be empty; it must contain either a - * non-empty data field, or at least one attribute. + * Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic + * does not exist. The message payload must not be empty; it must contain + * either a non-empty data field, or at least one attribute. + * + * + * * * @param request The request object containing all of the parameters for the API call. */ @@ -323,12 +481,20 @@ public PublishResponse publish(PublishRequest request) { // AUTO-GENERATED DOCUMENTATION AND METHOD - see instructions at the top of the file for editing. /** - * Adds one or more messages to the topic. Returns NOT_FOUND if the topic does - * not exist. The message payload must not be empty; it must contain either a - * non-empty data field, or at least one attribute. + * Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic + * does not exist. The message payload must not be empty; it must contain + * either a non-empty data field, or at least one attribute. + * + * + * */ public ApiCallable publishCallable() { - return PUBLISH.bind(channel); + ImmutableSet retryableCodes = retryCodesConfig.get(MethodIdentifier.PUBLISH); + RetryParams retryParams = retryParamsConfig.get(MethodIdentifier.PUBLISH); + return PUBLISH + .retryableOn(retryableCodes) + .retrying(retryParams, settings.getExecutor()) + .bind(channel); } // ----- getTopic ----- @@ -337,13 +503,13 @@ public ApiCallable publishCallable() { /** * Gets the configuration of a topic. * + * + * + * * @param topic The name of the topic to get. */ public Topic getTopic(String topic) { - GetTopicRequest request = - GetTopicRequest.newBuilder() - .setTopic(topic) - .build(); + GetTopicRequest request = GetTopicRequest.newBuilder().setTopic(topic).build(); return getTopic(request); } @@ -352,6 +518,9 @@ public Topic getTopic(String topic) { /** * Gets the configuration of a topic. * + * + * + * * @param request The request object containing all of the parameters for the API call. */ public Topic getTopic(GetTopicRequest request) { @@ -361,9 +530,17 @@ public Topic getTopic(GetTopicRequest request) { // AUTO-GENERATED DOCUMENTATION AND METHOD - see instructions at the top of the file for editing. /** * Gets the configuration of a topic. + * + * + * */ public ApiCallable getTopicCallable() { - return ApiUtils.prepareIdempotentCallable(GET_TOPIC, settings).bind(channel); + ImmutableSet retryableCodes = retryCodesConfig.get(MethodIdentifier.GET_TOPIC); + RetryParams retryParams = retryParamsConfig.get(MethodIdentifier.GET_TOPIC); + return GET_TOPIC + .retryableOn(retryableCodes) + .retrying(retryParams, settings.getExecutor()) + .bind(channel); } // ----- listTopics ----- @@ -371,12 +548,12 @@ public ApiCallable getTopicCallable() { // AUTO-GENERATED DOCUMENTATION AND METHOD - see instructions at the top of the file for editing. /** * Lists matching topics. + * + * + * */ public Iterable listTopics(String project) { - ListTopicsRequest request = - ListTopicsRequest.newBuilder() - .setProject(project) - .build(); + ListTopicsRequest request = ListTopicsRequest.newBuilder().setProject(project).build(); return listTopics(request); } @@ -384,27 +561,40 @@ public Iterable listTopics(String project) { /** * Lists matching topics. * + * + * + * * @param request The request object containing all of the parameters for the API call. */ public Iterable listTopics(ListTopicsRequest request) { - return listTopicsStreamingCallable() - .iterableResponseStreamCall(request); + return listTopicsStreamingCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD - see instructions at the top of the file for editing. /** * Lists matching topics. + * + * + * */ - public ApiCallable listTopicsStreamingCallable() { + public ApiCallable> listTopicsStreamingCallable() { return listTopicsCallable().pageStreaming(LIST_TOPICS_PAGE_DESC); } // AUTO-GENERATED DOCUMENTATION AND METHOD - see instructions at the top of the file for editing. /** * Lists matching topics. + * + * + * */ public ApiCallable listTopicsCallable() { - return ApiUtils.prepareIdempotentCallable(LIST_TOPICS, settings).bind(channel); + ImmutableSet retryableCodes = retryCodesConfig.get(MethodIdentifier.LIST_TOPICS); + RetryParams retryParams = retryParamsConfig.get(MethodIdentifier.LIST_TOPICS); + return LIST_TOPICS + .retryableOn(retryableCodes) + .retrying(retryParams, settings.getExecutor()) + .bind(channel); } // ----- listTopicSubscriptions ----- @@ -412,12 +602,13 @@ public ApiCallable listTopicsCallable() { // AUTO-GENERATED DOCUMENTATION AND METHOD - see instructions at the top of the file for editing. /** * Lists the name of the subscriptions for this topic. + * + * + * */ public Iterable listTopicSubscriptions(String topic) { ListTopicSubscriptionsRequest request = - ListTopicSubscriptionsRequest.newBuilder() - .setTopic(topic) - .build(); + ListTopicSubscriptionsRequest.newBuilder().setTopic(topic).build(); return listTopicSubscriptions(request); } @@ -425,58 +616,77 @@ public Iterable listTopicSubscriptions(String topic) { /** * Lists the name of the subscriptions for this topic. * + * + * + * * @param request The request object containing all of the parameters for the API call. */ public Iterable listTopicSubscriptions(ListTopicSubscriptionsRequest request) { - return listTopicSubscriptionsStreamingCallable() - .iterableResponseStreamCall(request); + return listTopicSubscriptionsStreamingCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD - see instructions at the top of the file for editing. /** * Lists the name of the subscriptions for this topic. + * + * + * */ - public ApiCallable listTopicSubscriptionsStreamingCallable() { + public ApiCallable> + listTopicSubscriptionsStreamingCallable() { return listTopicSubscriptionsCallable().pageStreaming(LIST_TOPIC_SUBSCRIPTIONS_PAGE_DESC); } // AUTO-GENERATED DOCUMENTATION AND METHOD - see instructions at the top of the file for editing. /** * Lists the name of the subscriptions for this topic. - */ - public ApiCallable listTopicSubscriptionsCallable() { - return ApiUtils.prepareIdempotentCallable(LIST_TOPIC_SUBSCRIPTIONS, settings).bind(channel); + * + * + * + */ + public ApiCallable + listTopicSubscriptionsCallable() { + ImmutableSet retryableCodes = + retryCodesConfig.get(MethodIdentifier.LIST_TOPIC_SUBSCRIPTIONS); + RetryParams retryParams = retryParamsConfig.get(MethodIdentifier.LIST_TOPIC_SUBSCRIPTIONS); + return LIST_TOPIC_SUBSCRIPTIONS + .retryableOn(retryableCodes) + .retrying(retryParams, settings.getExecutor()) + .bind(channel); } // ----- deleteTopic ----- // AUTO-GENERATED DOCUMENTATION AND METHOD - see instructions at the top of the file for editing. /** - * Deletes the topic with the given name. Returns NOT_FOUND if the topic does - * not exist. After a topic is deleted, a new topic may be created with the - * same name; this is an entirely new topic with none of the old + * Deletes the topic with the given name. Returns `NOT_FOUND` if the topic + * does not exist. After a topic is deleted, a new topic may be created with + * the same name; this is an entirely new topic with none of the old * configuration or subscriptions. Existing subscriptions to this topic are * not deleted, but their `topic` field is set to `_deleted-topic_`. * + * + * + * * @param topic Name of the topic to delete. */ public void deleteTopic(String topic) { - DeleteTopicRequest request = - DeleteTopicRequest.newBuilder() - .setTopic(topic) - .build(); + DeleteTopicRequest request = DeleteTopicRequest.newBuilder().setTopic(topic).build(); deleteTopic(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD - see instructions at the top of the file for editing. /** - * Deletes the topic with the given name. Returns NOT_FOUND if the topic does - * not exist. After a topic is deleted, a new topic may be created with the - * same name; this is an entirely new topic with none of the old + * Deletes the topic with the given name. Returns `NOT_FOUND` if the topic + * does not exist. After a topic is deleted, a new topic may be created with + * the same name; this is an entirely new topic with none of the old * configuration or subscriptions. Existing subscriptions to this topic are * not deleted, but their `topic` field is set to `_deleted-topic_`. * + * + * + * * @param request The request object containing all of the parameters for the API call. */ public void deleteTopic(DeleteTopicRequest request) { @@ -485,17 +695,24 @@ public void deleteTopic(DeleteTopicRequest request) { // AUTO-GENERATED DOCUMENTATION AND METHOD - see instructions at the top of the file for editing. /** - * Deletes the topic with the given name. Returns NOT_FOUND if the topic does - * not exist. After a topic is deleted, a new topic may be created with the - * same name; this is an entirely new topic with none of the old + * Deletes the topic with the given name. Returns `NOT_FOUND` if the topic + * does not exist. After a topic is deleted, a new topic may be created with + * the same name; this is an entirely new topic with none of the old * configuration or subscriptions. Existing subscriptions to this topic are * not deleted, but their `topic` field is set to `_deleted-topic_`. + * + * + * */ public ApiCallable deleteTopicCallable() { - return ApiUtils.prepareIdempotentCallable(DELETE_TOPIC, settings).bind(channel); + ImmutableSet retryableCodes = retryCodesConfig.get(MethodIdentifier.DELETE_TOPIC); + RetryParams retryParams = retryParamsConfig.get(MethodIdentifier.DELETE_TOPIC); + return DELETE_TOPIC + .retryableOn(retryableCodes) + .retrying(retryParams, settings.getExecutor()) + .bind(channel); } - // ======== // Cleanup // ======== @@ -503,6 +720,9 @@ public ApiCallable deleteTopicCallable() { /** * Initiates an orderly shutdown in which preexisting calls continue but new calls are immediately * cancelled. + * + * + * */ @Override public void close() { @@ -514,7 +734,6 @@ public void close() { // Manually-added shutdown code } - // ======== // Manually-added methods: add custom (non-generated) methods after this point. // ======== diff --git a/gcloud-java-pubsub/src/main/java/com/google/gcloud/pubsub/spi/SubscriberApi.java b/gcloud-java-pubsub/src/main/java/com/google/gcloud/pubsub/spi/SubscriberApi.java index ff320597ddf7..91387c8a9771 100644 --- a/gcloud-java-pubsub/src/main/java/com/google/gcloud/pubsub/spi/SubscriberApi.java +++ b/gcloud-java-pubsub/src/main/java/com/google/gcloud/pubsub/spi/SubscriberApi.java @@ -26,11 +26,25 @@ * Allowed modifications - currently these are the only types allowed: * 1. New methods (these should be added to the end of the class) * 2. New imports + * 3. Additional documentation between "manual edit" demarcations * * Happy editing! */ package com.google.gcloud.pubsub.spi; +import com.google.api.gax.core.BackoffParams; +import com.google.api.gax.core.ConnectionSettings; +import com.google.api.gax.core.RetryParams; +import com.google.api.gax.grpc.ApiCallable; +import com.google.api.gax.grpc.PageDescriptor; +import com.google.api.gax.grpc.ServiceApiSettings; +import com.google.api.gax.protobuf.PathTemplate; +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.common.collect.Maps; +import com.google.common.collect.Sets; import com.google.protobuf.Empty; import com.google.pubsub.v1.AcknowledgeRequest; import com.google.pubsub.v1.DeleteSubscriptionRequest; @@ -44,109 +58,212 @@ import com.google.pubsub.v1.PushConfig; import com.google.pubsub.v1.SubscriberGrpc; import com.google.pubsub.v1.Subscription; - -import io.gapi.gax.grpc.ApiCallable; -import io.gapi.gax.grpc.PageDescriptor; -import io.gapi.gax.grpc.ServiceApiSettings; -import io.gapi.gax.internal.ApiUtils; -import io.gapi.gax.protobuf.PathTemplate; import io.grpc.ManagedChannel; - +import io.grpc.Status; import java.io.IOException; +import java.util.EnumMap; +import java.util.HashMap; import java.util.List; +import java.util.Map; // Manually-added imports: add custom (non-generated) imports after this point. - - // AUTO-GENERATED DOCUMENTATION AND SERVICE - see instructions at the top of the file for editing. /** * The service that an application uses to manipulate subscriptions and to - * consume messages from a subscription via the Pull method. + * consume messages from a subscription via the `Pull` method. + * + * + * */ @javax.annotation.Generated("by the veneer generator") public class SubscriberApi implements AutoCloseable { + public enum MethodIdentifier { + CREATE_SUBSCRIPTION, + GET_SUBSCRIPTION, + LIST_SUBSCRIPTIONS, + DELETE_SUBSCRIPTION, + MODIFY_ACK_DEADLINE, + ACKNOWLEDGE, + PULL, + MODIFY_PUSH_CONFIG + } + // ========= // Constants // ========= /** * The default address of the service. + * + * + * */ - public static final String SERVICE_ADDRESS = "pubsub-experimental.googleapis.com"; + public static final String DEFAULT_SERVICE_ADDRESS = "pubsub-experimental.googleapis.com"; /** * The default port of the service. + * + * + * */ public static final int DEFAULT_SERVICE_PORT = 443; - - private static final ApiCallable - CREATE_SUBSCRIPTION = ApiCallable.create(SubscriberGrpc.METHOD_CREATE_SUBSCRIPTION); - private static final ApiCallable - GET_SUBSCRIPTION = ApiCallable.create(SubscriberGrpc.METHOD_GET_SUBSCRIPTION); + /** + * The default scopes of the service. + */ + public static ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder() + .add("https://www.googleapis.com/auth/pubsub") + .add("https://www.googleapis.com/auth/cloud-platform") + .build(); + + /** + * The default settings for the service. + */ + public static ServiceApiSettings DEFAULT_SETTINGS = + ServiceApiSettings.builder() + .provideChannelWith( + ConnectionSettings.builder() + .setServiceAddress(DEFAULT_SERVICE_ADDRESS) + .setPort(DEFAULT_SERVICE_PORT) + .provideCredentialsWith(DEFAULT_SERVICE_SCOPES) + .build()) + .build(); + + private static final ImmutableMap> + DEFAULT_RETRY_CONFIG; + + static { + Map> definition = new HashMap<>(); + definition.put( + "idempotent", + Sets.immutableEnumSet( + Lists.newArrayList( + Status.Code.DEADLINE_EXCEEDED, Status.Code.UNAVAILABLE))); + definition.put("non_idempotent", Sets.immutableEnumSet(Lists.newArrayList())); + + Map> retryableCodes = + new EnumMap<>(MethodIdentifier.class); + retryableCodes.put(MethodIdentifier.CREATE_SUBSCRIPTION, definition.get("non_idempotent")); + retryableCodes.put(MethodIdentifier.GET_SUBSCRIPTION, definition.get("idempotent")); + retryableCodes.put(MethodIdentifier.LIST_SUBSCRIPTIONS, definition.get("idempotent")); + retryableCodes.put(MethodIdentifier.DELETE_SUBSCRIPTION, definition.get("idempotent")); + retryableCodes.put(MethodIdentifier.MODIFY_ACK_DEADLINE, definition.get("non_idempotent")); + retryableCodes.put(MethodIdentifier.ACKNOWLEDGE, definition.get("non_idempotent")); + retryableCodes.put(MethodIdentifier.PULL, definition.get("non_idempotent")); + retryableCodes.put(MethodIdentifier.MODIFY_PUSH_CONFIG, definition.get("non_idempotent")); + DEFAULT_RETRY_CONFIG = + Maps.>immutableEnumMap(retryableCodes); + } + + private static final ImmutableMap DEFAULT_RETRY_PARAMS; + + static { + Map definition = new HashMap<>(); + RetryParams params = null; + params = + RetryParams.newBuilder() + .setRetryBackoff( + BackoffParams.newBuilder() + .setInitialDelayMillis(100L) + .setDelayMultiplier(1.2) + .setMaxDelayMillis(1000L) + .build()) + .setTimeoutBackoff( + BackoffParams.newBuilder() + .setInitialDelayMillis(300L) + .setDelayMultiplier(1.3) + .setMaxDelayMillis(3000L) + .build()) + .setTotalTimeout(30000L) + .build(); + definition.put("default", params); + + Map retryParams = new EnumMap<>(MethodIdentifier.class); + retryParams.put(MethodIdentifier.CREATE_SUBSCRIPTION, definition.get("default")); + retryParams.put(MethodIdentifier.GET_SUBSCRIPTION, definition.get("default")); + retryParams.put(MethodIdentifier.LIST_SUBSCRIPTIONS, definition.get("default")); + retryParams.put(MethodIdentifier.DELETE_SUBSCRIPTION, definition.get("default")); + retryParams.put(MethodIdentifier.MODIFY_ACK_DEADLINE, definition.get("default")); + retryParams.put(MethodIdentifier.ACKNOWLEDGE, definition.get("default")); + retryParams.put(MethodIdentifier.PULL, definition.get("default")); + retryParams.put(MethodIdentifier.MODIFY_PUSH_CONFIG, definition.get("default")); + DEFAULT_RETRY_PARAMS = Maps.immutableEnumMap(retryParams); + } + + private static final ApiCallable CREATE_SUBSCRIPTION = + ApiCallable.create(SubscriberGrpc.METHOD_CREATE_SUBSCRIPTION); + private static final ApiCallable GET_SUBSCRIPTION = + ApiCallable.create(SubscriberGrpc.METHOD_GET_SUBSCRIPTION); private static final ApiCallable LIST_SUBSCRIPTIONS = ApiCallable.create(SubscriberGrpc.METHOD_LIST_SUBSCRIPTIONS); - private static final ApiCallable - DELETE_SUBSCRIPTION = ApiCallable.create(SubscriberGrpc.METHOD_DELETE_SUBSCRIPTION); - private static final ApiCallable - MODIFY_ACK_DEADLINE = ApiCallable.create(SubscriberGrpc.METHOD_MODIFY_ACK_DEADLINE); - private static final ApiCallable - ACKNOWLEDGE = ApiCallable.create(SubscriberGrpc.METHOD_ACKNOWLEDGE); - private static final ApiCallable - PULL = ApiCallable.create(SubscriberGrpc.METHOD_PULL); - private static final ApiCallable - MODIFY_PUSH_CONFIG = ApiCallable.create(SubscriberGrpc.METHOD_MODIFY_PUSH_CONFIG); - - private static PageDescriptor LIST_SUBSCRIPTIONS_PAGE_DESC = - new PageDescriptor() { - @Override - public Object emptyToken() { - return ""; - } - @Override - public ListSubscriptionsRequest injectToken( - ListSubscriptionsRequest payload, Object token) { - return ListSubscriptionsRequest - .newBuilder(payload) - .setPageToken((String) token) - .build(); - } - @Override - public Object extractNextToken(ListSubscriptionsResponse payload) { - return payload.getNextPageToken(); - } - @Override - public Iterable extractResources(ListSubscriptionsResponse payload) { - return payload.getSubscriptionsList(); - } - }; - - private static String ALL_SCOPES[] = { - "https://www.googleapis.com/auth/pubsub" - }; + private static final ApiCallable DELETE_SUBSCRIPTION = + ApiCallable.create(SubscriberGrpc.METHOD_DELETE_SUBSCRIPTION); + private static final ApiCallable MODIFY_ACK_DEADLINE = + ApiCallable.create(SubscriberGrpc.METHOD_MODIFY_ACK_DEADLINE); + private static final ApiCallable ACKNOWLEDGE = + ApiCallable.create(SubscriberGrpc.METHOD_ACKNOWLEDGE); + private static final ApiCallable PULL = + ApiCallable.create(SubscriberGrpc.METHOD_PULL); + private static final ApiCallable MODIFY_PUSH_CONFIG = + ApiCallable.create(SubscriberGrpc.METHOD_MODIFY_PUSH_CONFIG); + + private static PageDescriptor + LIST_SUBSCRIPTIONS_PAGE_DESC = + new PageDescriptor() { + @Override + public Object emptyToken() { + return ""; + } + + @Override + public ListSubscriptionsRequest injectToken( + ListSubscriptionsRequest payload, Object token) { + return ListSubscriptionsRequest.newBuilder(payload) + .setPageToken((String) token) + .build(); + } + + @Override + public Object extractNextToken(ListSubscriptionsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListSubscriptionsResponse payload) { + return payload.getSubscriptionsList(); + } + }; /** * A PathTemplate representing the fully-qualified path to represent * a project resource. + * + * + * */ private static final PathTemplate PROJECT_PATH_TEMPLATE = - PathTemplate.create("/projects/{project}"); - + PathTemplate.create("projects/{project}"); /** * A PathTemplate representing the fully-qualified path to represent * a subscription resource. + * + * + * */ private static final PathTemplate SUBSCRIPTION_PATH_TEMPLATE = - PathTemplate.create("/projects/{project}/subscriptions/{subscription}"); + PathTemplate.create("projects/{project}/subscriptions/{subscription}"); // ======== // Members // ======== private final ManagedChannel channel; - private final ServiceApiSettings settings; + private final ServiceApiSettings settings; + private final ImmutableMap> retryCodesConfig; + private final ImmutableMap retryParamsConfig; // =============== // Factory Methods @@ -154,28 +271,47 @@ public Iterable extractResources(ListSubscriptionsResponse payload /** * Constructs an instance of SubscriberApi with default settings. + * + * + * */ public static SubscriberApi create() throws IOException { - return create(new ServiceApiSettings()); + return create(DEFAULT_SETTINGS); } /** * Constructs an instance of SubscriberApi, 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 SubscriberApi create(ServiceApiSettings settings) throws IOException { + public static SubscriberApi create(ServiceApiSettings settings) + throws IOException { return new SubscriberApi(settings); } /** * Constructs an instance of SubscriberApi, using the given settings. This is protected so that it * easy to make a subclass, but otherwise, the static factory methods should be preferred. + * + * + * */ - protected SubscriberApi(ServiceApiSettings settings) throws IOException { - ServiceApiSettings internalSettings = ApiUtils.populateSettings(settings, - SERVICE_ADDRESS, DEFAULT_SERVICE_PORT, ALL_SCOPES); - this.settings = internalSettings; - this.channel = internalSettings.getChannel(); + protected SubscriberApi(ServiceApiSettings settings) throws IOException { + this.settings = settings; + this.channel = settings.getChannel(); + + Map> retryCodesConfig = + new EnumMap<>(DEFAULT_RETRY_CONFIG); + retryCodesConfig.putAll(settings.getRetryableCodes()); + this.retryCodesConfig = + Maps.>immutableEnumMap(retryCodesConfig); + + Map retryParamsConfig = new EnumMap<>(DEFAULT_RETRY_PARAMS); + retryParamsConfig.putAll(settings.getRetryParams()); + this.retryParamsConfig = + Maps.immutableEnumMap(retryParamsConfig); } // ============================== @@ -185,24 +321,31 @@ protected SubscriberApi(ServiceApiSettings settings) throws IOException { /** * Creates a string containing the fully-qualified path to represent * a project resource. + * + * + * */ public static final String createProjectPath(String project) { - return PROJECT_PATH_TEMPLATE.instantiate( - "project", project); + return PROJECT_PATH_TEMPLATE.instantiate("project", project); } /** * Creates a string containing the fully-qualified path to represent * a subscription resource. + * + * + * */ public static final String createSubscriptionPath(String project, String subscription) { - return SUBSCRIPTION_PATH_TEMPLATE.instantiate( - "project", project,"subscription", subscription); + return SUBSCRIPTION_PATH_TEMPLATE.instantiate("project", project, "subscription", subscription); } /** * Extracts the project from the given fully-qualified path which * represents a project resource. + * + * + * */ public static final String extractProjectFromProjectPath(String projectPath) { return PROJECT_PATH_TEMPLATE.parse(projectPath).get("project"); @@ -211,6 +354,9 @@ public static final String extractProjectFromProjectPath(String projectPath) { /** * Extracts the project from the given fully-qualified path which * represents a subscription resource. + * + * + * */ public static final String extractProjectFromSubscriptionPath(String subscriptionPath) { return SUBSCRIPTION_PATH_TEMPLATE.parse(subscriptionPath).get("project"); @@ -219,12 +365,14 @@ public static final String extractProjectFromSubscriptionPath(String subscriptio /** * Extracts the subscription from the given fully-qualified path which * represents a subscription resource. + * + * + * */ public static final String extractSubscriptionFromSubscriptionPath(String subscriptionPath) { return SUBSCRIPTION_PATH_TEMPLATE.parse(subscriptionPath).get("subscription"); } - // ============= // Service Calls // ============= @@ -234,12 +382,15 @@ public static final String extractSubscriptionFromSubscriptionPath(String subscr // AUTO-GENERATED DOCUMENTATION AND METHOD - see instructions at the top of the file for editing. /** * Creates a subscription to a given topic for a given subscriber. - * If the subscription already exists, returns ALREADY_EXISTS. - * If the corresponding topic doesn't exist, returns NOT_FOUND. + * If the subscription already exists, returns `ALREADY_EXISTS`. + * If the corresponding topic doesn't exist, returns `NOT_FOUND`. * * If the name is not provided in the request, the server will assign a random * name for this subscription on the same project as the topic. * + * + * + * * @param name The name of the subscription. It must have the format * `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must * start with a letter, and contain only letters (`[A-Za-z]`), numbers @@ -250,7 +401,7 @@ public static final String extractSubscriptionFromSubscriptionPath(String subscr * The value of this field will be `_deleted-topic_` if the topic has been * deleted. * @param pushConfig If push delivery is used with this subscription, this field is - * used to configure it. An empty pushConfig signifies that the subscriber + * used to configure it. An empty `pushConfig` signifies that the subscriber * will pull and ack messages using API methods. * @param ackDeadlineSeconds This value is the maximum time after a subscriber receives a message * before the subscriber should acknowledge the message. After message @@ -258,9 +409,10 @@ public static final String extractSubscriptionFromSubscriptionPath(String subscr * acknowledged, it is an outstanding message and will not be delivered * again during that time (on a best-effort basis). * - * For pull delivery this value is used as the initial value for the ack + * For pull subscriptions, this value is used as the initial value for the ack * deadline. To override this value for a given message, call - * ModifyAckDeadline with the corresponding ack_id. + * `ModifyAckDeadline` with the corresponding `ack_id` if using + * pull. * * For push delivery, this value is also used to set the request timeout for * the call to the push endpoint. @@ -270,14 +422,15 @@ public static final String extractSubscriptionFromSubscriptionPath(String subscr * * If this parameter is not set, the default value of 10 seconds is used. */ - public Subscription createSubscription(String name, String topic, PushConfig pushConfig, int ackDeadlineSeconds) { + public Subscription createSubscription( + String name, String topic, PushConfig pushConfig, int ackDeadlineSeconds) { Subscription request = Subscription.newBuilder() - .setName(name) - .setTopic(topic) - .setPushConfig(pushConfig) - .setAckDeadlineSeconds(ackDeadlineSeconds) - .build(); + .setName(name) + .setTopic(topic) + .setPushConfig(pushConfig) + .setAckDeadlineSeconds(ackDeadlineSeconds) + .build(); return createSubscription(request); } @@ -285,12 +438,15 @@ public Subscription createSubscription(String name, String topic, PushConfig pus // AUTO-GENERATED DOCUMENTATION AND METHOD - see instructions at the top of the file for editing. /** * Creates a subscription to a given topic for a given subscriber. - * If the subscription already exists, returns ALREADY_EXISTS. - * If the corresponding topic doesn't exist, returns NOT_FOUND. + * If the subscription already exists, returns `ALREADY_EXISTS`. + * If the corresponding topic doesn't exist, returns `NOT_FOUND`. * * If the name is not provided in the request, the server will assign a random * name for this subscription on the same project as the topic. * + * + * + * * @param request The request object containing all of the parameters for the API call. */ public Subscription createSubscription(Subscription request) { @@ -300,14 +456,23 @@ public Subscription createSubscription(Subscription request) { // AUTO-GENERATED DOCUMENTATION AND METHOD - see instructions at the top of the file for editing. /** * Creates a subscription to a given topic for a given subscriber. - * If the subscription already exists, returns ALREADY_EXISTS. - * If the corresponding topic doesn't exist, returns NOT_FOUND. + * If the subscription already exists, returns `ALREADY_EXISTS`. + * If the corresponding topic doesn't exist, returns `NOT_FOUND`. * * If the name is not provided in the request, the server will assign a random * name for this subscription on the same project as the topic. + * + * + * */ public ApiCallable createSubscriptionCallable() { - return ApiUtils.prepareIdempotentCallable(CREATE_SUBSCRIPTION, settings).bind(channel); + ImmutableSet retryableCodes = + retryCodesConfig.get(MethodIdentifier.CREATE_SUBSCRIPTION); + RetryParams retryParams = retryParamsConfig.get(MethodIdentifier.CREATE_SUBSCRIPTION); + return CREATE_SUBSCRIPTION + .retryableOn(retryableCodes) + .retrying(retryParams, settings.getExecutor()) + .bind(channel); } // ----- getSubscription ----- @@ -316,13 +481,14 @@ public ApiCallable createSubscriptionCallable() { /** * Gets the configuration details of a subscription. * + * + * + * * @param subscription The name of the subscription to get. */ public Subscription getSubscription(String subscription) { GetSubscriptionRequest request = - GetSubscriptionRequest.newBuilder() - .setSubscription(subscription) - .build(); + GetSubscriptionRequest.newBuilder().setSubscription(subscription).build(); return getSubscription(request); } @@ -331,6 +497,9 @@ public Subscription getSubscription(String subscription) { /** * Gets the configuration details of a subscription. * + * + * + * * @param request The request object containing all of the parameters for the API call. */ public Subscription getSubscription(GetSubscriptionRequest request) { @@ -340,9 +509,18 @@ public Subscription getSubscription(GetSubscriptionRequest request) { // AUTO-GENERATED DOCUMENTATION AND METHOD - see instructions at the top of the file for editing. /** * Gets the configuration details of a subscription. + * + * + * */ public ApiCallable getSubscriptionCallable() { - return ApiUtils.prepareIdempotentCallable(GET_SUBSCRIPTION, settings).bind(channel); + ImmutableSet retryableCodes = + retryCodesConfig.get(MethodIdentifier.GET_SUBSCRIPTION); + RetryParams retryParams = retryParamsConfig.get(MethodIdentifier.GET_SUBSCRIPTION); + return GET_SUBSCRIPTION + .retryableOn(retryableCodes) + .retrying(retryParams, settings.getExecutor()) + .bind(channel); } // ----- listSubscriptions ----- @@ -350,12 +528,13 @@ public ApiCallable getSubscriptionCallable // AUTO-GENERATED DOCUMENTATION AND METHOD - see instructions at the top of the file for editing. /** * Lists matching subscriptions. + * + * + * */ public Iterable listSubscriptions(String project) { ListSubscriptionsRequest request = - ListSubscriptionsRequest.newBuilder() - .setProject(project) - .build(); + ListSubscriptionsRequest.newBuilder().setProject(project).build(); return listSubscriptions(request); } @@ -363,27 +542,43 @@ public Iterable listSubscriptions(String project) { /** * Lists matching subscriptions. * + * + * + * * @param request The request object containing all of the parameters for the API call. */ public Iterable listSubscriptions(ListSubscriptionsRequest request) { - return listSubscriptionsStreamingCallable() - .iterableResponseStreamCall(request); + return listSubscriptionsStreamingCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD - see instructions at the top of the file for editing. /** * Lists matching subscriptions. + * + * + * */ - public ApiCallable listSubscriptionsStreamingCallable() { + public ApiCallable> + listSubscriptionsStreamingCallable() { return listSubscriptionsCallable().pageStreaming(LIST_SUBSCRIPTIONS_PAGE_DESC); } // AUTO-GENERATED DOCUMENTATION AND METHOD - see instructions at the top of the file for editing. /** * Lists matching subscriptions. + * + * + * */ - public ApiCallable listSubscriptionsCallable() { - return ApiUtils.prepareIdempotentCallable(LIST_SUBSCRIPTIONS, settings).bind(channel); + public ApiCallable + listSubscriptionsCallable() { + ImmutableSet retryableCodes = + retryCodesConfig.get(MethodIdentifier.LIST_SUBSCRIPTIONS); + RetryParams retryParams = retryParamsConfig.get(MethodIdentifier.LIST_SUBSCRIPTIONS); + return LIST_SUBSCRIPTIONS + .retryableOn(retryableCodes) + .retrying(retryParams, settings.getExecutor()) + .bind(channel); } // ----- deleteSubscription ----- @@ -391,18 +586,19 @@ public ApiCallable listSubs // AUTO-GENERATED DOCUMENTATION AND METHOD - see instructions at the top of the file for editing. /** * Deletes an existing subscription. All pending messages in the subscription - * are immediately dropped. Calls to Pull after deletion will return - * NOT_FOUND. After a subscription is deleted, a new one may be created with + * are immediately dropped. Calls to `Pull` after deletion will return + * `NOT_FOUND`. After a subscription is deleted, a new one may be created with * the same name, but the new one has no association with the old * subscription, or its topic unless the same topic is specified. * + * + * + * * @param subscription The subscription to delete. */ public void deleteSubscription(String subscription) { DeleteSubscriptionRequest request = - DeleteSubscriptionRequest.newBuilder() - .setSubscription(subscription) - .build(); + DeleteSubscriptionRequest.newBuilder().setSubscription(subscription).build(); deleteSubscription(request); } @@ -410,11 +606,14 @@ public void deleteSubscription(String subscription) { // AUTO-GENERATED DOCUMENTATION AND METHOD - see instructions at the top of the file for editing. /** * Deletes an existing subscription. All pending messages in the subscription - * are immediately dropped. Calls to Pull after deletion will return - * NOT_FOUND. After a subscription is deleted, a new one may be created with + * are immediately dropped. Calls to `Pull` after deletion will return + * `NOT_FOUND`. After a subscription is deleted, a new one may be created with * the same name, but the new one has no association with the old * subscription, or its topic unless the same topic is specified. * + * + * + * * @param request The request object containing all of the parameters for the API call. */ public void deleteSubscription(DeleteSubscriptionRequest request) { @@ -424,49 +623,64 @@ public void deleteSubscription(DeleteSubscriptionRequest request) { // AUTO-GENERATED DOCUMENTATION AND METHOD - see instructions at the top of the file for editing. /** * Deletes an existing subscription. All pending messages in the subscription - * are immediately dropped. Calls to Pull after deletion will return - * NOT_FOUND. After a subscription is deleted, a new one may be created with + * are immediately dropped. Calls to `Pull` after deletion will return + * `NOT_FOUND`. After a subscription is deleted, a new one may be created with * the same name, but the new one has no association with the old * subscription, or its topic unless the same topic is specified. + * + * + * */ public ApiCallable deleteSubscriptionCallable() { - return ApiUtils.prepareIdempotentCallable(DELETE_SUBSCRIPTION, settings).bind(channel); + ImmutableSet retryableCodes = + retryCodesConfig.get(MethodIdentifier.DELETE_SUBSCRIPTION); + RetryParams retryParams = retryParamsConfig.get(MethodIdentifier.DELETE_SUBSCRIPTION); + return DELETE_SUBSCRIPTION + .retryableOn(retryableCodes) + .retrying(retryParams, settings.getExecutor()) + .bind(channel); } // ----- modifyAckDeadline ----- // AUTO-GENERATED DOCUMENTATION AND METHOD - see instructions at the top of the file for editing. /** - * Modifies the ack deadline for a specific message. This method is useful to - * indicate that more time is needed to process a message by the subscriber, - * or to make the message available for redelivery if the processing was - * interrupted. + * Modifies the ack deadline for a specific message. This method is useful + * to indicate that more time is needed to process a message by the + * subscriber, or to make the message available for redelivery if the + * processing was interrupted. + * + * + * * * @param subscription The name of the subscription. * @param ackIds List of acknowledgment IDs. - * @param ackDeadlineSeconds The new ack deadline with respect to the time this request was sent to the - * Pub/Sub system. Must be >= 0. For example, if the value is 10, the new ack - * deadline will expire 10 seconds after the ModifyAckDeadline call was made. - * Specifying zero may immediately make the message available for another pull - * request. + * @param ackDeadlineSeconds The new ack deadline with respect to the time this request was sent to + * the Pub/Sub system. Must be >= 0. For example, if the value is 10, the new + * ack deadline will expire 10 seconds after the `ModifyAckDeadline` call + * was made. Specifying zero may immediately make the message available for + * another pull request. */ public void modifyAckDeadline(String subscription, List ackIds, int ackDeadlineSeconds) { ModifyAckDeadlineRequest request = ModifyAckDeadlineRequest.newBuilder() - .setSubscription(subscription) - .addAllAckIds(ackIds) - .setAckDeadlineSeconds(ackDeadlineSeconds) - .build(); + .setSubscription(subscription) + .addAllAckIds(ackIds) + .setAckDeadlineSeconds(ackDeadlineSeconds) + .build(); modifyAckDeadline(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD - see instructions at the top of the file for editing. /** - * Modifies the ack deadline for a specific message. This method is useful to - * indicate that more time is needed to process a message by the subscriber, - * or to make the message available for redelivery if the processing was - * interrupted. + * Modifies the ack deadline for a specific message. This method is useful + * to indicate that more time is needed to process a message by the + * subscriber, or to make the message available for redelivery if the + * processing was interrupted. + * + * + * * * @param request The request object containing all of the parameters for the API call. */ @@ -476,51 +690,63 @@ public void modifyAckDeadline(ModifyAckDeadlineRequest request) { // AUTO-GENERATED DOCUMENTATION AND METHOD - see instructions at the top of the file for editing. /** - * Modifies the ack deadline for a specific message. This method is useful to - * indicate that more time is needed to process a message by the subscriber, - * or to make the message available for redelivery if the processing was - * interrupted. + * Modifies the ack deadline for a specific message. This method is useful + * to indicate that more time is needed to process a message by the + * subscriber, or to make the message available for redelivery if the + * processing was interrupted. + * + * + * */ public ApiCallable modifyAckDeadlineCallable() { - return MODIFY_ACK_DEADLINE.bind(channel); + ImmutableSet retryableCodes = + retryCodesConfig.get(MethodIdentifier.MODIFY_ACK_DEADLINE); + RetryParams retryParams = retryParamsConfig.get(MethodIdentifier.MODIFY_ACK_DEADLINE); + return MODIFY_ACK_DEADLINE + .retryableOn(retryableCodes) + .retrying(retryParams, settings.getExecutor()) + .bind(channel); } // ----- acknowledge ----- // AUTO-GENERATED DOCUMENTATION AND METHOD - see instructions at the top of the file for editing. /** - * Acknowledges the messages associated with the ack tokens in the - * AcknowledgeRequest. The Pub/Sub system can remove the relevant messages + * Acknowledges the messages associated with the `ack_ids` in the + * `AcknowledgeRequest`. The Pub/Sub system can remove the relevant messages * from the subscription. * * Acknowledging a message whose ack deadline has expired may succeed, * but such a message may be redelivered later. Acknowledging a message more * than once will not result in an error. * + * + * + * * @param subscription The subscription whose message is being acknowledged. * @param ackIds The acknowledgment ID for the messages being acknowledged that was returned - * by the Pub/Sub system in the Pull response. Must not be empty. + * by the Pub/Sub system in the `Pull` response. Must not be empty. */ public void acknowledge(String subscription, List ackIds) { AcknowledgeRequest request = - AcknowledgeRequest.newBuilder() - .setSubscription(subscription) - .addAllAckIds(ackIds) - .build(); + AcknowledgeRequest.newBuilder().setSubscription(subscription).addAllAckIds(ackIds).build(); acknowledge(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD - see instructions at the top of the file for editing. /** - * Acknowledges the messages associated with the ack tokens in the - * AcknowledgeRequest. The Pub/Sub system can remove the relevant messages + * Acknowledges the messages associated with the `ack_ids` in the + * `AcknowledgeRequest`. The Pub/Sub system can remove the relevant messages * from the subscription. * * Acknowledging a message whose ack deadline has expired may succeed, * but such a message may be redelivered later. Acknowledging a message more * than once will not result in an error. * + * + * + * * @param request The request object containing all of the parameters for the API call. */ public void acknowledge(AcknowledgeRequest request) { @@ -529,16 +755,24 @@ public void acknowledge(AcknowledgeRequest request) { // AUTO-GENERATED DOCUMENTATION AND METHOD - see instructions at the top of the file for editing. /** - * Acknowledges the messages associated with the ack tokens in the - * AcknowledgeRequest. The Pub/Sub system can remove the relevant messages + * Acknowledges the messages associated with the `ack_ids` in the + * `AcknowledgeRequest`. The Pub/Sub system can remove the relevant messages * from the subscription. * * Acknowledging a message whose ack deadline has expired may succeed, * but such a message may be redelivered later. Acknowledging a message more * than once will not result in an error. + * + * + * */ public ApiCallable acknowledgeCallable() { - return ACKNOWLEDGE.bind(channel); + ImmutableSet retryableCodes = retryCodesConfig.get(MethodIdentifier.ACKNOWLEDGE); + RetryParams retryParams = retryParamsConfig.get(MethodIdentifier.ACKNOWLEDGE); + return ACKNOWLEDGE + .retryableOn(retryableCodes) + .retrying(retryParams, settings.getExecutor()) + .bind(channel); } // ----- pull ----- @@ -546,13 +780,16 @@ public ApiCallable acknowledgeCallable() { // AUTO-GENERATED DOCUMENTATION AND METHOD - see instructions at the top of the file for editing. /** * Pulls messages from the server. Returns an empty list if there are no - * messages available in the backlog. The server may return UNAVAILABLE if + * messages available in the backlog. The server may return `UNAVAILABLE` if * there are too many concurrent pull requests pending for the given * subscription. * + * + * + * * @param subscription The subscription from which messages should be pulled. * @param returnImmediately If this is specified as true the system will respond immediately even if - * it is not able to return a message in the Pull response. Otherwise the + * it is not able to return a message in the `Pull` response. Otherwise the * system is allowed to wait until at least one message is available rather * than returning no messages. The client may cancel the request if it does * not wish to wait any longer for the response. @@ -562,10 +799,10 @@ public ApiCallable acknowledgeCallable() { public PullResponse pull(String subscription, boolean returnImmediately, int maxMessages) { PullRequest request = PullRequest.newBuilder() - .setSubscription(subscription) - .setReturnImmediately(returnImmediately) - .setMaxMessages(maxMessages) - .build(); + .setSubscription(subscription) + .setReturnImmediately(returnImmediately) + .setMaxMessages(maxMessages) + .build(); return pull(request); } @@ -573,10 +810,13 @@ public PullResponse pull(String subscription, boolean returnImmediately, int max // AUTO-GENERATED DOCUMENTATION AND METHOD - see instructions at the top of the file for editing. /** * Pulls messages from the server. Returns an empty list if there are no - * messages available in the backlog. The server may return UNAVAILABLE if + * messages available in the backlog. The server may return `UNAVAILABLE` if * there are too many concurrent pull requests pending for the given * subscription. * + * + * + * * @param request The request object containing all of the parameters for the API call. */ public PullResponse pull(PullRequest request) { @@ -586,53 +826,64 @@ public PullResponse pull(PullRequest request) { // AUTO-GENERATED DOCUMENTATION AND METHOD - see instructions at the top of the file for editing. /** * Pulls messages from the server. Returns an empty list if there are no - * messages available in the backlog. The server may return UNAVAILABLE if + * messages available in the backlog. The server may return `UNAVAILABLE` if * there are too many concurrent pull requests pending for the given * subscription. + * + * + * */ public ApiCallable pullCallable() { - return PULL.bind(channel); + ImmutableSet retryableCodes = retryCodesConfig.get(MethodIdentifier.PULL); + RetryParams retryParams = retryParamsConfig.get(MethodIdentifier.PULL); + return PULL.retryableOn(retryableCodes) + .retrying(retryParams, settings.getExecutor()) + .bind(channel); } // ----- modifyPushConfig ----- // AUTO-GENERATED DOCUMENTATION AND METHOD - see instructions at the top of the file for editing. /** - * Modifies the PushConfig for a specified subscription. + * Modifies the `PushConfig` for a specified subscription. * - * This may be used to change a push subscription to a pull one (signified - * by an empty PushConfig) or vice versa, or change the endpoint URL and other - * attributes of a push subscription. Messages will accumulate for - * delivery continuously through the call regardless of changes to the - * PushConfig. + * This may be used to change a push subscription to a pull one (signified by + * an empty `PushConfig`) or vice versa, or change the endpoint URL and other + * attributes of a push subscription. Messages will accumulate for delivery + * continuously through the call regardless of changes to the `PushConfig`. + * + * + * * * @param subscription The name of the subscription. * @param pushConfig The push configuration for future deliveries. * - * An empty pushConfig indicates that the Pub/Sub system should + * An empty `pushConfig` indicates that the Pub/Sub system should * stop pushing messages from the given subscription and allow * messages to be pulled and acknowledged - effectively pausing - * the subscription if Pull is not called. + * the subscription if `Pull` is not called. */ public void modifyPushConfig(String subscription, PushConfig pushConfig) { ModifyPushConfigRequest request = ModifyPushConfigRequest.newBuilder() - .setSubscription(subscription) - .setPushConfig(pushConfig) - .build(); + .setSubscription(subscription) + .setPushConfig(pushConfig) + .build(); modifyPushConfig(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD - see instructions at the top of the file for editing. /** - * Modifies the PushConfig for a specified subscription. + * Modifies the `PushConfig` for a specified subscription. * - * This may be used to change a push subscription to a pull one (signified - * by an empty PushConfig) or vice versa, or change the endpoint URL and other - * attributes of a push subscription. Messages will accumulate for - * delivery continuously through the call regardless of changes to the - * PushConfig. + * This may be used to change a push subscription to a pull one (signified by + * an empty `PushConfig`) or vice versa, or change the endpoint URL and other + * attributes of a push subscription. Messages will accumulate for delivery + * continuously through the call regardless of changes to the `PushConfig`. + * + * + * * * @param request The request object containing all of the parameters for the API call. */ @@ -642,19 +893,26 @@ public void modifyPushConfig(ModifyPushConfigRequest request) { // AUTO-GENERATED DOCUMENTATION AND METHOD - see instructions at the top of the file for editing. /** - * Modifies the PushConfig for a specified subscription. + * Modifies the `PushConfig` for a specified subscription. + * + * This may be used to change a push subscription to a pull one (signified by + * an empty `PushConfig`) or vice versa, or change the endpoint URL and other + * attributes of a push subscription. Messages will accumulate for delivery + * continuously through the call regardless of changes to the `PushConfig`. * - * This may be used to change a push subscription to a pull one (signified - * by an empty PushConfig) or vice versa, or change the endpoint URL and other - * attributes of a push subscription. Messages will accumulate for - * delivery continuously through the call regardless of changes to the - * PushConfig. + * + * */ public ApiCallable modifyPushConfigCallable() { - return MODIFY_PUSH_CONFIG.bind(channel); + ImmutableSet retryableCodes = + retryCodesConfig.get(MethodIdentifier.MODIFY_PUSH_CONFIG); + RetryParams retryParams = retryParamsConfig.get(MethodIdentifier.MODIFY_PUSH_CONFIG); + return MODIFY_PUSH_CONFIG + .retryableOn(retryableCodes) + .retrying(retryParams, settings.getExecutor()) + .bind(channel); } - // ======== // Cleanup // ======== @@ -662,6 +920,9 @@ public ApiCallable modifyPushConfigCallable() { /** * Initiates an orderly shutdown in which preexisting calls continue but new calls are immediately * cancelled. + * + * + * */ @Override public void close() { @@ -673,7 +934,6 @@ public void close() { // Manually-added shutdown code } - // ======== // Manually-added methods: add custom (non-generated) methods after this point. // ======== diff --git a/gcloud-java-pubsub/src/main/java/com/google/gcloud/pubsub/testing/LocalPubsubHelper.java b/gcloud-java-pubsub/src/main/java/com/google/gcloud/pubsub/testing/LocalPubsubHelper.java index b9c17e0f0831..823edba0d5a6 100644 --- a/gcloud-java-pubsub/src/main/java/com/google/gcloud/pubsub/testing/LocalPubsubHelper.java +++ b/gcloud-java-pubsub/src/main/java/com/google/gcloud/pubsub/testing/LocalPubsubHelper.java @@ -1,68 +1,104 @@ +/* + * Copyright 2015 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.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. + */ + package com.google.gcloud.pubsub.testing; -import com.google.gcloud.pubsub.spi.testing.LocalPublisherImpl; -import com.google.pubsub.v1.PublisherGrpc; +import com.google.api.gax.testing.DownloadableEmulatorRunner; +import com.google.api.gax.testing.GCloudEmulatorRunner; +import com.google.api.gax.testing.LocalServiceHelper; import io.grpc.ManagedChannel; -import io.grpc.Server; import io.grpc.netty.NegotiationType; import io.grpc.netty.NettyChannelBuilder; -import io.grpc.netty.NettyServerBuilder; -import io.netty.channel.local.LocalAddress; -import io.netty.channel.local.LocalChannel; -import io.netty.channel.local.LocalServerChannel; import java.io.IOException; -import java.net.SocketAddress; +import java.net.MalformedURLException; +import java.net.URL; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; /** - * A class that runs an in-memory Publisher instance for use in tests. + * A class that runs a Pubsub emulator instance for use in tests. */ public class LocalPubsubHelper { - private static int FLOW_CONTROL_WINDOW = 65 * 1024; + private final LocalServiceHelper serviceHelper; + private final List gcloudCommand; + private final URL emulatorUrl; + + // Local server settings + private static final int DEFAULT_PORT = 8080; + private static final String DEFAULT_HOST = "localhost"; + + // GCloud emulator settings + private static final String GCLOUD_CMD_TEXT = "gcloud beta emulators pubsub start --host-port"; + private static final String VERSION_PREFIX = "pubsub-emulator"; + private static final String MIN_VERSION = "2016.01.13"; - private final SocketAddress address; - private final Server server; - private final LocalPublisherImpl publisherImpl; + // Downloadable emulator settings + private static final String FILENAME = "pubsub-emulator-20160113-2.zip"; + private static final String BIN_NAME = "pubsub-emulator/bin/cloud-pubsub-fake"; + private static final String MD5_CHECKSUM = "20943e9defa300f2de101568459c133d"; /** * Constructs a new LocalPubsubHelper. The method start() must * be called before it is used. + * @throws MalformedURLException */ - public LocalPubsubHelper(String addressString) { - address = new LocalAddress(addressString); - publisherImpl = new LocalPublisherImpl(); - NettyServerBuilder builder = NettyServerBuilder - .forAddress(address) - .flowControlWindow(FLOW_CONTROL_WINDOW) - .channelType(LocalServerChannel.class); - builder.addService(PublisherGrpc.bindService(publisherImpl)); - server = builder.build(); + public LocalPubsubHelper() throws MalformedURLException { + gcloudCommand = new ArrayList<>(Arrays.asList(GCLOUD_CMD_TEXT.split(" "))); + gcloudCommand.add(DEFAULT_HOST); + emulatorUrl = + new URL("http://storage.googleapis.com/pubsub/tools/" + FILENAME); + GCloudEmulatorRunner gcloudRunner = + new GCloudEmulatorRunner(gcloudCommand, VERSION_PREFIX, MIN_VERSION); + DownloadableEmulatorRunner downloadRunner = + new DownloadableEmulatorRunner(Arrays.asList(BIN_NAME), emulatorUrl, MD5_CHECKSUM); + serviceHelper = + new LocalServiceHelper(Arrays.asList(gcloudRunner, downloadRunner), DEFAULT_PORT); } /** - * Starts the in-memory service. + * Start the local pubsub emulator through gcloud, download the zip file if user does not have + * gcloud installed. + * @throws InterruptedException + * @throws IOException */ - public void start() { - try { - server.start(); - } catch (IOException ex) { - throw new RuntimeException(ex); - } + public void start() throws IOException, InterruptedException { + String blockUntilOutput = Integer.toString(DEFAULT_PORT); + serviceHelper.start(blockUntilOutput); } /** - * Resets the state of the in-memory service. + * Reset the internal state of the emulator. + * @throws InterruptedException + * @throws IOException */ - public void reset() { - publisherImpl.reset(); + public void reset() throws IOException, InterruptedException { + this.serviceHelper.sendPostRequest("/reset"); } /** - * Returns the internal in-memory service. + * Quit the local emulator and related local service. + * @throws InterruptedException + * @throws IOException */ - public LocalPublisherImpl getPublisherImpl() { - return publisherImpl; + public void stop() throws IOException, InterruptedException { + this.serviceHelper.sendPostRequest("/shutdown"); + this.serviceHelper.stop(); } /** @@ -70,16 +106,8 @@ public LocalPublisherImpl getPublisherImpl() { */ public ManagedChannel createChannel() { return NettyChannelBuilder - .forAddress(address) + .forAddress(DEFAULT_HOST, DEFAULT_PORT) .negotiationType(NegotiationType.PLAINTEXT) - .channelType(LocalChannel.class) .build(); } - - /** - * Shuts down the in-memory service. - */ - public void shutdownNow() { - server.shutdownNow(); - } } diff --git a/gcloud-java-pubsub/src/test/java/com/google/gcloud/pubsub/spi/PublisherApiTest.java b/gcloud-java-pubsub/src/test/java/com/google/gcloud/pubsub/spi/PublisherApiTest.java index 38e337890aa1..05a2f2acb9e2 100644 --- a/gcloud-java-pubsub/src/test/java/com/google/gcloud/pubsub/spi/PublisherApiTest.java +++ b/gcloud-java-pubsub/src/test/java/com/google/gcloud/pubsub/spi/PublisherApiTest.java @@ -17,14 +17,10 @@ import com.google.gcloud.pubsub.testing.LocalPubsubHelper; import com.google.protobuf.ByteString; import com.google.pubsub.v1.PubsubMessage; +import com.google.pubsub.v1.PullResponse; +import com.google.pubsub.v1.PushConfig; import com.google.pubsub.v1.Topic; -import io.gapi.gax.grpc.ServiceApiSettings; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - import org.junit.After; import org.junit.AfterClass; import org.junit.Assert; @@ -32,27 +28,45 @@ import org.junit.BeforeClass; import org.junit.Test; +import com.google.api.gax.grpc.ServiceApiSettings; + +import io.grpc.ManagedChannel; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + public class PublisherApiTest { private static LocalPubsubHelper pubsubHelper; private PublisherApi publisherApi; + private SubscriberApi subscriberApi; @BeforeClass - public static void startStaticServer() { - pubsubHelper = new LocalPubsubHelper("in-process-1"); + public static void startServer() throws IOException, InterruptedException { + pubsubHelper = new LocalPubsubHelper(); pubsubHelper.start(); } @AfterClass - public static void stopServer() { - pubsubHelper.shutdownNow(); + public static void stopServer() throws IOException, InterruptedException { + pubsubHelper.stop(); } @Before public void setUp() throws Exception { - pubsubHelper.reset(); - ServiceApiSettings settings = new ServiceApiSettings(); - settings.setChannel(pubsubHelper.createChannel()); - publisherApi = PublisherApi.create(settings); + ManagedChannel channel = pubsubHelper.createChannel(); + + publisherApi = + PublisherApi.create( + ServiceApiSettings.builder() + .provideChannelWith(channel) + .build()); + subscriberApi = + SubscriberApi.create( + ServiceApiSettings.builder() + .provideChannelWith(channel) + .build()); } @After @@ -60,6 +74,9 @@ public void tearDown() throws Exception { if (publisherApi != null) { publisherApi.close(); } + if (subscriberApi != null) { + subscriberApi.close(); + } pubsubHelper.reset(); } @@ -68,22 +85,25 @@ public void testCreateTopic() throws Exception { String topicName = PublisherApi.createTopicPath("my-project", "my-topic"); Topic result = publisherApi.createTopic(topicName); Assert.assertEquals(topicName, result.getName()); - Assert.assertEquals(1, pubsubHelper.getPublisherImpl().getTopics().size()); - Assert.assertNotNull(pubsubHelper.getPublisherImpl().getTopics().get(topicName)); } @Test public void testPublish() throws Exception { String topicName = PublisherApi.createTopicPath("my-project", "publish-topic"); publisherApi.createTopic(topicName); - PubsubMessage msg = PubsubMessage.newBuilder() - .setData(ByteString.copyFromUtf8("pubsub-message")) - .build(); + + String subscriberName = SubscriberApi.createSubscriptionPath("my-project", "my-subscribe"); + PushConfig config = PushConfig.getDefaultInstance(); + subscriberApi.createSubscription(subscriberName, topicName, config, 5); + + PubsubMessage msg = + PubsubMessage.newBuilder().setData(ByteString.copyFromUtf8("pubsub-message")).build(); publisherApi.publish(topicName, Collections.singletonList(msg)); - List publishedMessages = - pubsubHelper.getPublisherImpl().getTopics().get(topicName); - Assert.assertEquals(1, publishedMessages.size()); - Assert.assertEquals("pubsub-message", publishedMessages.get(0).getData().toStringUtf8()); + + PullResponse response = subscriberApi.pull(subscriberName, true, 100); + Assert.assertEquals(1, response.getReceivedMessagesCount()); + Assert.assertEquals( + "pubsub-message", response.getReceivedMessages(0).getMessage().getData().toStringUtf8()); } @Test @@ -115,9 +135,14 @@ public void testListTopics() throws Exception { @Test public void testDeleteTopic() throws Exception { + String project = PublisherApi.createProjectPath("project.1"); String topicName = PublisherApi.createTopicPath("my-project", "fun-topic"); publisherApi.createTopic(topicName); publisherApi.deleteTopic(topicName); - Assert.assertEquals(0, pubsubHelper.getPublisherImpl().getTopics().size()); + List topics = new ArrayList<>(); + for (Topic topic : publisherApi.listTopics(project)) { + topics.add(topic); + } + Assert.assertEquals(0, topics.size()); } } From 25dbeefd736d6ad723e14544aa49f23fc2eff48a Mon Sep 17 00:00:00 2001 From: Garrett Jones Date: Tue, 23 Feb 2016 16:12:11 -0800 Subject: [PATCH 4/5] Fixing root build --- pom.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/pom.xml b/pom.xml index 01e1c0d2888f..3cfa57b45c96 100644 --- a/pom.xml +++ b/pom.xml @@ -99,7 +99,6 @@ gcloud-java-core gcloud-java-datastore gcloud-java-examples - gcloud-java-gax gcloud-java-pubsub gcloud-java-resourcemanager gcloud-java-storage From 6b78851d5fb4b53cca6c000f72f56e9e1deeeb76 Mon Sep 17 00:00:00 2001 From: Garrett Jones Date: Wed, 24 Feb 2016 10:37:44 -0800 Subject: [PATCH 5/5] Using version of GAX compatible with Java 1.7 --- gcloud-java-pubsub/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcloud-java-pubsub/pom.xml b/gcloud-java-pubsub/pom.xml index cec635adca31..d8a1f905633e 100644 --- a/gcloud-java-pubsub/pom.xml +++ b/gcloud-java-pubsub/pom.xml @@ -19,7 +19,7 @@ com.google.api gax - 0.0.1 + 0.0.2 com.google.api.grpc